cppcanvas/source/mtfrenderer/implrenderer.cxx | 16 ++++--- editeng/source/items/svxfont.cxx | 56 ++++++++++++-------------- include/editeng/svxfont.hxx | 3 - oox/source/ppt/timenodelistcontext.cxx | 9 ++-- 4 files changed, 42 insertions(+), 42 deletions(-)
New commits: commit 44bb0cc3aa4f5697078d393d5724d28f4b05f5a8 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jan 14 09:32:02 2014 +0000 Related: #i119844# align from/to types with DFF_msofbtAnimateRotationData Change-Id: I43bf12b69892614a6054a14de76bbbd4e46c2ee9 diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index 3c798f2..14bd0e2 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -714,21 +714,22 @@ namespace oox { namespace ppt { pNode->getNodeProperties()[ NP_TRANSFORMTYPE ] = makeAny((sal_Int16)AnimationTransformType::ROTATE); - // TODO make sure the units are OK + // see also DFF_msofbtAnimateRotationData in + // sd/source/filter/ppt/pptinanimations.cxx if(attribs.hasAttribute( XML_by ) ) { sal_Int32 nBy = attribs.getInteger( XML_by, 0 ); - pNode->setBy( makeAny( (double)nBy ) ); + pNode->setBy( makeAny( (double) nBy ) ); } if(attribs.hasAttribute( XML_from ) ) { sal_Int32 nFrom = attribs.getInteger( XML_from, 0 ); - pNode->setFrom( makeAny( nFrom ) ); + pNode->setFrom( makeAny( (double) nFrom ) ); } if(attribs.hasAttribute( XML_to ) ) { sal_Int32 nTo = attribs.getInteger( XML_to, 0 ); - pNode->setTo( makeAny( nTo ) ); + pNode->setTo( makeAny( (double) nTo ) ); } } commit 0bec1401680bce1b2aaaa3e941b083d3427d481b Author: Steve Yin <stev...@apache.org> Date: Tue Jan 14 08:03:55 2014 +0000 Resolves: #i119844# Spin effect amount property lost when saving pptx to odp (cherry picked from commit a7eedd28dd66cec1a668c3df6a8568dcad0f858f) Change-Id: Ia2b46f4b35fc90723570b7f8bfb82c101279eb9d diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index ca7f1cd..3c798f2 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -718,7 +718,7 @@ namespace oox { namespace ppt { if(attribs.hasAttribute( XML_by ) ) { sal_Int32 nBy = attribs.getInteger( XML_by, 0 ); - pNode->setBy( makeAny( nBy ) ); + pNode->setBy( makeAny( (double)nBy ) ); } if(attribs.hasAttribute( XML_from ) ) { commit 92ba7bd75b584ae85380b9c07863db36b74cab53 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Jan 13 20:49:52 2014 +0000 xub_StrLen->sal_Int32 Change-Id: I9c4d9b8d18b36dda6609b1976cae13a481943563 diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index b86160f..cf67643 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -22,7 +22,6 @@ #include <vcl/print.hxx> #include <tools/gen.hxx> #include <tools/poly.hxx> -#include <tools/string.hxx> #include <unotools/charclass.hxx> #include <editeng/unolingu.hxx> #include <com/sun/star/i18n/KCharacterType.hpp> @@ -166,12 +165,12 @@ class SvxDoCapitals protected: OutputDevice *pOut; const OUString &rTxt; - const xub_StrLen nIdx; - const xub_StrLen nLen; + const sal_Int32 nIdx; + const sal_Int32 nLen; public: SvxDoCapitals( OutputDevice *_pOut, const OUString &_rTxt, - const xub_StrLen _nIdx, const xub_StrLen _nLen ) + const sal_Int32 _nIdx, const sal_Int32 _nLen ) : pOut(_pOut), rTxt(_rTxt), nIdx(_nIdx), nLen(_nLen) { } @@ -180,13 +179,13 @@ public: virtual void DoSpace( const sal_Bool bDraw ); virtual void SetSpace(); virtual void Do( const OUString &rTxt, - const xub_StrLen nIdx, const xub_StrLen nLen, + const sal_Int32 nIdx, const sal_Int32 nLen, const sal_Bool bUpper ) = 0; - inline OutputDevice *GetOut() { return pOut; } - inline const OUString &GetTxt() const { return rTxt; } - xub_StrLen GetIdx() const { return nIdx; } - xub_StrLen GetLen() const { return nLen; } + OutputDevice *GetOut() { return pOut; } + const OUString &GetTxt() const { return rTxt; } + sal_Int32 GetIdx() const { return nIdx; } + sal_Int32 GetLen() const { return nLen; } }; void SvxDoCapitals::DoSpace( const sal_Bool /*bDraw*/ ) { } @@ -202,13 +201,13 @@ void SvxDoCapitals::SetSpace() { } void SvxFont::DoOnCapitals(SvxDoCapitals &rDo) const { const OUString &rTxt = rDo.GetTxt(); - const xub_StrLen nIdx = rDo.GetIdx(); + const sal_Int32 nIdx = rDo.GetIdx(); const sal_Int32 nLen = rDo.GetLen(); const OUString aTxt( CalcCaseMap( rTxt ) ); - const sal_uInt16 nTxtLen = std::min( rTxt.getLength(), nLen ); - sal_uInt16 nPos = 0; - sal_uInt16 nOldPos = nPos; + const sal_Int32 nTxtLen = std::min( rTxt.getLength(), nLen ); + sal_Int32 nPos = 0; + sal_Int32 nOldPos = nPos; // #108210# // Test if string length differ between original and CaseMapped @@ -591,8 +590,8 @@ protected: short nKern; public: SvxDoGetCapitalSize( SvxFont *_pFnt, const OutputDevice *_pOut, - const OUString &_rTxt, const xub_StrLen _nIdx, - const xub_StrLen _nLen, const short _nKrn ) + const OUString &_rTxt, const sal_Int32 _nIdx, + const sal_Int32 _nLen, const short _nKrn ) : SvxDoCapitals( (OutputDevice*)_pOut, _rTxt, _nIdx, _nLen ), pFont( _pFnt ), nKern( _nKrn ) @@ -600,14 +599,14 @@ public: virtual ~SvxDoGetCapitalSize() {} - virtual void Do( const OUString &rTxt, const xub_StrLen nIdx, - const xub_StrLen nLen, const sal_Bool bUpper ); + virtual void Do( const OUString &rTxt, const sal_Int32 nIdx, + const sal_Int32 nLen, const sal_Bool bUpper ); - inline const Size &GetSize() const { return aTxtSize; }; + const Size &GetSize() const { return aTxtSize; }; }; -void SvxDoGetCapitalSize::Do( const OUString &_rTxt, const xub_StrLen _nIdx, - const xub_StrLen _nLen, const sal_Bool bUpper ) +void SvxDoGetCapitalSize::Do( const OUString &_rTxt, const sal_Int32 _nIdx, + const sal_Int32 _nLen, const sal_Bool bUpper ) { Size aPartSize; if ( !bUpper ) @@ -656,7 +655,7 @@ protected: short nKern; public: SvxDoDrawCapital( SvxFont *pFnt, OutputDevice *_pOut, const OUString &_rTxt, - const xub_StrLen _nIdx, const xub_StrLen _nLen, + const sal_Int32 _nIdx, const sal_Int32 _nLen, const Point &rPos, const short nKrn ) : SvxDoCapitals( _pOut, _rTxt, _nIdx, _nLen ), pFont( pFnt ), @@ -664,18 +663,17 @@ public: aSpacePos( rPos ), nKern( nKrn ) { } - virtual ~SvxDoDrawCapital() {} virtual void DoSpace( const sal_Bool bDraw ); virtual void SetSpace(); - virtual void Do( const OUString &rTxt, const xub_StrLen nIdx, - const xub_StrLen nLen, const sal_Bool bUpper ); + virtual void Do( const OUString &rTxt, const sal_Int32 nIdx, + const sal_Int32 nLen, const sal_Bool bUpper ); }; void SvxDoDrawCapital::DoSpace( const sal_Bool bDraw ) { if ( bDraw || pFont->IsWordLineMode() ) { - sal_uInt16 nDiff = (sal_uInt16)(aPos.X() - aSpacePos.X()); + sal_uLong nDiff = (sal_uLong)(aPos.X() - aSpacePos.X()); if ( nDiff ) { sal_Bool bWordWise = pFont->IsWordLineMode(); @@ -697,8 +695,8 @@ void SvxDoDrawCapital::SetSpace() aSpacePos.X() = aPos.X(); } -void SvxDoDrawCapital::Do( const OUString &_rTxt, const xub_StrLen _nIdx, - const xub_StrLen _nLen, const sal_Bool bUpper) +void SvxDoDrawCapital::Do( const OUString &_rTxt, const sal_Int32 _nIdx, + const sal_Int32 _nLen, const sal_Bool bUpper) { sal_uInt8 nProp = 0; Size aPartSize; commit 563ba069b529c5a65db4f5e306fc21e5c59431e6 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Jan 13 20:45:34 2014 +0000 longparas: nPartLen always is USHRT_MAX/STRING_LEN to take full string Change-Id: I55bb0baa8e83948c470ade2fc6fabccb69dea91d diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index b873c59..b86160f 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -199,11 +199,11 @@ void SvxDoCapitals::SetSpace() { } * calls the method SvxDoCapitals::Do( ). *************************************************************************/ -void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const +void SvxFont::DoOnCapitals(SvxDoCapitals &rDo) const { const OUString &rTxt = rDo.GetTxt(); const xub_StrLen nIdx = rDo.GetIdx(); - const sal_Int32 nLen = STRING_LEN == nPartLen ? rDo.GetLen() : nPartLen; + const sal_Int32 nLen = rDo.GetLen(); const OUString aTxt( CalcCaseMap( rTxt ) ); const sal_uInt16 nTxtLen = std::min( rTxt.getLength(), nLen ); diff --git a/include/editeng/svxfont.hxx b/include/editeng/svxfont.hxx index 34d78f1..cbd4d02 100644 --- a/include/editeng/svxfont.hxx +++ b/include/editeng/svxfont.hxx @@ -74,8 +74,7 @@ public: OUString CalcCaseMap(const OUString &rTxt) const; // Handle upper case letters - void DoOnCapitals( SvxDoCapitals &rDo, - const sal_uInt16 nPartLen = USHRT_MAX ) const; + void DoOnCapitals(SvxDoCapitals &rDo) const; void SetPhysFont( OutputDevice *pOut ) const; Font ChgPhysFont( OutputDevice *pOut ) const; commit d113e328ef045e8da2b3e6f6e9d82970e882d097 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Jan 13 20:42:42 2014 +0000 longparas: remove now broken STRING_LEN uses Change-Id: Ie2de4680e07e26416fc52d4c22b5bececb190cc1 diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 8d92f51..9b65a41 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -79,7 +79,6 @@ #include "mtftools.hxx" #include "outdevstate.hxx" #include <basegfx/matrix/b2dhommatrixtools.hxx> -#include <tools/string.hxx> using namespace ::com::sun::star; @@ -2480,11 +2479,13 @@ namespace cppcanvas if (rVDev.GetDigitLanguage()) sText = convertToLocalizedNumerals(sText, rVDev.GetDigitLanguage()); + const sal_Int32 nLen = std::min(pAct->GetLen(), pAct->GetText().getLength() - pAct->GetIndex()); + createTextAction( pAct->GetPoint(), sText, pAct->GetIndex(), - pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().getLength() - pAct->GetIndex() : pAct->GetLen(), + nLen, NULL, rFactoryParms, bSubsettableActions ); @@ -2499,11 +2500,13 @@ namespace cppcanvas if (rVDev.GetDigitLanguage()) sText = convertToLocalizedNumerals(sText, rVDev.GetDigitLanguage()); + const sal_Int32 nLen = std::min(pAct->GetLen(), pAct->GetText().getLength() - pAct->GetIndex()); + createTextAction( pAct->GetPoint(), sText, pAct->GetIndex(), - pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().getLength() - pAct->GetIndex() : pAct->GetLen(), + nLen, pAct->GetDXArray(), rFactoryParms, bSubsettableActions ); @@ -2577,8 +2580,7 @@ namespace cppcanvas if (rVDev.GetDigitLanguage()) sText = convertToLocalizedNumerals(sText, rVDev.GetDigitLanguage()); - const sal_uInt16 nLen( pAct->GetLen() == (sal_uInt16)STRING_LEN ? - pAct->GetText().getLength() - pAct->GetIndex() : pAct->GetLen() ); + const sal_Int32 nLen = std::min(pAct->GetLen(), pAct->GetText().getLength() - pAct->GetIndex()); // #i70897# Nothing to do, actually... if( nLen == 0 ) @@ -2598,7 +2600,7 @@ namespace cppcanvas // Last entry of pDXArray contains total width of the text sal_Int32* p=pDXArray.get(); - for( sal_uInt16 i=1; i<=nLen; ++i ) + for (sal_Int32 i=1; i<=nLen; ++i) { // calc ratio for every array entry, to // distribute rounding errors 'evenly' @@ -2613,7 +2615,7 @@ namespace cppcanvas pAct->GetPoint(), sText, pAct->GetIndex(), - pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().getLength() - pAct->GetIndex() : pAct->GetLen(), + nLen, pDXArray.get(), rFactoryParms, bSubsettableActions );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits