[Libreoffice-commits] .: oox/source
oox/source/drawingml/customshapepresets4.cxx | 217 +++ oox/source/export/shapes.cxx |1 2 files changed, 218 insertions(+) New commits: commit d9a18176d6b56119aa91699cd3aa102e36a7805c Author: Lennard wassert...@nefkom.net 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 wassert...@nefkom.net Conflicts: oox/source/drawingml/customshapepresets4.cxx Change-Id: I8b9ce3ae1aef7894ab04b9857e90831d715ec1d5 Reviewed-on: https://gerrit.libreoffice.org/1492 Reviewed-by: Petr Mladek pmla...@suse.cz Tested-by: Petr Mladek pmla...@suse.cz 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
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 r...@novell.com 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
oox/source/mathml/importutils.cxx | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) New commits: commit a577418d9f9fe0e622f60a5b61a6fadc98d819a9 Author: Miklos Vajna vmik...@suse.cz 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 oox/token/namespaces.hxx #include rtl/ustring.hxx -// *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( / ) + namespacename + STR( : ) + tokenname + STR ( ); +return / + namespacename + : + tokenname + ; // 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
oox/source/drawingml/table/tablecell.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit fd447c820f3f42cb16f5af28572fe7a9047b6481 Author: Radek Doulik r...@novell.com 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
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 guilherme@gmail.com 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 guilherme@gmail.com Reviewed-on: https://gerrit.libreoffice.org/1556 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz 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
[Libreoffice-commits] .: oox/source
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 guilherme@gmail.com 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 guilherme@gmail.com Reviewed-on: https://gerrit.libreoffice.org/1520 Reviewed-by: LOH KOK HOE huahsi...@gmail.com Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz 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 +++
[Libreoffice-commits] .: oox/source
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 guilherme@gmail.com Date: Wed Dec 26 01:06:08 2012 -0200 OUString cleanup in oox Change-Id: Id3c121acddd515621325c93735bb3dd88592749e Signed-off-by: José Guilherme Vanz guilherme@gmail.com Reviewed-on: https://gerrit.libreoffice.org/1485 Reviewed-by: Muthu Subramanian K muthus...@gmail.com Tested-by: Muthu Subramanian K muthus...@gmail.com 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(SELECT MULTIPLE) ); -static String sSelected( RTL_CONSTASCII_USTRINGPARAM(OPTION SELECTED) ); +static OUString sMultiple( SELECT MULTIPLE ); +static OUString sSelected( OPTION SELECTED ); OUString sStringContents = rInStrm.readUnicodeArray( rInStrm.size() ); -String data = sStringContents; +OUString data = sStringContents; // replace crlf with lf -data.SearchAndReplaceAll( String( RTL_CONSTASCII_USTRINGPARAM( \x0D\x0A ) ), String( RTL_CONSTASCII_USTRINGPARAM( \x0A ) ) ); -std::vector rtl::OUString 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 (
[Libreoffice-commits] .: oox/source
oox/source/export/drawingml.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit e481740cc894ea21c8e7a49100d56ca572a21a76 Author: Muthu Subramanian sumu...@suse.com 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
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 guilherme@gmail.com 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 guilherme@gmail.com Reviewed-on: https://gerrit.libreoffice.org/1335 Reviewed-by: LuboÅ¡ LuÅák l.lu...@suse.cz Tested-by: LuboÅ¡ LuÅák l.lu...@suse.cz 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
[Libreoffice-commits] .: oox/source
oox/source/export/drawingml.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1385f3736c0b80b7c31c03c457808db2ca4725d9 Author: LuboÅ¡ LuÅák l.lu...@suse.cz 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
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 guilherme@gmail.com 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 guilherme@gmail.com Reviewed-on: https://gerrit.libreoffice.org/1430 Reviewed-by: Norbert Thiebaud nthieb...@gmail.com Tested-by: Norbert Thiebaud nthieb...@gmail.com 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
[Libreoffice-commits] .: oox/source
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 guilherme@gmail.com 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 guilherme@gmail.com Reviewed-on: https://gerrit.libreoffice.org/1334 Reviewed-by: Olivier Hallot olivier.hal...@alta.org.br Tested-by: Olivier Hallot olivier.hal...@alta.org.br 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 ) ) ) +
[Libreoffice-commits] .: oox/source ucb/source
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 serval2...@yahoo.fr 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
oox/source/vml/vmlshapecontainer.cxx |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) New commits: commit 5931dbb53ebb2ff1e5670ad6537a41f996c0277c Author: Julien Nabet serval2...@yahoo.fr 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
oox/source/vml/vmltextboxcontext.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 5bc835d48f1e5373b3a31bd166fadfdf19b3588f Author: Miklos Vajna vmik...@suse.cz 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
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 guilherme@gmail.com 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 guilherme@gmail.com Reviewed-on: https://gerrit.libreoffice.org/1259 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com 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 iostream #include fstream -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
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 guilherme@gmail.com 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 guilherme@gmail.com Reviewed-on: https://gerrit.libreoffice.org/1260 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com 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 com/sun/star/drawing/TextHorizontalAdjust.hpp #include com/sun/star/text/XText.hpp -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 +++
[Libreoffice-commits] .: oox/source sc/source
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 kohei.yosh...@gmail.com 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( vectorScTokenRef 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_castconst ScToken*(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_castconst ScToken*(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; -
[Libreoffice-commits] .: oox/source
oox/source/drawingml/chart/titlecontext.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit f0b22ccfdd94e557b4c3db5e0aea570341d8830c Author: Kohei Yoshida kohei.yosh...@gmail.com 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
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 guilherme@gmail.com 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 guilherme@gmail.com Reviewed-on: https://gerrit.libreoffice.org/1212 Reviewed-by: Olivier Hallot olivier.hal...@alta.org.br Tested-by: Olivier Hallot olivier.hal...@alta.org.br 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() ) {
[Libreoffice-commits] .: oox/source
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 guilherme@gmail.com 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 guilherme@gmail.com Reviewed-on: https://gerrit.libreoffice.org/1211 Reviewed-by: Olivier Hallot olivier.hal...@alta.org.br Tested-by: Olivier Hallot olivier.hal...@alta.org.br 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::Sequencesal_Int8( (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::Sequencesal_Int8( (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
[Libreoffice-commits] .: oox/source
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 timofeev@gmail.com 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
[Libreoffice-commits] .: oox/source
oox/source/export/drawingml.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 28315fb6a40dd0f43990272b11037f60d26afda7 Author: Radek Doulik r...@novell.com 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
oox/source/helper/binaryoutputstream.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 1f90b032a6d8f2fce49334190e321b81832e3466 Author: Tor Lillqvist t...@iki.fi 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
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 noel.po...@suse.com 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 com/sun/star/awt/Rectangle.hpp #include com/sun/star/awt/Size.hpp -#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 ---
[Libreoffice-commits] .: oox/source
oox/source/helper/attributelist.cxx |4 1 file changed, 4 insertions(+) New commits: commit 1aafcb90209ebdfdeb974fad8bdc28ebfffaa486 Author: Michael Meeks michael.me...@suse.com 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
oox/source/vml/vmlshape.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 2fd5586337fc7b1048160582abff4aafc6a33902 Author: LuboÅ¡ LuÅák l.lu...@suse.cz 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
oox/source/ppt/slidefragmenthandler.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9c248f9265747351f32bf52d608a91393bfdf1e2 Author: Tor Lillqvist tlillqv...@suse.com 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
oox/source/drawingml/textbodypropertiescontext.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d6f6086f850720d77b48b06b51e873d90e9ad5ee Author: Muthu Subramanian sumu...@suse.com 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 xmloff/source
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 lohmaier+libreoff...@googlemail.com 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 sberg...@redhat.com Tested-by: Stephan Bergmann sberg...@redhat.com 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
oox/source/vml/vmlformatting.cxx | 45 --- 1 file changed, 28 insertions(+), 17 deletions(-) New commits: commit 64dc5a0c6d7ef1169fe09a0377106e98f71ce6f7 Author: Pierre-Eric Pelloux-Prayer pierre-e...@lanedo.com 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 nthieb...@gmail.com Reviewed-by: Petr Mladek pmla...@suse.cz Tested-by: Petr Mladek pmla...@suse.cz 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 rtl/strbuf.hxx @@ -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
[Libreoffice-commits] .: oox/source
oox/source/vml/vmlshape.cxx |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) New commits: commit b0176f6245b996cdfabdce7ca299b95e4b64bb88 Author: Pierre-Eric Pelloux-Prayer pierre-e...@lanedo.com 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 pmla...@suse.cz Tested-by: Petr Mladek pmla...@suse.cz 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
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 vmik...@suse.cz 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 @@ namespace
[Libreoffice-commits] .: oox/source
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 sumu...@suse.com 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 com/sun/star/awt/XBitmap.hpp #include com/sun/star/graphic/XGraphic.hpp #include com/sun/star/beans/PropertyValue.hpp +#include com/sun/star/style/TabStop.hpp #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
oox/source/drawingml/textparagraphproperties.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d8628e87e989668ade0045cfd219912c1579b27b Author: Caolán McNamara caol...@redhat.com 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
oox/source/drawingml/shape.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e1d8f611021d04a0f48101d8416bd0f1ff3eb07c Author: Radek Doulik r...@novell.com 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
oox/source/ppt/slidefragmenthandler.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4874a0dcbfe56028d5ac7f44bb994837eb003c35 Author: Radek Doulik r...@novell.com 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
oox/source/ppt/slidefragmenthandler.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit e9960f36675a025c0536dec30ae56c50f4adecb1 Author: Radek Doulik r...@novell.com 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
oox/source/export/drawingml.cxx | 21 + 1 file changed, 21 insertions(+) New commits: commit fdb42c397f1d15d05a74492a233df72d832cab1c Author: Noel Power noel.po...@suse.com 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
oox/source/docprop/ooxmldocpropimport.cxx | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) New commits: commit 0671ba1329adf142c26c20a36b4845aea05fe08e Author: Fridrich Å trba fridrich.st...@bluewin.ch 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
oox/source/export/chartexport.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit f3b2fc9be23739cec600b349e6b28b71be9acc3d Author: Radek Doulik r...@novell.com 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
oox/source/vml/vmlshape.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit b5a1db961372b3fa66724ee580726c67e7683dbc Author: Miklos Vajna vmik...@suse.cz 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
oox/source/vml/vmlformatting.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 891746ed955b110960113ba0de3a51335af50d66 Author: Miklos Vajna vmik...@suse.cz 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
oox/source/drawingml/textliststyle.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9057689742c28279bc09844acfd8dbd64d3244d7 Author: Muthu Subramanian sumu...@suse.com 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
oox/source/docprop/ooxmldocpropimport.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9748670e040e993d66eb777225772e62d0ca2b4e Author: Muthu Subramanian sumu...@suse.com 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
oox/source/docprop/ooxmldocpropimport.cxx | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) New commits: commit 0f0bd022b6f8ae89655a6e47964842086a9beb80 Author: Muthu Subramanian sumu...@suse.com 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
oox/source/vml/vmlshape.cxx |4 1 file changed, 4 insertions(+) New commits: commit 711958d8afcf7704b19e8f656aeac3cd7569e0f5 Author: Pierre-Eric Pelloux-Prayer pierre-e...@lanedo.com 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 l.lu...@suse.cz Tested-by: LuboÅ¡ LuÅák l.lu...@suse.cz 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
oox/source/drawingml/table/tablecell.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 309658bd85fd21daade42be1f1909d944a1e8c20 Author: Muthu Subramanian sumu...@suse.com 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
[Libreoffice-commits] .: oox/source
oox/source/drawingml/textparagraph.cxx |6 -- 1 file changed, 6 deletions(-) New commits: commit f2b1841ae3f082921ea0db44a0e6d4d7b0d92041 Author: Felix Zhang fezh...@suse.com 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
Re: [Libreoffice-commits] .: oox/source
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 sumu...@suse.com 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
oox/source/export/shapes.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 57e8f53e4f6ecfbedef4d2922935a7f7b2f467b3 Author: Radek Doulik r...@novell.com 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
oox/source/export/shapes.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit de77d83c15be81a194cb98f6470e52369ad578f6 Author: Radek Doulik r...@novell.com 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
oox/source/drawingml/table/tablecell.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 36233b158b5de6c474f06c8c8772f0012b191baa Author: Muthu Subramanian sumu...@suse.com 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
oox/source/helper/propertymap.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit e3c2e0fab67bbb812e8c693aab987fb5c374e5e0 Author: Stephan Bergmann sberg...@redhat.com 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
oox/source/dump/dumperbase.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6aff9717426db96f41ab04cd96da2b5d074625e1 Author: Stephan Bergmann sberg...@redhat.com 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_castchar *(i)[j] = reinterpret_castchar const *(f)[j]; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/ppt/slidefragmenthandler.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 752c83258899be8b3541e25933905393b9c38698 Author: Muthu Subramanian sumu...@suse.com 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
oox/source/ppt/slidefragmenthandler.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 711976fbd0da490ef0d7a9bf45a44eeb1dfb9e7c Author: David Tardon dtar...@redhat.com 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
oox/source/vml/vmlshapecontext.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 750a9c408f9a2bd1454f567ca1fcbb6381be1570 Author: Julien Nabet serval2...@yahoo.fr 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
oox/source/vml/vmlshape.cxx | 38 +++--- 1 file changed, 23 insertions(+), 15 deletions(-) New commits: commit f3ed8b8b152a16e8a6a8f11587ebd74c6dadad60 Author: Miklos Vajna vmik...@suse.cz 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
oox/source/shape/ShapeContextHandler.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit e5fdaa259157c062b5481226e54e6a02bfbeca0d Author: LuboÅ¡ LuÅák l.lu...@suse.cz 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
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 vmik...@suse.cz 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 com/sun/star/xml/sax/XFastSAXSerializable.hpp + #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::Referencexml::sax::XFastSAXSerializable xDoc(mxFilterBase-importFragment(aThemeFragmentPath), uno::UNO_QUERY_THROW); +mxFilterBase-importFragment(new ThemeFragmentHandler(*mxFilterBase, aThemeFragmentPath, *mpThemePtr ), xDoc); +ShapeFilterBase* pShapeFilterBase(dynamic_castShapeFilterBase*(mxFilterBase.get())); +if (pShapeFilterBase) +pShapeFilterBase-setCurrentTheme(mpThemePtr); +} + createFastChildContext(Element, Attribs); +} uno::ReferenceXFastContextHandler 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. +
[Libreoffice-commits] .: oox/source
oox/source/drawingml/textparagraph.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 25d7dffde13ecf32df1cce521a91c7075f372167 Author: Miklos Vajna vmik...@suse.cz 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
oox/source/drawingml/textparagraphproperties.cxx | 25 ++- 1 file changed, 16 insertions(+), 9 deletions(-) New commits: commit 9dc26ca9461dbb539c523c8bd68ce171aab25d90 Author: Miklos Vajna vmik...@suse.cz 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
oox/source/token/properties.txt |1 + oox/source/vml/vmlshape.cxx |9 + 2 files changed, 10 insertions(+) New commits: commit 229f6e187bd85d0af47da9feffef2d9ac7f83120 Author: Miklos Vajna vmik...@suse.cz 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::Referencelang::XServiceInfo 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
oox/source/shape/ShapeContextHandler.cxx | 26 ++ oox/source/shape/ShapeContextHandler.hxx |2 ++ 2 files changed, 28 insertions(+) New commits: commit 467f335161d0d098c167612fb530f3abe3b2cef4 Author: Miklos Vajna vmik...@suse.cz 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::Referencexml::sax::XFastContextHandler +ShapeContextHandler::getDiagramShapeContext() +{ +if (!mxDiagramShapeContext.is()) +{ +FragmentHandlerRef rFragmentHandler(new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath)); +mpShape.reset(new Shape()); +mxDiagramShapeContext.set(new DiagramGraphicDataContext(*rFragmentHandler, mpShape)); +} + +return mxDiagramShapeContext; +} + +uno::Referencexml::sax::XFastContextHandler ShapeContextHandler::getContextHandler() { uno::Referencexml::sax::XFastContextHandler 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::ReferenceXFastContextHandler 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::ReferenceXFastContextHandler mxDrawingFragmentHandler; css::uno::ReferenceXFastContextHandler mxGraphicShapeContext; +css::uno::ReferenceXFastContextHandler mxDiagramShapeContext; core::XmlFilterRef mxFilterBase; drawingml::ThemePtr mpThemePtr; @@ -168,6 +169,7 @@ private: css::uno::ReferenceXFastContextHandler getGraphicShapeContext(::sal_Int32 Element); css::uno::ReferenceXFastContextHandler getDrawingShapeContext(); +css::uno::ReferenceXFastContextHandler getDiagramShapeContext(); css::uno::ReferenceXFastContextHandler getContextHandler(); }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
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 l.lu...@suse.cz 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::Referencexml::sax::XFastContextHandler -ShapeContextHandler::getDiagramShapeContext() -{ -if (!mxDiagramShapeContext.is()) -{ -FragmentHandlerRef rFragmentHandler(new ShapeFragmentHandler(*mxFilterBase, msRelationFragmentPath)); -mpShape.reset(new Shape()); -mxDiagramShapeContext.set(new DiagramGraphicDataContext(*rFragmentHandler, mpShape)); -} - -return mxDiagramShapeContext; -} - -uno::Referencexml::sax::XFastContextHandler ShapeContextHandler::getContextHandler() { uno::Referencexml::sax::XFastContextHandler 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::ReferenceXFastContextHandler 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::ReferenceXFastContextHandler mxDrawingFragmentHandler; css::uno::ReferenceXFastContextHandler mxGraphicShapeContext; -css::uno::ReferenceXFastContextHandler mxDiagramShapeContext; core::XmlFilterRef mxFilterBase; drawingml::ThemePtr mpThemePtr; @@ -169,7 +168,6 @@ private: css::uno::ReferenceXFastContextHandler getGraphicShapeContext(::sal_Int32 Element); css::uno::ReferenceXFastContextHandler getDrawingShapeContext(); -css::uno::ReferenceXFastContextHandler getDiagramShapeContext(); css::uno::ReferenceXFastContextHandler getContextHandler(); }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/chart/objectformatter.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit ef4d2a80ee726faa91b3fc2402126813d92666ef Author: Muthu Subramanian sumu...@suse.com 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
oox/source/drawingml/textparagraphproperties.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 46083c95c9f4058cc7e9aad3c316de78446897b3 Author: Muthu Subramanian sumu...@suse.com 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
oox/source/ppt/slidefragmenthandler.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 11713989b1580799635fff997b920d9bd4bf619f Author: Muthu Subramanian sumu...@suse.com 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
oox/source/helper/textinputstream.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit c91b51edc10dae72fc1d1f4bdfe21ef70bb00fde Author: Caolán McNamara caol...@redhat.com 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
oox/source/helper/textinputstream.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit d04fb45caa46db829d21a7f9b96878655ce0f479 Author: Julien Nabet serval2...@yahoo.fr 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 sw/source
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 serval2...@yahoo.fr 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
oox/source/drawingml/shape.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit c41e9c7c0a7a986c8ad87a4b8033843803792506 Author: Radek Doulik r...@novell.com 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
[Libreoffice-commits] .: oox/source
oox/source/drawingml/shape.cxx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit b8b69ab0889e24ae385cda40b0ebbb1099a4d150 Author: Miklos Vajna vmik...@suse.cz Date: Fri Apr 13 10:43:19 2012 +0200 oox::drawingml::Shape: OSL_TRACE - SAL_INFO diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 967f57c..51803a6 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -205,7 +205,7 @@ void Shape::addShape( const awt::Rectangle* pShapeRect, ShapeIdMap* pShapeMap ) { -OSL_TRACE(Shape::addShape id: %s, rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr()); +SAL_INFO(oox, OSL_THIS_FUNC id: msId); try { @@ -233,7 +233,7 @@ void Shape::addShape( void Shape::applyShapeReference( const Shape rReferencedShape ) { -OSL_TRACE(apply shape reference: %s to shape id: %s, rtl::OUStringToOString(rReferencedShape.msId, RTL_TEXTENCODING_UTF8 ).getStr(), rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr()); +SAL_INFO(oox, apply shape reference: rReferencedShape.msId to shape id: msId); if ( rReferencedShape.mpTextBody.get() ) mpTextBody = TextBodyPtr( new TextBody( *rReferencedShape.mpTextBody.get() ) ); @@ -331,7 +331,7 @@ Reference XShape Shape::createAndInsert( basegfx::B2DHomMatrix aParentTransformation ) { bool bIsEmbMedia = false; -OSL_TRACE(Shape::createAndInsert id: %s, rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr()); +SAL_INFO(oox, OSL_THIS_FUNC id: msId); awt::Rectangle aShapeRectHmm( maPosition.X / 360, maPosition.Y / 360, maSize.Width / 360, maSize.Height / 360 ); @@ -468,7 +468,7 @@ Reference XShape Shape::createAndInsert( if ( mbHidden || mbHiddenMasterShape ) { -OSL_TRACE(invisible shape with id: %s, rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr()); +SAL_INFO(oox, invisible shape with id: msId); const OUString sVisible( CREATE_OUSTRING( Visible ) ); xSet-setPropertyValue( sVisible, Any( sal_False ) ); } @@ -561,7 +561,7 @@ Reference XShape Shape::createAndInsert( mpCustomShapePropertiesPtr-setTextRotateAngle( -nTextRotateAngle / 6 ); } -OSL_TRACE(==cscode== shape name: '%s', rtl::OUStringToOString(msName, RTL_TEXTENCODING_UTF8 ).getStr()); +SAL_INFO(oox, ==cscode== shape name: msName); mpCustomShapePropertiesPtr-pushToPropSet( rFilterBase, xSet, mxShape ); } else if( getTextBody() ) @@ -579,7 +579,7 @@ Reference XShape Shape::createAndInsert( if( pTheme ) if( const TextCharacterProperties* pCharProps = pTheme-getFontStyle( pFontRef-mnThemedIdx ) ) aCharStyleProperties.assignUsed( *pCharProps ); -OSL_TRACE(use font color); +SAL_INFO(oox, use font color); aCharStyleProperties.maCharColor.assignIfUsed( pFontRef-maPhClr ); } @@ -615,7 +615,7 @@ void Shape::moveAllToPosition( const Point rPoint ) void Shape::setMasterTextListStyle( const TextListStylePtr pMasterTextListStyle ) { -OSL_TRACE(set master text list style to shape id: %s, rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr()); +SAL_INFO(oox, set master text list style to shape id: %s msId); mpMasterTextListStyle = pMasterTextListStyle; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source svx/inc svx/source
oox/source/drawingml/customshapeproperties.cxx|1 + oox/source/token/properties.txt |1 + svx/inc/svx/EnhancedCustomShape2d.hxx |1 + svx/inc/svx/svdoashp.hxx |1 + svx/source/customshapes/EnhancedCustomShape2d.cxx |5 + svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 10 -- svx/source/svdraw/svdoashp.cxx| 11 +++ 7 files changed, 28 insertions(+), 2 deletions(-) New commits: commit 1c44b263d789b4c20e9178c6432300e301df94d6 Author: Muthu Subramanian sumu...@suse.com Date: Mon Apr 9 18:24:11 2012 +0530 fdo43752: PPTX import fix affected odp imports. Related bugs: n#719989, n#719997 diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 071f37a..90c0027 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -158,6 +158,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFi aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX ); aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY ); aPropertyMap[ PROP_TextPreRotateAngle ] = Any( mnTextRotateAngle ); +aPropertyMap[ PROP_IsPostRotateAngle ] = true; // For OpenXML Imports Sequence PropertyValue aSeq = aPropertyMap.makePropertyValueSequence(); aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq ); diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 7ad1a4c..a86df72 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -244,6 +244,7 @@ IsLoaded IsNumbering IsOutlineSymbolsSet IsPlaceholderDependent +IsPostRotateAngle IsSharedFormula IsStartOfNewPage IsTextWrapped diff --git a/svx/inc/svx/EnhancedCustomShape2d.hxx b/svx/inc/svx/EnhancedCustomShape2d.hxx index 415385c..0d9da95 100644 --- a/svx/inc/svx/EnhancedCustomShape2d.hxx +++ b/svx/inc/svx/EnhancedCustomShape2d.hxx @@ -182,6 +182,7 @@ class EnhancedCustomShape2d : public SfxItemSet sal_BoolIsFlipVert() { return bFlipV; }; sal_BoolIsFlipHorz() { return bFlipH; }; sal_Int32 GetRotateAngle() { return nRotateAngle; }; +SVX_DLLPUBLIC bool IsPostRotate() const; SVX_DLLPUBLIC SdrObject*CreateLineGeometry(); SVX_DLLPUBLIC SdrObject*CreateObject( sal_Bool bLineGeometryNeededOnly ); diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx index 013e150..0f54019 100644 --- a/svx/inc/svx/svdoashp.hxx +++ b/svx/inc/svx/svdoashp.hxx @@ -145,6 +145,7 @@ public: sal_Bool IsMirroredX() const; sal_Bool IsMirroredY() const; +bool IsPostRotate() const; void SetMirroredX( const sal_Bool bMirroredX ); void SetMirroredY( const sal_Bool bMirroredY ); diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 3087526..39a7709 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -2332,6 +2332,11 @@ void EnhancedCustomShape2d::ApplyGluePoints( SdrObject* pObj ) } } +bool EnhancedCustomShape2d::IsPostRotate() const +{ +return pCustomShapeObj-ISA( SdrObjCustomShape ) ? ((SdrObjCustomShape*)pCustomShapeObj)-IsPostRotate() : false; +} + SdrObject* EnhancedCustomShape2d::CreateLineGeometry() { return CreateObject( sal_True ); diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 3be2cd4..cfb8c41 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -276,6 +276,7 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL EnhancedCustomShapeEngine::rende EnhancedCustomShape2d aCustomShape2d( pSdrObjCustomShape ); sal_Int32 nRotateAngle = aCustomShape2d.GetRotateAngle(); +bool bPostRotateAngle = aCustomShape2d.IsPostRotate(); sal_Bool bFlipV = aCustomShape2d.IsFlipVert(); sal_Bool bFlipH = aCustomShape2d.IsFlipHorz(); @@ -315,6 +316,11 @@ REF( com::sun::star::drawing::XShape ) SAL_CALL EnhancedCustomShapeEngine::rende } pRenderedShape-Shear( pSdrObjCustomShape-GetSnapRect().Center(), nShearWink, nTan, sal_False); } +if( !bPostRotateAngle nRotateAngle ) +{ +double a = nRotateAngle * F_PI18000; +pRenderedShape-NbcRotate( pSdrObjCustomShape-GetSnapRect().Center(), nRotateAngle, sin( a ), cos( a ) ); +} if ( bFlipV ) { Point aLeft( aRect.Left(), ( aRect.Top() + aRect.Bottom() ) 1 ); @@ -327,8 +333,8 @@ REF(
[Libreoffice-commits] .: oox/source
oox/source/vml/vmlformatting.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c893a820c447c9014d35597a37c3220c261e35ae Author: Julien Nabet serval2...@yahoo.fr Date: Sat Apr 7 21:12:27 2012 +0200 Fix Redundant assignment of nModToken in switch diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index f7ebde4..4bc582d 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -248,7 +248,7 @@ bool lclExtractDouble( double orfValue, sal_Int32 ornEndPos, const OUString r sal_Int32 nModToken = XML_TOKEN_INVALID; switch( AttributeConversion::decodeToken( aColorIndex.copy( 0, nOpenParen ) ) ) { -case XML_darken:nModToken = XML_shade; +case XML_darken:nModToken = XML_shade;break; case XML_lighten: nModToken = XML_tint; } sal_Int32 nValue = aColorIndex.copy( nOpenParen + 1, nCloseParen - nOpenParen - 1 ).toInt32(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/fillproperties.cxx |4 ++-- oox/source/drawingml/graphicshapecontext.cxx | 21 - oox/source/drawingml/shape.cxx | 15 +-- oox/source/token/properties.txt |3 +++ 4 files changed, 38 insertions(+), 5 deletions(-) New commits: commit 8866e1986d354f0eb7eb26d78e6b6a22c6fda632 Author: Muthu Subramanian sumu...@suse.com Date: Mon Apr 2 17:33:32 2012 +0530 n747499: PPTX embedded media playback. Currently plays the embedded audio files. The image for the audio file seems to be rendered bad, currently. diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 07df75d..4a94c01 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -440,9 +440,9 @@ void GraphicProperties::pushToPropMap( PropertyMap rPropMap, const GraphicHelpe if( nContrast != 0 ) rPropMap[ PROP_AdjustContrast ] = nContrast; -// TODO: Audio content, yet to be implemented +// Media content if( !maAudio.msEmbed.isEmpty() ) -rPropMap[ PROP_Sound ] = maAudio.msEmbed; +rPropMap[ PROP_MediaURL ] = maAudio.msEmbed; } // diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index f01854c..2230a3b 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -26,6 +26,7 @@ * / +#include com/sun/star/io/XTempFile.hpp #include oox/drawingml/graphicshapecontext.hxx #include osl/diagnose.h @@ -42,6 +43,9 @@ #include oox/vml/vmlshapecontainer.hxx #include oox/drawingml/fillproperties.hxx #include oox/drawingml/transform2dcontext.hxx +#include oox/helper/binaryinputstream.hxx +#include oox/helper/binaryoutputstream.hxx +#include comphelper/processfactory.hxx using ::rtl::OUString; using namespace ::com::sun::star; @@ -77,7 +81,22 @@ Reference XFastContextHandler GraphicShapeContext::createFastChildContext( sa xRet.set( new BlipFillContext( *this, xAttribs, mpShapePtr-getGraphicProperties().maBlipProps ) ); break; case XML_wavAudioFile: -getEmbeddedWAVAudioFile( getRelations(), xAttribs, mpShapePtr-getGraphicProperties().maAudio ); +{ +getEmbeddedWAVAudioFile( getRelations(), xAttribs, mpShapePtr-getGraphicProperties().maAudio ); +if( !mpShapePtr-getGraphicProperties().maAudio.msEmbed.isEmpty() ) +{ +Reference XMultiServiceFactory xFactory = comphelper::getProcessServiceFactory(); +Reference XInputStream xInStrm( getFilter().openInputStream( mpShapePtr-getGraphicProperties().maAudio.msEmbed ), UNO_SET_THROW ); +Reference XTempFile xTempFile( xFactory-createInstance( CREATE_OUSTRING( com.sun.star.io.TempFile ) ), UNO_QUERY_THROW ); +Reference XOutputStream xOutStrm( xTempFile-getOutputStream(), UNO_SET_THROW ); +BinaryXOutputStream aOutStrm( xOutStrm, false ); +BinaryXInputStream aInStrm( xInStrm, false ); +aInStrm.copyToStream( aOutStrm ); + +xTempFile-setRemoveFile( false ); +mpShapePtr-getGraphicProperties().maAudio.msEmbed = xTempFile-getUri(); +} +} break; } diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index d9f30f7..01ee819 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -330,11 +330,22 @@ Reference XShape Shape::createAndInsert( sal_Bool bClearText, basegfx::B2DHomMatrix aParentTransformation ) { +bool bIsEmbMedia = false; OSL_TRACE(Shape::createAndInsert id: %s, rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr()); awt::Rectangle aShapeRectHmm( maPosition.X / 360, maPosition.Y / 360, maSize.Width / 360, maSize.Height / 360 ); -OUString aServiceName = finalizeServiceName( rFilterBase, rServiceName, aShapeRectHmm ); +OUString aServiceName; +if( rServiceName == OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.drawing.GraphicObjectShape) ) +mpGraphicPropertiesPtr !mpGraphicPropertiesPtr-maAudio.msEmbed.isEmpty() ) +{ +aServiceName = finalizeServiceName( rFilterBase, OUString( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.MediaShape ) ), aShapeRectHmm ); +bIsEmbMedia = true; +} +else +{ +aServiceName = finalizeServiceName( rFilterBase, rServiceName, aShapeRectHmm ); +} sal_Bool bIsCustomShape = aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( com.sun.star.drawing.CustomShape ) ) || aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
[Libreoffice-commits] .: oox/source
oox/source/vml/vmlformatting.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5881168bf8187149e2caf59e72e1ac2d739aa3a4 Author: Miklos Vajna vmik...@suse.cz Date: Wed Mar 21 16:39:15 2012 +0100 oox: it's EMU, not MEU diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index 1197829..1d5a958 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -150,7 +150,7 @@ bool lclExtractDouble( double orfValue, sal_Int32 ornEndPos, const OUString r fValue *= 36.0; else if( (cChar1 == 'm') (cChar2 == 'm') ) // 1 mm = 36,000 EMU fValue *= 36000.0; -else if( (cChar1 == 'p') (cChar2 == 't') ) // 1 point = 1/72 inch = 12,700 MEU +else if( (cChar1 == 'p') (cChar2 == 't') ) // 1 point = 1/72 inch = 12,700 EMU fValue *= 12700.0; else if( (cChar1 == 'p') (cChar2 == 'c') ) // 1 pica = 1/6 inch = 152,400 EMU fValue *= 152400.0; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/ole/vbamodule.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1bd695d3ddcbce48899a70130b5e948c48541d17 Author: Noel Power noel.po...@novell.com Date: Thu Mar 15 19:50:11 2012 + fix mishandling of 'End Sub' is there is a trailing comment fod#46889 diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx index 9f0e5ff..d5c1db3 100644 --- a/oox/source/ole/vbamodule.cxx +++ b/oox/source/ole/vbamodule.cxx @@ -313,7 +313,7 @@ OUString VbaModule::readSourceCode( StorageBase rVbaStrg, const Reference XNam procInfo.nPos = aSourceCode.getLength(); } } -else if ( mbExecutable aCodeLine.trim().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(End Sub)) ) +else if ( mbExecutable aCodeLine.trim().matchAsciiL( RTL_CONSTASCII_STRINGPARAM(End Sub)) ) { // un-matched End Sub if ( !procInfo.bInProcedure ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source unusedcode.easy
oox/source/core/xmlfilterbase.cxx |5 - unusedcode.easy |1 - 2 files changed, 6 deletions(-) New commits: commit b6ff047a572189a2b000ffbd437e573e518773db Author: Petr Vorel petr.vo...@gmail.com Date: Sun Mar 11 19:02:40 2012 +0400 remove unused code diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index f5868bf..f1aebdd 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -672,11 +672,6 @@ XmlFilterBase XmlFilterBase::exportDocumentProperties( Reference XDocumentProp return *this; } -::oox::drawingml::chart::ChartConverter* XmlFilterBase::getChartConverter() -{ -return 0; -} - // protected -- Reference XInputStream XmlFilterBase::implGetInputStream( MediaDescriptor rMediaDesc ) const diff --git a/unusedcode.easy b/unusedcode.easy index 5f8063a..38f62a8 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -910,7 +910,6 @@ oox::AttributeConversion::decodeUnsignedHex(rtl::OUString const) oox::ContainerHelper::insertByIndex(com::sun::star::uno::Referencecom::sun::star::container::XIndexContainer const, int, com::sun::star::uno::Any const) oox::GraphicHelper::convertScreenPixelToHmm(com::sun::star::awt::Point const) const oox::core::PowerPointExport::WriteTextStyle(boost::shared_ptrsax_fastparser::FastSerializerHelper, int, int) -oox::core::XmlFilterBase::getChartConverter() oox::drawingml::ChartExport::exportDataSeq(com::sun::star::uno::Referencecom::sun::star::chart2::data::XDataSequence const, int) oox::drawingml::ChartExport::exportXAxis(oox::drawingml::AxisIdPair) oox::drawingml::ChartExport::exportYAxis(oox::drawingml::AxisIdPair) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/shape.cxx |4 +++- oox/source/ppt/pptshape.cxx|2 +- 2 files changed, 4 insertions(+), 2 deletions(-) New commits: commit 77901e53ecd99aed59e5c8697461ab4d241388a4 Author: Muthu Subramanian sumu...@suse.com Date: Fri Mar 2 18:01:45 2012 +0530 n657904: Styling information isn't applied to grpSp. diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index a6e86c3..5e3aa73 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -299,8 +299,10 @@ void Shape::addChildren( aChildTransformation.get(2, 2)); std::vector ShapePtr ::iterator aIter( rMaster.maChildren.begin() ); -while( aIter != rMaster.maChildren.end() ) +while( aIter != rMaster.maChildren.end() ) { +(*aIter)-setMasterTextListStyle( mpMasterTextListStyle ); (*aIter++)-addShape( rFilterBase, pTheme, rxShapes, aChildTransformation, NULL, pShapeMap ); +} } Reference XShape Shape::createAndInsert( diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 0bd2ce4..a72a10c 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -310,7 +310,7 @@ void PPTShape::addShape( { if ( !aMasterTextListStyle.get() ) { -bool isOther = !getTextBody().get(); +bool isOther = !getTextBody().get() !sServiceName.equalsAscii(com.sun.star.drawing.GroupShape); TextListStylePtr aSlideStyle = isOther ? rSlidePersist.getOtherTextStyle() : rSlidePersist.getDefaultTextStyle(); // Combine from MasterSlide details as well. if( rSlidePersist.getMasterPersist().get() ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/textcharacterproperties.cxx |2 +- oox/source/drawingml/textparagraph.cxx |9 - oox/source/drawingml/textparagraphproperties.cxx |2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) New commits: commit 101fd1733000b4f8dae5fa39b6657531a21769ea Author: Felix Zhang fezh...@suse.com Date: Fri Mar 2 18:17:29 2012 +0800 n719988, n734733: Bullet should have same color as following text by default diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index adfa2fe..e7c6bb8 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -69,7 +69,7 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties rSource moUnderlineFillFollowText.assignIfUsed( rSourceProps.moUnderlineFillFollowText ); } -void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const XmlFilterBase rFilter, bool bUseOptional ) const +void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const XmlFilterBase rFilter, bool bUseOptional ) const { OUString aFontName; sal_Int16 nFontPitch = 0; diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx index 689ab90..63a2845 100644 --- a/oox/source/drawingml/textparagraph.cxx +++ b/oox/source/drawingml/textparagraph.cxx @@ -28,6 +28,7 @@ #include oox/drawingml/textparagraph.hxx #include oox/drawingml/drawingmltypes.hxx +#include oox/drawingml/textcharacterproperties.hxx #include rtl/ustring.hxx #include oox/helper/propertyset.hxx @@ -111,8 +112,14 @@ void TextParagraph::insertAt( float fCharacterSize = nCharHeight 0 ? GetFontHeight( nCharHeight ) : 18; if ( pTextParagraphStyle.get() ) { -pTextParagraphStyle-pushToPropSet( rFilterBase, xProps, aioBulletList, NULL, sal_False, fCharacterSize ); +pTextParagraphStyle-pushToPropSet( rFilterBase, xProps, aioBulletList, NULL, sal_True, fCharacterSize ); fCharacterSize = pTextParagraphStyle-getCharHeightPoints( fCharacterSize ); + +// bullets have same color as following texts by default +if( !aioBulletList.hasProperty( PROP_BulletColor ) maRuns.size() 0 + (*maRuns.begin())-getTextCharacterProperties().maCharColor.isUsed() ) +aioBulletList[ PROP_BulletColor ] = (*maRuns.begin())-getTextCharacterProperties().maCharColor.getColor( rFilterBase.getGraphicHelper() ); + maProperties.pushToPropSet( rFilterBase, xProps, aioBulletList, pTextParagraphStyle-getBulletList(), sal_True, fCharacterSize ); } diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index 6eea22f..5df6bfe 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -433,6 +433,8 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p rioBulletMap[ PROP_FirstLineOffset ] = static_cast sal_Int32 ( *noFirstLineIndentation ); noFirstLineIndentation = boost::optional sal_Int32 ( 0 ); } +if ( nNumberingType != NumberingType::BITMAP !rioBulletMap.hasProperty( PROP_BulletColor )) +rioBulletMap[ PROP_BulletColor ] = static_cast sal_Int32 ( maTextCharacterProperties.maCharColor.getColor( pFilterBase-getGraphicHelper())); } if ( bApplyBulletMap ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/ole/vbamodule.cxx | 48 +++ 1 file changed, 48 insertions(+) New commits: commit 24b402d67eb9acc7ff1f0afeee7237f6b3b14644 Author: Noel Power noel.po...@novell.com Date: Fri Mar 2 13:04:18 2012 + weed out unmatched Sub/End Sub statements when importing VBA fdo#46889 diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx index 585f28d..d4b041b 100644 --- a/oox/source/ole/vbamodule.cxx +++ b/oox/source/ole/vbamodule.cxx @@ -221,6 +221,7 @@ void VbaModule::createEmptyModule( const Reference XNameContainer rxBasicLib OUString VbaModule::readSourceCode( StorageBase rVbaStrg, const Reference XNameContainer rxOleNameOverrides ) const { OUStringBuffer aSourceCode; +const static rtl::OUString sUnmatchedRemovedTag( RTL_CONSTASCII_USTRINGPARAM( Rem removed unmatched Sub/End: ) ); if( !maStreamName.isEmpty() (mnOffset != SAL_MAX_UINT32) ) { BinaryXInputStream aInStrm( rVbaStrg.openInputStream( maStreamName ), true ); @@ -234,6 +235,14 @@ OUString VbaModule::readSourceCode( StorageBase rVbaStrg, const Reference XNam VbaInputStream aVbaStrm( aInStrm ); // load the source code line-by-line, with some more processing TextInputStream aVbaTextStrm( mxContext, aVbaStrm, meTextEnc ); + +struct ProcedurePair +{ +bool bInProcedure; +sal_uInt32 nPos; +ProcedurePair() : bInProcedure( false ), nPos( 0 ) {}; +} procInfo; + while( !aVbaTextStrm.isEof() ) { OUString aCodeLine = aVbaTextStrm.readLine(); @@ -244,6 +253,45 @@ OUString VbaModule::readSourceCode( StorageBase rVbaStrg, const Reference XNam } else { +// Hack here to weed out any unmatched End Sub / Sub Foo statements. +// The behaviour of the vba ide practically guarantees the case and +// spacing of Sub statement(s). However, indentation can be arbitrary hence +// the trim. +rtl::OUString trimLine( aCodeLine.trim() ); +if ( mbExecutable ( + trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM(Sub ) ) || + trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM(Public Sub ) ) || + trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM(Private Sub ) ) || + trimLine.matchAsciiL( RTL_CONSTASCII_STRINGPARAM(Static Sub ) ) ) ) +{ +// this should never happen, basic doesn't support nested procedures +// first Sub Foo must be bogus +if ( procInfo.bInProcedure ) +{ +// comment out the line +aSourceCode.insert( procInfo.nPos, sUnmatchedRemovedTag ); +// mark location of this Sub +procInfo.nPos = aSourceCode.getLength(); +} +else +{ +procInfo.bInProcedure = true; +procInfo.nPos = aSourceCode.getLength(); +} +} +else if ( mbExecutable aCodeLine.trim().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(End Sub)) ) +{ +// un-matched End Sub +if ( !procInfo.bInProcedure ) +{ +aSourceCode.append( sUnmatchedRemovedTag ); +} +else +{ +procInfo.bInProcedure = false; +procInfo.nPos = 0; +} +} // normal source code line if( !mbExecutable ) aSourceCode.appendAscii( RTL_CONSTASCII_STRINGPARAM( Rem ) ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/customshapes/generatePresetsPPTXs.pl | 25 +++--- 1 file changed, 20 insertions(+), 5 deletions(-) New commits: commit e3c0a952a7607436224fe57f9e1665597702f6b2 Author: Radek Doulik r...@novell.com Date: Fri Mar 2 20:40:04 2012 +0100 generate more pptx test documents with preset shapes - before we only generated custom shapes used as presets definition - preset-*.pptx documents might be used for testing the presets diff --git a/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl b/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl index c9eb314..28127f8 100755 --- a/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl +++ b/oox/source/drawingml/customshapes/generatePresetsPPTXs.pl @@ -29,10 +29,17 @@ sub generatePPTX mkdir (pptx); system (unzip -qq -o -d cshape cshape.pptx); - generateSlide ($shapes, $type, cshape/ppt/slides/slide1.xml); + # custom shape(s) slide with preset definition + generateSlide ($shapes, $type, cshape/ppt/slides/slide1.xml, 0); $pptx = ../pptx/cshape- . (defined $type ? $type : all) . .pptx; system (cd cshape\nrm -rf . $pptx . \nzip -q -r . $pptx . .\ncd ..); + + # preset(s) slide, for testing + generateSlide ($shapes, $type, cshape/ppt/slides/slide1.xml, 1); + + $pptx = ../pptx/preset-cshape- . (defined $type ? $type : all) . .pptx; + system (cd cshape\nrm -rf . $pptx . \nzip -q -r . $pptx . .\ncd ..); } sub loadShapes() @@ -79,6 +86,7 @@ sub generateSlide $shapes = shift; $type = shift; $file = shift; + $preset = shift; open (OUT, $file); @@ -132,11 +140,18 @@ sub generateSlide a:off x=\ . (35 + $col++*$size) . \ y=\ . (45 + $row*$size) . \/ a:ext cx=\ . (4*$size/5) . \ cy=\ . (4*$size/5) . \/ /a:xfrm - a:custGeom ; - print OUT @{$shapes-{$shape}}; - print OUT /a:custGeom - a:solidFill + if ($preset) { + print OUT a:prstGeom prst=\ . $shape . \a:avLst//a:prstGeom +; + } else { + print OUT a:custGeom +; + print OUT @{$shapes-{$shape}}; + print OUT /a:custGeom +; + } + print OUT a:solidFill a:srgbClr val=\7F\/ /a:solidFill a:ln w=\19080\ ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/textliststyle.cxx |2 +- oox/source/drawingml/textparagraphproperties.cxx |2 +- oox/source/helper/propertyset.cxx|2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 602908b300d4d688d50355ebeca5d3063f25f475 Author: Michael Meeks michael.me...@suse.com Date: Fri Feb 24 11:19:56 2012 + fix oox debug build with DBG_UTIL guard for 'dump' usage diff --git a/oox/source/drawingml/textliststyle.cxx b/oox/source/drawingml/textliststyle.cxx index edd50f0..663a5d5 100644 --- a/oox/source/drawingml/textliststyle.cxx +++ b/oox/source/drawingml/textliststyle.cxx @@ -66,7 +66,7 @@ void TextListStyle::apply( const TextListStyle rTextListStyle ) applyStyleList( rTextListStyle.getListStyle(), getListStyle() ); } -#if OSL_DEBUG_LEVEL 0 +#ifdef DBG_UTIL void TextListStyle::dump() const { for ( int i = 0; i 9; i++ ) diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index a916f45..6eea22f 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -467,7 +467,7 @@ float TextParagraphProperties::getCharHeightPoints( float fDefault ) const } -#if OSL_DEBUG_LEVEL 0 +#ifdef DBG_UTIL void TextParagraphProperties::dump() const { diff --git a/oox/source/helper/propertyset.cxx b/oox/source/helper/propertyset.cxx index 71f0d4e..e973318 100644 --- a/oox/source/helper/propertyset.cxx +++ b/oox/source/helper/propertyset.cxx @@ -178,7 +178,7 @@ bool PropertySet::implSetPropertyValue( const OUString rPropName, const Any rV return false; } -#if OSL_DEBUG_LEVEL 0 +#ifdef DBG_UTIL void PropertySet::dump() { PropertyMap::dump( Reference XPropertySet ( getXPropertySet(), UNO_QUERY ) ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/diagram/diagramlayoutatoms.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 905df1bae9cab296ee7dd07e88813c667788ed8a Author: Thorsten Behrens tbehr...@suse.com Date: Thu Feb 16 10:35:12 2012 +0100 Fix crash in smartart import Rather check iterator validity *before* accessing it. valgrind warning on linux, and crash on windows for e.g. doc at n#736495. diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 493dcf2..29a9cb9 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -394,8 +394,8 @@ bool LayoutNode::setupShape( const ShapePtr rShape, const Diagram rDgm, sal_uI { // find the data node to grab text from DiagramData::PointsNameMap::const_iterator aDataNode=rDgm.getData()-getPointsPresNameMap().find(msName); -if( aDataNode-second.size() nIdx -aDataNode != rDgm.getData()-getPointsPresNameMap().end() ) +if( aDataNode != rDgm.getData()-getPointsPresNameMap().end() +aDataNode-second.size() nIdx ) { OSL_TRACE( Filling content from %d th layout node named \%s\, modelId \%s\, nIdx, ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/ole/vbamodule.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 2174d4d44eeb83378f76ea34086b8a1989b70b76 Author: Noel Power noel.po...@novell.com Date: Thu Feb 16 10:34:59 2012 + use stream name for module names when importing vba. fdo#46151 bnc#747323 diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx index d907051..585f28d 100644 --- a/oox/source/ole/vbamodule.cxx +++ b/oox/source/ole/vbamodule.cxx @@ -156,6 +156,9 @@ void VbaModule::importDirRecords( BinaryInputStream rDirStrm ) break; case VBA_ID_MODULESTREAMNAME: maStreamName = aRecStrm.readCharArrayUC( nRecSize, meTextEnc ); +// Actually the stream name seems the best name to use +// the VBA_ID_MODULENAME name can sometimes be the wrong case +maName = maStreamName; break; case VBA_ID_MODULESTREAMNAMEUNICODE: break; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/ppt/pptshapegroupcontext.cxx | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) New commits: commit 5c714632583036f72377aa0fa6ed1137e53582dc Author: Muthu Subramanian sumu...@suse.com Date: Thu Feb 16 20:59:57 2012 +0530 n744503: Importing useBgFill colors for shapes. diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx index cf982cf..0529ec6 100644 --- a/oox/source/ppt/pptshapegroupcontext.cxx +++ b/oox/source/ppt/pptshapegroupcontext.cxx @@ -41,6 +41,7 @@ #include oox/drawingml/customshapegeometry.hxx #include oox/drawingml/textbodycontext.hxx #include oox/drawingml/connectorshapecontext.hxx +#include oox/drawingml/fillproperties.hxx #include extdrawingfragmenthandler.hxx using rtl::OUString; @@ -108,7 +109,19 @@ Reference XFastContextHandler PPTShapeGroupContext::createFastChildContext( s xRet.set( new PPTShapeGroupContext( *this, mpSlidePersistPtr, meShapeLocation, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, com.sun.star.drawing.GroupShape ) ) ) ); break; case PPT_TOKEN( sp ): // Shape -xRet.set( new PPTShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, com.sun.star.drawing.CustomShape ) ) ) ); +{ +AttributeList aAttribs( xAttribs ); +oox::drawingml::ShapePtr pShape = oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, com.sun.star.drawing.CustomShape ) ); +if( aAttribs.getBool( XML_useBgFill, false ) ) +{ +::oox::drawingml::FillProperties aFill = pShape-getFillProperties(); +aFill.moFillType = XML_solidFill; +// This is supposed to fill with slide (background) color, but +// TODO: We are using white here, because thats the closest we can assume (?) +aFill.maFillColor.setSrgbClr( API_RGB_WHITE ); +} +xRet.set( new PPTShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, pShape ) ); +} break; case PPT_TOKEN( pic ): // CT_Picture xRet.set( new PPTGraphicShapeContext( *this, mpSlidePersistPtr, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, com.sun.star.drawing.GraphicObjectShape ) ) ) ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/textparagraphpropertiescontext.cxx |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) New commits: commit a71c878cd0b443a0d8473d8e4eb43d66f37ce2c0 Author: Muthu Subramanian sumu...@suse.com Date: Fri Feb 3 16:20:34 2012 +0530 n#744509: Alignment of text is wrong. According to section 21.1.2.2.7 [pPr], If this [algn] attribute is omitted, then a value of left is implied. diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx index 9d06ae1..d3c91cd 100644 --- a/oox/source/drawingml/textparagraphpropertiescontext.cxx +++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx @@ -64,12 +64,7 @@ TextParagraphPropertiesContext::TextParagraphPropertiesContext( ContextHandler PropertyMap rPropertyMap( mrTextParagraphProperties.getTextParagraphPropertyMap() ); // ST_TextAlignType -if ( xAttribs-hasAttribute( XML_algn ) ) -{ -sal_Int32 nAlign = xAttribs-getOptionalValueToken( XML_algn, XML_l ); -rPropertyMap[ PROP_ParaAdjust ] = GetParaAdjust( nAlign ); -} -// OSL_TRACE( OOX: para adjust %d, GetParaAdjust( nAlign )); +rPropertyMap[ PROP_ParaAdjust ] = GetParaAdjust( xAttribs-getOptionalValueToken( XML_algn, XML_l ) ); // TODO see to do the same with RubyAdjust // ST_Coordinate32 ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/helper/propertymap.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 34c5059b80777244e25dee1299ea258c8d7ba4fe Author: Julien Nabet serval2...@yahoo.fr Date: Wed Feb 1 21:40:29 2012 +0100 Fix Prefer prefix ++/-- operators for non-primitive types diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx index 0bf875c..bf92f7a 100644 --- a/oox/source/helper/propertymap.cxx +++ b/oox/source/helper/propertymap.cxx @@ -236,7 +236,7 @@ const Any* PropertyMap::getProperty( sal_Int32 nPropId ) const void PropertyMap::assignAll( const PropertyMap rPropMap ) { -for( PropertyMap::const_iterator it=rPropMap.begin(); it != rPropMap.end(); it++ ) +for( PropertyMap::const_iterator it=rPropMap.begin(); it != rPropMap.end(); ++it ) (*this)[it-first] = it-second; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/diagram/diagram.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit af15127871d38a862ce300ceda5cc74624fda8df Author: Muthu Subramanian sumu...@suse.com Date: Wed Feb 1 13:32:56 2012 +0530 Fixes crashing while loading manipulated pptx files. diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx index 91a475f..9194001 100644 --- a/oox/source/drawingml/diagram/diagram.cxx +++ b/oox/source/drawingml/diagram/diagram.cxx @@ -340,7 +340,8 @@ void Diagram::addTo( const ShapePtr pParentShape ) // create Shape hierarchy ShapeCreationVisitor aCreationVisitor(pParentShape, *this); -mpLayout-getNode()-accept(aCreationVisitor); +if( mpLayout-getNode() ) +mpLayout-getNode()-accept( aCreationVisitor ); } OUString Diagram::getLayoutId() const ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/xls/workbookhelper.cxx |3 --- 1 file changed, 3 deletions(-) New commits: commit 1f2bf6d863a25475f27e2b0d37f8c36aec74d6d4 Author: Kohei Yoshida kohei.yosh...@suse.com Date: Mon Jan 30 12:30:03 2012 -0500 Removed debug statement. diff --git a/oox/source/xls/workbookhelper.cxx b/oox/source/xls/workbookhelper.cxx index d1a61c9..675a6a1 100644 --- a/oox/source/xls/workbookhelper.cxx +++ b/oox/source/xls/workbookhelper.cxx @@ -69,8 +69,6 @@ #include oox/xls/workbooksettings.hxx #include oox/xls/worksheetbuffer.hxx -#include iostream - namespace oox { namespace xls { @@ -394,7 +392,6 @@ Reference XNamedRange WorkbookGlobals::createLocalNamedRangeObject( OUString Reference XSpreadsheet xSheet (xSheets-getByIndex(nTab), UNO_QUERY_THROW); Reference com::sun::star::container::XNamed xNamed(xSheet, UNO_QUERY_THROW); rtl::OUString aName = xNamed-getName(); -std::cout sheetName: rtl::OUStringToOString( aName, RTL_TEXTENCODING_UTF8).getStr() std::endl; PropertySet aSheetProps( xSheet ); Reference XNamedRanges xNamedRanges( aSheetProps.getAnyProperty( PROP_NamedRanges ), UNO_QUERY_THROW ); Reference XNameAccess xNameAccess( xNamedRanges, UNO_QUERY_THROW ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/ppt/pptshape.cxx | 40 1 file changed, 36 insertions(+), 4 deletions(-) New commits: commit 229b0cc0029e93fa808624d8aa4dcfa2e289b1aa Author: Radek Doulik r...@novell.com Date: Mon Jan 16 15:37:23 2012 +0100 handle [more] placeholder shapes in Layout slides - import them as outliner shapes, so that they don't appear on regular slides - choose appropriate placeholder shapes on regular slides (Table, Picture, Chart, Media) diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index dfb4a38..17ceb30 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -126,7 +126,7 @@ void PPTShape::addShape( const awt::Rectangle* pShapeRect, ::oox::drawingml::ShapeIdMap* pShapeMap ) { -OSL_TRACE(add shape id: %s location: %s, rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr(), meShapeLocation == Master ? master : meShapeLocation == Slide ? slide : other); +OSL_TRACE(add shape id: %s location: %s subtype: %d service: %s, rtl::OUStringToOString(msId, RTL_TEXTENCODING_UTF8 ).getStr(), meShapeLocation == Master ? master : meShapeLocation == Slide ? slide : meShapeLocation == Layout ? layout : other, mnSubType, rtl::OUStringToOString(msServiceName, RTL_TEXTENCODING_UTF8 ).getStr()); // only placeholder from layout are being inserted if ( mnSubType ( meShapeLocation == Master ) ) return; @@ -142,6 +142,7 @@ void PPTShape::addShape( if ( sServiceName != OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.drawing.GraphicObjectShape)) sServiceName != OUString(RTL_CONSTASCII_USTRINGPARAM(com.sun.star.drawing.OLE2Shape)) ) { +const rtl::OUString sOutlinerShapeService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.OutlinerShape ) ); OSL_TRACE(has master: %p, rSlidePersist.getMasterPersist().get()); switch( mnSubType ) { @@ -166,7 +167,6 @@ void PPTShape::addShape( break; case XML_obj : { -const rtl::OUString sOutlinerShapeService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.OutlinerShape ) ); sServiceName = sOutlinerShapeService; aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()-getBodyTextStyle() : rSlidePersist.getBodyTextStyle(); } @@ -174,7 +174,6 @@ void PPTShape::addShape( case XML_body : { const rtl::OUString sNotesShapeService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.NotesShape ) ); -const rtl::OUString sOutlinerShapeService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.OutlinerShape ) ); if ( rSlidePersist.isNotesPage() ) { sServiceName = sNotesShapeService; @@ -221,8 +220,41 @@ void PPTShape::addShape( sServiceName = sPageShapeService; } break; - +case XML_chart : +if ( meShapeLocation == Layout ) +sServiceName = sOutlinerShapeService; +else { +const rtl::OUString sChartService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.ChartShape ) ); +sServiceName = sChartService; +} +break; +case XML_tbl : +if ( meShapeLocation == Layout ) +sServiceName = sOutlinerShapeService; +else { +const rtl::OUString sTableService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.TableShape ) ); +sServiceName = sTableService; +} +break; +case XML_pic : +if ( meShapeLocation == Layout ) +sServiceName = sOutlinerShapeService; +else { +const rtl::OUString sGraphicObjectService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.GraphicObjectShape ) ); +sServiceName = sGraphicObjectService; +} +break; +case XML_media : +if ( meShapeLocation == Layout ) +sServiceName = sOutlinerShapeService; +else { +const rtl::OUString sMediaService( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.presentation.MediaShape ) ); +sServiceName =
[Libreoffice-commits] .: oox/source svx/inc svx/source
oox/source/drawingml/customshapeproperties.cxx|2 +- oox/source/drawingml/shapecontext.cxx |6 ++ oox/source/ppt/pptshapecontext.cxx|6 ++ oox/source/token/properties.txt |1 + oox/source/token/tokens.txt |1 + svx/inc/svx/svdoashp.hxx |2 +- svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx |8 svx/source/svdraw/svdoashp.cxx|5 +++-- 8 files changed, 27 insertions(+), 4 deletions(-) New commits: commit 5c4d1b05faa8a3d704fc74a186a173f8cc019cc1 Author: Muthu Subramanian sumu...@suse.com Date: Wed Jan 11 15:24:27 2012 +0530 n#734734: Text rotation fixes. PPTX would need rotation of text _inside_ text/object boundaries, rather than the rotation of the text/object itself. diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 5da446a..a03e42c 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -154,7 +154,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase /* rFi aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX ); aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY ); -aPropertyMap[ PROP_TextRotateAngle ] = Any( mnTextRotateAngle ); +aPropertyMap[ PROP_TextPreRotateAngle ] = Any( mnTextRotateAngle ); Sequence PropertyValue aSeq = aPropertyMap.makePropertyValueSequence(); aPropSet.setProperty( PROP_CustomShapeGeometry, aSeq ); diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx index f613e89..389bfac 100644 --- a/oox/source/drawingml/shapecontext.cxx +++ b/oox/source/drawingml/shapecontext.cxx @@ -119,6 +119,12 @@ Reference XFastContextHandler ShapeContext::createFastChildContext( sal_Int32 xRet = new TextBodyContext( *this, *xTextBody ); break; } +case XML_txXfrm: +{ +AttributeList aAttribs( xAttribs ); +mpShapePtr-getTextBody()-getTextProperties().moRotation = aAttribs.getInteger( XML_rot ); +break; +} } if( !xRet.is() ) diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx index dce07b8..cc62b82 100644 --- a/oox/source/ppt/pptshapecontext.cxx +++ b/oox/source/ppt/pptshapecontext.cxx @@ -218,6 +218,12 @@ Reference XFastContextHandler PPTShapeContext::createFastChildContext( sal_In xRet = new oox::drawingml::TextBodyContext( *this, *xTextBody ); break; } +case PPT_TOKEN( txXfrm ): +{ +AttributeList aAttribs( xAttribs ); +mpShapePtr-getTextBody()-getTextProperties().moRotation = aAttribs.getInteger( XML_rot ); +break; +} } if( !xRet.is() ) diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 65d2cb0..50c46bd 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -457,6 +457,7 @@ TextHorizontalAdjust TextLeftDistance TextLowerDistance TextOverlap +TextPreRotateAngle TextRightDistance TextRotateAngle TextRotation diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt index 594468e..cec24b5 100644 --- a/oox/source/token/tokens.txt +++ b/oox/source/token/tokens.txt @@ -5334,6 +5334,7 @@ txOverObj txPr txSp txStyles +txXfrm txbxContent txtBox ty diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx index 3d91549..013e150 100644 --- a/svx/inc/svx/svdoashp.hxx +++ b/svx/inc/svx/svdoashp.hxx @@ -149,7 +149,7 @@ public: void SetMirroredY( const sal_Bool bMirroredY ); double GetObjectRotation() const; -double GetExtraTextRotation() const; +double GetExtraTextRotation( const bool bPreRotation = false ) const; TYPEINFO(); SdrObjCustomShape(); diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index 2e63da2..85628ca 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -160,6 +160,14 @@ namespace sdr // #i101684# get the text range unrotated and absolute to the object range const basegfx::B2DRange aTextRange(getCorrectedTextBoundRect()); +// Rotation before scaling + if(!basegfx::fTools::equalZero(GetCustomShapeObj().GetExtraTextRotation(true))) +{ +basegfx::B2DVector aTranslation(0.5, 0.5); +aTextBoxMatrix.translate( -aTranslation.getX(), -aTranslation.getY() ); +aTextBoxMatrix.rotate((360.0 - GetCustomShapeObj().GetExtraTextRotation(true)) *
[Libreoffice-commits] .: oox/source sdext/source slideshow/test svx/source sw/source unotools/source unoxml/test vcl/aqua vcl/ios vcl/source vcl/test vcl/win
oox/source/token/propertynames.cxx |2 +- sdext/source/pdfimport/filterdet.cxx |4 ++-- slideshow/test/demoshow.cxx |2 +- svx/source/dialog/linkwarn.cxx |2 +- svx/source/svdraw/svdotext.cxx |2 +- sw/source/filter/ww1/w1class.cxx |2 +- sw/source/filter/ww1/w1sprm.cxx |2 +- sw/source/filter/ww8/ww8par6.cxx |4 ++-- unotools/source/misc/fontdefs.cxx|2 +- unoxml/test/domtest.cxx | 10 +- vcl/aqua/source/gdi/salgdi.cxx |2 +- vcl/ios/source/gdi/salgdi.cxx|2 +- vcl/source/gdi/sallayout.cxx |2 +- vcl/source/window/window.cxx |2 +- vcl/test/canvasbitmaptest.cxx|2 +- vcl/win/source/gdi/salgdi3.cxx |4 ++-- 16 files changed, 23 insertions(+), 23 deletions(-) New commits: commit 2c3d0ff9f83aab89980529da2aa3837390b84ef7 Author: Thomas Arnhold tho...@arnhold.org Date: Tue Jan 10 16:00:18 2012 +0100 Use SAL_N_ELEMENTS Some more like Thorstens diff 9c59cd15b150638c845bbc275b9b04460afc23bd Done with some regex magic (and a check if this var is an array): s/sizeof\(\s*$var\s*\)\s*\/\s*sizeof\(\s*\*$var\s*/SAL_N_ELEMENTS\($var/gs diff --git a/oox/source/token/propertynames.cxx b/oox/source/token/propertynames.cxx index a7c9b87..d65c8d2 100644 --- a/oox/source/token/propertynames.cxx +++ b/oox/source/token/propertynames.cxx @@ -41,7 +41,7 @@ PropertyNameVector::PropertyNameVector() }; -size_t nArraySize = (sizeof( sppcPropertyNames ) / sizeof( *sppcPropertyNames )) - 1; +size_t nArraySize = SAL_N_ELEMENTS(sppcPropertyNames) - 1; reserve( nArraySize ); for( size_t nIndex = 0; nIndex nArraySize; ++nIndex ) push_back( ::rtl::OUString::createFromAscii( sppcPropertyNames[ nIndex ] ) ); diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index 28fd126..969f378 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -139,8 +139,8 @@ namespace { xPropSet-getPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( Label ))) = aLabel; const char pFileName[] = %FILENAME; aLabel = aLabel.replaceAt( - aLabel.indexOfAsciiL(pFileName,sizeof(pFileName)/sizeof(*pFileName)-1), -sizeof(pFileName)/sizeof(*pFileName)-1, +aLabel.indexOfAsciiL(pFileName,SAL_N_ELEMENTS(pFileName)-1), +SAL_N_ELEMENTS(pFileName)-1, aFilename ); xPropSet-setPropertyValue(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( Label )), uno::makeAny(aLabel)); diff --git a/slideshow/test/demoshow.cxx b/slideshow/test/demoshow.cxx index f52ba55..692251e 100644 --- a/slideshow/test/demoshow.cxx +++ b/slideshow/test/demoshow.cxx @@ -278,7 +278,7 @@ private: }; static PropMapT aMap( lcl_propertyMap, - sizeof(lcl_propertyMap)/sizeof(*lcl_propertyMap), + SAL_N_ELEMENTS(lcl_propertyMap), true ); sal_Int16 aRes; diff --git a/svx/source/dialog/linkwarn.cxx b/svx/source/dialog/linkwarn.cxx index 5beecf0..6bc3a1b 100644 --- a/svx/source/dialog/linkwarn.cxx +++ b/svx/source/dialog/linkwarn.cxx @@ -114,7 +114,7 @@ void SvxLinkWarningDialog::InitSize() m_aLinkGraphicBtn, m_aEmbedGraphicBtn, m_aOptionLine, m_aWarningOnBox }; Window** pCurrent = pWins; -for ( sal_uInt32 i = 0; i sizeof(pWins) / sizeof(*pWins); ++i, ++pCurrent ) +for ( sal_uInt32 i = 0; i SAL_N_ELEMENTS(pWins); ++i, ++pCurrent ) { Point aNewPos = (*pCurrent)-GetPosPixel(); aNewPos.Y() -= nDelta; diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 620b677..e43b160 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1281,7 +1281,7 @@ void SdrTextObj::ImpAutoFitText( SdrOutliner rOutliner, const Size rTextSize, // loop early-exits if we detect an already attained value sal_uInt16 nMinStretchX=0, nMinStretchY=0; sal_uInt16 aOldStretchXVals[]={0,0,0,0,0,0,0,0,0,0}; -const size_t aStretchArySize=sizeof(aOldStretchXVals)/sizeof(*aOldStretchXVals); +const size_t aStretchArySize=SAL_N_ELEMENTS(aOldStretchXVals); for(unsigned int i=0; iaStretchArySize; ++i) { const Size aCurrTextSize = rOutliner.CalcTextSizeNTP(); diff --git a/sw/source/filter/ww1/w1class.cxx b/sw/source/filter/ww1/w1class.cxx index a7e35cd..c1630ca 100644 --- a/sw/source/filter/ww1/w1class.cxx +++ b/sw/source/filter/ww1/w1class.cxx @@ -160,7 +160,7 @@ sal_uInt16 Ww1Style::ReadName( sal_uInt8*p, sal_uInt16 rnCountBytes, sal_uInt1 size_t nSize(stc); if (!nSize) pStr = W1 Normal; -else if (nSize - 222 = sizeof(names) / sizeof(*names)) +else
[Libreoffice-commits] .: oox/source
oox/source/drawingml/textparagraphpropertiescontext.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 82e385c7e0b466cd1106e19cdbb6dc15b2464811 Author: Muthu Subramanian sumu...@suse.com Date: Tue Jan 3 18:07:24 2012 +0530 n734734: Line Spacing is used from previous values. diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx index 2164bf2..9d06ae1 100644 --- a/oox/source/drawingml/textparagraphpropertiescontext.cxx +++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx @@ -148,6 +148,9 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext() PropertyMap rPropertyMap( mrTextParagraphProperties.getTextParagraphPropertyMap() ); if ( maLineSpacing.bHasValue ) rPropertyMap[ PROP_ParaLineSpacing ] = maLineSpacing.toLineSpacing(); +else +rPropertyMap[ PROP_ParaLineSpacing ] = ::com::sun::star::style::LineSpacing( ::com::sun::star::style::LineSpacingMode::PROP, 100 ); + ::std::list TabStop ::size_type nTabCount = maTabList.size(); if( nTabCount != 0 ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source package/source padmin/source pyuno/source
oox/source/export/SchXMLSeriesHelper.cxx |6 ++-- oox/source/export/chartexport.cxx | 11 +++- package/source/xstor/ohierarchyholder.cxx |2 - package/source/xstor/xstorage.cxx | 18 +++--- package/source/zippackage/ZipPackage.cxx |8 +++--- padmin/source/pamain.cxx |2 - pyuno/source/module/pyuno.cxx | 28 +++--- pyuno/source/module/pyuno_adapter.cxx | 10 +++ pyuno/source/module/pyuno_callable.cxx|8 +++--- pyuno/source/module/pyuno_except.cxx |6 ++-- pyuno/source/module/pyuno_gc.cxx |2 - pyuno/source/module/pyuno_module.cxx | 38 +++--- pyuno/source/module/pyuno_runtime.cxx |4 +-- pyuno/source/module/pyuno_type.cxx|6 ++-- 14 files changed, 74 insertions(+), 75 deletions(-) New commits: commit 7958f8244cc3e554b1339b14c7e589dfcbb0526c Author: Takeshi Abe t...@fixedpoint.jp Date: Wed Dec 21 21:57:16 2011 +0900 catch exception by constant reference diff --git a/oox/source/export/SchXMLSeriesHelper.cxx b/oox/source/export/SchXMLSeriesHelper.cxx index e233b8a..5723122 100644 --- a/oox/source/export/SchXMLSeriesHelper.cxx +++ b/oox/source/export/SchXMLSeriesHelper.cxx @@ -76,7 +76,7 @@ using ::rtl::OUString; } } } -catch( uno::Exception ex ) +catch( const uno::Exception ex ) { (void)ex; // avoid warning for pro build @@ -212,7 +212,7 @@ uno::Reference beans::XPropertySet SchXMLSeriesHelper::createOldAPISeriesProp } } } -catch( uno::Exception rEx ) +catch( const uno::Exception rEx ) { (void)rEx; // avoid warning for pro build OSL_TRACE( Exception caught SchXMLSeriesHelper::createOldAPISeriesPropertySet: %s, @@ -250,7 +250,7 @@ uno::Reference beans::XPropertySet SchXMLSeriesHelper::createOldAPIDataPointP } } } -catch( uno::Exception rEx ) +catch( const uno::Exception rEx ) { (void)rEx; // avoid warning for pro build diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index fb4d013..e757b1e 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -216,7 +216,7 @@ Reference chart2::data::XLabeledDataSequence lcl_getCategories( const Referen } } } -catch( uno::Exception ex ) +catch( const uno::Exception ex ) { (void)ex; // avoid warning for pro build OSL_FAIL( rtl::OUStringToOString( @@ -334,7 +334,7 @@ bool lcl_isSeriesAttachedToFirstAxis( xProp-getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM(AttachedAxisIndex) ) ) = nAxisIndex; bResult = (0==nAxisIndex); } -catch( uno::Exception ex ) +catch( const uno::Exception ex ) { (void)ex; // avoid warning for pro build OSL_FAIL( rtl::OUStringToOString( @@ -495,9 +495,8 @@ bool lcl_SequenceHasUnhiddenData( const uno::Reference chart2::data::XDataSeque if( !aHiddenValues.getLength() ) return true; } -catch( uno::Exception e ) +catch( uno::Exception ) { -(void)e; // avoid warning return true; } } @@ -787,7 +786,7 @@ void ChartExport::InitRangeSegmentationProperties( const Reference chart2::XCha } } } -catch( uno::Exception ex ) +catch( const uno::Exception ex ) { (void)ex; // avoid warning for pro build OSL_FAIL( rtl::OUStringToOString( @@ -2573,7 +2572,7 @@ void ChartExport::exportDataPoints( xPropSet = SchXMLSeriesHelper::createOldAPIDataPointPropertySet( xSeries, nElement, getModel() ); } -catch( uno::Exception rEx ) +catch( const uno::Exception rEx ) { (void)rEx; // avoid warning for pro build OSL_TRACE( Exception caught during Export of data point: %s, diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx index cc36e46..9ab6b15 100644 --- a/package/source/xstor/ohierarchyholder.cxx +++ b/package/source/xstor/ohierarchyholder.cxx @@ -335,7 +335,7 @@ void SAL_CALL OHierarchyElement_Impl::commited( const ::com::sun::star::lang::Ev { Commit(); } -catch( uno::Exception e ) +catch( const uno::Exception e ) { throw lang::WrappedTargetRuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( Can not commit storage sequence! ) ), diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 7ba64a5..f5a3fdb 100644 --- a/package/source/xstor/xstorage.cxx +++
[Libreoffice-commits] .: oox/source
oox/source/drawingml/customshapeproperties.cxx | 16 1 file changed, 16 deletions(-) New commits: commit 606c2e7e9f0ab0fb5c32d98a6778457bcaaf1719 Author: Muthu Subramanian sumu...@suse.com Date: Fri Dec 16 20:25:43 2011 +0530 Fixed: bentConnectors are not imported properly. Reverting regression with f0bf2a2ae95ddad3d08ddd1413ec56bf04224a94 diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 3f3bcdb..5da446a 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -110,22 +110,6 @@ static OUString GetConnectorShapeType( sal_Int32 nType ) static const OUString sStraightConnector1 = CREATE_OUSTRING( mso-spt32 ); sType = sStraightConnector1; } break; -case XML_bentConnector2: { -static const OUString sBentConnector2 = CREATE_OUSTRING( mso-spt33 ); -sType = sBentConnector2; -} break; -case XML_bentConnector3: { -static const OUString sBentConnector3 = CREATE_OUSTRING( mso-spt34 ); -sType = sBentConnector3; -} break; -case XML_bentConnector4: { -static const OUString sBentConnector4 = CREATE_OUSTRING( mso-spt35 ); -sType = sBentConnector4; -} break; -case XML_bentConnector5: { -static const OUString sBentConnector5 = CREATE_OUSTRING( mso-spt36 ); -sType = sBentConnector5; -} break; default: break; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/drawingml/customshapeproperties.cxx | 16 oox/source/drawingml/shapepropertiescontext.cxx |1 + 2 files changed, 1 insertion(+), 16 deletions(-) New commits: commit 748a636b5150dbab9d92832bd0f422f57b406114 Author: Radek Doulik r...@novell.com Date: Wed Dec 14 15:05:15 2011 +0100 use custom shapes for curved connector shapes - they looks correctly visually, we can make then connector shapes once we have new implementation diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 12a7f29..3f3bcdb 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -126,22 +126,6 @@ static OUString GetConnectorShapeType( sal_Int32 nType ) static const OUString sBentConnector5 = CREATE_OUSTRING( mso-spt36 ); sType = sBentConnector5; } break; -case XML_curvedConnector2: { -static const OUString sCurvedConnector2 = CREATE_OUSTRING( mso-spt37 ); -sType = sCurvedConnector2; -} break; -case XML_curvedConnector3: { -static const OUString sCurvedConnector3 = CREATE_OUSTRING( mso-spt38 ); -sType = sCurvedConnector3; -} break; -case XML_curvedConnector4: { -static const OUString sCurvedConnector4 = CREATE_OUSTRING( mso-spt39 ); -sType = sCurvedConnector4; -} break; -case XML_curvedConnector5: { -static const OUString sCurvedConnector5 = CREATE_OUSTRING( mso-spt40 ); -sType = sCurvedConnector5; -} break; default: break; } diff --git a/oox/source/drawingml/shapepropertiescontext.cxx b/oox/source/drawingml/shapepropertiescontext.cxx index 1d2a216..7f862e4 100644 --- a/oox/source/drawingml/shapepropertiescontext.cxx +++ b/oox/source/drawingml/shapepropertiescontext.cxx @@ -88,6 +88,7 @@ Reference XFastContextHandler ShapePropertiesContext::createFastChildContext( mrShape.getServiceName() = sLineShape; } if( ( nToken = XML_bentConnector2 nToken = XML_bentConnector5 ) || +( nToken = XML_curvedConnector2 nToken = XML_curvedConnector5 ) || nToken == XML_straightConnector1 ) { static const OUString sCustomShape( RTL_CONSTASCII_USTRINGPARAM( com.sun.star.drawing.CustomShape ) ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/helper/graphichelper.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 65be3e7908f21355fc8cc443192338d1cc8a8d61 Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Fri Nov 25 11:16:29 2011 +0100 Docx crasher: there may be no External Header for pictures. diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx index fd3046e..6ddb986 100644 --- a/oox/source/helper/graphichelper.cxx +++ b/oox/source/helper/graphichelper.cxx @@ -257,7 +257,7 @@ Reference XGraphic GraphicHelper::importGraphic( const Reference XInputStrea aArgs[ 0 ].Name = CREATE_OUSTRING( InputStream ); aArgs[ 0 ].Value = rxInStrm; -if ( pExtHeader-mapMode 0 ) +if ( pExtHeader pExtHeader-mapMode 0 ) { aArgs.realloc( aArgs.getLength() + 1 ); Sequence PropertyValue aFilterData( 3 ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits