oox/inc/oox/core/contexthandler2.hxx | 2 oox/inc/oox/drawingml/textcharacterproperties.hxx | 1 oox/source/drawingml/textcharacterproperties.cxx | 10 ++++ oox/source/drawingml/textcharacterpropertiescontext.cxx | 2 oox/source/export/drawingml.cxx | 10 ++-- sal/inc/rtl/strbuf.hxx | 17 ++++++ sd/inc/sdpage.hxx | 3 + sd/source/core/drawdoc3.cxx | 22 ++++++-- sd/source/core/sdpage2.cxx | 37 ++++++++++++++ svl/inc/svl/itemset.hxx | 1 svl/source/items/itemset.cxx | 16 ++++++ svx/inc/svx/svdobj.hxx | 2 svx/source/svdraw/svdobj.cxx | 40 ++++++++++++++++ 13 files changed, 152 insertions(+), 11 deletions(-)
New commits: commit ac139769216942c409d7c5d40163ad29cadadf5a Author: Muthu Subramanian <sumu...@collabora.com> Date: Thu Jan 2 14:03:22 2014 +0530 Fix compilation problems. diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx index a8b3d64..7bc29a0 100644 --- a/oox/source/drawingml/textbodycontext.cxx +++ b/oox/source/drawingml/textbodycontext.cxx @@ -54,7 +54,6 @@ TextParagraphContext::TextParagraphContext( ContextHandler& rParent, TextParagra : ContextHandler( rParent ) , mrParagraph( rPara ) { - mbEnableTrimSpace = false; } // -------------------------------------------------------------------- diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index c531bc1..bc23204 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -21,7 +21,7 @@ #include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/awt/FontSlant.hpp> #include <com/sun/star/awt/FontWeight.hpp> -#include <editeng/escapementitem.hxx> +#include <editeng/escpitem.hxx> #include "oox/helper/helper.hxx" #include "oox/helper/propertyset.hxx" #include "oox/core/xmlfilterbase.hxx" commit e5cd547846663c69bd66aa1ba94e3b4dcce30a89 Author: Muthu Subramanian <sumu...@collabora.com> Date: Thu Dec 19 16:48:20 2013 +0530 n#828390: Bullet sizes set wrong. diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index ff3f62a..3986989 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1102,7 +1102,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa } else { if( nBulletRelSize && nBulletRelSize != 100 ) mpFS->singleElementNS( XML_a, XML_buSzPct, - XML_val, IS( std::min( (sal_Int32)25000, std::max( (sal_Int32)400000, 1000*( (sal_Int32)nBulletRelSize ) ) ) ), FSEND ); + XML_val, IS( std::max( (sal_Int32)25000, std::min( (sal_Int32)400000, 1000*( (sal_Int32)nBulletRelSize ) ) ) ), FSEND ); if( bHasFontDesc ) mpFS->singleElementNS( XML_a, XML_buFont, XML_typeface, OUStringToOString( aFontDesc.Name, RTL_TEXTENCODING_UTF8 ).getStr(), commit c8f4d9b98228d241d3798ce839b3553a2708c36b Author: Muthu Subramanian <sumu...@collabora.com> Date: Thu Dec 12 18:24:42 2013 +0530 n#828390: Reset charescapement. Unless the value is reset - the escapement seems to continue to the next set of textruns. diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index 4230148..c531bc1 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -129,6 +129,9 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil if( moBaseline.has() ) { rPropMap[ PROP_CharEscapement ] <<= sal_Int16(moBaseline.get( 0 ) / 1000); rPropMap[ PROP_CharEscapementHeight ] <<= sal_Int8(DFLT_ESC_PROP); + } else { + rPropMap[ PROP_CharEscapement ] <<= sal_Int16(0); + rPropMap[ PROP_CharEscapementHeight ] <<= sal_Int8(100); // 100% } if( !bUseOptional || moBold.has() ) { commit cd793642b76d69155e581f3d7df049c08a4195ee Author: Muthu Subramanian <sumu...@collabora.com> Date: Wed Dec 18 20:19:48 2013 +0530 Fix fdo#70220 Superscript not imported from pptx. Ported from: 840a8573c8cebe67ddd3c9fe106c7dbd789bb334 (Original Author: Thorsten) diff --git a/oox/inc/oox/drawingml/textcharacterproperties.hxx b/oox/inc/oox/drawingml/textcharacterproperties.hxx index 3dc4062..1073fa6 100644 --- a/oox/inc/oox/drawingml/textcharacterproperties.hxx +++ b/oox/inc/oox/drawingml/textcharacterproperties.hxx @@ -46,6 +46,7 @@ struct TextCharacterProperties OptValue< sal_Int32 > moHeight; OptValue< sal_Int32 > moSpacing; OptValue< sal_Int32 > moUnderline; + OptValue< sal_Int32 > moBaseline; OptValue< sal_Int32 > moStrikeout; OptValue< sal_Int32 > moCaseMap; OptValue< bool > moBold; diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index 0163f82..4230148 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/awt/FontSlant.hpp> #include <com/sun/star/awt/FontWeight.hpp> +#include <editeng/escapementitem.hxx> #include "oox/helper/helper.hxx" #include "oox/helper/propertyset.hxx" #include "oox/core/xmlfilterbase.hxx" @@ -52,6 +53,7 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties& rSource moHeight.assignIfUsed( rSourceProps.moHeight ); moSpacing.assignIfUsed( rSourceProps.moSpacing ); moUnderline.assignIfUsed( rSourceProps.moUnderline ); + moBaseline.assignIfUsed( rSourceProps.moBaseline ); moStrikeout.assignIfUsed( rSourceProps.moStrikeout ); moCaseMap.assignIfUsed( rSourceProps.moCaseMap ); moBold.assignIfUsed( rSourceProps.moBold ); @@ -124,6 +126,11 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil rPropMap[ PROP_CharStrikeout ] <<= GetFontStrikeout( moStrikeout.get( XML_noStrike ) ); rPropMap[ PROP_CharCaseMap ] <<= GetCaseMap( moCaseMap.get( XML_none ) ); + if( moBaseline.has() ) { + rPropMap[ PROP_CharEscapement ] <<= sal_Int16(moBaseline.get( 0 ) / 1000); + rPropMap[ PROP_CharEscapementHeight ] <<= sal_Int8(DFLT_ESC_PROP); + } + if( !bUseOptional || moBold.has() ) { float fWeight = moBold.get( false ) ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL; rPropMap[ PROP_CharWeight ] <<= fWeight; diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx index 605ebb0..2119dc6 100644 --- a/oox/source/drawingml/textcharacterpropertiescontext.cxx +++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx @@ -56,6 +56,8 @@ TextCharacterPropertiesContext::TextCharacterPropertiesContext( mrTextCharacterProperties.moUnderline = aAttribs.getToken( XML_u ); if ( aAttribs.hasAttribute( XML_strike ) ) mrTextCharacterProperties.moStrikeout = aAttribs.getToken( XML_strike ); + if ( aAttribs.hasAttribute( XML_baseline ) ) + mrTextCharacterProperties.moBaseline = aAttribs.getInteger( XML_baseline ); // mrTextCharacterProperties.moCaseMap = aAttribs.getToken( XML_cap ); if ( aAttribs.hasAttribute( XML_b ) ) commit 3ab5537b23061e2e42b3afb56c403a72ae8524b8 Author: Muthu Subramanian <sumu...@collabora.com> Date: Wed Dec 18 20:08:41 2013 +0530 n#828390: Explictly export font properties. Seems like the status is returned as default, but the font properties needs to be still exported. diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index bfe3ed9..ff3f62a 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -667,14 +667,14 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs sal_Int32 nSize = 1800; sal_Int32 nCharEscapement = 0; - if( GETAD( CharHeight ) ) + if( GETA( CharHeight ) ) nSize = (sal_Int32) (100*(*((float*) mAny.getValue()))); - if ( ( bComplex && GETAD( CharWeightComplex ) ) || GETAD( CharWeight ) ) + if ( ( bComplex && GETA( CharWeightComplex ) ) || GETA( CharWeight ) ) if ( *((float*) mAny.getValue()) >= awt::FontWeight::SEMIBOLD ) bold = "1"; - if ( ( bComplex && GETAD( CharPostureComplex ) ) || GETAD( CharPosture ) ) + if ( ( bComplex && GETA( CharPostureComplex ) ) || GETA( CharPosture ) ) switch ( *((awt::FontSlant*) mAny.getValue()) ) { case awt::FontSlant_OBLIQUE : @@ -789,7 +789,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs WriteSolidFill( color ); } - if( GETAD( CharFontName ) ) { + if( GETA( CharFontName ) ) { const char* typeface = NULL; const char* pitch = NULL; const char* charset = NULL; commit e16a2d929613610526a4101e1750a14b49a68104 Author: Muthu Subramanian <sumu...@collabora.com> Date: Thu Dec 12 12:57:02 2013 +0530 Force int16 as int32 diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index 2aceba9..f61cab0 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -599,8 +599,8 @@ OString SdPage::stringify() const /*append(OUStringToOString(maCreatedPageName, RTL_TEXTENCODING_UTF8)). append(OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)).*/ append(OUStringToOString(maBookmarkName, RTL_TEXTENCODING_UTF8)). - append(mbScaleObjects).append(mbBackgroundFullSize).append((sal_Int32)meCharSet).append(mnPaperBin). - append((sal_Int32)meOrientation).append(mnTransitionType).append(mnTransitionSubtype).append(mbTransitionDirection). + append(mbScaleObjects).append(mbBackgroundFullSize).append((sal_Int32)meCharSet).append((sal_Int32)mnPaperBin). + append((sal_Int32)meOrientation).append((sal_Int32)mnTransitionType).append((sal_Int32)mnTransitionSubtype).append(mbTransitionDirection). append(mnTransitionFadeColor).append(mfTransitionDuration);//.append(mbIsPrecious); sal_Int32 n = GetObjCount(); commit 21326076928a11f12dcef6bf752b76302bd469c8 Author: Muthu Subramanian <sumu...@collabora.com> Date: Thu Dec 12 12:55:39 2013 +0530 Force enums as ints - to avoid warning/errors. diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index 9f621fd..2aceba9 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -592,15 +592,15 @@ void SdPage::setTransitionDuration ( double fTranstionDuration ) OString SdPage::stringify() const { OStringBuffer aString(100); - aString.append(mePageKind).append(meAutoLayout).append(mbSelected).append(mePresChange).append(mbSoundOn).append(mbExcluded). + aString.append((sal_Int32)mePageKind).append((sal_Int32)meAutoLayout).append(mbSelected).append((sal_Int32)mePresChange).append(mbSoundOn).append(mbExcluded). append(OUStringToOString( maLayoutName, RTL_TEXTENCODING_UTF8 )). append(OUStringToOString(maSoundFile, RTL_TEXTENCODING_UTF8 )). append(mbLoopSound).append(mbStopSound). /*append(OUStringToOString(maCreatedPageName, RTL_TEXTENCODING_UTF8)). append(OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)).*/ append(OUStringToOString(maBookmarkName, RTL_TEXTENCODING_UTF8)). - append(mbScaleObjects).append(mbBackgroundFullSize).append(meCharSet).append(mnPaperBin). - append(meOrientation).append(mnTransitionType).append(mnTransitionSubtype).append(mbTransitionDirection). + append(mbScaleObjects).append(mbBackgroundFullSize).append((sal_Int32)meCharSet).append(mnPaperBin). + append((sal_Int32)meOrientation).append(mnTransitionType).append(mnTransitionSubtype).append(mbTransitionDirection). append(mnTransitionFadeColor).append(mfTransitionDuration);//.append(mbIsPrecious); sal_Int32 n = GetObjCount(); commit 2da05adcdc7481df78ab5d11b5e498843bff22a5 Author: Muthu Subramanian <sumu...@collabora.com> Date: Thu Dec 12 12:53:55 2013 +0530 Add append(bool) to OStringBuffer. diff --git a/sal/inc/rtl/strbuf.hxx b/sal/inc/rtl/strbuf.hxx index ed627ce..d8112ea 100644 --- a/sal/inc/rtl/strbuf.hxx +++ b/sal/inc/rtl/strbuf.hxx @@ -510,6 +510,23 @@ public: } /** + Appends the string representation of the <code>bool</code> + argument to the string buffer. + + The argument is converted to a string as if by the method + <code>String.valueOf</code>, and the characters of that + string are then appended to this string buffer. + + @param b a <code>bool</code>. + @return this string buffer. + */ + OStringBuffer & append(bool b) + { + sal_Char sz[RTL_STR_MAX_VALUEOFBOOLEAN]; + return append( sz, rtl_str_valueOfBoolean( sz, b ) ); + } + + /** Appends the string representation of the <code>char</code> argument to this string buffer. commit f866e29bf5623e8910ad3070a9c40af985aeb351 Author: Muthu Subramanian <sumu...@collabora.com> Date: Thu Dec 12 12:50:13 2013 +0530 n#753460: Copying slides having same master page name. diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index f62b2ae..0c99930 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -382,6 +382,9 @@ public: void removeAnnotation( const ::com::sun::star::uno::Reference< ::com::sun::star::office::XAnnotation >& xAnnotation ); const sd::AnnotationVector& getAnnotations() const { return maAnnotations; } bool hasAnnotations() const { return !maAnnotations.empty(); } + sal_uInt64 getHash() const; + virtual OString stringify() const; + private: bool mbIsPrecious; diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index e2d7039..7f493d8 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -72,12 +72,12 @@ class InsertBookmarkAsPage_FindDuplicateLayouts public: InsertBookmarkAsPage_FindDuplicateLayouts( std::vector<rtl::OUString> &rLayoutsToTransfer ) : mrLayoutsToTransfer(rLayoutsToTransfer) {} - void operator()( SdDrawDocument&, SdPage* ); + void operator()( SdDrawDocument&, SdPage*, bool, SdDrawDocument* ); private: std::vector<rtl::OUString> &mrLayoutsToTransfer; }; -void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc, SdPage* pBMMPage ) +void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc, SdPage* pBMMPage, bool bRenameDuplicates, SdDrawDocument* pBookmarkDoc ) { // now check for duplicate masterpage and layout names // =================================================== @@ -105,7 +105,17 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc rtl::OUString aTest(aFullTest); if (aTest == aLayout) - bFound = true; + { + if( bRenameDuplicates && pTestPage->getHash() != pBMMPage->getHash() ) + { + pBookmarkDoc->RenameLayoutTemplate( pBMMPage->GetLayoutName(), OUString(pBMMPage->GetName())+=OUString("_") ); + aLayout = pBMMPage->GetName(); + + break; + } + else + bFound = true; + } } if (!bFound) @@ -120,7 +130,7 @@ void InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument& rDoc static void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBookmarkDoc, const std::vector<rtl::OUString> &rBookmarkList, sal_uInt16 nBMSdPageCount, - InsertBookmarkAsPage_FindDuplicateLayouts& rPageIterator ) + InsertBookmarkAsPage_FindDuplicateLayouts& rPageIterator, bool bRenameDuplicates = false ) { // // Refactored copy'n'pasted layout name collection from InsertBookmarkAsPage @@ -180,7 +190,7 @@ static void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBoo if( pBMMPage ) { // yes, call functor - rPageIterator( rDoc, pBMMPage ); + rPageIterator( rDoc, pBMMPage, bRenameDuplicates, pBookmarkDoc ); } } } @@ -498,7 +508,7 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage( // std::vector<rtl::OUString> aLayoutsToTransfer; InsertBookmarkAsPage_FindDuplicateLayouts aSearchFunctor( aLayoutsToTransfer ); - lcl_IterateBookmarkPages( *this, pBookmarkDoc, rBookmarkList, nBMSdPageCount, aSearchFunctor ); + lcl_IterateBookmarkPages( *this, pBookmarkDoc, rBookmarkList, nBMSdPageCount, aSearchFunctor, ( rBookmarkList.empty() && pBookmarkDoc != this ) ); /************************************************************************** diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index 13fda31..9f621fd 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -45,6 +45,7 @@ #include <tools/tenccvt.hxx> #include <svl/itemset.hxx> +#include <rtl/strbuf.hxx> using namespace ::sd; using namespace ::com::sun::star; @@ -53,6 +54,16 @@ using namespace ::com::sun::star::office; extern void NotifyDocumentEvent( SdDrawDocument* pDocument, const rtl::OUString& rEventName, const Reference< XInterface >& xSource ); +static sal_uInt64 lcl_getHash( OString aString ) +{ + sal_Int32 len = aString.getLength(); + sal_uInt64 nHash = 0; + + for( sal_Int32 i = 0; i < len; i++ ) + nHash = (nHash << 5) - nHash + aString[i]; + return nHash; +} + /************************************************************************* |* |* SetPresentationLayout, setzt: Layoutnamen, Masterpage-Verkn�pfung und @@ -578,6 +589,32 @@ void SdPage::setTransitionDuration ( double fTranstionDuration ) ActionChanged(); } +OString SdPage::stringify() const +{ + OStringBuffer aString(100); + aString.append(mePageKind).append(meAutoLayout).append(mbSelected).append(mePresChange).append(mbSoundOn).append(mbExcluded). + append(OUStringToOString( maLayoutName, RTL_TEXTENCODING_UTF8 )). + append(OUStringToOString(maSoundFile, RTL_TEXTENCODING_UTF8 )). + append(mbLoopSound).append(mbStopSound). + /*append(OUStringToOString(maCreatedPageName, RTL_TEXTENCODING_UTF8)). + append(OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)).*/ + append(OUStringToOString(maBookmarkName, RTL_TEXTENCODING_UTF8)). + append(mbScaleObjects).append(mbBackgroundFullSize).append(meCharSet).append(mnPaperBin). + append(meOrientation).append(mnTransitionType).append(mnTransitionSubtype).append(mbTransitionDirection). + append(mnTransitionFadeColor).append(mfTransitionDuration);//.append(mbIsPrecious); + + sal_Int32 n = GetObjCount(); + for(sal_Int32 i = 0; i < n; i++) + aString.append(GetObj(i)->stringify()); + return aString.makeStringAndClear(); +} + +sal_uInt64 SdPage::getHash() const +{ + return lcl_getHash( stringify() ); +} + + namespace sd { extern void createAnnotation( Reference< XAnnotation >& xAnnotation, SdPage* pPage ); extern SdrUndoAction* CreateUndoInsertOrRemoveAnnotation( const Reference< XAnnotation >& xAnnotation, bool bInsert ); diff --git a/svl/inc/svl/itemset.hxx b/svl/inc/svl/itemset.hxx index a38398a..47ed7ef 100644 --- a/svl/inc/svl/itemset.hxx +++ b/svl/inc/svl/itemset.hxx @@ -119,6 +119,7 @@ public: virtual sal_uInt16 ClearItem( sal_uInt16 nWhich = 0); virtual void ClearInvalidItems( sal_Bool bHardDefault = sal_False ); void InvalidateAllItems(); // HACK(via nWhich = 0) ??? + void InvalidateDefaultItems(); inline void SetParent( const SfxItemSet* pNew ); diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index 27f2a8d..c531048 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -1790,7 +1790,23 @@ SfxAllItemSet::SfxAllItemSet(const SfxItemSet &rCopy) // ----------------------------------------------------------------------- +void SfxItemSet::InvalidateDefaultItems() +{ + DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet); + sal_uInt16* pPtr = _pWhichRanges; + SfxItemArray ppFnd = _aItems; + while( *pPtr ) + { + for ( sal_uInt16 nWhich = *pPtr; nWhich <= *(pPtr+1); ++nWhich, ++ppFnd ) + if ( *ppFnd && *ppFnd != (SfxPoolItem *)-1 && **ppFnd == _pPool->GetDefaultItem( nWhich ) ) + { + _pPool->Remove( **ppFnd ); + *ppFnd = (SfxPoolItem*)-1; + } + pPtr += 2; + } +} SfxAllItemSet::SfxAllItemSet(const SfxAllItemSet &rCopy) : SfxItemSet(rCopy), diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx index cf6d266..35a023f 100644 --- a/svx/inc/svx/svdobj.hxx +++ b/svx/inc/svx/svdobj.hxx @@ -1056,6 +1056,8 @@ public: /// @see mbDoNotInsertIntoPageAutomatically bool IsDoNotInsertIntoPageAutomatically() const; + virtual OString stringify() const; + protected: /** Sets a new UNO shape * diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 1c0c879..6f30096 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -109,6 +109,7 @@ #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <svx/sdrobjectfilter.hxx> #include "svdconv.hxx" +#include <rtl/strbuf.hxx> using namespace ::com::sun::star; @@ -1766,6 +1767,45 @@ bool SdrObject::HasTextEdit() const return false; } +OString SdrObject::stringify() const +{ + OStringBuffer aString(100); + aString.append(aAnchor.X()). + append(aAnchor.Y()). + append(aGridOffset.X()). + append(aGridOffset.Y()). + append((sal_Int32)nOrdNum). + append((sal_Int32)mnNavigationPosition). + append(mbSupportTextIndentingOnLineWidthChange). + append(mbLineIsOutsideGeometry). + append(bMarkProt). + append(bIs3DObj). + append(bIsEdge). + append(bClosedObj). + append(bNotVisibleAsMaster). + append(bEmptyPresObj). + append(mbVisible). + append(bNoPrint). + append(bSizProt). + append(bMovProt). + append(bGrouped). + append(bInserted). + append(bNetLock). + append(bVirtObj). + //append(maBLIPSizeRectangle). + append(mnLayerID); + + SvMemoryStream aStream; + OString aLine; + SfxItemSet aSet(GetMergedItemSet()); + aSet.InvalidateDefaultItems(); + aSet.Store(aStream, true); + aStream.Flush(); + aString.append((const char *)aStream.GetData(), aStream.GetEndOfData()); + + return aString.makeStringAndClear(); +} + sal_Bool SdrObject::BegTextEdit(SdrOutliner& /*rOutl*/) { return false; commit cd725d9c3772cf4a9fdf557971e84a4acaaee3ab Author: Muthu Subramanian <sumu...@collabora.com> Date: Tue Dec 10 17:07:23 2013 +0530 n#828390: Import new line in text. diff --git a/oox/inc/oox/core/contexthandler2.hxx b/oox/inc/oox/core/contexthandler2.hxx index 12ff23b..f6b9d5d 100644 --- a/oox/inc/oox/core/contexthandler2.hxx +++ b/oox/inc/oox/core/contexthandler2.hxx @@ -206,6 +206,8 @@ private: ContextStackRef mxContextStack; /// Stack of all processed elements. size_t mnRootStackSize; /// Stack size on construction time. + +protected: bool mbEnableTrimSpace; /// True = trim whitespace in characters(). }; diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx index 7bc29a0..a8b3d64 100644 --- a/oox/source/drawingml/textbodycontext.cxx +++ b/oox/source/drawingml/textbodycontext.cxx @@ -54,6 +54,7 @@ TextParagraphContext::TextParagraphContext( ContextHandler& rParent, TextParagra : ContextHandler( rParent ) , mrParagraph( rPara ) { + mbEnableTrimSpace = false; } // --------------------------------------------------------------------
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits