[Libreoffice-commits] .: sw/source unusedcode.easy
sw/source/ui/dbui/maildispatcher.cxx |8 sw/source/ui/inc/maildispatcher.hxx |5 - unusedcode.easy |1 - 3 files changed, 14 deletions(-) New commits: commit 78aa62bc54e67b4552c18ae67be9789be5ef2409 Author: Santiago Martinez smvar...@gmail.com Date: Tue Apr 24 08:52:28 2012 +0100 Remove unused code in sw diff --git a/sw/source/ui/dbui/maildispatcher.cxx b/sw/source/ui/dbui/maildispatcher.cxx index 5e0f9e5..3eb6632 100644 --- a/sw/source/ui/dbui/maildispatcher.cxx +++ b/sw/source/ui/dbui/maildispatcher.cxx @@ -208,14 +208,6 @@ void MailDispatcher::addListener(::rtl::ReferenceIMailDispatcherListener liste listeners_.push_back(listener); } -void MailDispatcher::removeListener(::rtl::ReferenceIMailDispatcherListener listener) -{ -OSL_PRECOND(!shutdown_requested_, MailDispatcher thread is shuting down already); - -::osl::MutexGuard guard(listener_container_mutex_); -listeners_.remove(listener); -} - std::list ::rtl::ReferenceIMailDispatcherListener MailDispatcher::cloneListener() { ::osl::MutexGuard guard(listener_container_mutex_); diff --git a/sw/source/ui/inc/maildispatcher.hxx b/sw/source/ui/inc/maildispatcher.hxx index ad5521d..d11d58f 100644 --- a/sw/source/ui/inc/maildispatcher.hxx +++ b/sw/source/ui/inc/maildispatcher.hxx @@ -136,11 +136,6 @@ public: */ void addListener(::rtl::ReferenceIMailDispatcherListener listener); -/** -Unregister a listener for mail dispatcher events -*/ -void removeListener(::rtl::ReferenceIMailDispatcherListener listener); - protected: virtual void SAL_CALL run(); virtual void SAL_CALL onTerminated(); diff --git a/unusedcode.easy b/unusedcode.easy index a96ce89..e1cd14b 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -22,7 +22,6 @@ MSDffImportRecords::Insert(SvxMSDffImportRec* const, unsigned short) MSDffImportRecords::Insert(SvxMSDffImportRec* const*, unsigned short) MSDffImportRecords::Remove(SvxMSDffImportRec* const, unsigned short) MSDffImportRecords::Remove(unsigned short, unsigned short) -MailDispatcher::removeListener(rtl::ReferenceIMailDispatcherListener) Matrix3d::Inverse() const Matrix3d::Matrix3d() PopupMenu::SetSelectedEntry(unsigned short) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/bastyp/swcache.cxx| 18 +- sw/source/core/crsr/crsrsh.cxx |7 +-- sw/source/core/doc/docredln.cxx |8 sw/source/core/layout/calcmove.cxx |8 sw/source/core/layout/ftnfrm.cxx | 12 ++-- sw/source/core/table/swnewtable.cxx | 26 +- sw/source/core/text/txtio.cxx|4 +--- sw/source/filter/writer/wrtswtbl.cxx |2 +- 8 files changed, 39 insertions(+), 46 deletions(-) New commits: commit a7c7942fd1946da978673d2c350630f83603d18d Author: Stephan Bergmann sberg...@redhat.com Date: Tue Apr 24 11:05:51 2012 +0200 DBG_UTIL vs OSL_DEBUG_LEVEL confusion diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx index 78e2960..9c0187f 100644 --- a/sw/source/core/bastyp/swcache.cxx +++ b/sw/source/core/bastyp/swcache.cxx @@ -49,8 +49,8 @@ void SwCache::Check() return; //Konsistenspruefung. -OSL_ENSURE( !pLast-GetNext(), Last but not last. ); -OSL_ENSURE( !pRealFirst-GetPrev(), First but not first. ); +SAL_WARN_IF( pLast-GetNext(), sw, Last but not last. ); +SAL_WARN_IF( pRealFirst-GetPrev(), sw, First but not first. ); sal_uInt16 nCnt = 0; sal_Bool bFirstFound = sal_False; SwCacheObj *pObj = pRealFirst; @@ -61,20 +61,20 @@ void SwCache::Check() SwCacheObj *pTmp = pLast; while ( pTmp pTmp != pObj ) pTmp = pTmp-GetPrev(); -OSL_ENSURE( pTmp, Objekt not found. ); +SAL_WARN_IF( !pTmp, sw, Objekt not found. ); ++nCnt; if ( pObj == pFirst ) bFirstFound = sal_True; if ( !pObj-GetNext() ) -OSL_ENSURE( pObj == pLast, Last not Found. ); +SAL_WARN_IF( pObj != pLast, sw, Last not Found. ); pObj = pObj-GetNext(); -OSL_ENSURE( pObj != pRekursive, Recursion in SwCache. ); +SAL_WARN_IF( pObj == pRekursive, sw, Recursion in SwCache. ); } -OSL_ENSURE( bFirstFound, First not Found. ); -OSL_ENSURE( (nCnt + aFreePositions.size()) == Count(), Lost Chain. ); -OSL_ENSURE( -Count() != nCurMax || nCurMax == aFreePositions.size() + nCnt, +SAL_WARN_IF( !bFirstFound, sw, First not Found. ); +SAL_WARN_IF( nCnt + aFreePositions.size() != Count(), sw, Lost Chain. ); +SAL_WARN_IF( +Count() == nCurMax nCurMax != aFreePositions.size() + nCnt, sw, Lost FreePositions. ); } #endif diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 6a1f2bb..88fd062 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1254,12 +1254,7 @@ static void lcl_CheckHiddenSection( SwNodeIndex rIdx ) SwNodeIndex aTmp( *pSectNd ); const SwNode* pFrmNd = rIdx.GetNodes().FindPrvNxtFrmNode( aTmp, pSectNd-EndOfSectionNode() ); - -#ifndef DBG_UTIL -(void) pFrmNd; -#else -OSL_ENSURE( pFrmNd, found no Node with Frames ); -#endif +SAL_WARN_IF( !pFrmNd, sw, found no Node with Frames ); rIdx = aTmp; } } diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 5ca28ec..c68f85d 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -119,12 +119,12 @@ TYPEINIT1(SwRedlineHint, SfxHint); const SwRedline* pCurrent = rTbl[ n ]; // check redline sorting -OSL_ENSURE( *pPrev-Start() = *pCurrent-Start(), -_ERROR_PREFIX not sorted correctly ); +SAL_WARN_IF( *pPrev-Start() *pCurrent-Start(), sw, + _ERROR_PREFIX not sorted correctly ); // check for overlapping redlines -OSL_ENSURE( *pPrev-End() = *pCurrent-Start(), -_ERROR_PREFIX overlapping redlines ); +SAL_WARN_IF( *pPrev-End() *pCurrent-Start(), sw, + _ERROR_PREFIX overlapping redlines ); } } diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index eeccc20..b049913 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -1147,14 +1147,14 @@ void SwCntntFrm::MakeAll() const SwDoc *pDoc = GetAttrSet()-GetDoc(); if( pDoc ) { -static sal_Bool bWarn = sal_False; +static sal_Bool bWarned = sal_False; if( pDoc-InXMLExport() ) { -OSL_ENSURE( bWarn, Formatting during XML-export! ); -bWarn = sal_True; +SAL_WARN_IF( !bWarned, sw, Formatting during XML-export! ); +bWarned = sal_True; } else -bWarn = sal_False; +bWarned = sal_False; } #endif diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 940bc11..38e3ee8 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -3134,18 +3134,18 @@
[Libreoffice-commits] .: sw/source
sw/source/ui/inc/unotxvw.hxx |4 ++-- sw/source/ui/uno/unotxvw.cxx | 29 ++--- 2 files changed, 16 insertions(+), 17 deletions(-) New commits: commit 8533a191f4434490aa44118bce0e5719477d957a Author: Noel Grandin n...@peralex.com Date: Wed Apr 18 18:03:53 2012 +0200 Convert SV_DECL_PTRARR_DEL to boost::ptr_vector diff --git a/sw/source/ui/inc/unotxvw.hxx b/sw/source/ui/inc/unotxvw.hxx index 5655b6c..c764c15 100644 --- a/sw/source/ui/inc/unotxvw.hxx +++ b/sw/source/ui/inc/unotxvw.hxx @@ -55,8 +55,8 @@ class SdrObject; class SwView; -typedef ::com::sun::star::uno::Reference ::com::sun::star::view::XSelectionChangeListener * XSelectionChangeListenerPtr; -SV_DECL_PTRARR_DEL( SelectionChangeListenerArr, XSelectionChangeListenerPtr, 4 ) +typedef ::com::sun::star::uno::Reference ::com::sun::star::view::XSelectionChangeListener XSelectionChangeListenerRef; +typedef boost::ptr_vectorXSelectionChangeListenerRef SelectionChangeListenerArr; class SwXTextView : public ::com::sun::star::view::XSelectionSupplier, diff --git a/sw/source/ui/uno/unotxvw.cxx b/sw/source/ui/uno/unotxvw.cxx index d96a47e..3cd93ac 100644 --- a/sw/source/ui/uno/unotxvw.cxx +++ b/sw/source/ui/uno/unotxvw.cxx @@ -97,8 +97,6 @@ using comphelper::HelperBaseNoState; using ::rtl::OUString; -SV_IMPL_PTRARR( SelectionChangeListenerArr, XSelectionChangeListenerPtr ); - SwPaM* lcl_createPamCopy(const SwPaM rPam) { SwPaM *const pRet = new SwPaM(*rPam.GetPoint()); @@ -141,23 +139,23 @@ void SwXTextView::Invalidate() m_refCount++; //prevent second d'tor call -sal_uInt16 nCount = aSelChangedListeners.Count(); +sal_uInt16 nCount = aSelChangedListeners.size(); if(nCount) { uno::Reference uno::XInterface xInt = (cppu::OWeakObject*)(SfxBaseController*)this; lang::EventObject aEvent(xInt); for ( sal_uInt16 i = nCount; i--; ) { -uno::Reference view::XSelectionChangeListener *pObj = aSelChangedListeners[i]; +uno::Reference view::XSelectionChangeListener *pObj = aSelChangedListeners[i]; (*pObj)-disposing(aEvent); } } // #i85580: now clean up any possibly remaining entries in the array... // (i.e. listeners that did not call removeSelectionChangeListener in their disposing.) -while ((nCount = aSelChangedListeners.Count()) != 0) +while ((nCount = aSelChangedListeners.size()) != 0) { -removeSelectionChangeListener( *aSelChangedListeners[0] ); +removeSelectionChangeListener( aSelChangedListeners[0] ); } m_refCount--; @@ -610,7 +608,7 @@ void SwXTextView::addSelectionChangeListener( SolarMutexGuard aGuard; uno::Reference view::XSelectionChangeListener * pInsert = new uno::Reference view::XSelectionChangeListener ; *pInsert = rxListener; -aSelChangedListeners.Insert(pInsert, aSelChangedListeners.Count()); +aSelChangedListeners.push_back(pInsert); } void SwXTextView::removeSelectionChangeListener( @@ -619,13 +617,14 @@ void SwXTextView::removeSelectionChangeListener( { SolarMutexGuard aGuard; view::XSelectionChangeListener* pLeft = rxListener.get(); -for(sal_uInt16 i = 0; i aSelChangedListeners.Count(); i++) +for(SelectionChangeListenerArr::iterator it = aSelChangedListeners.begin(); +it != aSelChangedListeners.end(); ++it) { -uno::Reference view::XSelectionChangeListener * pElem = aSelChangedListeners.GetObject(i); - view::XSelectionChangeListener* pRight = pElem-get(); +uno::Reference view::XSelectionChangeListener * pElem = *it; +view::XSelectionChangeListener* pRight = pElem-get(); if(pLeft == pRight) { -aSelChangedListeners.Remove(i); +aSelChangedListeners.erase(it); delete pElem; break; } @@ -885,10 +884,10 @@ void SwXTextView::NotifySelChanged() lang::EventObject aEvent(xInt); -sal_uInt16 nCount = aSelChangedListeners.Count(); +sal_uInt16 nCount = aSelChangedListeners.size(); for ( sal_uInt16 i = nCount; i--; ) { -uno::Reference view::XSelectionChangeListener *pObj = aSelChangedListeners[i]; +uno::Reference view::XSelectionChangeListener *pObj = aSelChangedListeners[i]; (*pObj)-selectionChanged(aEvent); } } @@ -898,10 +897,10 @@ void SwXTextView::NotifyDBChanged() URL aURL; aURL.Complete = rtl::OUString::createFromAscii(SwXDispatch::GetDBChangeURL()); -sal_uInt16 nCount = aSelChangedListeners.Count(); +sal_uInt16 nCount = aSelChangedListeners.size(); for ( sal_uInt16 i = nCount; i--; ) { -uno::Reference view::XSelectionChangeListener *pObj = aSelChangedListeners[i]; +uno::Reference view::XSelectionChangeListener *pObj = aSelChangedListeners[i]; uno::ReferenceXDispatch xDispatch((*pObj), UNO_QUERY); if(xDispatch.is())
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/wrtww8.cxx | 46 +--- sw/source/filter/ww8/wrtww8.hxx |5 ++-- 2 files changed, 23 insertions(+), 28 deletions(-) New commits: commit a3c7602ba3ed1ab57adab797a5820c8b0cb42abe Author: Arnaud Versini arnaud.vers...@gmail.com Date: Sat Apr 21 15:02:50 2012 +0200 Use boost::ptr_vector in WW8_WrPct instead of SV_DECL_PTRARR_DEL diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 0dbf05c..f3ade78 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -228,10 +228,6 @@ public: SV_IMPL_PTRARR( WW8_WrFkpPtrs, WW8_FkpPtr ) -typedef WW8_WrPc* WW8_WrPcPtr; -SV_DECL_PTRARR_DEL( WW8_WrPcPtrs, WW8_WrPcPtr, 4 ) -SV_IMPL_PTRARR( WW8_WrPcPtrs, WW8_WrPcPtr ) - static void WriteDop( WW8Export rWrt ) { WW8Dop rDop = *rWrt.pDop; @@ -1153,14 +1149,13 @@ WW8_FC WW8_WrFkp::GetEndFc() const //-- WW8_WrPct::WW8_WrPct(WW8_FC nfcMin, bool bSaveUniCode) -: pPcts(new WW8_WrPcPtrs), nOldFc(nfcMin), bIsUni(bSaveUniCode) +: nOldFc(nfcMin), bIsUni(bSaveUniCode) { AppendPc( nOldFc, bIsUni ); } WW8_WrPct::~WW8_WrPct() { -delete pPcts; } // Piece fuellen und neues Piece erzeugen @@ -1169,10 +1164,10 @@ void WW8_WrPct::AppendPc(WW8_FC nStartFc, bool bIsUnicode) WW8_CP nStartCp = nStartFc - nOldFc;// Textbeginn abziehen if ( !nStartCp ) { -if ( 0 != pPcts-Count() ) +if ( !aPcts.empty() ) { -OSL_ENSURE( 1 == pPcts-Count(), Leeres Piece !!); -pPcts-DeleteAndDestroy( pPcts-Count() - 1 , 1); +OSL_ENSURE( 1 == aPcts.size(), Leeres Piece !!); +aPcts.pop_back( ); } } @@ -1188,11 +1183,11 @@ void WW8_WrPct::AppendPc(WW8_FC nStartFc, bool bIsUnicode) nStartFc |= 0x4000; // Vorletztes Bit setzen fuer !Unicode } -if( pPcts-Count() ) -nStartCp += pPcts-GetObject( pPcts-Count()- 1 )-GetStartCp(); +if( !aPcts.empty() ) +nStartCp += aPcts.back().GetStartCp(); -WW8_WrPcPtr pPc = new WW8_WrPc( nStartFc, nStartCp ); -pPcts-Insert( pPc, pPcts-Count() ); +WW8_WrPc* pPc = new WW8_WrPc( nStartFc, nStartCp ); +aPcts.push_back( pPc ); bIsUni = bIsUnicode; } @@ -1202,31 +1197,30 @@ void WW8_WrPct::WritePc( WW8Export rWrt ) { sal_uLong nPctStart; sal_uLong nOldPos, nEndPos; -sal_uInt16 i; +boost::ptr_vectorWW8_WrPc::iterator aIter; nPctStart = rWrt.pTableStrm-Tell();// Beginn Piece-Table *rWrt.pTableStrm ( char )0x02; // Statusbyte PCT nOldPos = nPctStart + 1;// Position merken SwWW8Writer::WriteLong( *rWrt.pTableStrm, 0 ); // Laenge folgt -for( i = 0; i pPcts-Count(); ++i ) // Bereiche + +for( aIter = aPcts.begin(); aIter != aPcts.end(); ++aIter ) // Bereiche SwWW8Writer::WriteLong( *rWrt.pTableStrm, -pPcts-GetObject( i )-GetStartCp() ); +aIter-GetStartCp() ); // die letzte Pos noch errechnen sal_uLong nStartCp = rWrt.pFib-fcMac - nOldFc; if( bIsUni ) nStartCp = 1; // Bei Unicode Anzahl der Zeichen / 2 -nStartCp += pPcts-GetObject( i-1 )-GetStartCp(); +nStartCp += aPcts.back().GetStartCp(); SwWW8Writer::WriteLong( *rWrt.pTableStrm, nStartCp ); // Pieceverweise -for ( i = 0; i pPcts-Count(); ++i ) +for ( aIter = aPcts.begin(); aIter != aPcts.end(); ++aIter ) { -WW8_WrPcPtr pPc = pPcts-GetObject( i ); - -SwWW8Writer::WriteShort( *rWrt.pTableStrm, pPc-GetStatus()); -SwWW8Writer::WriteLong( *rWrt.pTableStrm, pPc-GetStartFc()); +SwWW8Writer::WriteShort( *rWrt.pTableStrm, aIter-GetStatus()); +SwWW8Writer::WriteLong( *rWrt.pTableStrm, aIter-GetStartFc()); SwWW8Writer::WriteShort( *rWrt.pTableStrm, 0); // PRM=0 } @@ -1243,19 +1237,19 @@ void WW8_WrPct::WritePc( WW8Export rWrt ) void WW8_WrPct::SetParaBreak() { -OSL_ENSURE( pPcts-Count(),SetParaBreak : aPcts.Count = 0 ); -pPcts-GetObject( pPcts-Count() - 1)-SetStatus(); +OSL_ENSURE( !aPcts.empty(),SetParaBreak : aPcts.empty() ); +aPcts.back().SetStatus(); } WW8_CP WW8_WrPct::Fc2Cp( sal_uLong nFc ) const { OSL_ENSURE( nFc = (sal_uLong)nOldFc, FilePos liegt vorm letzten Piece ); -OSL_ENSURE( pPcts-Count(), Fc2Cp noch kein Piece vorhanden ); +OSL_ENSURE( ! aPcts.empty(), Fc2Cp noch kein Piece vorhanden ); nFc -= nOldFc; if( bIsUni ) nFc /= 2; -return nFc + pPcts-GetObject( pPcts-Count() - 1 )-GetStartCp(); +return nFc + aPcts.back().GetStartCp(); } //-- diff --git a/sw/source/filter/ww8/wrtww8.hxx
[Libreoffice-commits] .: sw/source
sw/source/core/layout/paintfrm.cxx | 20 1 file changed, 16 insertions(+), 4 deletions(-) New commits: commit b08e9f3023e9ea1ca0926334becac939ca8fdfac Author: Michael Stahl mst...@redhat.com Date: Tue Apr 17 22:30:25 2012 +0200 fdo#38635: sw: fix border corner gaps: The start and end points of the vertical and adjacent horizontal borders were apart by 1.5 to 3 twips, leading to small visible gaps in the corners. This is fixed by using lcl_AlignWidth/lcl_AlignHeight on the border widths, and by always computing the start/end positions from the outer edge, which makes the horizontal and vertical start/end points match. (regression from 0f0896c26fb260d1bbf31d7a886df3f61837f0f2) diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 1c09c4d..03e9731 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -4616,8 +4616,13 @@ void lcl_PaintLeftRightLine( const sal_Bool _bLeft, nExtentOE = lcl_GetExtent( pBottomBorder, NULL ); } -basegfx::B2DPoint aStart( aRect.Left() + aRect.Width() / 2.0, aRect.Top() + lcl_GetLineWidth( pTopBorder ) / 2.0 ); -basegfx::B2DPoint aEnd( aRect.Left() + aRect.Width() / 2.0, aRect.Bottom() - lcl_GetLineWidth( pBottomBorder ) / 2.0 ); +double const fStartX( (_bLeft) // fdo#38635: always from outer edge +? aRect.Left() + (aRect.Width() / 2.0) +: aRect.Right() - (aRect.Width() / 2.0)); +basegfx::B2DPoint const aStart(fStartX, +aRect.Top() + lcl_AlignHeight(lcl_GetLineWidth(pTopBorder))/2.0 ); +basegfx::B2DPoint const aEnd(fStartX, +aRect.Bottom() - lcl_AlignHeight(lcl_GetLineWidth(pBottomBorder))/2.0 ); double nLeftWidth = !_bLeft ? pLeftRightBorder-GetOutWidth() : pLeftRightBorder-GetInWidth( ); double nRightWidth = !_bLeft ? pLeftRightBorder-GetInWidth() : pLeftRightBorder-GetOutWidth( ); @@ -4691,8 +4696,15 @@ void lcl_PaintTopBottomLine( const sal_Bool _bTop, nExtentOE = lcl_GetExtent( NULL, pRightBorder ); } -basegfx::B2DPoint aStart( aRect.Left() + lcl_GetLineWidth( pLeftBorder ) / 2.0, aRect.Top() + aRect.Height() / 2.0 ); -basegfx::B2DPoint aEnd( aRect.Right() - lcl_GetLineWidth( pRightBorder ) / 2.0, aRect.Top() + aRect.Height() / 2.0 ); +double const fStartY( (_bTop) // fdo#38635: always from outer edge +? aRect.Top()+ (aRect.Height() / 2.0) +: aRect.Bottom() - (aRect.Height() / 2.0)); +basegfx::B2DPoint const aStart( +aRect.Left() + lcl_AlignWidth(lcl_GetLineWidth(pLeftBorder))/2.0, +fStartY ); +basegfx::B2DPoint const aEnd( +aRect.Right() - lcl_AlignWidth(lcl_GetLineWidth(pRightBorder))/2.0, +fStartY ); double nLeftWidth = !_bTop ? pTopBottomBorder-GetOutWidth() : pTopBottomBorder-GetInWidth( ); double nRightWidth = !_bTop ? pTopBottomBorder-GetInWidth() : pTopBottomBorder-GetOutWidth( ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/layout/paintfrm.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 44092833d3a0f0d6074c64bd0e64bbdf11109afe Author: Michael Stahl mst...@redhat.com Date: Mon Apr 16 16:34:21 2012 +0200 fdo#38215: forgot idiotic C++ syntax (fix 0868a0155a) diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 255cf14..1c09c4d 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -500,7 +500,7 @@ lcl_TryMergeBorderLine(BorderLinePrimitive2D const rThis, if (rThis.getStart().getX() == rOther.getStart().getX()) { assert(rThis.getEnd().getX() == rOther.getEnd().getX()); -pairbool, pairdouble, double const res = lcl_TryMergeLines( +pairbool, pairdouble, double const res = lcl_TryMergeLines( make_pair(rThis.getStart().getY(), rThis.getEnd().getY()), make_pair(rOther.getStart().getY(),rOther.getEnd().getY())); if (res.first) // merge them @@ -518,7 +518,7 @@ lcl_TryMergeBorderLine(BorderLinePrimitive2D const rThis, if (rThis.getStart().getY() == rOther.getStart().getY()) { assert(rThis.getEnd().getY() == rOther.getEnd().getY()); -pairbool, pairdouble, double const res = lcl_TryMergeLines( +pairbool, pairdouble, double const res = lcl_TryMergeLines( make_pair(rThis.getStart().getX(), rThis.getEnd().getX()), make_pair(rOther.getStart().getX(),rOther.getEnd().getX())); if (res.first) // merge them ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/rtfexport.cxx |9 + 1 file changed, 9 insertions(+) New commits: commit 1d256da4dcbeb623c146e197bc20d3583d9bb3b8 Author: Miklos Vajna vmik...@suse.cz Date: Sun Apr 15 03:30:06 2012 +0200 sw: implement writing of RTF_VIEWSCALE diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 9d9cc37..d5a90ad 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -35,6 +35,8 @@ #include com/sun/star/i18n/ScriptType.hdl #include docsh.hxx +#include viewsh.hxx +#include viewopt.hxx #include ndtxt.hxx #include fmtpdsc.hxx #include section.hxx @@ -504,6 +506,13 @@ void RtfExport::ExportDocument_Impl() WriteInfo(); // Default TabSize Strm() m_pAttrOutput-m_aTabStop.makeStringAndClear().getStr() sNewLine; +// Zoom +ViewShell *pViewShell(pDoc-GetCurrentViewShell()); +if (pViewShell) +{ +Strm() OOO_STRING_SVTOOLS_RTF_VIEWSCALE; +OutULong(pViewShell-GetViewOptions()-GetZoom()); +} // Page description WritePageDescTable(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/inc/rootfrm.hxx |1 - 1 file changed, 1 deletion(-) New commits: commit edcf5270f0a4d6ef59fe914e41e25df494ceca54 Author: Michael Meeks michael.me...@suse.com Date: Sun Apr 15 18:45:59 2012 +0200 remove extraneous '2' diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx index dc62618..85c2a07 100644 --- a/sw/source/core/inc/rootfrm.hxx +++ b/sw/source/core/inc/rootfrm.hxx @@ -114,7 +114,6 @@ class SwRootFrm: public SwLayoutFrm //Die letzte Seite wollen wir uns nicht immer muehsam zusammensuchen. SwPageFrm *pLastPage; -2 // [ Comment from the original StarOffice checkin ]: // The root takes care of the shell access. Via the document // it should be possible to get at the root frame, and thus always ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/text/frminf.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 63585de969d3892ddb6034cfa05284e30f97a304 Author: Philipp Weissenbacher p.weissenbac...@gmail.com Date: Thu Apr 12 21:07:21 2012 +0200 Convert macro to local const variable diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx index 93b4c01..a9b3c48 100644 --- a/sw/source/core/text/frminf.cxx +++ b/sw/source/core/text/frminf.cxx @@ -279,13 +279,13 @@ sal_Bool SwTxtFrmInfo::IsBullet( xub_StrLen nTxtStart ) const // All lines (except for the first one) have the same left margin. // We do not want to be so picky and work with a tolerance of TOLERANCE twips. -#define TOLERANCE 20 - SwTwips SwTxtFrmInfo::GetFirstIndent() const { SwTxtSizeInfo aInf( (SwTxtFrm*)pFrm ); SwTxtCursor aLine( (SwTxtFrm*)pFrm, aInf ); const SwTwips nFirst = GetLineStart( aLine ); +const SwTwips TOLERANCE = 20; + if( !aLine.Next() ) return 0; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/text/frmform.cxx | 95 ++-- 1 file changed, 43 insertions(+), 52 deletions(-) New commits: commit 1830cf752e9abd2bb168e5e978b72038e1c4b263 Author: Philipp Weissenbacher p.weissenbac...@gmail.com Date: Fri Apr 13 12:39:35 2012 +0200 Begin translating comments diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 1d1d444..b3a40b1 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -59,7 +59,7 @@ // OD 2004-05-24 #i28701# #include sortedobjs.hxx -// Toleranzwert in der Formatierung und Textausgabe. +// Tolerance in formatting and text output #define SLOPPY_TWIPS5 class FormatLevel @@ -77,7 +77,7 @@ MSHORT FormatLevel::nLevel = 0; * ValidateTxt/Frm() */ -void ValidateTxt( SwFrm *pFrm ) // Freund vom Frame +void ValidateTxt( SwFrm *pFrm ) // Friend of frame { if ( ( ! pFrm-IsVertical() pFrm-Frm().Width() == pFrm-GetUpper()-Prt().Width() ) || @@ -88,13 +88,12 @@ void ValidateTxt( SwFrm *pFrm ) // Freund vom Frame void SwTxtFrm::ValidateFrm() { -// Umgebung validieren, um Oszillationen zu verhindern. +// Validate surroundings to avoid oscillation SWAP_IF_SWAPPED( this ) if ( !IsInFly() !IsInTab() ) -{ //Innerhalb eines Flys nur this validieren, der Rest sollte eigentlich -//nur fuer Fussnoten notwendig sein und die gibt es innerhalb von -//Flys nicht. Fix fuer 5544 +{ // Only validate 'this' when inside a fly, the rest should actually only be +// needed for footnotes, which do not exist in flys. SwSectionFrm* pSct = FindSctFrm(); if( pSct ) { @@ -111,7 +110,7 @@ void SwTxtFrm::ValidateFrm() } ValidateTxt( this ); -//MA: mindestens das MustFit-Flag muessen wir retten! +// We at least have to save the MustFit flag! OSL_ENSURE( HasPara(), ResetPreps(), missing ParaPortion. ); SwParaPortion *pPara = GetPara(); const sal_Bool bMustFit = pPara-IsPrepMustFit(); @@ -125,9 +124,9 @@ void SwTxtFrm::ValidateFrm() * ValidateBodyFrm() */ -// nach einem RemoveFtn muss der BodyFrm und alle innenliegenden kalkuliert -// werden, damit die DeadLine richtig sitzt. -// Erst wird nach aussen hin gesucht, beim Rueckweg werden alle kalkuliert. +// After a RemoveFtn the BodyFrm and all Frms contained within it, need to be +// recalculated, so that the DeadLine is right. +// First we search outwards, on the way back we calculate everything. void _ValidateBodyFrm( SwFrm *pFrm ) { @@ -152,7 +151,7 @@ void SwTxtFrm::ValidateBodyFrm() { SWAP_IF_SWAPPED( this ) - //siehe Kommtar in ValidateFrm() + // See comment in ValidateFrm() if ( !IsInFly() !IsInTab() !( IsInSct() FindSctFrm()-Lower()-IsColumnFrm() ) ) _ValidateBodyFrm( GetUpper() ); @@ -241,7 +240,7 @@ sal_Bool SwTxtFrm::CalcFollow( const xub_StrLen nTxtOfst ) if ( !IsInFly() GetNext() ) { pPage = FindPageFrm(); -//Minimieren - sprich ggf. zuruecksetzen - der Invalidierungen s.u. +// Minimize = that is set back if needed - for invalidation see below bOldInvaCntnt = pPage-IsInvalidCntnt(); } @@ -258,7 +257,7 @@ sal_Bool SwTxtFrm::CalcFollow( const xub_StrLen nTxtOfst ) } } -//Der Fussnotenbereich darf sich keinesfalls vergrossern. +// The footnote area must not get larger SwSaveFtnHeight aSave( FindFtnBossFrm( sal_True ), LONG_MAX ); pMyFollow-CalcFtnFlag(); @@ -269,11 +268,10 @@ sal_Bool SwTxtFrm::CalcFollow( const xub_StrLen nTxtOfst ) { if( !FormatLevel::LastLevel() ) { -// Weenn der Follow in einem spaltigen Bereich oder einem -// spaltigen Rahmen steckt, muss zunaechst dieser kalkuliert -// werden, da das FormatWidthCols() nicht funktioniert, wenn -// es aus dem MakeAll des _gelockten_ Follows heraus gerufen -// wird. +// If the follow is contained within a column section or column +// frame, we need to calculate that first. This is because the +// FormatWidthCols() does not work if it is called from MakeAll +// of the _locked_ follow. SwSectionFrm* pSct = pMyFollow-FindSctFrm(); if( pSct !pSct-IsAnLower( this ) ) { @@ -313,8 +311,7 @@ sal_Bool SwTxtFrm::CalcFollow( const xub_StrLen nTxtOfst ) } pMyFollow-Calc(); -// Der Follow merkt anhand seiner Frm().Height(), dass was schief -// gelaufen
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/docxattributeoutput.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b30c9f7d8eea41fadcf3ff09db9e005f2f266006 Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Thu Apr 12 17:55:28 2012 +0200 ++I_hate_sal_Int32 diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 4b918fd..ed18354 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2104,7 +2104,7 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode rGrfNode, const Size } // picture description ::sax_fastparser::FastAttributeList* attrList = m_pSerializer-createAttrList(); -attrList-add( XML_id, OString::valueOf( m_anchorId++ ).getStr()); +attrList-add( XML_id, OString::valueOf( sal_Int32( m_anchorId++ )).getStr()); attrList-add( XML_name, Picture ); attrList-add( XML_descr, OUStringToOString( rGrfNode.GetDescription(), RTL_TEXTENCODING_UTF8 ).getStr()); if( GetExport().GetFilter().getVersion( ) != oox::core::ECMA_DIALECT ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/text/frminf.cxx | 51 +- sw/source/core/text/itrtxt.hxx | 60 - sw/source/core/text/porfld.hxx | 44 +++--- sw/source/core/text/porlin.hxx | 37 - 4 files changed, 95 insertions(+), 97 deletions(-) New commits: commit c5718b012fcbd19c79ff6eb07ca00a39ae643d8d Author: Philipp Weissenbacher p.weissenbac...@gmail.com Date: Thu Apr 12 20:09:53 2012 +0200 Translate German comments diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx index 8808032..93b4c01 100644 --- a/sw/source/core/text/frminf.cxx +++ b/sw/source/core/text/frminf.cxx @@ -75,7 +75,7 @@ xub_StrLen SwTxtMargin::GetTxtEnd() const * SwTxtFrmInfo::IsOneLine() */ -// Passt der Absatz in eine Zeile? +// Does the paragraph fit into one line? sal_Bool SwTxtFrmInfo::IsOneLine() const { const SwLineLayout *pLay = pFrm-GetPara(); @@ -83,7 +83,7 @@ sal_Bool SwTxtFrmInfo::IsOneLine() const return sal_False; else { -// 6575: bei Follows natuerlich sal_False +// For follows sal_False of course if( pFrm-GetFollow() ) return sal_False; pLay = pLay-GetNext(); @@ -101,7 +101,7 @@ sal_Bool SwTxtFrmInfo::IsOneLine() const * SwTxtFrmInfo::IsFilled() */ -// Ist die Zeile zu X% gefuellt? +// Is the line filled for X percent? sal_Bool SwTxtFrmInfo::IsFilled( const sal_uInt8 nPercent ) const { const SwLineLayout *pLay = pFrm-GetPara(); @@ -120,7 +120,7 @@ sal_Bool SwTxtFrmInfo::IsFilled( const sal_uInt8 nPercent ) const * SwTxtFrmInfo::GetLineStart() */ -// Wo beginnt der Text (ohne whitespaces)? ( Dokument global ) +// Where does the text start (without whitespace)? (document global) SwTwips SwTxtFrmInfo::GetLineStart( const SwTxtCursor rLine ) const { xub_StrLen nTxtStart = rLine.GetTxtStart(); @@ -143,7 +143,7 @@ SwTwips SwTxtFrmInfo::GetLineStart( const SwTxtCursor rLine ) const * SwTxtFrmInfo::GetLineStart() */ -// Wo beginnt der Text (ohne whitespaces)? (rel. im Frame) +// Where does the text start (without whitespace)? (relative in the Frame) SwTwips SwTxtFrmInfo::GetLineStart() const { SwTxtSizeInfo aInf( (SwTxtFrm*)pFrm ); @@ -151,7 +151,7 @@ SwTwips SwTxtFrmInfo::GetLineStart() const return GetLineStart( aLine ) - pFrm-Frm().Left() - pFrm-Prt().Left(); } -// errechne die Position des Zeichens und gebe die Mittelposition zurueck +// Calculates the character's position and returns the middle position SwTwips SwTxtFrmInfo::GetCharPos( xub_StrLen nChar, sal_Bool bCenter ) const { SWRECTFN( pFrm ) @@ -197,11 +197,11 @@ SwPaM *AddPam( SwPaM *pPam, const SwTxtFrm* pTxtFrm, { if( nLen ) { -// Es koennte auch der erste sein. +// It could be the first if( pPam-HasMark() ) { -// liegt die neue Position genau hinter der aktuellen, dann -// erweiter den Pam einfach +// If the new position is right after the current one, then +// simply extend the Pam if( nPos == pPam-GetPoint()-nContent.GetIndex() ) { pPam-GetPoint()-nContent += nLen; @@ -218,7 +218,7 @@ SwPaM *AddPam( SwPaM *pPam, const SwTxtFrm* pTxtFrm, return pPam; } -// Sammelt die whitespaces am Zeilenbeginn und -ende im Pam +// Accumulates the whitespace at line start and end in the Pam void SwTxtFrmInfo::GetSpaces( SwPaM rPam, sal_Bool bWithLineBreak ) const { SwTxtSizeInfo aInf( (SwTxtFrm*)pFrm ); @@ -230,14 +230,14 @@ void SwTxtFrmInfo::GetSpaces( SwPaM rPam, sal_Bool bWithLineBreak ) const if( aLine.GetCurr()-GetLen() ) { xub_StrLen nPos = aLine.GetTxtStart(); -// Bug 49649: von der ersten Line die Blanks/Tabs NICHT -// mit selektieren +// Do NOT include the blanks/tabs from the first line +// in the selection if( !bFirstLine nPos aLine.GetStart() ) pPam = AddPam( pPam, pFrm, aLine.GetStart(), nPos - aLine.GetStart() ); -// Bug 49649: von der letzten Line die Blanks/Tabs NICHT -// mit selektieren +// Do NOT include the blanks/tabs from the last line +// in the selection if( aLine.GetNext() ) { nPos = aLine.GetTxtEnd(); @@ -260,7 +260,7 @@ void SwTxtFrmInfo::GetSpaces( SwPaM rPam, sal_Bool bWithLineBreak ) const *
[Libreoffice-commits] .: sw/source unusedcode.easy vbahelper/inc vbahelper/source
sw/source/core/doc/docbm.cxx | 12 sw/source/core/inc/MarkManager.hxx |3 --- unusedcode.easy |2 -- vbahelper/inc/vbahelper/vbahelper.hxx|4 vbahelper/source/vbahelper/vbahelper.cxx | 17 - 5 files changed, 38 deletions(-) New commits: commit 1ea28ebcf0a7719fd2ba18054c5dfbb1da229348 Author: Julien Nabet serval2...@yahoo.fr Date: Sun Apr 8 13:12:03 2012 +0200 Dump MarkManager::dumpFieldmarks + extractIntFromAny from vbahelper diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index fdbddb5..ea2a433 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -304,18 +304,6 @@ namespace sw { namespace mark MarkManager::MarkManager(SwDoc rDoc) : m_pDoc(rDoc) { } -#ifdef DBG_UTIL -void MarkManager::dumpFieldmarks( ) const -{ -const_iterator_t pIt = m_vFieldmarks.begin(); -for (; pIt != m_vFieldmarks.end( ); pIt++) -{ -rtl::OUString str = (*pIt)-ToString(); -OSL_TRACE(%s\n, -::rtl::OUStringToOString(str, RTL_TEXTENCODING_UTF8).getStr()); -} -} -#endif ::sw::mark::IMark* MarkManager::makeMark(const SwPaM rPaM, const ::rtl::OUString rName, const IDocumentMarkAccess::MarkType eType) diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx index 1c917c7..6fc8a4d 100644 --- a/sw/source/core/inc/MarkManager.hxx +++ b/sw/source/core/inc/MarkManager.hxx @@ -45,9 +45,6 @@ namespace sw { namespace mark { public: MarkManager(/*[in/out]*/ SwDoc rDoc); -#ifdef DBG_UTIL -void dumpFieldmarks( ) const; -#endif // IDocumentMarkAccess virtual ::sw::mark::IMark* makeMark(const SwPaM rPaM, const ::rtl::OUString rName, IDocumentMarkAccess::MarkType eMark); diff --git a/unusedcode.easy b/unusedcode.easy index 6699ed5..7441a3a 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -790,7 +790,6 @@ nullcanvas::SpriteCanvasHelper::backgroundPaint(basegfx::B2DRange const) nullcanvas::SpriteCanvasHelper::genericUpdate(basegfx::B2DConnectedRangescanvas::SpriteRedrawManager::SpriteInfo::ConnectedComponents const) nullcanvas::SpriteCanvasHelper::opaqueUpdate(basegfx::B2DConnectedRangescanvas::SpriteRedrawManager::SpriteInfo::ConnectedComponents const) nullcanvas::SpriteCanvasHelper::scrollUpdate(basegfx::B2DRange const, basegfx::B2DRange const, basegfx::B2DConnectedRangescanvas::SpriteRedrawManager::SpriteInfo::ConnectedComponents const) -ooo::vba::extractIntFromAny(com::sun::star::uno::Any const) oox::PropertyMap::dump(com::sun::star::uno::Referencecom::sun::star::beans::XPropertySet) oox::core::BinaryFilterBase::BinaryFilterBase(com::sun::star::uno::Referencecom::sun::star::uno::XComponentContext const) oox::core::FilterBase::openSubStorage(rtl::OUString const, bool) const @@ -872,4 +871,3 @@ svxform::SvLBoxEntrySortedArray::Insert(SvLBoxEntry* const, unsigned short) svxform::SvLBoxEntrySortedArray::Insert(SvLBoxEntry* const*, unsigned short) svxform::SvLBoxEntrySortedArray::Insert(svxform::SvLBoxEntrySortedArray const*, unsigned short, unsigned short) svxform::SvLBoxEntrySortedArray::Remove(SvLBoxEntry* const, unsigned short) -sw::mark::MarkManager::dumpFieldmarks() const diff --git a/vbahelper/inc/vbahelper/vbahelper.hxx b/vbahelper/inc/vbahelper/vbahelper.hxx index 9a3da3c..e9a316b 100644 --- a/vbahelper/inc/vbahelper/vbahelper.hxx +++ b/vbahelper/inc/vbahelper/vbahelper.hxx @@ -99,10 +99,6 @@ namespace ooo VBAHELPER_DLLPUBLIC void PrintOutHelper( SfxViewShell* pViewShell, const css::uno::Any From, const css::uno::Any To, const css::uno::Any Copies, const css::uno::Any Preview, const css::uno::Any ActivePrinter, const css::uno::Any PrintToFile, const css::uno::Any Collate, const css::uno::Any PrToFileName, sal_Bool bSelection ); VBAHELPER_DLLPUBLIC void PrintPreviewHelper( const css::uno::Any EnableChanges, SfxViewShell* ); -/** Extracts a 32-bit integer value from the passed Any, which may contain an integer or floating-point value. -Throws, if the Any is empty or contains an incompatible type. */ -VBAHELPER_DLLPUBLIC sal_Int32 extractIntFromAny( const css::uno::Any rAny ) throw (css::uno::RuntimeException); - /** Extracts a boolean value from the passed Any, which may contain a Boolean or an integer or floating-point value. Throws, if the Any is empty or contains an incompatible type. */ VBAHELPER_DLLPUBLIC bool extractBoolFromAny( const css::uno::Any rAny ) throw (css::uno::RuntimeException); diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index a8cfb1a..b91ef85 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -476,23 +476,6 @@ void PrintOutHelper(
[Libreoffice-commits] .: sw/source
sw/source/core/layout/flowfrm.cxx | 455 ++ 1 file changed, 225 insertions(+), 230 deletions(-) New commits: commit c3b72f69e093d79a1b263964633fe2ddfaef2e45 Author: David Vogt david.v...@adfinis-sygroup.ch Date: Wed Apr 4 09:42:32 2012 +0200 Translated source comments from german diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 1aacdbc..ed88edc 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -145,9 +145,9 @@ sal_Bool SwFlowFrm::HasLockedFollow() const sal_Bool SwFlowFrm::IsKeepFwdMoveAllowed() { -//Wenn der Vorgaenger das KeepAttribut traegt und auch dessen -//Vorgaenger usw. bis zum ersten der Kette und fuer diesen das -//IsFwdMoveAllowed ein sal_False liefert, so ist das Moven eben nicht erlaubt. +// If all the predecessors up to the first of the chain have +// the 'keep' attribute set, and the first of the chain's +// IsFwdMoveAllowed returns sal_False, then we're not allowed to move. SwFrm *pFrm = rThis; if ( !pFrm-IsInFtn() ) do @@ -157,7 +157,7 @@ sal_Bool SwFlowFrm::IsKeepFwdMoveAllowed() return sal_True; } while ( pFrm ); - //Siehe IsFwdMoveAllowed() + //See IsFwdMoveAllowed() sal_Bool bRet = sal_False; if ( pFrm pFrm-GetIndPrev() ) bRet = sal_True; @@ -173,8 +173,8 @@ sal_Bool SwFlowFrm::IsKeepFwdMoveAllowed() void SwFlowFrm::CheckKeep() { -//Den 'letzten' Vorgaenger mit KeepAttribut anstossen, denn -//die ganze Truppe koennte zuruckrutschen. +// Kick off the last predecessor with a 'keep' attribute, because +// it's possible for the whole troop to move back. SwFrm *pPre = rThis.GetIndPrev(); if( pPre-IsSctFrm() ) { @@ -308,31 +308,33 @@ sal_Bool SwFlowFrm::IsKeep( const SwAttrSet rAttrs, bool bCheckIfLastRowShouldK sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect rRect ) { -// Der return-Wert entscheidet mit, -// ob auf Zurueckgeflossen werden muss, (3) -// ob das gute alte WouldFit gerufen werden kann (0, 1) -// oder ob ein Umhaengen und eine Probeformatierung sinnvoll ist (2) -// dabei bedeutet Bit 1, dass Objekte an mir selbst verankert sind -// und Bit 2, dass ich anderen Objekten ausweichen muss. - -//Wenn ein SurroundObj, dass einen Umfluss wuenscht mit dem Rect ueberlappt -//ist der Fluss notwendig (weil die Verhaeltnisse nicht geschaetzt werden -//koennen), es kann allerdings ggf. eine TestFormatierung stattfinden. -//Wenn das SurroundObj ein Fly ist und ich selbst ein Lower bin oder der Fly -//Lower von mir ist, so spielt er keine Rolle. -//Wenn das SurroundObj in einem zeichengebunden Fly verankert ist, und ich -//selbst nicht Lower dieses Zeichengebundenen Flys bin, so spielt der Fly -//keine Rolle. -//#32639# Wenn das Objekt bei mir verankert ist kann ich es -//vernachlaessigen, weil es hoechstwahrscheinlich (!?) mitfliesst, -//eine TestFormatierung ist dann allerdings nicht erlaubt! +// The return value helps deciding whether we need to flow back (3), +// or whether we can use the good old WouldFit (0, 1), or if +// it's reasonable to relocate and test-format (2). +// +// Bit 1 in this case means that there are objects anchored to myself, +// bit 2 means that I have to avoid other objects. + +// If a SurroundObj that desires to be wrapped around overlaps with the Rect, +// it's required to float (because we can't guess the relationships). +// However it's possible for a test formatting to happen. +// +// If the SurroundObj is a Fly and I'm a Lower, or the Fly is a lower of +// mine, then it doesn't matter. +// +// If the SurroundObj is anchored in a character bound Fly, and I'm not +// a Lower of that character bound Fly myself, then the Fly doesn't matter. + +//#32639# If the object is anchored with me, i can neglect it, because +//it's likely that it will follow the flow. A test formatting is not +//allowed in that case, however! sal_uInt8 nRet = 0; SwFlowFrm *pTmp = this; do -{ // Wenn an uns oder einem Follow Objekte haengen, so -// kann keine ProbeFormatierung stattfinden, da absatzgebundene -// nicht richtig beruecksichtigt wuerden und zeichengebundene sollten -// gar nicht zur Probe formatiert werden. +{ // If there are objects hanging either on me or on a follow, we can't +// do a test formatting, because paragraph bound objects wouldn't +// be properly considered, and character bound objects shouldn't +// be test formatted either. if( pTmp-GetFrm()-GetDrawObjs() ) nRet = 1; pTmp = pTmp-GetFollow(); @@ -352,13 +354,13 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect rRe
[Libreoffice-commits] .: sw/source
sw/source/core/text/atrhndl.hxx |2 sw/source/core/text/itrform2.cxx | 227 ++- sw/source/core/text/pordrop.hxx |2 sw/source/core/text/porrst.hxx |2 sw/source/core/text/txtcache.cxx |4 sw/source/core/text/txtpaint.cxx |6 - 6 files changed, 118 insertions(+), 125 deletions(-) New commits: commit a64475a0ac7f9be2e599e0b2bbc643fcb55a4c1f Author: Philipp Weissenbacher p.weissenbac...@gmail.com Date: Wed Apr 4 19:22:16 2012 +0200 Translate German comments diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx index 1befde4..33f71c3 100644 --- a/sw/source/core/text/atrhndl.hxx +++ b/sw/source/core/text/atrhndl.hxx @@ -142,7 +142,7 @@ public: void Pop( const SwTxtAttr rAttr ); // apply script dependent attributes -//void ChangeScript( SwFont rFnt, const sal_uInt8 nScr ); +// void ChangeScript( SwFont rFnt, const sal_uInt8 nScr ); // returns the default value for stack nStack inline const SfxPoolItem GetDefault( const sal_uInt16 nAttribID ) const; diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index a4233da..e33666a 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -49,15 +49,15 @@ #include porfly.hxx // CalcFlyWidth #include portox.hxx // WhichTxtPortion #include porref.hxx // WhichTxtPortion -#include porfld.hxx // SwNumberPortion fuer CalcAscent() +#include porfld.hxx // SwNumberPortion for CalcAscent() #include porftn.hxx // SwFtnPortion #include porhyph.hxx #include guess.hxx #include blink.hxx// pBlink -#include ftnfrm.hxx // WhichFirstPortion() - mal Verlagern. +#include ftnfrm.hxx // WhichFirstPortion() - move it #include redlnitr.hxx // SwRedlineItr #include pagefrm.hxx -#include pagedesc.hxx // SwPageDesc +#include pagedesc.hxx // SwPageDesc #include tgrditem.hxx #include doc.hxx // SwDoc #include pormulti.hxx // SwMultiPortion @@ -66,7 +66,7 @@ #include vector #if OSL_DEBUG_LEVEL 1 -#include ndtxt.hxx// pSwpHints, Ausgabeoperator +#include ndtxt.hxx// pSwpHints, output operator #endif using namespace ::com::sun::star; @@ -126,8 +126,8 @@ void SwTxtFormatter::CtorInitTxtFormatter( SwTxtFrm *pNewFrm, SwTxtFormatInfo *p SwTxtFormatter::~SwTxtFormatter() { -// Auesserst unwahrscheinlich aber denkbar. -// z.B.: Feld spaltet sich auf, Widows schlagen zu +// Extremly unlikely, but still possible +// e.g.: field splits up, widows start to matter if( GetInfo().GetRest() ) { delete GetInfo().GetRest(); @@ -141,7 +141,7 @@ SwTxtFormatter::~SwTxtFormatter() void SwTxtFormatter::Insert( SwLineLayout *pLay ) { -// Einfuegen heute mal ausnahmsweise hinter dem aktuellen Element. +// Insert BEHIND the current element if ( pCurr ) { pLay-SetNext( pCurr-GetNext() ); @@ -157,11 +157,11 @@ void SwTxtFormatter::Insert( SwLineLayout *pLay ) KSHORT SwTxtFormatter::GetFrmRstHeight() const { -// 8725: Uns interessiert die Resthoehe bezogen auf die Seite. -// Wenn wir in einer Tabelle stehen, dann ist pFrm-GetUpper() nicht -// die Seite. GetFrmRstHeight() wird im Zusammenhang mit den Ftn -// gerufen. -// Falsch: const SwFrm *pUpper = pFrm-GetUpper(); +// We want the rest height relative to the page. +// If we're in a table, then pFrm-GetUpper() is not the page. +// +// GetFrmRstHeight() is being called with Ftn. +// Wrong: const SwFrm *pUpper = pFrm-GetUpper(); const SwFrm *pPage = (const SwFrm*)pFrm-FindPageFrm(); const SwTwips nHeight = pPage-Frm().Top() + pPage-Prt().Top() @@ -178,40 +178,40 @@ KSHORT SwTxtFormatter::GetFrmRstHeight() const SwLinePortion *SwTxtFormatter::UnderFlow( SwTxtFormatInfo rInf ) { -// Werte sichern und rInf initialisieren. +// Save values and initialize rInf SwLinePortion *pUnderFlow = rInf.GetUnderFlow(); if( !pUnderFlow ) return 0; -// Wir formatieren rueckwaerts, d.h. dass Attributwechsel in der -// naechsten Zeile durchaus noch einmal drankommen koennen. -// Zu beobachten in 8081.sdw, wenn man in der ersten Zeile Text eingibt. +// We format backwards, i.e. attribute changes can happen the next +// line again. +// Can be seen in 8081.sdw, if you enter text in the first line const xub_StrLen nSoftHyphPos = rInf.GetSoftHyphPos(); const xub_StrLen nUnderScorePos = rInf.GetUnderScorePos(); -// 8358, 8359: Flys sichern und auf 0 setzen, sonst GPF -// 3983: Nicht ClearFly(rInf) ! +// Save flys and set to 0, or else segmentation fault +// Not ClearFly(rInf) ! SwFlyPortion *pFly = rInf.GetFly(); rInf.SetFly( 0 ); FeedInf( rInf ); rInf.SetLast( pCurr ); -// pUnderFlow braucht nicht deletet werden, weil es im folgenden -//
[Libreoffice-commits] .: sw/source
sw/source/core/txtnode/fntcache.cxx | 155 ++-- 1 file changed, 78 insertions(+), 77 deletions(-) New commits: commit c39cb68bec7eb5048c3a5feb669cc9e60a8a4371 Author: Michael Stahl mst...@redhat.com Date: Tue Apr 3 14:25:24 2012 +0200 fntcache.cxx: translate comments diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 4ddeb3d..bf15370 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -37,8 +37,8 @@ #include com/sun/star/i18n/CharacterIteratorMode.hdl #include com/sun/star/i18n/WordType.hdl #include breakit.hxx -#include viewsh.hxx // Bildschirmabgleich -#include viewopt.hxx // Bildschirmabgleich abschalten, ViewOption +#include viewsh.hxx +#include viewopt.hxx #include fntcache.hxx #include IDocumentSettingAccess.hxx #include swfont.hxx // CH_BLANK + CH_BULLET @@ -61,12 +61,12 @@ using namespace ::com::sun::star; -// globale Variablen, werden in FntCache.Hxx bekanntgegeben -// Der FontCache wird in TxtInit.Cxx _TXTINIT erzeugt und in _TXTEXIT geloescht +// global variables declared in fntcache.hxx +// FontCache is created in txtinit.cxx _TextInit and deleted in _TextFinit SwFntCache *pFntCache = NULL; -// Letzter Font, der durch ChgFntCache eingestellt wurde. +// last Font set by ChgFntCache SwFntObj *pLastFont = NULL; -// Die MagicNumber, die den Fonts zur Identifizierung verpasst wird +// MagicNumber used to identify Fonts sal_uInt8* pMagicNo = NULL; Color *pWaveCol = 0; @@ -285,9 +285,8 @@ void lcl_calcLinePos( const CalcLinePosData rData, * * sal_uInt16 SwFntObj::GetFontAscent( const OutputDevice rOut ) * - * Beschreibung: liefern den Ascent des Fonts auf dem - * gewuenschten Outputdevice zurueck, ggf. muss der Bildschirmfont erst - * erzeugt werden. + * Returns the Ascent of the Font on the given output device; + * it may be necessary to create the screen font first. */ sal_uInt16 SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice rOut ) @@ -303,7 +302,7 @@ sal_uInt16 SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice rO } else { -if ( nPrtAscent == USHRT_MAX ) // DruckerAscent noch nicht bekannt? +if (nPrtAscent == USHRT_MAX) // printer ascent unknown? { CreatePrtFont( rOut ); const Font aOldFnt( rRefDev.GetFont() ); @@ -329,9 +328,8 @@ sal_uInt16 SwFntObj::GetFontAscent( const ViewShell *pSh, const OutputDevice rO * * sal_uInt16 SwFntObj::GetFontHeight( const OutputDevice* pOut ) * - * Beschreibung: liefern die H?he des Fonts auf dem - * gewuenschten Outputdevice zurueck, ggf. muss der Bildschirmfont erst - * erzeugt werden. + * Returns the height of the Font on the given output device; + * it may be necessary to create the screen font first. */ sal_uInt16 SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice rOut ) @@ -347,7 +345,7 @@ sal_uInt16 SwFntObj::GetFontHeight( const ViewShell* pSh, const OutputDevice rO } else { -if ( nPrtHeight == USHRT_MAX ) // PrinterHeight noch nicht bekannt? +if (nPrtHeight == USHRT_MAX) // printer height unknown? { CreatePrtFont( rOut ); const Font aOldFnt( rRefDev.GetFont() ); @@ -483,12 +481,11 @@ void SwFntObj::CreateScrFont( const ViewShell rSh, const OutputDevice rOut ) pScrFont = pPrtFont; } -// Zoomfaktor ueberpruefen, z.B. wg. PrtOle2 beim Speichern +// check zoom factor, e.g. because of PrtOle2 during export { -// Sollte der Zoomfaktor des OutputDevices nicht mit dem der View- -// Options uebereinstimmen, so darf dieser Font nicht gecacht -// werden, deshalb wird der Zoomfaktor auf einen ungueltigen Wert -// gesetzt. +// In case the zoom factor of the output device differs from the +// one in the ViewOptions, this Font must not be cached, +// hence set zoom factor to an invalid value long nTmp; if( pOut-GetMapMode().GetScaleX().IsValid() pOut-GetMapMode().GetScaleY().IsValid() @@ -541,10 +538,9 @@ void SwFntObj::GuessLeading( const ViewShell const sal_uInt16 nWinHeight = sal_uInt16( aWinMet.GetSize().Height() ); if( pPrtFont-GetName().Search( aWinMet.GetName() ) USHRT_MAX ) { -// Wenn das Leading auf dem Window auch 0 ist, dann -// muss es auch so bleiben (vgl. StarMath!). +// If the Leading on the Window is also 0, then it has to stay +// that way (see also StarMath). long nTmpLeading = (long)aWinMet.GetIntLeading(); - // einen Versuch haben wir noch wg. 31003: if( nTmpLeading = 0 ) {
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/ww8par.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 3bbe44404f0ff98dbbaeb3d1b3adaede9c27b1a5 Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Mon Apr 2 15:21:38 2012 +0200 prevent a memory leak Based on a patch from Arnaud Versini (http://lists.freedesktop.org/archives/libreoffice/2012-April/029240.html) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 541adc8..6fe9784 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2716,6 +2716,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP rPos, long nEnd, long nCpOfs) pStr-length = nEndUsed; emulateMSWordAddTextToParagraph(rtl::OUString(pStr, SAL_NO_ACQUIRE)); +pStr = NULL; rPos += nL2; if (!maApos.back()) //a para end in apo doesn't count bWasParaEnd = false;//kein CR @@ -2723,6 +2724,8 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP rPos, long nEnd, long nCpOfs) if (hConverter) rtl_destroyTextToUnicodeConverter(hConverter); +if (pStr) +rtl_uString_release(pStr); delete [] p8Bits; return nL2 = nStrLen; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/ww8atr.cxx |2 +- sw/source/filter/ww8/ww8par6.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 36e176ee2354e62d5e4208fb0ae2a101ba32d7f5 Author: Miklos Vajna vmik...@suse.cz Date: Mon Apr 2 16:03:22 2012 +0200 ww8: sprmPFContextualSpacing is a Bool8 value diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 7fcba60..16a5539 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -3889,7 +3889,7 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem rUL ) if (m_rWW8Export.bWrtWW8 rUL.GetContext()) { m_rWW8Export.InsUInt16(NS_sprm::LN_PContextualSpacing); -m_rWW8Export.InsUInt16(rUL.GetContext()); +m_rWW8Export.pO-push_back( (sal_uInt8)rUL.GetContext() ); } } } diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index e995640..993020c 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -4177,7 +4177,7 @@ void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLe pCtrlStck-SetAttr( *pPaM-GetPoint(), RES_UL_SPACE ); return; } -short nPara = SVBT16ToShort( pData ); +short nPara = nId == 0x246D ? SVBT16ToShort( pData ) : 0 != *pData; if( nPara 0 ) nPara = -nPara; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/ww8par6.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit e650f3ec528777b56d45f4a652ff0569f8b925b4 Author: Miklos Vajna vmik...@suse.cz Date: Mon Apr 2 16:27:18 2012 +0200 SwWW8ImplReader::Read_UL: make this a bit less hard to read diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 993020c..65cea9d 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -4177,7 +4177,7 @@ void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLe pCtrlStck-SetAttr( *pPaM-GetPoint(), RES_UL_SPACE ); return; } -short nPara = nId == 0x246D ? SVBT16ToShort( pData ) : 0 != *pData; +short nPara = ((nId == 0x246D) ? SVBT16ToShort( pData ) : (0 != *pData)); if( nPara 0 ) nPara = -nPara; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/text/frmcrsr.cxx | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) New commits: commit 25db817c873bb7f2548d7f8d7fdc65194d306755 Author: Philipp Weissenbacher p.weissenbac...@gmail.com Date: Mon Apr 2 21:39:03 2012 +0200 Remove superfluous bug numbers diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 2f6dfc2..1ca3794 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -63,7 +63,7 @@ using namespace ::com::sun::star; /* - * 1170-SurvivalKit: For how long do we get past the last char of the line. + * - SurvivalKit: For how long do we get past the last char of the line. * - RightMargin abstains from adjusting position with -1 * - GetCharRect returns a GetEndCharRect for MV_RIGHTMARGIN * - GetEndCharRect sets bRightMargin to sal_True @@ -77,7 +77,7 @@ using namespace ::com::sun::star; SwTxtFrm *GetAdjFrmAtPos( SwTxtFrm *pFrm, const SwPosition rPos, const sal_Bool bRightMargin, const sal_Bool bNoScroll = sal_True ) { -// 8810: vgl. 1170, RightMargin in the last master line +// RightMargin in the last master line const xub_StrLen nOffset = rPos.nContent.GetIndex(); SwTxtFrm *pFrmAtPos = pFrm; if( !bNoScroll || pFrm-GetFollow() ) @@ -153,7 +153,6 @@ sal_Bool lcl_ChangeOffset( SwTxtFrm* pFrm, xub_StrLen nNew ) * GetFrmAtOfst(), GetFrmAtPos() */ -// OD 07.10.2003 #110978# SwTxtFrm SwTxtFrm::GetFrmAtOfst( const xub_StrLen nWhere ) { SwTxtFrm* pRet = this; @@ -292,7 +291,7 @@ sal_Bool SwTxtFrm::GetCharRect( SwRect rOrig, const SwPosition rPos, SwTxtCursor aLine( pFrm, aInf ); nNextOfst = aLine.GetEnd(); // See comment in AdjustFrm -// 1170: Include the line's last char? +// Include the line's last char? bRet = bRightMargin ? aLine.GetEndCharRect( rOrig, nOffset, pCMS, nMaxY ) : aLine.GetCharRect( rOrig, nOffset, pCMS, nMaxY ); } @@ -458,8 +457,6 @@ sal_Bool SwTxtFrm::GetAutoPos( SwRect rOrig, const SwPosition rPos ) const /** determine top of line for given position in the text frame -OD 11.11.2003 #i22341# -OD 2004-03-18 #114789# - corrections: - Top of first paragraph line is the top of the printing area of the text frame - If a proportional line spacing is applied use top of anchor character as top of the line. @@ -483,7 +480,7 @@ bool SwTxtFrm::GetTopOfLine( SwTwips _onTopOfLine, SWRECTFN( this ) if ( IsEmpty() || !(Prt().*fnRect-fnGetHeight)() ) { -// OD 2004-03-18 #i11860# - consider upper space amount considered +// consider upper space amount considered // for previous frame and the page grid. _onTopOfLine = (this-*fnRect-fnGetPrtTop)(); } @@ -493,7 +490,7 @@ bool SwTxtFrm::GetTopOfLine( SwTwips _onTopOfLine, SwTxtFrm* pFrm = (const_castSwTxtFrm*(this)-GetFrmAtOfst( nOffset )); pFrm-GetFormatted(); SWREFRESHFN( pFrm ) -// OD 2004-03-18 #114789# - If proportional line spacing is applied +// If proportional line spacing is applied // to the text frame, the top of the anchor character is also the // top of the line. // Otherwise the line layout determines the top of the line @@ -569,7 +566,7 @@ struct SwFillData sal_Bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point rPoint, const sal_Bool bChgFrm, SwCrsrMoveState* pCMS ) const { -// 8804: _GetCrsrOfst is called by GetCrsrOfst and GetKeyCrsrOfst. +// _GetCrsrOfst is called by GetCrsrOfst and GetKeyCrsrOfst. // Never just a return sal_False. if( IsLocked() || IsHiddenNow() ) @@ -627,7 +624,7 @@ sal_Bool SwTxtFrm::_GetCrsrOfst(SwPosition* pPos, const Point rPoint, if( pCMS pCMS-eState == MV_NONE aLine.GetEnd() == nOffset ) ((SwCrsrMoveState*)pCMS)-eState = MV_RIGHTMARGIN; -// 6776: pPos is a pure IN parameter and must not be evaluated. +// pPos is a pure IN parameter and must not be evaluated. // pIter-GetCrsrOfst returns from a nesting with STRING_LEN. // If SwTxtIter::GetCrsrOfst calls GetCrsrOfst further by itself // nNode changes the position. @@ -804,7 +801,7 @@ public: sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, sal_Bool bSetInReadOnly ) const { -// 8626: Set the RightMargin if needed +// Set the RightMargin if needed SwSetToRightMargin aSet; if( IsInTab() @@ -831,7 +828,7 @@ sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset, SwTxtSizeInfo aInf( (SwTxtFrm*)this ); SwTxtCursor aLine(
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/rtfattributeoutput.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8836b45de536a3a2fd72533c3210e439bc2fbca1 Author: Miklos Vajna vmik...@suse.cz Date: Fri Mar 30 14:18:40 2012 +0200 fdo#40735 RTF export: CJK text is typically not single-byte diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 7cdae5f..1eb0803 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -2100,7 +2100,7 @@ void RtfAttributeOutput::CharFontCJK( const SvxFontItem rFont ) { SAL_INFO(sw.rtf, OSL_THIS_FUNC); -m_aStyles.append(OOO_STRING_SVTOOLS_RTF_HICH); +m_aStyles.append(OOO_STRING_SVTOOLS_RTF_DBCH); m_aStyles.append(OOO_STRING_SVTOOLS_RTF_AF); m_aStyles.append((sal_Int32)m_rExport.maFontHelper.GetId(rFont)); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/rtfexport.cxx |2 +- sw/source/filter/ww8/rtfexport.hxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 633cbb4954a2469f3c8911fbdffcaa4340ca6ac9 Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Thu Mar 29 11:17:20 2012 +0200 fix last commit diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 00b8e18..93f8313 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -79,7 +79,7 @@ using rtl::OUStringBuffer; using sw::mark::IMark; -#if defined(UNX22) +#if defined(UNX) const sal_Char RtfExport::sNewLine = '\012'; #else const sal_Char* const RtfExport::sNewLine = \015\012; diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index 9d395de..b0a45a5 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -155,7 +155,7 @@ public: /// Destructor. virtual ~RtfExport(); -#if defined(UNX22) +#if defined(UNX) static const sal_Char sNewLine; // \012 or \015 #else static const sal_Char* const sNewLine; // \015\012 ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/docxexport.cxx | 22 ++ sw/source/filter/ww8/writerhelper.cxx |4 ++-- sw/source/filter/ww8/ww8par3.cxx |2 +- 3 files changed, 9 insertions(+), 19 deletions(-) New commits: commit b9f7225bb7c9cb58f796296fac3e58f84a619303 Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Wed Mar 28 23:23:42 2012 +0200 remove RTL_CONSTASCII_(U)STRINGPARAM usage diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index ceec8e2..ab41592 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -304,21 +304,13 @@ void DocxExport::DoFormText(const SwInputField* /*pFld*/) rtl::OString DocxExport::OutputChart( uno::Reference frame::XModel xModel, sal_Int32 nCount ) { -rtl::OUString aFileName = rtl::OUStringBuffer() - .appendAscii(RTL_CONSTASCII_STRINGPARAM(charts/chart)) -.append(nCount) - .appendAscii(RTL_CONSTASCII_STRINGPARAM(.xml)) -.makeStringAndClear(); +rtl::OUString aFileName = rtl::OUStringBuffer().append(charts/chart).append(nCount).append(.xml).makeStringAndClear(); OUString sId = m_pFilter-addRelation( m_pDocumentFS-getOutputStream(), http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart;, aFileName ); -aFileName = rtl::OUStringBuffer() - .appendAscii(RTL_CONSTASCII_STRINGPARAM(word/charts/chart)) - .append(nCount) - .appendAscii(RTL_CONSTASCII_STRINGPARAM(.xml)) - .makeStringAndClear(); +aFileName = rtl::OUStringBuffer().append(word/charts/chart).append(nCount).append(.xml).makeStringAndClear(); ::sax_fastparser::FSHelperPtr pChartFS = m_pFilter-openFragmentStreamWithSerializer( aFileName, @@ -575,28 +567,26 @@ void DocxExport::WriteHeaderFooter( const SwFmt rFmt, bool bHeader, const char* ::sax_fastparser::FSHelperPtr pFS; if ( bHeader ) { -OUString aName( OUStringBuffer().appendAscii(RTL_CONSTASCII_STRINGPARAM(header)) -.append( ++m_nHeaders ).appendAscii(RTL_CONSTASCII_STRINGPARAM(.xml)) -.makeStringAndClear() ); +OUString aName( OUStringBuffer().append(header).append( ++m_nHeaders ).append(.xml).makeStringAndClear() ); aRelId = m_pFilter-addRelation( m_pDocumentFS-getOutputStream(), http://schemas.openxmlformats.org/officeDocument/2006/relationships/header;, aName ); -pFS = m_pFilter-openFragmentStreamWithSerializer( OUStringBuffer().appendAscii(RTL_CONSTASCII_STRINGPARAM(word/)).append( aName ).makeStringAndClear(), +pFS = m_pFilter-openFragmentStreamWithSerializer( OUStringBuffer().append(word/).append( aName ).makeStringAndClear(), application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml ); pFS-startElementNS( XML_w, XML_hdr, MainXmlNamespaces( pFS )); } else { -OUString aName( OUStringBuffer().appendAscii(RTL_CONSTASCII_STRINGPARAM(footer)).append( ++m_nFooters ).appendAscii(RTL_CONSTASCII_STRINGPARAM(.xml)).makeStringAndClear() ); +OUString aName( OUStringBuffer().append(footer).append( ++m_nFooters ).append(.xml).makeStringAndClear() ); aRelId = m_pFilter-addRelation( m_pDocumentFS-getOutputStream(), http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer;, aName ); -pFS = m_pFilter-openFragmentStreamWithSerializer( OUStringBuffer().appendAscii(RTL_CONSTASCII_STRINGPARAM(word/)).append( aName ).makeStringAndClear(), +pFS = m_pFilter-openFragmentStreamWithSerializer( OUStringBuffer().append(word/).append( aName ).makeStringAndClear(), application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml ); pFS-startElementNS( XML_w, XML_ftr, MainXmlNamespaces( pFS )); diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index e96dfaa..a997ee8 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -633,8 +633,8 @@ namespace sw bool IsStarSymbol(const rtl::OUString rFontName) { rtl::OUString sFamilyNm(GetFontToken(rFontName, 0)); -return (sFamilyNm.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(starsymbol)) || - sFamilyNm.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(opensymbol))); +return (sFamilyNm.equalsIgnoreAsciiCase(starsymbol) || +sFamilyNm.equalsIgnoreAsciiCase(opensymbol)); } Size GetSwappedInSize(const SwNoTxtNode rNd) diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index e74829b..f50f321 100644 ---
[Libreoffice-commits] .: sw/source
sw/source/core/layout/paintfrm.cxx | 34 ++ 1 file changed, 14 insertions(+), 20 deletions(-) New commits: commit 8945f1bc858f3636d4270f16bd2e66ce88c0021c Author: Stephan Bergmann sberg...@redhat.com Date: Mon Mar 26 11:58:51 2012 +0200 Fix recent paintfrm.cxx regressions ...as reported by Linux-RHEL6-x86_64@14-with-check tinderbox. For one, e94c4ab5523c7dcbee2f1b7fd47685529498e774 Conver SV VARARR to std::deque for sw module. did not use rbegin/rend to iterate backwards. For another, e94c4ab5523c7dcbee2f1b7fd47685529498e774 and subsequent 1a412714031bf6cf3f7962b044b2edea74899b46 fixed crash due to use of STL deque for SwLineRects failed to get the nested loop Remove all help line that are almost covered (tables) at the start of SwSubsRects::PaintSubsidiary converted correctly. This attempt here at fixing it models the original behavior (before conversion) more closely, and hopefully gets it right now. diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index a9f60f3..286908a 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -492,7 +492,8 @@ void SwLineRects::AddLineRect( const SwRect rRect, const Color *pCol, const Svx //Loop backwards because lines which can be combined, can usually be painted //in the same context. -for (SwLineRects::iterator it = this-end(); it != this-begin(); --it) +for (SwLineRects::reverse_iterator it = this-rbegin(); it != this-rend(); + ++it) { SwLineRect rLRect = (*it); // Test for the orientation, color, table @@ -948,17 +949,14 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut, SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pOut ); // Remove all help line that are almost covered (tables) -SwSubsRects::iterator it = this-begin(); -while ( it != this-end() ) +for (SwSubsRects::size_type i = 0; i != this-size(); ++i) { -SwLineRect rLi = *it; +SwLineRect rLi = (*this)[i]; const bool bVerticalSubs = rLi.Height() rLi.Width(); -SwSubsRects::iterator itK = it; -while ( itK != this-end() ) +for (SwSubsRects::size_type k = i + 1; k != this-size(); ++k) { -bool bRemoved = false; -SwLineRect rLk = (*itK); +SwLineRect rLk = (*this)[k]; if ( rLi.SSize() == rLk.SSize() ) { if ( bVerticalSubs == ( rLk.Height() rLk.Width() ) ) @@ -971,11 +969,11 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut, ((nLi rLk.Left() nLi+21 rLk.Left()) || (nLk rLi.Left() nLk+21 rLi.Left( { -this-erase( itK ); +this-erase(this-begin() + k); // don't continue with inner loop any more: // the array may shrink! -itK = this-end(); -bRemoved = true; +--i; +break; } } else @@ -986,21 +984,16 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut, ((nLi rLk.Top() nLi+21 rLk.Top()) || (nLk rLi.Top() nLk+21 rLi.Top( { -this-erase( itK ); +this-erase(this-begin() + k); // don't continue with inner loop any more: // the array may shrink! -itK = this-end(); -bRemoved = true; +--i; +break; } } } } - -if ( !bRemoved ) -++itK; } - -++it; } if ( pRects (!pRects-empty()) ) @@ -1021,7 +1014,8 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut, pOut-SetDrawMode( 0 ); } -for (it = this-begin(); it != this-end(); ++it) +for (SwSubsRects::iterator it = this-begin(); it != this-end(); + ++it) { SwLineRect rLRect = (*it); // Add condition !rLRect.IsLocked() to prevent paint of locked subsidiary lines. ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org
[Libreoffice-commits] .: sw/source
sw/source/core/inc/frmtool.hxx |2 +- sw/source/core/layout/calcmove.cxx |4 ++-- sw/source/core/layout/fly.cxx | 10 +- sw/source/core/layout/frmtool.cxx | 16 sw/source/core/layout/laycache.cxx |4 ++-- sw/source/core/layout/pagechg.cxx |4 ++-- sw/source/core/layout/tabfrm.cxx |6 +++--- sw/source/core/text/txtfly.cxx |2 +- 8 files changed, 24 insertions(+), 24 deletions(-) New commits: commit 19648377e1e4ad5c8c342dc45aeaca83f91b4b27 Author: Nicolas Christener nicolas.christe...@adfinis-sygroup.ch Date: Wed Mar 21 23:26:30 2012 +0100 Rename WEIT_WECH to FAR_AWAY diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index ba1b0f4..e31d8b9 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -56,7 +56,7 @@ struct SwFindRowSpanCacheObj; #define MA_FASTCALL #endif -#define WEIT_WECH LONG_MAX - 2//Initale Position der Flys. +#define FAR_AWAY LONG_MAX - 2//Initale Position der Flys. #define BROWSE_HEIGHT 56700L * 10L //10 Meter #define GRFNUM_NO 0 diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 33e6722..eeccc20 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -669,7 +669,7 @@ void lcl_CheckObjects( SwSortedObjs* pSortedObjs, SwFrm* pFrm, long rBot ) if ( pObj-ISA(SwFlyFrm) ) { SwFlyFrm *pFly = static_castSwFlyFrm*(pObj); -if( pFly-Frm().Top() != WEIT_WECH +if( pFly-Frm().Top() != FAR_AWAY ( pFrm-IsPageFrm() ? pFly-IsFlyLayFrm() : ( pFly-IsFlyAtCntFrm() ( pFrm-IsBodyFrm() ? pFly-GetAnchorFrm()-IsInDocBody() : @@ -1012,7 +1012,7 @@ sal_Bool SwCntntFrm::MakePrtArea( const SwBorderAttrs rAttrs ) SwAnchoredObject* pObj = (*GetDrawObjs())[i]; const SwFrmFmt rFmt = pObj-GetFrmFmt(); const sal_Bool bFly = pObj-ISA(SwFlyFrm); -if ((bFly (WEIT_WECH == pObj-GetObjRect().Width())) +if ((bFly (FAR_AWAY == pObj-GetObjRect().Width())) || rFmt.GetFrmSize().GetWidthPercent()) { continue; diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index b6e7b1f..cc7c170 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -192,7 +192,7 @@ SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) : //Und erstmal in den Wald stellen die Kiste, damit bei neuen Dokument nicht //unnoetig viel formatiert wird. -Frm().Pos().X() = Frm().Pos().Y() = WEIT_WECH; +Frm().Pos().X() = Frm().Pos().Y() = FAR_AWAY; } // OD 2004-01-19 #110582# @@ -1339,7 +1339,7 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs ) if ( !bValidSize ) { -if ( Frm().Top() == WEIT_WECH Frm().Left() == WEIT_WECH ) +if ( Frm().Top() == FAR_AWAY Frm().Left() == FAR_AWAY ) { //Sicherheitsschaltung wegnehmen (siehe SwFrm::CTor) Frm().Pos().X() = Frm().Pos().Y() = 0; @@ -1414,7 +1414,7 @@ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs ) // OD 06.11.2003 #i22305# - consider // only Writer fly frames, which follow the text flow. if ( pFly-IsFlyLayFrm() - pFly-Frm().Top() != WEIT_WECH + pFly-Frm().Top() != FAR_AWAY pFly-GetFmt()-GetFollowTextFlow().GetValue() ) { SwTwips nDist = -(pFly-Frm().*fnRect- @@ -2149,7 +2149,7 @@ void SwFrm::AppendFly( SwFlyFrm *pNew ) SwPageFrm *pPage = FindPageFrm(); if ( pPage ) { -if ( pNew-IsFlyAtCntFrm() pNew-Frm().Top() == WEIT_WECH ) +if ( pNew-IsFlyAtCntFrm() pNew-Frm().Top() == FAR_AWAY ) { //Versuch die Seitenformatierung von neuen Dokumenten etwas //guenstiger zu gestalten. @@ -2424,7 +2424,7 @@ void SwLayoutFrm::NotifyLowerObjs( const bool _bUnlockPosOfObjs ) { SwFlyFrm* pFly = static_castSwFlyFrm*(pObj); -if ( pFly-Frm().Left() == WEIT_WECH ) +if ( pFly-Frm().Left() == FAR_AWAY ) continue; if ( pFly-IsAnLower( this ) ) diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index c19dbf7..fe42863 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -692,7 +692,7 @@ SwFlyNotify::~SwFlyNotify() { pFly-NotifyDrawObj(); } -if ( bPosChgd aFrm.Pos().X() != WEIT_WECH ) +if ( bPosChgd aFrm.Pos().X() != FAR_AWAY ) {
[Libreoffice-commits] .: sw/source
sw/source/core/docnode/ndcopy.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a04fee7204b769dc98c3592aaed2dce5e8eb0161 Author: Julien Nabet serval2...@yahoo.fr Date: Mon Mar 26 23:11:58 2012 +0200 Fix Prefer prefix ++/-- operators for non-primitive types diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index 97557f2..9b1ec4c 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -1478,7 +1478,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange rRg, //die Chains entsprechend aufgebaut werden koennen. ::std::vector SwFrmFmt* aVecSwFrmFmt; -for (::std::set _ZSortFly ::const_iterator it=aSet.begin() ; it != aSet.end(); it++ ) +for (::std::set _ZSortFly ::const_iterator it=aSet.begin() ; it != aSet.end(); ++it ) { // #i59964# // correct determination of new anchor position ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/docxattributeoutput.cxx |8 sw/source/filter/ww8/docxexport.cxx |2 +- sw/source/filter/ww8/rtfattributeoutput.cxx |4 ++-- sw/source/filter/ww8/rtfexport.cxx |2 +- sw/source/filter/ww8/wrtw8nds.cxx|2 +- 5 files changed, 9 insertions(+), 9 deletions(-) New commits: commit 4da30c0b41b854a402e913b467d7e1a0a1b067a3 Author: Julien Nabet serval2...@yahoo.fr Date: Sat Mar 24 23:50:59 2012 +0100 check end of iterator with != instead of diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 77da6da..ba2420f 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -606,7 +606,7 @@ void DocxAttributeOutput::DoWriteBookmarks() { // Write the start bookmarks for ( std::vector OString ::const_iterator it = m_rMarksStart.begin(), end = m_rMarksStart.end(); - it end; ++it ) + it != end; ++it ) { const OString rName = *it; @@ -622,7 +622,7 @@ void DocxAttributeOutput::DoWriteBookmarks() // export the end bookmarks for ( std::vector OString ::const_iterator it = m_rMarksEnd.begin(), end = m_rMarksEnd.end(); - it end; ++it ) + it != end; ++it ) { const OString rName = *it; @@ -3455,14 +3455,14 @@ void DocxAttributeOutput::WriteFormData_Impl( const ::sw::mark::IFieldmark rFie void DocxAttributeOutput::WriteBookmarks_Impl( std::vector OUString rStarts, std::vector OUString rEnds ) { -for ( std::vector OUString ::const_iterator it = rStarts.begin(), end = rStarts.end(); it end; ++it ) +for ( std::vector OUString ::const_iterator it = rStarts.begin(), end = rStarts.end(); it != end; ++it ) { OString rName = OUStringToOString( *it, RTL_TEXTENCODING_UTF8 ).getStr( ); m_rMarksStart.push_back( rName ); } rStarts.clear(); -for ( std::vector OUString ::const_iterator it = rEnds.begin(), end = rEnds.end(); it end; ++it ) +for ( std::vector OUString ::const_iterator it = rEnds.begin(), end = rEnds.end(); it != end; ++it ) { OString rName = OUStringToOString( *it, RTL_TEXTENCODING_UTF8 ).getStr( ); m_rMarksEnd.push_back( rName ); diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 5f7c6da..ceec8e2 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -133,7 +133,7 @@ void DocxExport::AppendBookmarks( const SwTxtNode rNode, xub_StrLen nAktPos, xu if ( GetBookmarks( rNode, nAktPos, nAktPos + nLen, aMarks ) ) { for ( IMarkVector::const_iterator it = aMarks.begin(), end = aMarks.end(); - it end; ++it ) + it != end; ++it ) { IMark* pMark = (*it); diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 70a6a27..7cdae5f 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -1435,7 +1435,7 @@ void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eTyp void RtfAttributeOutput::WriteBookmarks_Impl( std::vector rtl::OUString rStarts, std::vector rtl::OUString rEnds ) { -for ( std::vector OUString ::const_iterator it = rStarts.begin(), end = rStarts.end(); it end; ++it ) +for ( std::vector OUString ::const_iterator it = rStarts.begin(), end = rStarts.end(); it != end; ++it ) { m_aRun-append({ OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_BKMKSTART ); m_aRun-append(m_rExport.OutString(*it, m_rExport.eCurrentEncoding)); @@ -1443,7 +1443,7 @@ void RtfAttributeOutput::WriteBookmarks_Impl( std::vector rtl::OUString rSta } rStarts.clear(); -for ( std::vector OUString ::const_iterator it = rEnds.begin(), end = rEnds.end(); it end; ++it ) +for ( std::vector OUString ::const_iterator it = rEnds.begin(), end = rEnds.end(); it != end; ++it ) { m_aRun-append({ OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_BKMKEND ); m_aRun-append(m_rExport.OutString(*it, m_rExport.eCurrentEncoding)); diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index ecb21cb..dda8b81 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -149,7 +149,7 @@ void RtfExport::AppendBookmarks( const SwTxtNode rNode, xub_StrLen nAktPos, xub if ( GetBookmarks( rNode, nAktPos, nAktPos + nLen, aMarks ) ) { for ( IMarkVector::const_iterator it = aMarks.begin(), end = aMarks.end(); -it end; ++it ) +it != end; ++it ) { IMark* pMark = (*it); xub_StrLen nStart = pMark-GetMarkStart().nContent.GetIndex(); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx
[Libreoffice-commits] .: sw/source
sw/source/core/layout/paintfrm.cxx | 143 - 1 file changed, 65 insertions(+), 78 deletions(-) New commits: commit e94c4ab5523c7dcbee2f1b7fd47685529498e774 Author: Bartosz Kosiorek gan...@poczta.onet.pl Date: Fri Mar 16 20:47:09 2012 +0100 Conver SV VARARR to std::deque for sw module. diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 958e279..ad0e241 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -32,7 +32,6 @@ #include vcl/sound.hxx #include vcl/lazydelete.hxx #include tools/poly.hxx -#include svl/svstdarr.hxx #include svx/xoutbmp.hxx #include sfx2/progress.hxx #include editeng/brshitem.hxx @@ -48,7 +47,6 @@ #include switerator.hxx #include fmtsrnd.hxx #include fmtclds.hxx -#include tools/shl.hxx #include comcore.hrc #include swmodule.hxx #include rootfrm.hxx @@ -81,7 +79,6 @@ #include dbg_lay.hxx #include accessibilityoptions.hxx #include docsh.hxx -#include swtable.hxx #include svx/svdogrp.hxx #include sortedobjs.hxx #include EnhancedPDFExportHelper.hxx @@ -99,14 +96,14 @@ #include ndole.hxx #include svtools/chartprettypainter.hxx #include PostItMgr.hxx -#include tools/color.hxx #include vcl/svapp.hxx #define COL_NOTES_SIDEPANE RGB_COLORDATA(230,230,230) #define COL_NOTES_SIDEPANE_BORDER RGB_COLORDATA(200,200,200) #define COL_NOTES_SIDEPANE_SCROLLAREA RGB_COLORDATA(230,230,220) -#include svtools/borderhelper.hxx +#include svtools/borderhelper.hxx //Need for svtools::DrawLine +#include swtable.hxx //Need for svtools::DrawLine #include pagefrm.hrc #include drawinglayer/geometry/viewinformation2d.hxx @@ -125,6 +122,7 @@ #include basegfx/polygon/b2dpolygon.hxx #include basegfx/color/bcolortools.hxx +#include deque #include algorithm #include wrtsh.hxx #include edtwin.hxx @@ -133,8 +131,6 @@ using namespace ::editeng; using namespace ::com::sun::star; -#define GETOBJSHELL() ((SfxObjectShell*)rSh.GetDoc()-GetDocShell()) - //subsidiary lines enabled? #define IS_SUBS_TABLE \ (pGlobalShell-GetViewOptions()-IsTable() \ @@ -157,8 +153,6 @@ using namespace ::com::sun::star; !pGlobalShell-GetViewOptions()-IsFormView() \ SwViewOption::IsObjectBoundaries()) -#define SW_MAXBORDERCACHE 20 - //Class declaration; here because they are only used in this file #define SUBCOL_PAGE 0x01//Helplines of the page @@ -195,25 +189,24 @@ public: sal_Bool MakeUnion( const SwRect rRect ); }; -SV_DECL_VARARR( SwLRects, SwLineRect, 100 ) - -class SwLineRects : public SwLRects +class SwLineRects : public std::deque SwLineRect { -sal_uInt16 nLastCount; //avoid unnecessary cycles in PaintLines +std::deque SwLineRect ::iterator nLastCount; //avoid unnecessary cycles in PaintLines public: -SwLineRects() : nLastCount( 0 ) {} +SwLineRects() : nLastCount( this-begin() ) {} void AddLineRect( const SwRect rRect, const Color *pColor, const SvxBorderStyle nStyle, const SwTabFrm *pTab, const sal_uInt8 nSCol ); void ConnectEdges( OutputDevice *pOut ); void PaintLines ( OutputDevice *pOut ); void LockLines( sal_Bool bLock ); -sal_uInt16 Free() const { return nFree; } +//Limit lines to 100 +bool isFull() const { return this-size()100 ? true : false; } }; class SwSubsRects : public SwLineRects { -void RemoveSuperfluousSubsidiaryLines( const SwLineRects rRects ); //;-) +void RemoveSuperfluousSubsidiaryLines( const SwLineRects rRects ); public: void PaintSubsidiary( OutputDevice *pOut, const SwLineRects *pRects ); @@ -436,7 +429,6 @@ SwSavePaintStatics::~SwSavePaintStatics() //- Implementation for the table borders -- -SV_IMPL_VARARR( SwLRects, SwLineRect ); SwLineRect::SwLineRect( const SwRect rRect, const Color *pCol, const SvxBorderStyle nStyl, const SwTabFrm *pT, const sal_uInt8 nSCol ) : @@ -496,9 +488,10 @@ void SwLineRects::AddLineRect( const SwRect rRect, const Color *pCol, const Svx //Loop backwards because lines which can be combined, can usually be painted //in the same context. -for ( sal_uInt16 i = Count(); i ; ) + +for (SwLineRects::iterator it = this-end(); it != this-begin(); --it) { -SwLineRect rLRect = operator[](--i); +SwLineRect rLRect = (*it); // Test for the orientation, color, table if ( rLRect.GetTab() == pTab !rLRect.IsPainted() rLRect.GetSubColor() == nSCol @@ -510,7 +503,7 @@ void SwLineRects::AddLineRect( const SwRect rRect, const Color *pCol, const Svx return; } } -Insert( SwLineRect( rRect, pCol, nStyle, pTab, nSCol ), Count() ); +this-push_back( SwLineRect( rRect, pCol, nStyle, pTab, nSCol ) ); } void SwLineRects::ConnectEdges( OutputDevice *pOut ) @@
[Libreoffice-commits] .: sw/source
sw/source/core/doc/docdraw.cxx|3 -- sw/source/core/doc/docedt.cxx |9 ++ sw/source/core/docnode/ndcopy.cxx | 56 +++--- sw/source/core/inc/mvsave.hxx |5 +-- 4 files changed, 34 insertions(+), 39 deletions(-) New commits: commit db51589575d37ca608067ad9904dcc6a09651e8c Author: Bartosz Kosiorek gan...@poczta.onet.pl Date: Thu Mar 15 07:26:54 2012 +0100 Convert SVARRAY SORT into STL set diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index 2d5671c..cbff064 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -76,9 +76,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::linguistic2; - -SV_IMPL_VARARR_SORT( _ZSortFlys, _ZSortFly ) - /* |* |* SwDoc::GroupSelection / SwDoc::UnGroupSelection diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 26a2ad8..6c73ba1 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -163,7 +163,6 @@ struct _SaveRedline SV_DECL_PTRARR_DEL( _SaveRedlines, _SaveRedline*, 0 ) -SV_IMPL_VARARR( _SaveFlyArr, _SaveFly ) SV_IMPL_PTRARR( _SaveRedlines, _SaveRedline* ) bool lcl_MayOverwrite( const SwTxtNode *pNode, const xub_StrLen nPos ) @@ -191,7 +190,7 @@ void _RestFlyInRange( _SaveFlyArr rArr, const SwNodeIndex rSttIdx, const SwNodeIndex* pInsertPos ) { SwPosition aPos( rSttIdx ); -for( sal_uInt16 n = 0; n rArr.Count(); ++n ) +for( size_t n = 0; n rArr.size(); ++n ) { // create new anchor _SaveFly rSave = rArr[n]; @@ -234,7 +233,7 @@ void _SaveFlyInRange( const SwNodeRange rRg, _SaveFlyArr rArr ) { _SaveFly aSave( pAPos-nNode.GetIndex() - rRg.aStart.GetIndex(), pFmt, sal_False ); -rArr.Insert( aSave, rArr.Count()); +rArr.push_back( aSave ); pFmt-DelFrms(); rFmts.Remove( n--, 1 ); } @@ -295,7 +294,7 @@ void _SaveFlyInRange( const SwPaM rPam, const SwNodeIndex rInsPos, { _SaveFly aSave( pAPos-nNode.GetIndex() - rSttNdIdx.GetIndex(), pFmt, bInsPos ); -rArr.Insert( aSave, rArr.Count()); +rArr.push_back( aSave ); pFmt-DelFrms(); rFmts.Remove( n--, 1 ); } @@ -1188,7 +1187,7 @@ bool SwDoc::MoveNodeRange( SwNodeRange rRange, SwNodeIndex rPos, } // move the Flys to the new position -if( aSaveFlyArr.Count() ) +if( !aSaveFlyArr.empty() ) _RestFlyInRange( aSaveFlyArr, aIdx, NULL ); // Add the Bookmarks back to the Document diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index 4aabfba..97557f2 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -53,6 +53,8 @@ #include pagedesc.hxx #include poolfmt.hxx #include SwNodeNum.hxx +#include set +#include vector #ifdef DBG_UTIL #define CHECK_TABLE(t) (t).CheckConsistency(); @@ -328,7 +330,7 @@ sal_Bool lcl_CopyTblLine( const SwTableLine* rpLine, void* pPara ); sal_Bool lcl_CopyTblBox( const SwTableBox* rpBox, void* pPara ) { -_CopyTable* pCT = (_CopyTable*)pPara; +_CopyTable* pCT = reinterpret_cast _CopyTable* (pPara); SwTableBoxFmt* pBoxFmt = (SwTableBoxFmt*)rpBox-GetFrmFmt(); pCT-rMapArr.ForEach( lcl_SrchNew, pBoxFmt ); @@ -392,7 +394,7 @@ sal_Bool lcl_CopyTblBox( const SwTableBox* rpBox, void* pPara ) sal_Bool lcl_CopyTblLine( const SwTableLine* rpLine, void* pPara ) { -_CopyTable* pCT = (_CopyTable*)pPara; +_CopyTable* pCT = reinterpret_cast _CopyTable* (pPara); SwTableLineFmt* pLineFmt = (SwTableLineFmt*)rpLine-GetFrmFmt(); pCT-rMapArr.ForEach( lcl_SrchNew, pLineFmt ); if( pLineFmt == rpLine-GetFrmFmt() ) // ein neues anlegen ?? @@ -1403,7 +1405,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange rRg, //die Ordnungsnummer (wird nur im DrawModel verwaltet) //beibehalten. SwDoc *const pDest = rStartIdx.GetNode().GetDoc(); -_ZSortFlys aArr; +::std::set _ZSortFly aSet; sal_uInt16 nArrLen = GetSpzFrmFmts()-Count(); for ( sal_uInt16 n = 0; n nArrLen; ++n ) @@ -1467,22 +1469,20 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange rRg, } } if( bAdd ) -aArr.Insert( _ZSortFly( pFmt, pAnchor, nArrLen + aArr.Count() )); +aSet.insert( _ZSortFly( pFmt, pAnchor, nArrLen + aSet.size() )); } } //Alle kopierten (also die neu erzeugten) Rahmen in ein weiteres Array //stopfen. Dort sizten sie passend zu den Originalen, damit hinterher //die Chains entsprechend aufgebaut werden koennen. -SvPtrarr aNewArr( 10 ); +::std::vector
[Libreoffice-commits] .: sw/source
sw/source/core/unocore/unodraw.cxx | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) New commits: commit 28253b4d826a8a008349fa66c902028e3f5a907b Author: Miklos Vajna vmik...@suse.cz Date: Wed Mar 21 09:45:25 2012 +0100 SwXShape::setPropertyValue: OSL_ENSURE - SAL_WARN_IF diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 834d14d..ea49842 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1174,7 +1174,7 @@ void SwXShape::setPropertyValue(const rtl::OUString rPropertyName, const uno::A else if(RES_OPAQUE == pEntry-nWID) { SvxShape* pSvxShape = GetSvxShape(); -OSL_ENSURE(pSvxShape, No SvxShape found!); +SAL_WARN_IF(pSvxShape, sw.uno, No SvxShape found!); if(pSvxShape) { SdrObject* pObj = pSvxShape-GetSdrObject(); @@ -1220,15 +1220,15 @@ void SwXShape::setPropertyValue(const rtl::OUString rPropertyName, const uno::A //To prevent this the connection between format and attribute has to be broken before. const SwPosition *pPos = aAnchor.GetCntntAnchor(); SwTxtNode *pTxtNode = pPos-nNode.GetNode().GetTxtNode(); -OSL_ENSURE( pTxtNode-HasHints(), Missing FlyInCnt-Hint. ); +SAL_WARN_IF( pTxtNode-HasHints(), sw.uno, Missing FlyInCnt-Hint. ); const xub_StrLen nIdx = pPos-nContent.GetIndex(); SwTxtAttr * const pHnt = pTxtNode-GetTxtAttrForCharAt( nIdx, RES_TXTATR_FLYCNT ); -OSL_ENSURE( pHnt pHnt-Which() == RES_TXTATR_FLYCNT, -Missing FlyInCnt-Hint. ); -OSL_ENSURE( pHnt pHnt-GetFlyCnt().GetFrmFmt() == pFmt, -Wrong TxtFlyCnt-Hint. ); +SAL_WARN_IF( pHnt pHnt-Which() == RES_TXTATR_FLYCNT, +sw.uno, Missing FlyInCnt-Hint. ); +SAL_WARN_IF( pHnt pHnt-GetFlyCnt().GetFrmFmt() == pFmt, +sw.uno, Wrong TxtFlyCnt-Hint. ); const_castSwFmtFlyCnt(pHnt-GetFlyCnt()) .SetFlyFmt(); @@ -1237,7 +1237,7 @@ void SwXShape::setPropertyValue(const rtl::OUString rPropertyName, const uno::A RES_TXTATR_FLYCNT, nIdx ); //create a new one SwTxtNode *pNd = pInternalPam-GetNode()-GetTxtNode(); -OSL_ENSURE( pNd, Cursor not at TxtNode. ); +SAL_WARN_IF( pNd, sw.uno, Cursor not at TxtNode. ); SwFmtFlyCnt aFmt( pFmt ); pNd-InsertItem(aFmt, pInternalPam-GetPoint() -nContent.GetIndex(), 0 ); @@ -1306,15 +1306,15 @@ void SwXShape::setPropertyValue(const rtl::OUString rPropertyName, const uno::A //To prevent this the connection between format and attribute has to be broken before. const SwPosition *pPos = rOldAnchor.GetCntntAnchor(); SwTxtNode *pTxtNode = pPos-nNode.GetNode().GetTxtNode(); -OSL_ENSURE( pTxtNode-HasHints(), Missing FlyInCnt-Hint. ); +SAL_WARN_IF( pTxtNode-HasHints(), sw.uno, Missing FlyInCnt-Hint. ); const xub_StrLen nIdx = pPos-nContent.GetIndex(); SwTxtAttr * const pHnt = pTxtNode-GetTxtAttrForCharAt( nIdx, RES_TXTATR_FLYCNT ); -OSL_ENSURE( pHnt pHnt-Which() == RES_TXTATR_FLYCNT, -Missing FlyInCnt-Hint. ); -OSL_ENSURE( pHnt pHnt-GetFlyCnt().GetFrmFmt() == pFlyFmt, -Wrong TxtFlyCnt-Hint. ); +SAL_WARN_IF( pHnt pHnt-Which() == RES_TXTATR_FLYCNT, +sw.uno, Missing FlyInCnt-Hint. ); +SAL_WARN_IF( pHnt pHnt-GetFlyCnt().GetFrmFmt() == pFlyFmt, +sw.uno, Wrong TxtFlyCnt-Hint. ); const_castSwFmtFlyCnt(pHnt-GetFlyCnt()) .SetFlyFmt(); @@ -1349,7 +1349,7 @@ void SwXShape::setPropertyValue(const
[Libreoffice-commits] .: sw/source
sw/source/core/layout/atrfrm.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 0994cb60411b0efc71a8d6ef182e158761a85b6b Author: Miklos Vajna vmik...@suse.cz Date: Wed Mar 21 15:24:42 2012 +0100 SwFmtVertOrient: warn if passed relation type is wrong, don't just ignore it diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 920eb52..e836f62 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -149,7 +149,8 @@ sal_Int16 lcl_IntToRelation(const uno::Any rVal) { sal_Int16 eRet = text::RelOrientation::FRAME; sal_Int16 nVal = 0; -rVal = nVal; +if (!(rVal = nVal)) +SAL_WARN(sw.core, lcl_IntToRelation: read from Any failed!); switch(nVal) { case text::RelOrientation::PRINT_AREA: eRet = text::RelOrientation::PRINT_AREA ; break; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/text/xmldump.cxx | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) New commits: commit 8da05bd82457ad4bd90a61f806e4f0632a9c0273 Author: Tor Lillqvist tlillqv...@suse.com Date: Tue Mar 20 09:33:55 2012 +0200 WaE: '%u' expects 'unsigned int', but argument is 'sal_uInt32' diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index e443f6d..18b92e7 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -346,15 +346,15 @@ void SwFrm::dumpInfosAsXml( xmlTextWriterPtr writer ) void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) { xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( ptr ), %p, this ); -xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( id ), %u, GetFrmId() ); +xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( id ), %SAL_PRIuUINT32, GetFrmId() ); if ( GetNext( ) ) -xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( next ), %u, GetNext()-GetFrmId() ); +xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( next ), %SAL_PRIuUINT32, GetNext()-GetFrmId() ); if ( GetPrev( ) ) -xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( prev ), %u, GetPrev()-GetFrmId() ); +xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( prev ), %SAL_PRIuUINT32, GetPrev()-GetFrmId() ); if ( GetUpper( ) ) -xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( upper ), %u, GetUpper()-GetFrmId() ); +xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( upper ), %SAL_PRIuUINT32, GetUpper()-GetFrmId() ); if ( GetLower( ) ) -xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( lower ), %u, GetLower()-GetFrmId() ); +xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( lower ), %SAL_PRIuUINT32, GetLower()-GetFrmId() ); if ( IsTxtFrm( ) ) { SwTxtFrm *pTxtFrm = ( SwTxtFrm * ) this; @@ -390,30 +390,30 @@ void SwTxtFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) { SwFrm::dumpAsXmlAttributes( writer ); if ( HasFollow() ) -xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( follow ), %u, GetFollow()-GetFrmId() ); +xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( follow ), %SAL_PRIuUINT32, GetFollow()-GetFrmId() ); if (m_pPrecede != NULL) -xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( precede ), %u, static_castSwTxtFrm*(m_pPrecede)-GetFrmId() ); +xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( precede ), %SAL_PRIuUINT32, static_castSwTxtFrm*(m_pPrecede)-GetFrmId() ); } void SwSectionFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) { SwFrm::dumpAsXmlAttributes( writer ); if ( HasFollow() ) -xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( follow ), %u, GetFollow()-GetFrmId() ); +xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( follow ), %SAL_PRIuUINT32, GetFollow()-GetFrmId() ); if (m_pPrecede != NULL) -xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( precede ), %u, static_castSwSectionFrm*( m_pPrecede )-GetFrmId() ); +xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( precede ), %SAL_PRIuUINT32, static_castSwSectionFrm*( m_pPrecede )-GetFrmId() ); } void SwTabFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) { SwFrm::dumpAsXmlAttributes( writer ); if ( HasFollow() ) -xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( follow ), %u, GetFollow()-GetFrmId() ); +xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( follow ), %SAL_PRIuUINT32, GetFollow()-GetFrmId() ); if (m_pPrecede != NULL) -xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( precede ), %u, static_castSwTabFrm*( m_pPrecede )-GetFrmId() ); +xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( precede ), %SAL_PRIuUINT32, static_castSwTabFrm*( m_pPrecede )-GetFrmId() ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/ww8par.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 2255d1f25f6e9bf4baac9ca5ef9668eb3c518ee4 Author: Julien Nabet serval2...@yahoo.fr Date: Sun Mar 18 10:56:17 2012 +0100 Simplify these 2 conditions diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 254b4c9..db0fdb5 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2360,7 +2360,7 @@ CharSet SwWW8ImplReader::GetCurrentCharSet() { if (!maFontSrcCharSets.empty()) eSrcCharSet = maFontSrcCharSets.top(); -if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) (nCharFmt != -1) nCharFmt = 0 (size_t)nCharFmt vColl.size() ) +if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) nCharFmt = 0 (size_t)nCharFmt vColl.size() ) eSrcCharSet = vColl[nCharFmt].GetCharSet(); if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) StyleExists(nAktColl) nAktColl vColl.size()) eSrcCharSet = vColl[nAktColl].GetCharSet(); @@ -2422,7 +2422,7 @@ CharSet SwWW8ImplReader::GetCurrentCJKCharSet() eSrcCharSet = maFontSrcCJKCharSets.top(); if (!vColl.empty()) { -if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) (nCharFmt != -1) nCharFmt = 0 (size_t)nCharFmt vColl.size() ) +if ((eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) nCharFmt = 0 (size_t)nCharFmt vColl.size() ) eSrcCharSet = vColl[nCharFmt].GetCJKCharSet(); if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW nAktColl vColl.size()) eSrcCharSet = vColl[nAktColl].GetCJKCharSet(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/WW8TableInfo.cxx |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit 0184afc2738ed506f3848723ef1ac0c86822957b Author: Arnaud Versini arnaud.vers...@gmail.com Date: Sun Mar 18 19:59:55 2012 +0100 Check iterator end WW8TableCellGrid diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 6171430..72993ba 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -1171,9 +1171,11 @@ void WW8TableCellGrid::addShadowCells() } ++aCellIt; - -bBeginningOfCell = (aRect.Left() != aCellIt-left()); -aRect = aCellIt-getRect(); +if (aCellIt != aCellEndIt) +{ +bBeginningOfCell = (aRect.Left() != aCellIt-left()); +aRect = aCellIt-getRect(); +} } WW8TableCellGridRow::Pointer_t pRow = getRow(*aTopsIt); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/layout/dumpfilter.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 1a6b52a1bfc184524fc63d4a9d0b51055bf9af23 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Fri Mar 16 14:24:22 2012 +0100 add indentation to sw's layout dumper diff --git a/sw/source/core/layout/dumpfilter.cxx b/sw/source/core/layout/dumpfilter.cxx index b5ee4ee..75c2f0e 100644 --- a/sw/source/core/layout/dumpfilter.cxx +++ b/sw/source/core/layout/dumpfilter.cxx @@ -146,6 +146,7 @@ namespace sw writeCallback, closeCallback, ( void* ) xOut.get(), NULL ); xmlTextWriterPtr writer = xmlNewTextWriter( outBuffer ); +xmlTextWriterSetIndent(writer, 1); xmlTextWriterStartDocument( writer, NULL, NULL, NULL ); // TODO This doesn't export the whole XML file, whereas dumpAsXML() does it nicely ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/ui/chrdlg/pardlg.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit f1a2665128fa476f571cfd47c29b202a7ecc21cc Author: Miklos Vajna vmik...@suse.cz Date: Wed Mar 14 15:13:40 2012 +0100 SwParaDlg::PageCreated: replace this hardwired 0x001E with something readable diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index be65dfb..7e92407 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -186,7 +186,8 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage rPage) if (!bDrawParaDlg) { -aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET,0x001E)); +// See SvxStdParagraphTabPage::PageCreated: enable RegisterMode, AutoFirstLine, NegativeMode, ContextualMode + aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET,0x0002|0x0004|0x0008|0x0010)); aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST, MM50/10)); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/text/txtfly.cxx | 320 +++-- 1 file changed, 156 insertions(+), 164 deletions(-) New commits: commit 7caa7ae8947f20413f06291779aac021128cb126 Author: Philipp Weissenbacher p.weissenbac...@gmail.com Date: Wed Mar 14 18:55:03 2012 +0100 Translate German comments diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index a3b4630..7336d13 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -38,19 +38,19 @@ #include swregion.hxx // SwRegionRects #include dcontact.hxx // SwContact #include dflyobj.hxx // SdrObject -#include flyfrm.hxx // SwFlyFrm -#include frmtool.hxx// ::DrawGraphic +#include flyfrm.hxx // SwFlyFrm +#include frmtool.hxx // ::DrawGraphic #include porfld.hxx // SwGrfNumPortion -#include txtfrm.hxx // SwTxtFrm -#include itrform2.hxx // SwTxtFormatter -#include porfly.hxx // NewFlyCntPortion -#include porfld.hxx // SwGrfNumPortion -#include txtfly.hxx // SwTxtFly -#include txtpaint.hxx // SwSaveClip -#include txtatr.hxx // SwTxtFlyCnt +#include txtfrm.hxx // SwTxtFrm +#include itrform2.hxx // SwTxtFormatter +#include porfly.hxx // NewFlyCntPortion +#include porfld.hxx // SwGrfNumPortion +#include txtfly.hxx // SwTxtFly +#include txtpaint.hxx // SwSaveClip +#include txtatr.hxx // SwTxtFlyCnt #include notxtfrm.hxx #include flyfrms.hxx -#include fmtcnct.hxx // SwFmtChain +#include fmtcnct.hxx // SwFmtChain #include pormulti.hxx // SwMultiPortion #include svx/obj3d.hxx #include editeng/txtrange.hxx @@ -74,7 +74,7 @@ #include doc.hxx #ifdef DBG_UTIL -#include viewopt.hxx // SwViewOptions, nur zum Testen (Test2) +#include viewopt.hxx // SwViewOptions, only for testing (Test2) #include doc.hxx #endif @@ -82,37 +82,34 @@ using namespace ::com::sun::star; /* - * Beschreibung: - * Die Klasse SwTxtFly soll die Universalschnittstelle zwischen der - * Formatierung/Textausgabe und den u.U. ueberlappenden freifliegenden - * Frames sein. - * Waehrend der Formatierung erkundigt sich der Formatierer beim SwTxtFly, - * ob ein bestimmter Bereich durch die Attribute eines ueberlappenden - * Frames vorliegt. Solche Bereiche werden in Form von Dummy-Portions - * abgebildet. - * Die gesamte Textausgabe und Retusche wird ebenfalls an ein SwTxtFly - * weitergeleitet. Dieser entscheidet, ob Textteile geclippt werden muessen - * und zerteilt z.B. die Bereiche bei einem DrawRect. - * Zu beachten ist, dass alle freifliegenden Frames in einem nach TopLeft - * sortiertem PtrArray an der Seite zu finden sind. Intern wird immer nur - * in dokumentglobalen Werten gerechnet. Die IN- und OUT-Parameter sind - * jedoch in den meisten Faellen an die Beduerfnisse des LineIters - * zugeschnitten, d.h. sie werden in frame- oder windowlokalen Koordinaten - * konvertiert. - * Wenn mehrere Frames mit Umlaufattributen in einer Zeile liegen, - * ergeben sich unterschiedliche Auswirkungen fuer den Textfluss: + * Description: + * SwTxtFly's purpose is to be the universal interface between + * formatting/text output and the possibly overlapping free-flying frames. + * During formatting the formatter gets the information from SwTxtFly, whether + * a certain area is present by the attributes of an overlapping frame. + * Such areas are represented by dummy portions. + * The whole text output and touch-up is, again, forwarded to a SwTxtFly. + * This one decides, whether parts of the text need to be clipped and splits + * the areas for e.g. a DrawRect. + * Please note that all free-flying frames are located in a PtrArray, sorted + * by TopLeft. + * Internally we always use document-global values. The IN and OUT parameters + * are, however, adjusted to the needs of the LineIter most of the time. That + * is: they are converted to frame- and window-local coordinates. + * If multiple frames with wrap attributes are located on the same line, we get + * the following settings for the text flow: * - * L/RP L R K - * P -P-P- -P-L -P R- -P K - * L -L P- -L L -L R- -L K - * RR-P- R-L R R- R K - * KK P- K L K R- K K + * L/RP L R N + * P -P-P- -P-L -P R- -P N + * L -L P- -L L -L R- -L N + * RR-P- R-L R R- R N + * NN P- N L N R- N N * - * (P=parallel, L=links, R=rechts, K=kein Umlauf) + * (P=parallel, L=left, R=right, N=no wrap) * - * Das Verhalten so beschreiben: - * Jeder Rahmen kann Text verdraengen, wobei der Einfluss allerdings nur - * bis zum naechsten Rahmen reicht. + * We can describe the behaviour as follows: + * Every frame can push away text, with the restriction that it only has influence + * until the next frame. */
[Libreoffice-commits] .: sw/source
sw/source/ui/uiview/viewport.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f1040f9fa7e3af5ccc91a4cbc0ff781dd372107d Author: Ivan Timofeev timofeev@gmail.com Date: Tue Mar 13 17:19:57 2012 +0400 always use the *real* visibility of the SwScrollbar, part 2 diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx index 0e09076..d6b723d 100644 --- a/sw/source/ui/uiview/viewport.cxx +++ b/sw/source/ui/uiview/viewport.cxx @@ -833,7 +833,7 @@ void SwView::CalcAndSetBorderPixel( SvBorder rToFill, sal_Bool /*bInner*/ ) const StyleSettings rSet = GetEditWin().GetSettings().GetStyleSettings(); const long nTmp = rSet.GetScrollBarSize(); -if( pVScrollbar-IsVisible(sal_False) ) +if( pVScrollbar-IsVisible(sal_True) ) { if(bRightVRuler) rToFill.Left() = nTmp; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/ww8atr.cxx |6 ++ sw/source/filter/ww8/ww8par.hxx |1 - sw/source/filter/ww8/ww8par6.cxx | 11 --- sw/source/filter/ww8/ww8scan.cxx |2 +- 4 files changed, 11 insertions(+), 9 deletions(-) New commits: commit 605bc21f7941d598f98203928b034add416c9c65 Author: Miklos Vajna vmik...@suse.cz Date: Tue Mar 13 15:01:24 2012 +0100 ww8: implement sprmPFContextualSpacing diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index c8f005b..7fcba60 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -3885,6 +3885,12 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem rUL ) else m_rWW8Export.pO-push_back( 22 ); m_rWW8Export.InsUInt16( rUL.GetLower() ); +// sprmPFContextualSpacing +if (m_rWW8Export.bWrtWW8 rUL.GetContext()) +{ +m_rWW8Export.InsUInt16(NS_sprm::LN_PContextualSpacing); +m_rWW8Export.InsUInt16(rUL.GetContext()); +} } } diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index cdc495d..b86c5b6 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1588,7 +1588,6 @@ public: // eigentlich private, geht aber leider nur public void Read_UL( sal_uInt16 nId, const sal_uInt8*, short nLen ); void Read_ParaAutoBefore(sal_uInt16 , const sal_uInt8 *pData, short nLen); void Read_ParaAutoAfter(sal_uInt16 , const sal_uInt8 *pData, short nLen); -void Read_DontAddEqual(sal_uInt16 , const sal_uInt8 *pData, short nLen); void Read_LineSpace(sal_uInt16, const sal_uInt8*, short nLen ); void Read_Justify(sal_uInt16, const sal_uInt8*, short nLen); void Read_IdctHint(sal_uInt16, const sal_uInt8*, short nLen); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index eca258b..e995640 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -4102,12 +4102,6 @@ sal_uInt16 SwWW8ImplReader::GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing) return 280; //Seems to be always 14points in this case } -void SwWW8ImplReader::Read_DontAddEqual(sal_uInt16, const sal_uInt8 *, short nLen) -{ -if (nLen 0) -return; -} - void SwWW8ImplReader::Read_ParaAutoBefore(sal_uInt16, const sal_uInt8 *pData, short nLen) { if (nLen 0) @@ -4201,6 +4195,9 @@ void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLe case 0xA414: aUL.SetLower( nPara ); break; +case 0x246D: +aUL.SetContextValue( nPara ); +break; default: return; }; @@ -6079,7 +6076,7 @@ const wwSprmDispatcher *GetWW8SprmDispatcher() {0x303C, 0}, //undocumented {0x245B, SwWW8ImplReader::Read_ParaAutoBefore},//undocumented, para {0x245C, SwWW8ImplReader::Read_ParaAutoAfter},//undocumented, para -{0x246D, SwWW8ImplReader::Read_DontAddEqual}//undocumented, para +{0x246D, SwWW8ImplReader::Read_UL} //sprmPFContextualSpacing }; static wwSprmDispatcher aSprmSrch(aSprms, SAL_N_ELEMENTS(aSprms)); diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 7027261..ac801fb 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -779,7 +779,7 @@ const wwSprmSearcher *wwSprmParser::GetWW8SprmSearcher() {0x303C, 1, L_FIX}, // undocumented, sep {0x245B, 1, L_FIX}, // undocumented, para autobefore {0x245C, 1, L_FIX}, // undocumented, para autoafter -// undocumented, don't add space between para of the same style +// sprmPFContextualSpacing, don't add space between para of the same style {0x246D, 1, L_FIX} }; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/layout/tabfrm.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 1c12cc8070c05896182746f1c6524bdce930b148 Author: Korrawit Pruegsanusak detective.conan.1...@gmail.com Date: Tue Mar 13 21:45:42 2012 +0700 missing open brace diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 6e5c32a..0c68a3f 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -2564,6 +2564,7 @@ void SwTabFrm::MakeAll() bMovedFwd = true; aNotify.SetLowersComplete( sal_False ); if ( IsFollow() ) +{ //To avoid oscillations now invalid master should drop behind. SwTabFrm *pTab = FindMaster(); if ( pTab-GetUpper() ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/layout/tabfrm.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 9a22f0df9eb5c9b5dd7e080f6346385057458faf Author: Korrawit Pruegsanusak detective.conan.1...@gmail.com Date: Tue Mar 13 22:05:55 2012 +0700 another missing open brace diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 0c68a3f..19d608a 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -3517,6 +3517,7 @@ void SwTabFrm::Cut() InvalidatePage( pPage ); SwFrm *pFrm = GetNext(); if( pFrm ) +{ //The old follower eventually calculated a margin to the predecessor //which is obsolete now as it became the first one pFrm-_InvalidatePrt(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/layout/flowfrm.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit b7c2124b39e8a93c8dadfaec5257e491da9fdda1 Author: Michael Stahl mst...@redhat.com Date: Mon Mar 12 22:42:15 2012 +0100 SwFlowFrm::CalcUpperSpace: fix crash with null pPrevFrm in framework_unoapi diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index fe1ed54..1aacdbc 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -1626,8 +1626,11 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs, bool bContextualSpacing = pAttrs-GetULSpace().GetContext(); delete pAccess; -if (bContextualSpacing lcl_getContextualSpacing(pPrevFrm) lcl_IdenticalStyles(pPrevFrm, rThis)) +if (bContextualSpacing pPrevFrm lcl_getContextualSpacing(pPrevFrm) + lcl_IdenticalStyles(pPrevFrm, rThis)) +{ return 0; +} else return nUpper; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/WW8FFData.cxx |2 +- sw/source/filter/ww8/wrtw8nds.cxx |4 ++-- sw/source/filter/xml/XMLRedlineImportHelper.cxx |2 +- sw/source/filter/xml/xmltexti.cxx |2 +- sw/source/ui/dochdl/swdtflvr.cxx|2 +- 5 files changed, 6 insertions(+), 6 deletions(-) New commits: commit f96ac4aa501fb50150af9c9164f3bc1657f9c896 Author: Julien Nabet serval2...@yahoo.fr Date: Sun Mar 11 10:01:26 2012 +0100 Some cppcheck cleaning diff --git a/sw/source/filter/ww8/WW8FFData.cxx b/sw/source/filter/ww8/WW8FFData.cxx index f6e665f..7f347d8 100644 --- a/sw/source/filter/ww8/WW8FFData.cxx +++ b/sw/source/filter/ww8/WW8FFData.cxx @@ -163,7 +163,7 @@ void WW8FFData::Write(SvStream * pDataStrm) const ::rtl::OUString rEntry = *aIt; WriteOUString(pDataStrm, rEntry, false); -aIt++; +++aIt; } } diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 53f95ad..1c7e87b 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1676,7 +1676,7 @@ bool MSWordExportBase::NearestBookmark( xub_StrLen rNearest, const xub_StrLen n { bool bHasBookmark = false; -if ( m_rSortedMarksStart.size( ) 0 ) +if ( !m_rSortedMarksStart.empty() ) { IMark* pMarkStart = m_rSortedMarksStart.front(); xub_StrLen nNext = pMarkStart-GetMarkStart().nContent.GetIndex(); @@ -1687,7 +1687,7 @@ bool MSWordExportBase::NearestBookmark( xub_StrLen rNearest, const xub_StrLen n } } -if ( m_rSortedMarksEnd.size( ) 0 ) +if ( !m_rSortedMarksEnd.empty() ) { IMark* pMarkEnd = m_rSortedMarksEnd[0]; xub_StrLen nNext = pMarkEnd-GetMarkEnd().nContent.GetIndex(); diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index 49a3110..b91a81b 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -330,7 +330,7 @@ XMLRedlineImportHelper::~XMLRedlineImportHelper() { // delete all left over (and obviously incomplete) RedlineInfos (and map) RedlineMapType::iterator aFind = aRedlineMap.begin(); -for( ; aRedlineMap.end() != aFind; aFind++ ) +for( ; aRedlineMap.end() != aFind; ++aFind ) { RedlineInfo* pInfo = aFind-second; diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 4b77b18..d690dee 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -946,7 +946,7 @@ void SwXMLTextImportHelper::endAppletOrPlugin( aCommandSequence[nIndex].Handle = -1; aCommandSequence[nIndex].Value = makeAny( OUString((*aIter).second) ); aCommandSequence[nIndex].State = beans::PropertyState_DIRECT_VALUE; -aIter++, nIndex++; +++aIter, ++nIndex; } // unfortunately the names of the properties are depending on the object diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index adfa4d1..2760a7d 100644 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -854,7 +854,7 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut ) // remove all DDE-Bookmarks, they are invalid inside the clipdoc! for(::std::vector ::sw::mark::IMark* ::iterator ppMark = vDdeMarks.begin(); ppMark != vDdeMarks.end(); -ppMark++) +++ppMark) pMarkAccess-deleteMark(*ppMark); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/ui/docvw/edtwin.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 87279e0e812bac7f2c17f2758a39bcfd942214af Author: Michael Stahl mst...@redhat.com Date: Fri Mar 9 20:30:56 2012 +0100 fdo#45962: fix context menu key yanking cursor out of header/footer For the context menu key VCL synthesizes a cursor position that is the center of the window, hence likely to be in the document body. When SwEditWin::Command calls lcl_CheckHeaderFooterClick, it then moves the document view cursor; prevent that by only calling that for actual mouse events. (regression from a6176612ff1a6a142a68964b2c0834d28125fc45) diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 2613779..bb2daba 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -4733,7 +4733,7 @@ void SwEditWin::Command( const CommandEvent rCEvt ) if (rView.GetPostItMgr()-IsHit(rCEvt.GetMousePosPixel())) return; -if ( lcl_CheckHeaderFooterClick( rSh, +if (rCEvt.IsMouseEvent() lcl_CheckHeaderFooterClick( rSh, PixelToLogic( rCEvt.GetMousePosPixel() ), 1 ) ) return; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/writer/writer.cxx |9 + 1 file changed, 5 insertions(+), 4 deletions(-) New commits: commit 14ca52086ba3cdba0f767f69f9de9fa5fb9e5668 Author: Noel Grandin n...@peralex.com Date: Thu Mar 8 11:44:02 2012 +0200 Fix bug in commit ad9960ffeb25f31ce4b1f819f909f1eb9ad6d7dd My previous patch converting SvPtrarr usage to std::vector had a bug, (spotted by Ivan timofeev@gmail.com) where it called multimap.find instead of multimap.equal_range. diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 751743c..c0f780e 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -464,17 +464,18 @@ sal_uInt16 Writer::GetBookmarks(const SwCntntNode rNd, xub_StrLen nStt, OSL_ENSURE( rArr.empty(), es sind noch Eintraege vorhanden ); sal_uLong nNd = rNd.GetIndex(); -SwBookmarkNodeTable::const_iterator it = m_pImpl-aBkmkNodePos.find( nNd ); -if( it != m_pImpl-aBkmkNodePos.end() ) +std::pairSwBookmarkNodeTable::const_iterator, SwBookmarkNodeTable::const_iterator aIterPair += m_pImpl-aBkmkNodePos.equal_range( nNd ); +if( aIterPair.first != aIterPair.second ) { // there exist some bookmarks, search now all which is in the range if( !nStt nEnd == rNd.Len() ) // all -for( ; it != m_pImpl-aBkmkNodePos.end(); ++it ) +for( SwBookmarkNodeTable::const_iterator it = aIterPair.first; it != aIterPair.second; ++it ) rArr.push_back( it-second ); else { -for( ; it != m_pImpl-aBkmkNodePos.end(); ++it ) +for( SwBookmarkNodeTable::const_iterator it = aIterPair.first; it != aIterPair.second; ++it ) { const ::sw::mark::IMark rBkmk = *(it-second); xub_StrLen nCntnt; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/doc/doccomp.cxx | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) New commits: commit 706cac767c90281b74fbc27a134b022d27e2ce21 Author: Szabolcs Dezsi dezsisz...@hotmail.com Date: Thu Mar 8 14:52:14 2012 +0100 fdo#43424: Comparing empty document with attached one crashes LO diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 80c77c4..11c43f3 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -1536,14 +1536,17 @@ void SwCompareData::ShowDelete( const CompareData rData, sal_uLong nStt, ((SwCompareLine*)rData.GetLine( nEnd-1 ))-GetEndNode(), 1 ); sal_uInt16 nOffset = 0; -const CompareLine* pLine; -if( GetLineCount() == nInsPos ) +const CompareLine* pLine = 0; +if( nInsPos = 1 ) { -pLine = GetLine( nInsPos-1 ); -nOffset = 1; +if( GetLineCount() == nInsPos ) +{ +pLine = GetLine( nInsPos-1 ); +nOffset = 1; +} +else +pLine = GetLine( nInsPos ); } -else -pLine = GetLine( nInsPos ); const SwNode* pLineNd; if( pLine ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/inc/SwXMLTextBlocks.hxx |4 +-- sw/source/core/inc/swblocks.hxx |6 ++--- sw/source/core/swg/SwXMLTextBlocks.cxx | 34 +--- sw/source/core/swg/SwXMLTextBlocks1.cxx |3 -- sw/source/core/swg/swblocks.cxx |4 +-- 5 files changed, 27 insertions(+), 24 deletions(-) New commits: commit 1fad074f43e3301420900918881ad1a8b0bc8687 Author: Caolán McNamara caol...@redhat.com Date: Thu Mar 8 14:02:19 2012 + convert to OUString to I can use SAL_WARN diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx b/sw/source/core/inc/SwXMLTextBlocks.hxx index c87b08d..c7cf91e 100644 --- a/sw/source/core/inc/SwXMLTextBlocks.hxx +++ b/sw/source/core/inc/SwXMLTextBlocks.hxx @@ -47,7 +47,7 @@ protected: sal_Bool bBlock; SfxObjectShellRef xDocShellRef; sal_uInt16 nFlags; -String aPackageName; +rtl::OUString aPackageName; SfxMediumRef xMedium; void ReadInfo(); @@ -63,7 +63,7 @@ public: SwXMLTextBlocks( const com::sun::star::uno::Reference com::sun::star::embed::XStorage , const String rFile ); void AddName( const String, const String, const String, sal_Bool bOnlyTxt = sal_False ); virtual void AddName( const String, const String, sal_Bool bOnlyTxt = sal_False ); -void GeneratePackageName ( const String rShort, String rPackageName ); +rtl::OUString GeneratePackageName ( const String rShort ); virtual ~SwXMLTextBlocks(); //virtual sal_Bool IsOld() const; virtual sal_uLong Delete( sal_uInt16 ); diff --git a/sw/source/core/inc/swblocks.hxx b/sw/source/core/inc/swblocks.hxx index 9a4d2f3..88d72ab 100644 --- a/sw/source/core/inc/swblocks.hxx +++ b/sw/source/core/inc/swblocks.hxx @@ -45,12 +45,12 @@ class SwBlockName { friend class SwImpBlocks; friend class Sw2TextBlocks; -sal_uInt16 nHashS, nHashL; // Hash-Codes zum Checken +sal_uInt16 nHashS, nHashL; // Hash-Codes zum Checken long nPos;// Dateiposition (SW2-Format) public: String aShort; // Short name String aLong; // Long name -String aPackageName;// Package name +rtl::OUString aPackageName; // Package name sal_Bool bIsOnlyTxtFlagInit : 1;// ist das Flag gueltig? sal_Bool bIsOnlyTxt : 1;// unformatted text sal_Bool bInPutMuchBlocks : 1; // put serveral block entries @@ -108,7 +108,7 @@ public: sal_uInt16 GetLongIndex( const String ) const; //Index fuer Langnamen ermitteln const String GetShortName( sal_uInt16 ) const; // Kurzname fuer Index zurueck const String GetLongName( sal_uInt16 ) const; // Langname fuer Index zurueck -const String GetPackageName( sal_uInt16 ) const; // Langname fuer Index zurueck +rtl::OUString GetPackageName( sal_uInt16 ) const; // Langname fuer Index zurueck const String GetFileName() const {return aFile;} // phys. Dateinamen liefern void SetName( const String rName ) // logic name diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx index ba3b00a..6f786b0 100644 --- a/sw/source/core/swg/SwXMLTextBlocks.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks.cxx @@ -29,9 +29,10 @@ #include com/sun/star/embed/ElementModes.hpp #include com/sun/star/embed/XTransactedObject.hpp -#include tools/urlobj.hxx +#include rtl/oustringostreaminserter.hxx #include sot/stg.hxx #include sfx2/docfile.hxx +#include tools/urlobj.hxx #include unotools/localfilehelper.hxx #include unotools/ucbstreamhelper.hxx @@ -156,7 +157,7 @@ void SwXMLTextBlocks::AddName( const String rShort, const String rLong, sal_Bo if( nIdx != (sal_uInt16) -1 ) aNames.DeleteAndDestroy( nIdx ); -GeneratePackageName( rShort, aPackageName ); +aPackageName = GeneratePackageName( rShort ); pNew = new SwBlockName( rShort, rLong, aPackageName ); pNew-bIsOnlyTxtFlagInit = sal_True; @@ -205,17 +206,17 @@ sal_uLong SwXMLTextBlocks::Rename( sal_uInt16 nIdx, const String rNewShort, con OSL_ENSURE( xBlkRoot.is(), No storage set ); if(!xBlkRoot.is()) return 0; -String aOldName (aNames[ nIdx ]-aPackageName); +rtl::OUString aOldName (aNames[ nIdx ]-aPackageName); aShort = rNewShort; -GeneratePackageName( aShort, aPackageName ); +aPackageName = GeneratePackageName( aShort ); if(aOldName != aPackageName) { if (IsOnlyTextBlock ( nIdx ) ) { -String sExt( String::CreateFromAscii( .xml )); -String aOldStreamName( aOldName ); aOldStreamName += sExt; -String aNewStreamName( aPackageName ); aNewStreamName += sExt; +rtl::OUString sExt(.xml); +rtl::OUString aOldStreamName( aOldName ); aOldStreamName += sExt; +rtl::OUString aNewStreamName( aPackageName );
[Libreoffice-commits] .: sw/source
sw/source/core/fields/docufld.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 49e07aa0de601dfa43820f3ff1d54d0c80054016 Author: Michael Stahl mst...@redhat.com Date: Thu Mar 8 16:50:32 2012 +0100 docufld.cxx: Apple gcc can't find min(sal_Int32, int) diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 1f2e16e..79233a1 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -2566,7 +2566,8 @@ const rtl::OUString SwCombinedCharField::GetPar1() const void SwCombinedCharField::SetPar1(const rtl::OUString rStr) { -sCharacters = rStr.copy(0, std::min(rStr.getLength(), MAX_COMBINED_CHARACTERS)); +sCharacters = rStr.copy(0, std::min(rStr.getLength(), +static_castsal_Int32(MAX_COMBINED_CHARACTERS))); } bool SwCombinedCharField::QueryValue( uno::Any rAny, ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/ww8par3.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7fd4640469ce0cc3211a38393c7f25bd2deecd87 Author: Tor Lillqvist tlillqv...@suse.com Date: Wed Mar 7 11:02:59 2012 +0200 Fix MSVC compilation error: can't assign a const char* to String diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index f6bed3c..a2c7290 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2183,7 +2183,7 @@ void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich, { if ( iRes != 25 ) nChecked = iRes; -sDefault = ( wDef == 0 ) ? 0 : 1; +sDefault = ( wDef == 0 ) ? rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(0) ) : rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(1) ); } } // xstzTextFormat ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/ui/config/optpage.cxx | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) New commits: commit 793b87411646a4a008a6ed82315d8b5c82738641 Author: Stefan Knorr (astron) heinzless...@gmail.com Date: Sat Mar 3 22:02:23 2012 +0100 Fix fdo#38207 and also hide another option in Writer/Web diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 014f04d..89cb4eb 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1287,15 +1287,27 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet rSet) // hide certain controls for html if(bHTMLMode) { - +aRepeatHeaderCB.Hide(); aDontSplitCB.Hide(); + +long nMoveUpBy = +aRepeatHeaderCB.LogicToPixel( Size( 13, 13 ), MAP_APPFONT ).Height(); + +Point aPos = aRepeatHeaderCB.GetPosPixel(); +aRepeatHeaderCB.SetPosPixel( Point( aPos.X(), aPos.Y() - nMoveUpBy ) ); + +nMoveUpBy += +aDontSplitCB.LogicToPixel( Size( 13, 13 ), MAP_APPFONT ).Height(); + +aPos = aBorderCB.GetPosPixel(); +aBorderCB.SetPosPixel( Point( aPos.X(), aPos.Y() - nMoveUpBy ) ); } SwInsertTableOptions aInsOpts = pModOpt-GetInsTblFlags(bHTMLMode); sal_uInt16 nInsTblFlags = aInsOpts.mnInsMode; aHeaderCB.Check(0 != (nInsTblFlags tabopts::HEADLINE)); -aRepeatHeaderCB.Check(aInsOpts.mnRowsToRepeat 0); +aRepeatHeaderCB.Check((!bHTMLMode) (aInsOpts.mnRowsToRepeat 0)); aDontSplitCB.Check(!(nInsTblFlags tabopts::SPLIT_LAYOUT)); aBorderCB.Check(0 != (nInsTblFlags tabopts::DEFAULT_BORDER)); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/inc/retrievedinputstreamdata.hxx | 10 -- 1 file changed, 10 deletions(-) New commits: commit 0fcf3e67623814b269e68f6cf5c6648f7cfdb5a6 Author: Caolán McNamara caol...@redhat.com Date: Mon Feb 27 10:50:16 2012 + fix MacOSX tinderbox build diff --git a/sw/source/core/inc/retrievedinputstreamdata.hxx b/sw/source/core/inc/retrievedinputstreamdata.hxx index a7bef2f..49797ed 100644 --- a/sw/source/core/inc/retrievedinputstreamdata.hxx +++ b/sw/source/core/inc/retrievedinputstreamdata.hxx @@ -77,10 +77,6 @@ class SwRetrievedInputStreamDataManager static SwRetrievedInputStreamDataManager GetManager(); -~SwRetrievedInputStreamDataManager() -{ -}; - tDataKey ReserveData( boost::weak_ptr SwAsyncRetrieveInputStreamThreadConsumer pThreadConsumer ); void PushData( const tDataKey nDataKey, @@ -99,12 +95,6 @@ class SwRetrievedInputStreamDataManager osl::Mutex maMutex; std::map tDataKey, tData maInputStreamData; - -templatetypename T, typename Unique friend class rtl::Static; - -SwRetrievedInputStreamDataManager() -{ -}; }; #endif ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/layout/findfrm.cxx |1 + sw/source/core/layout/flycnt.cxx |1 + sw/source/core/layout/paintfrm.cxx |1 + sw/source/core/layout/wsfrm.cxx|2 ++ 4 files changed, 5 insertions(+) New commits: commit 0f1120ad344ae220a93bd2af9cf4a6bf50e25888 Author: Jan Holesovsky ke...@suse.cz Date: Mon Feb 27 15:09:52 2012 +0100 Fix build (few missing {'s in the translations). diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index c4829a3..a2c7bf0 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -1365,6 +1365,7 @@ void SwFrm::SetInfFlags() if( IsFtnContFrm() ) bInfFtn = sal_True; do +{ // bInfBody is only set in the page body, but not in the column body if ( pFrm-IsBodyFrm() !bInfFtn pFrm-GetUpper() pFrm-GetUpper()-IsPageFrm() ) diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 3c2cf9c..0e21be6 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -937,6 +937,7 @@ sal_uLong MA_FASTCALL lcl_FindCntDiff( const Point rPt, const SwLayoutFrm *pLay if ( pCnt-Frm().Top() = rPt.Y() ) { if ( nDiff nDistance ) +{ //This one is the nearer one nDistance = nNearest = nDiff; rpCnt = pNearest = pCnt; diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index b9b903a..271ee0b 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -6189,6 +6189,7 @@ void MA_FASTCALL lcl_RefreshLine( const SwLayoutFrm *pLay, aP2( rP2 ); while ( aP1.*pDirPt aP2.*pDirPt ) +{ //If the starting point lies in a fly, it is directly set behind the //fly. //The end point moves to the start if the end point lies in a fly or we diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index ff03015..e2600e3 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -741,6 +741,7 @@ void SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct ) pBehind-pPrev = pLast; } else +{ //Insert at the end, or ... the first node in the subtree pPrev = pUpper-Lower(); if ( pPrev ) @@ -931,6 +932,7 @@ void SwCntntFrm::Cut() } if( 0 != (pFrm = GetIndNext()) ) +{ //The old follower may calculated a gap to the predecessor which now //becomes obsolete or different respectively as it becomes the first //one itself. ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source tools/inc
sw/source/ui/envelp/labfmt.cxx |2 +- tools/inc/tools/color.hxx |1 + 2 files changed, 2 insertions(+), 1 deletion(-) New commits: commit a3b0be108677c60653eb79187a45bbd447d5e21b Author: Winfried Donkers o...@dci-electronics.nl Date: Mon Feb 27 16:21:33 2012 +0100 fdo44516 cleanup of direct use of color in code diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index 6ec2a79..d5208dd 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -173,7 +173,7 @@ void SwLabPreview::Paint(const Rectangle ) // Labels SetClipRegion (Rectangle(Point(lX0, lY0), Size(lOutlineW, lOutlineH))); -SetFillColor( Color( 0xE0, 0xE0, 0xFF ) ); +SetFillColor( COL_LIGHTGRAYBLUE ); for (sal_uInt16 nRow = 0; nRow Min((sal_uInt16) 2, (sal_uInt16) aItem.nRows); nRow++) for (sal_uInt16 nCol = 0; nCol Min((sal_uInt16) 2, (sal_uInt16) aItem.nCols); nCol++) DrawRect(Rectangle( diff --git a/tools/inc/tools/color.hxx b/tools/inc/tools/color.hxx index a9fe589..4594de6 100644 --- a/tools/inc/tools/color.hxx +++ b/tools/inc/tools/color.hxx @@ -74,6 +74,7 @@ typedef sal_uInt32 ColorData; #define COL_LIGHTCYAN RGB_COLORDATA( 0x00, 0xFF, 0xFF ) #define COL_LIGHTREDRGB_COLORDATA( 0xFF, 0x00, 0x00 ) #define COL_LIGHTMAGENTARGB_COLORDATA( 0xFF, 0x00, 0xFF ) +#define COL_LIGHTGRAYBLUE RGB_COLORDATA( 0xE0, 0xE0, 0xFF ) #define COL_YELLOW RGB_COLORDATA( 0xFF, 0xFF, 0x00 ) #define COL_WHITE RGB_COLORDATA( 0xFF, 0xFF, 0xFF ) #define COL_TRANSPARENT TRGB_COLORDATA( 0xFF, 0xFF, 0xFF, 0xFF ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/unocore/unoframe.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit fda2c3639de6b673faf2ccd84b6d4318e592fbf0 Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Thu Feb 23 14:29:51 2012 +0100 WaE: aPosition is an unused parameter diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 60e66fc..f8d2c90 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2395,7 +2395,7 @@ awt::Point SwXFrame::getPosition(void) throw( uno::RuntimeException ) throw aRuntime; } -void SwXFrame::setPosition(const awt::Point aPosition) throw( uno::RuntimeException ) +void SwXFrame::setPosition(const awt::Point /*aPosition*/) throw( uno::RuntimeException ) { SolarMutexGuard aGuard; uno::RuntimeException aRuntime; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/xml/xmltexte.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 0389b77a3cbea09ddbae238d7934d4c6349a8d37 Author: Michael Meeks michael.me...@suse.com Date: Wed Feb 22 16:05:47 2012 + fdo#33393 - tentative workaround for autosave image loss cf. lengthy analysis in the bug, this appears to merit wider testing for 3.5.1 RC1 and wouldn't be sensible without that, so commit early. diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index c62bce3..5c89944 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -221,7 +221,9 @@ void SwXMLTextParagraphExport::setTextEmbeddedGraphicURL( { String aNewURL( RTL_CONSTASCII_USTRINGPARAM(vnd.sun.star.Package:) ); aNewURL += String(rURL); -pGrfNd-SetNewStreamName( aNewURL ); + +// This is nonsensical. +//pGrfNd-SetNewStreamName( aNewURL ); // #i15411# save-as will swap all graphics in; we need to swap // them out again, to prevent excessive memory use ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/layout/flylay.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5f06a2b734941a79983ecf8476b412bf6ce5e9e8 Author: Michael Meeks michael.me...@suse.com Date: Tue Feb 21 16:01:00 2012 + flylay - add back ';' removed in error diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 09bafcd..b2a9296 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -519,7 +519,7 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if( RES_ATTRSET_CHG == nWhich SFX_ITEM_SET == ((SwAttrSetChg*)pNew)-GetChgSet()-GetItemState( RES_ANCHOR, sal_False, (const SfxPoolItem**)pAnch )) -// GetItemState sets the anchor pointer! +; // GetItemState sets the anchor pointer! else if( RES_ANCHOR == nWhich ) { ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/unocore/unotext.cxx | 27 +++ 1 file changed, 27 insertions(+) New commits: commit 9592f56323de27f9e1d890ee6259a5f4f328cbd3 Author: Miklos Vajna vmik...@suse.cz Date: Mon Feb 20 10:12:01 2012 +0100 n#695479 fix anchor handling in SwXText::convertToTextFrame() When two (or more) text frames was imported without a non-frame paragraph in between, the first frame was anchored to the second one, instead of a non-frame paragraph. The fix is modelled after what the old RTF import already did in SwRTFParser::Continue() in swparrtf.cxx:493 and SwRTFParser::SetFlysInDoc() in rtffly.cxx:481. diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 00c7e09..2c25700 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1665,6 +1665,18 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) aStartPam.SetMark(); *aStartPam.End() = *pEndPam-End(); pEndPam.reset(0); + +// see if there are frames already anchored to this node +std::vectorSwFrmFmt* aAnchoredFrames; +for (int i = 0; i m_pImpl-m_pDoc-GetSpzFrmFmts()-Count(); ++i) +{ +SwFrmFmt* pFrmFmt = (*m_pImpl-m_pDoc-GetSpzFrmFmts())[i]; +const SwFmtAnchor rAnchor = pFrmFmt-GetAnchor(); +if (FLY_AT_PARA == rAnchor.GetAnchorId() +aStartPam.GetNode()-GetIndex() == rAnchor.GetCntntAnchor()-nNode.GetIndex()) +aAnchoredFrames.push_back(pFrmFmt); +} + SwXTextFrame *const pNewFrame = new SwXTextFrame(m_pImpl-m_pDoc); const uno::Reference text::XTextFrame xNewFrame = pNewFrame; pNewFrame-SetSelection( aStartPam ); @@ -1700,6 +1712,21 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) aNewAnchor.SetAnchor( aMovePam.Start() ); m_pImpl-m_pDoc-SetAttr( aNewAnchor, *pNewFrame-GetFrmFmt() ); + +// also move frames anchored to us +for (std::vectorSwFrmFmt*::iterator i = aAnchoredFrames.begin(); i != aAnchoredFrames.end(); ++i) +{ +// copy the anchor to the next paragraph +SwFmtAnchor aAnchor((*i)-GetAnchor()); +aAnchor.SetAnchor(aMovePam.Start()); +m_pImpl-m_pDoc-SetAttr(aAnchor, *(*i)); + +// delete the old anchor +SwSpzFrmFmts* pFrmFmts = m_pImpl-m_pDoc-GetSpzFrmFmts(); +// here we rely on that fact that this is a sorted list, where the last element is the newly created frame +SwFrmFmt *pFrmFmt = (*pFrmFmts)[pFrmFmts-Count()-1]; +m_pImpl-m_pDoc-DelLayoutFmt(pFrmFmt); +} } } m_pImpl-m_pDoc-DelFullPara(aStartPam); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/layout/paintfrm.cxx | 36 +--- 1 file changed, 33 insertions(+), 3 deletions(-) New commits: commit 7794baf89e74fc8308c8e1505f47d60b6547465f Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Mon Feb 20 15:36:29 2012 +0100 fdo#46073: Implemented soft boundaries only w/o non-printing chars diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 206bdc9..ba89741 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -6307,6 +6307,27 @@ drawinglayer::primitive2d::Primitive2DSequence lcl_CreatePageAreaDelimiterPrimit return aSeq; } +drawinglayer::primitive2d::Primitive2DSequence lcl_CreateRectangleDelimiterPrimitives ( +const SwRect rRect ) +{ +drawinglayer::primitive2d::Primitive2DSequence aSeq( 1 ); +basegfx::BColor aLineColor = SwViewOption::GetDocBoundariesColor().getBColor(); + +basegfx::B2DPolygon aPolygon; +aPolygon.append( basegfx::B2DPoint( rRect.Left(), rRect.Top() ) ); +aPolygon.append( basegfx::B2DPoint( rRect.Right(), rRect.Top() ) ); +aPolygon.append( basegfx::B2DPoint( rRect.Right(), rRect.Bottom() ) ); +aPolygon.append( basegfx::B2DPoint( rRect.Left(), rRect.Bottom() ) ); +aPolygon.setClosed( true ); + +drawinglayer::primitive2d::PolygonHairlinePrimitive2D* pLine = +new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( +aPolygon, aLineColor ); +aSeq[0] = drawinglayer::primitive2d::Primitive2DReference( pLine ); + +return aSeq; +} + drawinglayer::primitive2d::Primitive2DSequence lcl_CreateColumnAreaDelimiterPrimitives( const SwRect rRect ) { @@ -6362,7 +6383,10 @@ void SwPageFrm::PaintSubsidiaryLines( const SwPageFrm *, if ( pFtnCont ) aArea.AddBottom( pFtnCont-Frm().Bottom() - aArea.Bottom() ); -ProcessPrimitives( lcl_CreatePageAreaDelimiterPrimitives( aArea ) ); +if ( !pGlobalShell-GetViewOptions()-IsViewMetaChars( ) ) +ProcessPrimitives( lcl_CreatePageAreaDelimiterPrimitives( aArea ) ); +else +ProcessPrimitives( lcl_CreateRectangleDelimiterPrimitives( aArea ) ); } } @@ -6399,7 +6423,10 @@ void SwColumnFrm::PaintSubsidiaryLines( const SwPageFrm *, ::SwAlignRect( aArea, pGlobalShell ); -ProcessPrimitives( lcl_CreateColumnAreaDelimiterPrimitives( aArea ) ); +if ( !pGlobalShell-GetViewOptions()-IsViewMetaChars( ) ) +ProcessPrimitives( lcl_CreateColumnAreaDelimiterPrimitives( aArea ) ); +else +ProcessPrimitives( lcl_CreateRectangleDelimiterPrimitives( aArea ) ); } void SwSectionFrm::PaintSubsidiaryLines( const SwPageFrm * pPage, @@ -6426,7 +6453,10 @@ void SwHeadFootFrm::PaintSubsidiaryLines( const SwPageFrm *, const SwRect ) co { SwRect aArea( Prt() ); aArea.Pos() += Frm().Pos(); -ProcessPrimitives( lcl_CreatePageAreaDelimiterPrimitives( aArea ) ); +if ( !pGlobalShell-GetViewOptions()-IsViewMetaChars( ) ) +ProcessPrimitives( lcl_CreatePageAreaDelimiterPrimitives( aArea ) ); +else +ProcessPrimitives( lcl_CreateRectangleDelimiterPrimitives( aArea ) ); } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/ui/app/applab.cxx | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) New commits: commit a99083d233d0d5c5a09941ec2ee7164bc63c61db Author: Winfried Donkers o...@dci-electronics.nl Date: Fri Feb 17 18:02:55 2012 +0100 fdo#44516 final fix for labels with gaps larger than page margin diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index 3ccbf13..4159f18 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -164,7 +164,6 @@ const SwFrmFmt *lcl_InsertLabText( SwWrtShell rSh, const SwLabItem rItem, return pFmt; } - void SwModule::InsertLab(SfxRequest rReq, sal_Bool bLabel) { static sal_uInt16 nLabelTitleNo = 0; @@ -294,34 +293,31 @@ void SwModule::InsertLab(SfxRequest rReq, sal_Bool bLabel) // Prepare border template SwFrmFmt* pFmt = pSh-GetFrmFmtFromPool( RES_POOLFRM_LABEL ); -SwFrmFmt* pFmtEORow = pSh-GetFrmFmtFromPool( RES_POOLFRM_LABEL ); //new SwFrmFmt (*pFmt); -SwFrmFmt* pFmtEOCol = pSh-GetFrmFmtFromPool( RES_POOLFRM_LABEL ); //new SwFrmFmt (*pFmt); -SwFrmFmt* pFmtEOColEORow = pSh-GetFrmFmtFromPool( RES_POOLFRM_LABEL ); //new SwFrmFmt (*pFmt); - sal_Int32 iResultWidth = rItem.lLeft + (rItem.nCols - 1) * rItem.lHDist + rItem.lWidth - rItem.lPWidth; sal_Int32 iResultHeight = rItem.lUpper + (rItem.nRows - 1) * rItem.lVDist + rItem.lHeight - rItem.lPHeight; sal_Int32 iWidth = (iResultWidth 0 ? rItem.lWidth - (iResultWidth / rItem.nCols) - 1 : rItem.lWidth); sal_Int32 iHeight = (iResultHeight 0 ? rItem.lHeight - (iResultHeight / rItem.nRows) - 1 : rItem.lHeight); SwFmtFrmSize aFrmSize( ATT_FIX_SIZE, iWidth, iHeight ); +pFmt-SetFmtAttr( aFrmSize ); + +SwFrmFmt* pFmtEORow = new SwFrmFmt (*pFmt); +SwFrmFmt* pFmtEOCol = new SwFrmFmt (*pFmt); +SwFrmFmt* pFmtEOColEORow = new SwFrmFmt (*pFmt); SvxULSpaceItem aFrmULSpace( 0, (sal_uInt16)(rItem.lVDist - rItem.lHeight), -RES_UL_SPACE); -SvxULSpaceItem aFrmNoULSpace( 0, 0, RES_UL_SPACE); +RES_UL_SPACE ); +SvxULSpaceItem aFrmNoULSpace( 0, 0, RES_UL_SPACE ); SvxLRSpaceItem aFrmLRSpace( 0, (sal_uInt16)(rItem.lHDist - rItem.lWidth), -0, 0, RES_LR_SPACE); -SvxLRSpaceItem aFrmNoLRSpace( 0, 0, 0, 0, RES_LR_SPACE); +0, 0, RES_LR_SPACE ); +SvxLRSpaceItem aFrmNoLRSpace( 0, 0, 0, 0, RES_LR_SPACE ); -pFmt-SetFmtAttr( aFrmSize ); pFmt-SetFmtAttr(aFrmULSpace); pFmt-SetFmtAttr(aFrmLRSpace); -pFmtEORow-SetFmtAttr( aFrmSize ); pFmtEORow-SetFmtAttr(aFrmULSpace); pFmtEORow-SetFmtAttr(aFrmNoLRSpace); -pFmtEOCol-SetFmtAttr( aFrmSize ); pFmtEOCol-SetFmtAttr(aFrmNoULSpace); pFmtEOCol-SetFmtAttr(aFrmLRSpace); -pFmtEOColEORow-SetFmtAttr( aFrmSize ); pFmtEOColEORow-SetFmtAttr(aFrmNoULSpace); pFmtEOColEORow-SetFmtAttr(aFrmNoLRSpace); @@ -351,7 +347,6 @@ void SwModule::InsertLab(SfxRequest rReq, sal_Bool bLabel) lcl_InsertLabText( *pSh, rItem, *pFrmFmt, *pFldMgr, j, i, i == rItem.nRows - 1 j == rItem.nCols - 1, sal_True ) : lcl_InsertBCText(*pSh, rItem, *pFrmFmt, j, i, sal_True); - if (!(i|j)) { pFirstFlyFmt = pTmp; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/text/xmldump.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 1087afd9135b54e83c0ec3fa9aae19ac6c2d9c77 Author: Miklos Vajna vmik...@suse.cz Date: Thu Feb 16 09:26:27 2012 +0100 sw: mention node indexes in layout xml dump diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index 25e8347..3530753 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -334,6 +334,12 @@ void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer ) xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( prev ), %p, GetPrev() ); xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( upper ), %p, this-GetUpper() ); xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( lower ), %p, this-GetLower() ); +if ( IsTxtFrm( ) ) +{ +SwTxtFrm *pTxtFrm = ( SwTxtFrm * ) this; +SwTxtNode *pTxtNode = pTxtFrm-GetTxtNode(); +xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( txtNodeIndex ), %lu, pTxtNode-GetIndex() ); +} } void SwFrm::dumpChildrenAsXml( xmlTextWriterPtr writer ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/ui/uno/SwXDocumentSettings.cxx | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) New commits: commit 746e9a7d338db5fb0af285d453055ae5fa45037d Author: Caolán McNamara caol...@redhat.com Date: Thu Feb 16 13:39:09 2012 + allow unsetting database settings without warnings diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index c349631..fa8a704 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -474,21 +474,23 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo rInf case HANDLE_CURRENT_DATABASE_COMMAND: { SwDBData aData = mpDoc-GetDBData(); -SAL_WARN_IF( aData.sDataSource.isEmpty(), sw.uno, -\CurrentDatabaseCommand\ property possibly set before \CurrentDatabaseDataSource\ ); + if ( rValue = aData.sCommand ) mpDoc-ChgDBData( aData ); + +SAL_WARN_IF( aData.sDataSource.isEmpty() !aData.sCommand.isEmpty(), sw.uno, +\CurrentDatabaseCommand\ property possibly set before \CurrentDatabaseDataSource\ ); } break; case HANDLE_CURRENT_DATABASE_COMMAND_TYPE: { SwDBData aData = mpDoc-GetDBData(); -SAL_WARN_IF( aData.sDataSource.isEmpty(), sw.uno, -\CurrentDatabaseCommandType\ property possibly set before \CurrentDatabaseDataSource\ ); -SAL_WARN_IF( aData.sCommand.isEmpty(), sw.uno, -\CurrentDatabaseCommandType\ property possibly set before \CurrentDatabaseCommand\ ); if ( rValue = aData.nCommandType ) mpDoc-ChgDBData( aData ); +SAL_WARN_IF( aData.nCommandType aData.sDataSource.isEmpty(), sw.uno, +\CurrentDatabaseCommandType\ property possibly set before \CurrentDatabaseDataSource\ ); +SAL_WARN_IF( aData.nCommandType aData.sCommand.isEmpty(), sw.uno, +\CurrentDatabaseCommandType\ property possibly set before \CurrentDatabaseCommand\ ); } break; case HANDLE_SAVE_VERSION_ON_CLOSE: ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/rtf/rtffly.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 4c8307053e3003af6cef5056e36a650f19c8cdb3 Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Mon Jun 27 14:46:16 2011 + n#695479: Remove properties when removing empty fly frame diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx index 92a7ca9..6d40010 100644 --- a/sw/source/filter/rtf/rtffly.cxx +++ b/sw/source/filter/rtf/rtffly.cxx @@ -1092,6 +1092,8 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet ) // dann zerstoere den FlySave wieder. aFlyArr.DeleteAndDestroy( --nFlyArrCnt ); +// Remove the properties that have been parsed before in the paragraph +GetAttrStack().Pop(); } else { ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/rtf/rtffly.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9efe123eec58bcf14faa7e18c2625bdd0c420fb7 Author: Miklos Vajna vmik...@suse.cz Date: Wed Feb 15 15:47:20 2012 +0100 sw: SvxRTFItemStack has been changed to std::deque in the meantime diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx index 6d40010..b4c6573 100644 --- a/sw/source/filter/rtf/rtffly.cxx +++ b/sw/source/filter/rtf/rtffly.cxx @@ -1093,7 +1093,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet ) aFlyArr.DeleteAndDestroy( --nFlyArrCnt ); // Remove the properties that have been parsed before in the paragraph -GetAttrStack().Pop(); +GetAttrStack().pop_back(); } else { ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/text/txtfly.cxx | 64 - sw/source/core/text/txtfrm.cxx | 39 2 files changed, 103 deletions(-) New commits: commit 3bbb62f09fef9d8526ef6d4bdacc55def952963a Author: Thomas Arnhold tho...@arnhold.org Date: Tue Feb 14 13:38:59 2012 +0100 sw: dead code removal diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index 7a7ddf5..c2695f9 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -121,8 +121,6 @@ void SwTxtFormatter::CalcUnclipped( SwTwips rTop, SwTwips rBottom ) SwTxtFormatter::CalcUnclipped with unswapped frame ); long nFlyAsc, nFlyDesc; -// OD 08.01.2004 #i11859# - use new method SwLineLayout::MaxAscentDescent(..) -//lcl_MaxAscDescent( pCurr, rTop, rBottom, nFlyAsc, nFlyDesc ); pCurr-MaxAscentDescent( rTop, rBottom, nFlyAsc, nFlyDesc ); rTop = Y() + GetCurr()-GetAscent(); rBottom = rTop + nFlyDesc; @@ -156,8 +154,6 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart, aTmpInf.SetPos( aStart ); long nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc; -// OD 08.01.2004 #i11859# - use new method SwLineLayout::MaxAscentDescent(..) -//lcl_MaxAscDescent( pPos, nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc ); pCurrent-MaxAscentDescent( nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc ); KSHORT nTmpHeight = pCurrent-GetRealHeight(); @@ -195,9 +191,6 @@ void SwTxtFormatter::UpdatePos( SwLineLayout *pCurrent, Point aStart, if( ( pPos-IsFlyCntPortion() || pPos-IsGrfNumPortion() ) ( bAllWays || !IsQuick() ) ) { -// OD 08.01.2004 #i11859# - use new method SwLineLayout::MaxAscentDescent(..) -//lcl_MaxAscDescent( pFirst, nTmpAscent, nTmpDescent, -// nFlyAsc, nFlyDesc, pPos ); pCurrent-MaxAscentDescent( nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, pPos ); if( pPos-IsGrfNumPortion() ) @@ -290,9 +283,6 @@ void SwTxtFormatter::AlignFlyInCntBase( long nBaseLine ) const { if( pPos-IsFlyCntPortion() || pPos-IsGrfNumPortion() ) { -// OD 08.01.2004 #i11859# - use new method SwLineLayout::MaxAscentDescent(..) -//lcl_MaxAscDescent( pFirst, nTmpAscent, nTmpDescent, -// nFlyAsc, nFlyDesc, pPos ); pCurr-MaxAscentDescent( nTmpAscent, nTmpDescent, nFlyAsc, nFlyDesc, pPos ); if( pPos-IsGrfNumPortion() ) @@ -963,8 +953,6 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo rInf ) const SwFmtSurround rSur = pFmt-GetSurround(); const SwFmtAnchor rAnchor = pFmt-GetAnchor(); //Nur undurchsichtige und weiter oben liegende. -/// OD 08.10.2002 #103898# - add condition -/// !(pFly-IsBackgroundTransparent() || pFly-IsShadowTransparent()) if( !( pFly-IsBackgroundTransparent() || pFly-IsShadowTransparent() ) SURROUND_THROUGHT == rSur.GetSurround() @@ -1203,13 +1191,6 @@ sal_Bool SwTxtFly::GetTop( const SwAnchoredObject* _pAnchoredObj, // anchored objects to one in the page header/footer and // the document body -- content of at-paragraph/at-character // anchored objects doesn't wrap around each other. -//else if( bInFooterOrHeader ) -//return sal_False; // In header or footer no wrapping -// // if both bounded at paragraph -//else // Zwei Flies mit (auto-)absatzgebunder Verankerung ... -//// ... entscheiden nach der Reihenfolge ihrer Anker im Dok. -// bEvade = rNewA.GetCntntAnchor()-nNode.GetIndex() = -// rCurrA.GetCntntAnchor()-nNode.GetIndex(); else return sal_False; } @@ -1451,51 +1432,6 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList() // If objects on the same position are found, they are sorted // on its width. // #i68520# -//sal_uInt16 nPos = pFlyList-Count(); -//while ( nPos ) -//{ -//SdrObject* pTmpObj = (*pFlyList)[ --nPos ]; -//const SwRect aBoundRectOfTmpObj( GetBoundRect( pTmpObj ) ); -//if ( ( bR2L -// ( (aBoundRectOfTmpObj.*fnRect-fnGetRight)() == -// (aBound.*fnRect-fnGetRight)() ) ) || -// ( !bR2L -// ( (aBoundRectOfTmpObj.*fnRect-fnGetLeft)() == -// (aBound.*fnRect-fnGetLeft)() ) ) ) -//{
[Libreoffice-commits] .: sw/source
sw/source/ui/docvw/PageBreakWin.cxx |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) New commits: commit 9baee86cbdec44c657d06f355bdba0537fb12a1a Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Tue Feb 14 14:19:52 2012 +0100 fdo#45748: Don't use empty pages fo computing the page break position diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index 0439bc3..f92101c 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -333,9 +333,13 @@ void SwPageBreakWin::UpdatePosition( const Point* pEvtPt ) } const SwPageFrm* pPageFrm = GetPageFrame(); -const SwFrm* pPrevPage = pPageFrm-GetPrev(); -while ( pPrevPage ( pPrevPage-Frm().Top( ) == pPageFrm-Frm().Top( ) ) ) +const SwFrm* pPrevPage = pPageFrm; +do +{ pPrevPage = pPrevPage-GetPrev(); +} +while ( pPrevPage ( ( pPrevPage-Frm().Top( ) == pPageFrm-Frm().Top( ) ) +|| static_cast const SwPageFrm* ( pPrevPage )-IsEmptyPage( ) ) ); Rectangle aBoundRect = GetEditWin()-LogicToPixel( pPageFrm-GetBoundRect().SVRect() ); Rectangle aFrmRect = GetEditWin()-LogicToPixel( pPageFrm-Frm().SVRect() ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/layout/paintfrm.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 19d80a257b0e5c9d45985e49f33493f38c5d5f10 Author: Ivan Timofeev timofeev@gmail.com Date: Mon Feb 13 19:34:58 2012 +0400 Header/Footer: don't show in web layout mode diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 74abd70..206bdc9 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3489,6 +3489,7 @@ void SwPageFrm::PaintDecorators( ) const !pGlobalShell-GetViewOptions()-IsPDFExport() !pGlobalShell-IsPreView() !pGlobalShell-GetViewOptions()-IsReadonly() + !pGlobalShell-GetViewOptions()-getBrowseMode() ( pGlobalShell-IsShowHeaderFooterSeparator( Header ) || pGlobalShell-IsShowHeaderFooterSeparator( Footer ) ) ) { ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/unocore/unosrch.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 1fb6237c08b25e043ae70b16aa784d5a762612ef Author: Julien Nabet serval2...@yahoo.fr Date: Sun Feb 12 18:08:56 2012 +0100 Fix call delete twice on the same variable diff --git a/sw/source/core/unocore/unosrch.cxx b/sw/source/core/unocore/unosrch.cxx index 9ad8a5f..5af5aa6 100644 --- a/sw/source/core/unocore/unosrch.cxx +++ b/sw/source/core/unocore/unosrch.cxx @@ -428,7 +428,6 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet rSet, sal_Bool bIsValueSea } delete pBoxItem; delete pBreakItem; -delete pBreakItem ; delete pAutoKernItem ; delete pWLineItem; delete pTabItem; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/text/itrform2.cxx |5 ++--- sw/source/core/text/txttab.cxx |4 2 files changed, 2 insertions(+), 7 deletions(-) New commits: commit 36c905d8c2874f6f984d5fbbc07784ec20c43524 Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Fri Feb 10 21:57:54 2012 +0100 fdo#45908: Cleaning up the tabs too early can cause loops diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index b46d5b8..f9163af 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -1375,9 +1375,8 @@ SwLinePortion *SwTxtFormatter::NewPortion( SwTxtFormatInfo rInf ) } } -// Wenn eine Portion erzeugt wird, obwohl eine RestPortion ansteht, -// dann haben wir es mit einem Feld zu tun, das sich aufgesplittet -// hat, weil z.B. ein Tab enthalten ist. +// if a portion is created despite there being a pending RestPortion, +// then it is a field which has been split (e.g. because it contains a Tab) if( pPor rInf.GetRest() ) pPor-SetLen( 0 ); diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index fceddca..8841e39 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -82,10 +82,6 @@ sal_uInt16 SwLineInfo::NumberOfTabStops() const SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo rInf, bool bAuto ) const { SwTabPortion *pTabPor = 0; -SwTabPortion *pLastTab = rInf.GetLastTab(); -if( pLastTab ( pLastTab-IsTabCntPortion() || pLastTab-IsTabDecimalPortion() ) ) -if( pLastTab-PostFormat( rInf ) ) -return 0; xub_Unicode cFill = 0; xub_Unicode cDec = 0; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/fields/reffld.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 44f971506c0ed37928c48e55d8007f24b0c43a5f Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Wed Feb 8 14:06:09 2012 +0100 fdo#35669: Update the references even if nothing uses them here Merge the references with the other document even if there is no field using them as this may break the sequence and references in other parts of a master document. diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 05c3eda..b01471a 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -1074,8 +1074,7 @@ void _RefIdsMap::Check( SwDoc rDoc, SwDoc rDestDoc, SwGetRefField rFld, void SwGetRefFieldType::MergeWithOtherDoc( SwDoc rDestDoc ) { -if( rDestDoc != pDoc -rDestDoc.GetSysFldType( RES_GETREFFLD )-GetDepends() ) +if( rDestDoc != pDoc ) { // dann gibt es im DestDoc RefFelder, also muessen im SourceDoc // alle RefFelder auf einduetige Ids in beiden Docs umgestellt ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/rtfattributeoutput.cxx | 28 sw/source/filter/ww8/rtfattributeoutput.hxx |6 ++ 2 files changed, 30 insertions(+), 4 deletions(-) New commits: commit 1f77a5e8d5bf8a7f1b7bd7206996d2b2efc59462 Author: Miklos Vajna vmik...@frugalware.org Date: Wed Feb 8 16:49:57 2012 +0100 n#203704 fix RTF export table output for subtables Older ODT files containing table:table table:is-sub-table=true confused the RTF exporter. Add a few sanity checks to make sure the output is still valid. diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 52d80fc..875edfb 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -251,13 +251,19 @@ void RtfAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextN { ww8::WW8TableNodeInfoInner::Pointer_t pDeepInner( pTextNodeInfo-getInnerForDepth( m_nTableDepth ) ); OSL_ENSURE( pDeepInner, TableNodeInfoInner not found); -if ( pDeepInner pDeepInner-getCell() == 0 ) +// Make sure we always start a row between ending one and starting a cell. +// In case of subtables, we may not get the first cell. +if ((pDeepInner pDeepInner-getCell() == 0) || m_bTableRowEnded) +{ +m_bTableRowEnded = false; StartTableRow( pDeepInner ); +} StartTableCell( pDeepInner ); } -if ( nRow == 0 nCell == 0 ) +// Again, if depth was incremented, start a new table even if we skipped the first cell. +if ((nRow == 0 nCell == 0) || (m_nTableDepth == 0 pTextNodeInfo-getDepth())) { // Do we have to start the table? // [If we are at the rigth depth already, it means that we @@ -610,7 +616,10 @@ void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t rLR.GetLeft() - rLR.GetRight(); } SwTwips nTblSz = pFmt-GetFrmSize().GetWidth(); -for( sal_uInt16 i = 0; i pRow-GetCells().Count(); i++ ) +// Not using m_nTableDepth, which is not yet incremented here. +sal_uInt32 nCurrentDepth = pTableTextNodeInfoInner-getDepth(); +m_aCells[nCurrentDepth] = pRow-GetCells().Count(); +for( sal_uInt16 i = 0; i m_aCells[nCurrentDepth]; i++ ) { SwWriteTableCell *pCell = pRow-GetCells( )[ i ]; const SwFrmFmt *pCellFmt = pCell-GetBox()-GetFrmFmt(); @@ -906,6 +915,9 @@ void RtfAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pT // We'll write the table definition for nested tables later if ( nCurrentDepth 1 ) return; +// Empty the previous row closing buffer before starting the new one, +// necessary for subtables. +m_rExport.Strm() m_aAfterRuns.makeStringAndClear().getStr(); m_rExport.Strm() m_aRowDefs.makeStringAndClear().getStr(); } } @@ -944,12 +956,17 @@ void RtfAttributeOutput::EndTableCell( ) m_bTableCellOpen = false; m_bTblAfterCell = true; m_bWroteCellInfo = false; +m_aCells[m_nTableDepth]--; } void RtfAttributeOutput::EndTableRow( ) { SAL_INFO(sw.rtf, OSL_THIS_FUNC , (depth is m_nTableDepth )); +// Trying to end the row without writing the required number of cells? Fill with empty ones. +for( sal_uInt16 i = 0; i m_aCells[m_nTableDepth]; i++ ) +m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_CELL); + if ( m_nTableDepth 1 ) { m_aAfterRuns.append({ OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_NESTTABLEPROPRS); @@ -971,6 +988,7 @@ void RtfAttributeOutput::EndTableRow( ) } m_aAfterRuns.append(OOO_STRING_SVTOOLS_RTF_ROW).append(OOO_STRING_SVTOOLS_RTF_PARD); } +m_bTableRowEnded = true; } void RtfAttributeOutput::EndTable() @@ -2997,7 +3015,9 @@ RtfAttributeOutput::RtfAttributeOutput( RtfExport rExport ) m_bBufferSectionHeaders( false ), m_bLastTable( true ), m_bWroteCellInfo( false ), -m_bHadFieldResult( false ) +m_bHadFieldResult( false ), +m_bTableRowEnded( false ), +m_aCells() { SAL_INFO(sw.rtf, OSL_THIS_FUNC); } diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx index 8766c5a..eea4b8c 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.hxx +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -533,6 +533,12 @@ private: * If we had a field result in the URL. */ bool m_bHadFieldResult; + +/// If we ended a table row without starting a new one. +bool m_bTableRowEnded; + +/// Number of cells from the table definition, by depth. +std::mapsal_uInt32,sal_uInt32 m_aCells; public: RtfAttributeOutput( RtfExport rExport ); ___ Libreoffice-commits mailing list
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/rtfsdrexport.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8411534883e960a8404d24937f813eb20accecdd Author: Michael Stahl mst...@redhat.com Date: Mon Feb 6 16:09:49 2012 +0100 RtfSdrExport::StartShape: replace 75 diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx index f0c8d68..8d9644c 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -464,7 +464,7 @@ sal_Int32 RtfSdrExport::StartShape() return -1; m_aShapeProps.insert(std::pairOString,OString(OString(shapeType), OString::valueOf(sal_Int32(m_nShapeType; -if (m_nShapeType == 75) +if (ESCHER_ShpInst_PictureFrame == m_nShapeType) impl_writeGraphic(); m_rAttrOutput.RunText().append('{').append(OOO_STRING_SVTOOLS_RTF_SHP); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/fields/cellfml.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 9d0136679e441413b6945d2a40aa892b50ee19a8 Author: Julien Nabet serval2...@yahoo.fr Date: Fri Feb 3 21:58:38 2012 +0100 Fix iterator erase management (thank you Stephan) diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index 33b953e..99e48df 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -959,7 +959,7 @@ void SwTableFormula::GetBoxes( const SwTableBox rSttBox, break; // dann mal die Tabellenkoepfe raus: -for( SwSelBoxes::iterator it = rBoxes.begin(); it != rBoxes.end(); ++it ) +for( SwSelBoxes::iterator it = rBoxes.begin(); it != rBoxes.end(); ) { pLine = it-second-GetUpper(); while( pLine-GetUpper() ) @@ -968,7 +968,10 @@ void SwTableFormula::GetBoxes( const SwTableBox rSttBox, if( pTbl-IsHeadline( *pLine ) ) { rBoxes.erase( it++ ); ---it; +} +else +{ +++it; } } } while( sal_False ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/layout/pagechg.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit b446a1fb30b5a7097824acfe6143f4284b03 Author: Andreas Schierl openoff...@schierla.de Date: Mon Jan 30 23:34:56 2012 +0100 ClrContourCache for SwAnchoredDrawObjects diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 55fdefe..4b7092b 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -2035,6 +2035,9 @@ void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point rOffset ) const Point aNewAnchorPos( ( aCurrAnchorPos + rOffset ) ); pAnchoredDrawObj-DrawObj()-SetAnchorPos( aNewAnchorPos ); pAnchoredDrawObj-SetLastObjRect( pAnchoredDrawObj-GetObjRect().SVRect() ); + +// clear contour cache +ClrContourCache( pAnchoredDrawObj-GetDrawObj() ); } // #i92511# // cache for object rectangle inclusive spaces has to be invalidated. ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/layout/pagechg.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 84370b807279cd8336c3e77278bae42b904324b4 Author: Andreas Schierl openoff...@schierla.de Date: Tue Jan 31 14:29:32 2012 + only call ClrContour for contour wrapped drawing objects diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 4b7092b..403f64d 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -39,6 +39,7 @@ #include fmtfordr.hxx #include fmtfld.hxx #include fmtornt.hxx +#include fmtsrnd.hxx #include ftninfo.hxx #include tgrditem.hxx #include viewopt.hxx @@ -2037,7 +2038,8 @@ void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point rOffset ) pAnchoredDrawObj-SetLastObjRect( pAnchoredDrawObj-GetObjRect().SVRect() ); // clear contour cache -ClrContourCache( pAnchoredDrawObj-GetDrawObj() ); +if ( pAnchoredDrawObj-GetFrmFmt().GetSurround().IsContour() ) +ClrContourCache( pAnchoredDrawObj-GetDrawObj() ); } // #i92511# // cache for object rectangle inclusive spaces has to be invalidated. ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/ww8scan.cxx | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) New commits: commit b5a73d4b2b283d3d1a57ac0f66b608998960a873 Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Mon Jan 30 19:07:43 2012 +0100 query remaining stream size after seeking, not before (fdo#45255) diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index a97f383..593624b 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -1978,10 +1978,11 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, sal_uInt32 nFilePos, const sal_uInt32 nValidMin=4; sal_Size nOldPos = pSt-Tell(); -sal_Size nRemainingSize = pSt-remainingSize(); -bool bValid = checkSeek(*pSt, nFilePos) (nRemainingSize = nValidMin) -(nPLCF = nValidMin); +bool bValid = checkSeek(*pSt, nFilePos); +sal_Size nRemainingSize = pSt-remainingSize(); +if( !(nRemainingSize = nValidMin nPLCF = nValidMin )) +bValid = false; nPLCF = bValid ? std::min(nRemainingSize, static_castsal_Size(nPLCF)) : nValidMin; // Pointer auf Pos- u. Struct-Array @@ -2136,9 +2137,7 @@ WW8PLCF::WW8PLCF(SvStream rSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct, void WW8PLCF::ReadPLCF(SvStream rSt, WW8_FC nFilePos, sal_uInt32 nPLCF) { sal_Size nOldPos = rSt.Tell(); -sal_Size nRemainingSize = rSt.remainingSize(); - -bool bValid = checkSeek(rSt, nFilePos) (nRemainingSize = nPLCF); +bool bValid = checkSeek(rSt, nFilePos) (rSt.remainingSize() = nPLCF); if (bValid) { @@ -2317,10 +2316,11 @@ WW8PLCFpcd::WW8PLCFpcd(SvStream* pSt, sal_uInt32 nFilePos, const sal_uInt32 nValidMin=4; sal_Size nOldPos = pSt-Tell(); -sal_Size nRemainingSize = pSt-remainingSize(); -bool bValid = checkSeek(*pSt, nFilePos) (nRemainingSize = nValidMin) -(nPLCF = nValidMin); +bool bValid = checkSeek(*pSt, nFilePos); +sal_Size nRemainingSize = pSt-remainingSize(); +if( !(nRemainingSize = nValidMin nPLCF = nValidMin )) +bValid = false; nPLCF = bValid ? std::min(nRemainingSize, static_castsal_Size(nPLCF)) : nValidMin; pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ];// Pointer auf Pos-Array ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/ui/vba/vbaselection.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 17dcc215e0501dfb0821c0ee42ab5ae5699caae2 Author: Julien Nabet serval2...@yahoo.fr Date: Mon Jan 30 22:28:39 2012 +0100 Don't need a break after a throw diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx index 4ddee39..14152f8 100644 --- a/sw/source/ui/vba/vbaselection.cxx +++ b/sw/source/ui/vba/vbaselection.cxx @@ -163,7 +163,6 @@ SwVbaSelection::HomeKey( const uno::Any _unit, const uno::Any _extend ) throw default: { throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(Not implemented) ), uno::Reference uno::XInterface () ); -break; } } } @@ -199,7 +198,6 @@ SwVbaSelection::EndKey( const uno::Any _unit, const uno::Any _extend ) throw ( default: { throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(Not implemented) ), uno::Reference uno::XInterface () ); -break; } } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/rtf/swparrtf.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit bb147bbb801b53dba8928340df7e2aa2d4545349 Author: Miklos Vajna vmik...@frugalware.org Date: Wed Jan 25 16:33:25 2012 +0100 fdo#43869 use the old rtf importer for paste diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 8099617..81abb16 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -34,6 +34,7 @@ #include tools/stream.hxx #include svl/itemiter.hxx #include svtools/rtftoken.h +#include svtools/miscopt.hxx #include svl/intitem.hxx #include editeng/fhgtitem.hxx #include editeng/ulspitem.hxx @@ -161,6 +162,11 @@ sal_uLong SwRTFReader::Read( SwDoc rDoc, const String /*rBaseURL*/, SwPaM /*r extern C SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportRTF() { +// Use the old rtf importer by default for paste, till the new one supports +// undo stack and PaM. +SvtMiscOptions aMiscOptions; +if (!aMiscOptions.IsExperimentalMode()) +return new RtfReader(); return new SwRTFReader(); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/xml/xmlimp.cxx | 30 +- sw/source/ui/uno/SwXDocumentSettings.cxx |6 ++ 2 files changed, 35 insertions(+), 1 deletion(-) New commits: commit db0f839920c38973f8448df0f74de7c4c95c832c Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Tue Jan 24 16:05:37 2012 +0100 order database properties so that opening it in writer works (bnc#740032) http://lists.freedesktop.org/archives/libreoffice/2012-January/024380.html diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index a59ebf7..f19a20a 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1188,6 +1188,13 @@ void SwXMLImport::SetConfigurationSettings(const Sequence PropertyValue aC OUString sRedlineProtectionKey( RTL_CONSTASCII_USTRINGPARAM( RedlineProtectionKey ) ); +const PropertyValue* currentDatabaseDataSource = NULL; +const PropertyValue* currentDatabaseCommand = NULL; +const PropertyValue* currentDatabaseCommandType = NULL; +OUString currentDatabaseDataSourceKey( RTL_CONSTASCII_USTRINGPARAM( CurrentDatabaseDataSource )); +OUString currentDatabaseCommandKey( RTL_CONSTASCII_USTRINGPARAM( CurrentDatabaseCommand )); +OUString currentDatabaseCommandTypeKey( RTL_CONSTASCII_USTRINGPARAM( CurrentDatabaseCommandType )); + while( nCount-- ) { if( !bIsUserSetting ) @@ -1212,7 +1219,15 @@ void SwXMLImport::SetConfigurationSettings(const Sequence PropertyValue aC } else { -xProps-setPropertyValue( pValues-Name, +// HACK: Setting these out of order does not work. +if( pValues-Name.equals( currentDatabaseDataSourceKey )) +currentDatabaseDataSource = pValues; +else if( pValues-Name.equals( currentDatabaseCommandKey )) +currentDatabaseCommand = pValues; +else if( pValues-Name.equals( currentDatabaseCommandTypeKey )) +currentDatabaseCommandType = pValues; +else +xProps-setPropertyValue( pValues-Name, pValues-Value ); } } @@ -1267,6 +1282,19 @@ void SwXMLImport::SetConfigurationSettings(const Sequence PropertyValue aC pValues++; } +try +{ +if( currentDatabaseDataSource != NULL ) +xProps-setPropertyValue( currentDatabaseDataSource-Name, currentDatabaseDataSource-Value ); +if( currentDatabaseCommand != NULL ) +xProps-setPropertyValue( currentDatabaseCommand-Name, currentDatabaseCommand-Value ); +if( currentDatabaseCommandType != NULL ) +xProps-setPropertyValue( currentDatabaseCommandType-Name, currentDatabaseCommandType-Value ); +} catch( Exception ) +{ +OSL_FAIL( SwXMLImport::SetConfigurationSettings: Exception! ); +} + // finally, treat the non-default cases // introduce boolean, that indicates a document, written by version prior SO8. const bool bDocumentPriorSO8 = !bConsiderWrapOnObjPos; diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index 7398dfd..c349631 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -474,6 +474,8 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo rInf case HANDLE_CURRENT_DATABASE_COMMAND: { SwDBData aData = mpDoc-GetDBData(); +SAL_WARN_IF( aData.sDataSource.isEmpty(), sw.uno, +\CurrentDatabaseCommand\ property possibly set before \CurrentDatabaseDataSource\ ); if ( rValue = aData.sCommand ) mpDoc-ChgDBData( aData ); } @@ -481,6 +483,10 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo rInf case HANDLE_CURRENT_DATABASE_COMMAND_TYPE: { SwDBData aData = mpDoc-GetDBData(); +SAL_WARN_IF( aData.sDataSource.isEmpty(), sw.uno, +\CurrentDatabaseCommandType\ property possibly set before \CurrentDatabaseDataSource\ ); +SAL_WARN_IF( aData.sCommand.isEmpty(), sw.uno, +\CurrentDatabaseCommandType\ property possibly set before \CurrentDatabaseCommand\ ); if ( rValue = aData.nCommandType ) mpDoc-ChgDBData( aData ); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/wrtw8esh.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0d5167915b47df7c3e450614ea50d845ba959df3 Author: Julien Nabet serval2...@yahoo.fr Date: Sat Jan 21 09:30:05 2012 +0100 Fix Possible inefficient checking for 'aChrSetArr' emptiness diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 3d3cc83..86e9a4a 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -888,7 +888,7 @@ void MSWord_SdrAttrIter::NextPara( sal_uInt16 nPar ) rtl_TextEncoding MSWord_SdrAttrIter::GetNextCharSet() const { -if( aChrSetArr.size() ) +if( !aChrSetArr.empty() ) return (rtl_TextEncoding)aChrSetArr[ aChrSetArr.size() - 1 ]; return eNdChrSet; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/inc/swcache.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c76d098cd840c3bf830f04aecc879521b844098d Author: Stephan Bergmann sberg...@redhat.com Date: Sat Jan 21 17:51:19 2012 +0100 Fix non-DBG_UTIL case. diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx index aba30d1..63995ea 100644 --- a/sw/source/core/inc/swcache.hxx +++ b/sw/source/core/inc/swcache.hxx @@ -108,7 +108,7 @@ public: SwCache( const sal_uInt16 nInitSize, const rtl::OString rNm ); ~SwCache(); #else -SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize ); +SwCache( const sal_uInt16 nInitSize ); #endif void Flush( const sal_uInt8 nPercent = 100 ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/ui/dbui/dbtree.cxx | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) New commits: commit 9a7d098aa92a4099aeb022798189c00c87258408 Author: August Sodora aug...@gmail.com Date: Sat Jan 21 20:49:55 2012 -0500 SV_DECL_PTRARR_DEL-boost::ptr_vector diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx index 27faa2a..1ba0c18 100644 --- a/sw/source/ui/dbui/dbtree.cxx +++ b/sw/source/ui/dbui/dbtree.cxx @@ -57,6 +57,8 @@ #include unomid.h +#include boost/ptr_container/ptr_vector.hpp + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::container; @@ -73,9 +75,7 @@ struct SwConnectionData ReferenceXConnection xConnection; }; -typedef SwConnectionData* SwConnectionDataPtr; -SV_DECL_PTRARR_DEL( SwConnectionArr, SwConnectionDataPtr, 32 ) -SV_IMPL_PTRARR( SwConnectionArr, SwConnectionDataPtr ) +typedef boost::ptr_vectorSwConnectionData SwConnectionArr; class SwDBTreeList_Impl : public cppu::WeakImplHelper1 XContainerListener { @@ -125,12 +125,11 @@ void SwDBTreeList_Impl::elementRemoved( const ContainerEvent rEvent ) throw (Ru SolarMutexGuard aGuard; ::rtl::OUString sSource; rEvent.Accessor = sSource; -for(sal_uInt16 i = 0; i aConnections.Count(); i++) +for(SwConnectionArr::iterator i = aConnections.begin(); i != aConnections.end(); ++i) { -SwConnectionDataPtr pPtr = aConnections[i]; -if(pPtr-sSourceName == sSource) +if(i-sSourceName == sSource) { -aConnections.DeleteAndDestroy(i); +aConnections.erase(i); break; } } @@ -167,22 +166,21 @@ sal_Bool SwDBTreeList_Impl::HasContext() ReferenceXConnection SwDBTreeList_Impl::GetConnection(const rtl::OUString rSourceName) { -ReferenceXConnection xRet; -for(sal_uInt16 i = 0; i aConnections.Count(); i++) +ReferenceXConnection xRet; +for(SwConnectionArr::const_iterator i = aConnections.begin(); i != aConnections.end(); ++i) { -SwConnectionDataPtr pPtr = aConnections[i]; -if(pPtr-sSourceName == rSourceName) +if(i-sSourceName == rSourceName) { -xRet = pPtr-xConnection; +xRet = i-xConnection; break; } } if(!xRet.is() xDBContext.is() pWrtSh) { -SwConnectionDataPtr pPtr = new SwConnectionData(); +SwConnectionData* pPtr = new SwConnectionData(); pPtr-sSourceName = rSourceName; xRet = pWrtSh-GetNewDBMgr()-RegisterConnection(pPtr-sSourceName); -aConnections.Insert(pPtr, aConnections.Count()); +aConnections.push_back(pPtr); } return xRet; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/xml/ForbiddenCharactersEnum.hxx | 44 --- sw/source/filter/xml/xmlexp.cxx |1 sw/source/filter/xml/xmlimp.cxx |1 3 files changed, 46 deletions(-) New commits: commit 15e35093e86b49b3e8129108fa358adc0c865fbe Author: Takeshi Abe t...@fixedpoint.jp Date: Thu Jan 19 02:25:23 2012 +0900 removed unused header diff --git a/sw/source/filter/xml/ForbiddenCharactersEnum.hxx b/sw/source/filter/xml/ForbiddenCharactersEnum.hxx deleted file mode 100644 index 374d705..000 --- a/sw/source/filter/xml/ForbiddenCharactersEnum.hxx +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * http://www.openoffice.org/license.html - * for a copy of the LGPLv3 License. - * - / - -#ifndef _FORBIDDEN_CHARACTERS_ENUM_HXX -#define _FORBIDDEN_CHARACTERS_ENUM_HXX - -enum ForbiddenCharactersEnum -{ -SW_FORBIDDEN_CHARACTER_LANGUAGE, -SW_FORBIDDEN_CHARACTER_COUNTRY, -SW_FORBIDDEN_CHARACTER_VARIANT, -SW_FORBIDDEN_CHARACTER_BEGIN_LINE, -SW_FORBIDDEN_CHARACTER_END_LINE, -SW_FORBIDDEN_CHARACTER_MAX -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 7d6d0e9..9faf522 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -63,7 +63,6 @@ #include docary.hxx #include editeng/unolingu.hxx #include editeng/forbiddencharacterstable.hxx -#include ForbiddenCharactersEnum.hxx #include comphelper/servicehelper.hxx // for locking SolarMutex: svapp + mutex diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 36643e4..a59ebf7 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -58,7 +58,6 @@ #include svx/xmlgrhlp.hxx #include svx/xmleohlp.hxx #include sfx2/printer.hxx -#include ForbiddenCharactersEnum.hxx #include xmloff/xmluconv.hxx #include unotools/saveopt.hxx #include tools/diagnose_ex.h ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/doc/poolfmt.cxx|3 --- sw/source/filter/html/htmlatr.cxx |6 -- sw/source/filter/html/htmltab.cxx | 11 --- sw/source/filter/html/swhtml.cxx |2 -- sw/source/filter/html/wrthtml.hxx |1 - sw/source/filter/ww1/fltshell.cxx |2 -- sw/source/filter/ww8/ww8par.cxx |2 -- sw/source/filter/ww8/ww8par.hxx |1 - sw/source/filter/ww8/ww8par5.cxx |2 -- sw/source/filter/xml/xmlithlp.hxx | 10 -- 10 files changed, 40 deletions(-) New commits: commit c2c669db137b9ace3928612834ea080f3e661fef Author: Takeshi Abe t...@fixedpoint.jp Date: Wed Jan 18 02:00:12 2012 +0900 removed dead macro diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx index 6b5868a..cd64889 100644 --- a/sw/source/core/doc/poolfmt.cxx +++ b/sw/source/core/doc/poolfmt.cxx @@ -91,11 +91,8 @@ const sal_uInt16 PT_22 = 22 * 20; // 22 pt const sal_uInt16 PT_24 = 24 * 20; // 22 pt -//const sal_uInt16 HTML_PARSPACE = ((CM_05 * 7) / 10); #define HTML_PARSPACE GetMetricVal( CM_05 ) -static const sal_Char sKomma[] = , ; - static const sal_uInt16 aHeadlineSizes[ 2 * MAXLEVEL ] = { // PT_16, PT_14, PT_14, PT_12, PT_12, // normal // we do everything procentual now: diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 97087f5..8cc76ac 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -108,12 +108,6 @@ using namespace ::com::sun::star; #endif -#define HTML_BULLETCHAR_DISC34 -#define HTML_BULLETCHAR_CIRCLE 38 -#define HTML_BULLETCHAR_SQUARE 36 - -#define COLFUZZY 20 - //--- HTMLOutEvent aAnchorEventTable[] = diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 06aa3bf..42eebd5 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -67,11 +67,8 @@ #include numrule.hxx #define NETSCAPE_DFLT_BORDER 1 -#define NETSCAPE_DFLT_CELLPADDING 1 #define NETSCAPE_DFLT_CELLSPACING 2 -//#define FIX56334 - using ::editeng::SvxBorderLine; using namespace ::com::sun::star; @@ -1408,15 +1405,11 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox, // Wenn die Zelle ueber mehrere Zeilen geht muss ein evtl. // an der Zeile gesetzter Hintergrund an die Zelle uebernommen // werden. -#ifndef FIX56334 // Wenn es sich um eine Tabelle in der Tabelle handelt und // die Zelle ueber die gesamte Heoehe der Tabelle geht muss // ebenfalls der Hintergrund der Zeile uebernommen werden, weil // die Line von der GC (zu Recht) wegoptimiert wird. if( nRowSpan 1 || (this != pTopTable nRowSpan==nRows) ) -#else -if( nRowSpan 1 ) -#endif { pBGBrushItem = ((*pRows)[nRow])-GetBGBrush(); if( !pBGBrushItem this != pTopTable ) @@ -1691,13 +1684,11 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper, HTMLTableRow *pTopRow = (*pRows)[nTopRow]; sal_uInt16 nRowHeight = pTopRow-GetHeight(); const SvxBrushItem *pBGBrushItem = 0; -#ifndef FIX56334 if( this == pTopTable || nTopRow0 || nBottomRownRows ) { // An der Line eine Frabe zu setzen macht keinen Sinn, wenn sie // die auesserste und gleichzeitig einzige Zeile einer Tabelle in // der Tabelle ist. -#endif pBGBrushItem = pTopRow-GetBGBrush(); if( !pBGBrushItem this != pTopTable ) @@ -1709,9 +1700,7 @@ SwTableLine *HTMLTable::MakeTableLine( SwTableBox *pUpper, if( !pBGBrushItem ) pBGBrushItem = GetInhBGBrush(); } -#ifndef FIX56334 } -#endif if( nTopRow==nBottomRow-1 (nRowHeight || pBGBrushItem) ) { SwTableLineFmt *pFrmFmt = (SwTableLineFmt*)pLine-ClaimFrmFmt(); diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 23cc0df..b4f7f16 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -111,8 +111,6 @@ #include swerror.h #define FONTSIZE_MASK 7 -#define FONTCOLOR_MASK (115) -#define FONT_MASK (114) #define HTML_ESC_PROP 80 #define HTML_ESC_SUPER DFLT_ESC_SUPER diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index 4ceb9b5..633ad33 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -64,7 +64,6 @@ class SwHTMLTxtFtns; extern SwAttrFnTab aHTMLAttrFnTab; -//#define HTML_PARSPACE ((MM50 * 7) / 10) #define HTML_PARSPACE (MM50) // Flags fuer die Ausgabe von Rahmen aller Art diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index 284fbb5..0afe3d3 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -71,8 +71,6 @@ #include
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/ww8par5.cxx | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) New commits: commit 09a25659775c4d39eb40507e7cbd9472570834d3 Author: Kenneth Aafløy kenneth_li...@aafloy.net Date: Wed Jan 11 15:22:27 2012 +0100 Add import of docvariable fields from word documents Hi, Attached is a patch that adds support for importing docvariable fields from microsoft word documents. The variables themselves are already converted correctly, so this patch only ties the field to the existing custom document information. Please consider this patch for inclusion. I declare that this and my further patches are under LGPLv3+ / MPL license. With Regards, Kenneth Aafløy diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index e5cf9c8..f27ef6b 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -965,7 +965,7 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes) 0, 0, 0, -0, +SwWW8ImplReader::Read_F_DocInfo, // 64 - DOCVARIABLE 0, 0, SwWW8ImplReader::Read_F_IncludePicture,// 67 @@ -1759,6 +1759,9 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String rStr ) nReg = DI_SUB_TIME; bDateTime = true; break; +case 64: // DOCVARIABLE +nSub = DI_CUSTOM; +break; } sal_uInt32 nFormat = 0; @@ -1784,8 +1787,32 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String rStr ) } } +String aData; +// Extract DOCVARIABLE varname +if ( 64 == pF-nId ) +{ +_ReadFieldParams aReadParam( rStr ); +long nRet; +while( -1 != ( nRet = aReadParam.SkipToNextToken() )) +{ +switch( nRet ) +{ +case -2: +if( !aData.Len() ) +aData = aReadParam.GetResult(); +break; +case '*': +//Skip over MERGEFORMAT +aReadParam.SkipToNextToken(); +break; +} +} + +aData = comphelper::string::remove(aData, ''); +} + SwDocInfoField aFld( (SwDocInfoFieldType*) -rDoc.GetSysFldType( RES_DOCINFOFLD ), nSub|nReg, String(), nFormat ); +rDoc.GetSysFldType( RES_DOCINFOFLD ), nSub|nReg, aData, nFormat ); if (bDateTime) ForceFieldLanguage(aFld, nLang); rDoc.InsertPoolItem(*pPaM, SwFmtFld(aFld), 0); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source writerperfect/source
sw/source/core/crsr/findfmt.cxx |2 +- sw/source/core/layout/ftnfrm.cxx |2 +- sw/source/core/layout/pagechg.cxx |2 +- sw/source/filter/ww8/ww8par6.cxx |2 +- writerperfect/source/filter/FontStyle.cxx |2 +- 5 files changed, 5 insertions(+), 5 deletions(-) New commits: commit 79eb7c0cab7a7b4e0583e9582ad5e7f9e81af7d7 Author: Julien Nabet serval2...@yahoo.fr Date: Sat Jan 14 11:29:07 2012 +0100 Some cppcheck cleaning diff --git a/sw/source/core/crsr/findfmt.cxx b/sw/source/core/crsr/findfmt.cxx index 058a5f4..7902ab5 100644 --- a/sw/source/core/crsr/findfmt.cxx +++ b/sw/source/core/crsr/findfmt.cxx @@ -59,7 +59,7 @@ sal_Bool SwPaM::Find( const SwFmt rFmt, SwMoveFn fnMove, while( !bFound 0 != ( pNode = ::GetNode( *pPam, bFirst, fnMove, bInReadOnly ))) { -if( 0 != ( bFound = pNode-GetFmtColl() == rFmt )) +if( 0 != ( bFound = (pNode-GetFmtColl() == rFmt) )) { // wurde die FormatCollection gefunden, dann handelt es sich auf // jedenfall um einen SwCntntNode !! diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 1b4a14e..d485bc1 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -3008,7 +3008,7 @@ sal_Bool SwCntntFrm::MoveFtnCntFwd( sal_Bool bMakePage, SwFtnBossFrm *pOldBoss ) sal_Bool bSameBoss = sal_True; SwFtnBossFrm * const pNewBoss = pNewUpper-FindFtnBossFrm(); //Wechseln wir die Spalte/Seite? -if ( sal_False == ( bSameBoss = pNewBoss == pOldBoss ) ) +if ( sal_False == ( bSameBoss = (pNewBoss == pOldBoss) ) ) { bSamePage = pOldBoss-FindPageFrm() == pNewBoss-FindPageFrm(); // Seitenwechsel? pNewUpper-Calc(); diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 79d7d1b..55fdefe 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -246,7 +246,7 @@ SwPageFrm::SwPageFrm( SwFrmFmt *pFmt, SwFrm* pSib, SwPageDesc *pPgDsc ) : //Body-Bereich erzeugen und einsetzen, aber nur wenn ich nicht gerade //eine Leerseite bin. SwDoc *pDoc = pFmt-GetDoc(); -if ( sal_False == (bEmptyPage = pFmt == pDoc-GetEmptyPageFmt()) ) +if ( sal_False == (bEmptyPage = (pFmt == pDoc-GetEmptyPageFmt())) ) { bEmptyPage = sal_False; Calc(); //Damit die PrtArea stimmt. diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 4db2f04..e83b262 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -1540,7 +1540,7 @@ bool SwWW8ImplReader::SetFlyBordersShadow(SfxItemSet rFlySet, static void FlySecur1(short rSize, const bool bBorder) { short nMin = MINFLY + -bBorder ? MAX_BORDER_SIZE : MAX_EMPTY_BORDER; +(bBorder ? MAX_BORDER_SIZE : MAX_EMPTY_BORDER); if ( rSize nMin ) rSize = nMin; diff --git a/writerperfect/source/filter/FontStyle.cxx b/writerperfect/source/filter/FontStyle.cxx index b2d0080..7e94b4a 100644 --- a/writerperfect/source/filter/FontStyle.cxx +++ b/writerperfect/source/filter/FontStyle.cxx @@ -61,7 +61,7 @@ void FontStyleManager::writeFontsDeclaration(OdfDocumentHandler *pHandler) const { TagOpenElement(office:font-face-decls).write(pHandler); std::mapWPXString, shared_ptrFontStyle, ltstr::const_iterator iter; -for (iter = mStyleHash.begin(); iter != mStyleHash.end(); iter++) +for (iter = mStyleHash.begin(); iter != mStyleHash.end(); ++iter) { (iter-second)-write(pHandler); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/ui/uiview/view1.cxx |4 1 file changed, 4 insertions(+) New commits: commit d83488f9795740857830aaf005e06e30d4e7d70c Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Fri Jan 13 18:04:09 2012 +0100 fdo#40438: force calculating layout before Activate to avoid crashes and loops diff --git a/sw/source/ui/uiview/view1.cxx b/sw/source/ui/uiview/view1.cxx index 23d80f9..79ec899 100644 --- a/sw/source/ui/uiview/view1.cxx +++ b/sw/source/ui/uiview/view1.cxx @@ -53,6 +53,10 @@ extern int bDocSzUpdated; void SwView::Activate(sal_Bool bMDIActivate) { +// fdo#40438 Update the layout to make sure everything is correct before showing the content +pWrtShell-StartAction(); +pWrtShell-EndAction( sal_True ); + // aktuelle View anmelden an der DocShell // die View bleibt solange an der DocShell // aktiv bis Sie zerstoert wird oder durch Activate eine ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/ui/utlui/initui.cxx | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) New commits: commit cad9afa15f53d547733fa55f1353772f6d696611 Author: August Sodora aug...@gmail.com Date: Fri Jan 13 22:41:12 2012 -0500 SvStringsDtor-std::vector diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx index dacbb6e..1a3e6d4 100644 --- a/sw/source/ui/utlui/initui.cxx +++ b/sw/source/ui/utlui/initui.cxx @@ -233,37 +233,38 @@ SwGlossaryList* GetGlossaryList() struct ImpAutoFmtNameListLoader : public Resource { -ImpAutoFmtNameListLoader( SvStringsDtor rLst ); +ImpAutoFmtNameListLoader( std::vectorString rLst ); }; void ShellResource::_GetAutoFmtNameLst() const { -SvStringsDtor** ppLst = (SvStringsDtor**)pAutoFmtNameLst; -*ppLst = new SvStringsDtor( STR_AUTOFMTREDL_END ); -ImpAutoFmtNameListLoader aTmp( **ppLst ); +std::vectorString* pLst(pAutoFmtNameLst); +pLst = new std::vectorString; +pLst-reserve(STR_AUTOFMTREDL_END); +ImpAutoFmtNameListLoader aTmp( *pLst ); } -ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( SvStringsDtor rLst ) +ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( std::vectorString rLst ) : Resource( ResId(RID_SHELLRES_AUTOFMTSTRS, *pSwResMgr) ) { for( sal_uInt16 n = 0; n STR_AUTOFMTREDL_END; ++n ) { -String* p = new String( ResId( n + 1, *pSwResMgr) ); +String p(ResId(n + 1, *pSwResMgr)); if(STR_AUTOFMTREDL_TYPO == n) { #ifdef WNT //fuer Windows Sonderbehandlung, da MS hier ein paar Zeichen im Dialogfont vergessen hat -p-SearchAndReplace(C2S(%1), C2S(,,)); -p-SearchAndReplace(C2S(%2), C2S('')); +p.SearchAndReplace(C2S(%1), C2S(,,)); +p.SearchAndReplace(C2S(%2), C2S('')); #else const SvtSysLocale aSysLocale; const LocaleDataWrapper rLclD = aSysLocale.GetLocaleData(); //unter richtigen Betriebssystemen funktioniert es auch so -p-SearchAndReplace(C2S(%1), rLclD.getDoubleQuotationMarkStart()); -p-SearchAndReplace(C2S(%2), rLclD.getDoubleQuotationMarkEnd()); +p.SearchAndReplace(C2S(%1), rLclD.getDoubleQuotationMarkStart()); +p.SearchAndReplace(C2S(%2), rLclD.getDoubleQuotationMarkEnd()); #endif } -rLst.Insert( p, n ); +rLst.insert(rLst.begin() + n, p); } FreeResource(); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/html/htmlfly.cxx |7 +++ sw/source/filter/html/wrthtml.cxx |4 ++-- sw/source/filter/html/wrthtml.hxx |2 +- 3 files changed, 6 insertions(+), 7 deletions(-) New commits: commit 900e35045fee950f3f7d10f9fe863d0f51854699 Author: August Sodora aug...@gmail.com Date: Fri Jan 13 23:01:33 2012 -0500 SvStringsDtor-std::vector diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index 46dc171..7742f20 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -885,11 +885,11 @@ Writer OutHTML_Image( Writer rWrt, const SwFrmFmt rFrmFmt, do { bFound = sal_False; -for( sal_uInt16 i=0; irHTMLWrt.aImgMapNames.Count(); i++ ) +for(size_t i = 0; i rHTMLWrt.aImgMapNames.size(); ++i) { // TODO: Unicode: Comparison is case insensitive for ASCII // characters only now! -if( aIMapName.EqualsIgnoreCaseAscii(*rHTMLWrt.aImgMapNames[i]) ) +if( aIMapName.EqualsIgnoreCaseAscii(rHTMLWrt.aImgMapNames[i]) ) { bFound = sal_True; break; @@ -944,8 +944,7 @@ Writer OutHTML_Image( Writer rWrt, const SwFrmFmt rFrmFmt, } } -rHTMLWrt.aImgMapNames.Insert( new String(aIMapName), - rHTMLWrt.aImgMapNames.Count() ); +rHTMLWrt.aImgMapNames.push_back(aIMapName); rtl::OString aIndMap, aIndArea; const sal_Char *pLF = 0, *pIndArea = 0, *pIndMap = 0; diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 40d26c6..32c2611 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -392,8 +392,8 @@ sal_uLong SwHTMLWriter::WriteStream() if( aTxtCollInfos.Count() ) aTxtCollInfos.DeleteAndDestroy( sal_uInt16(0), aTxtCollInfos.Count() ); -if( aImgMapNames.Count() ) -aImgMapNames.DeleteAndDestroy( sal_uInt16(0), aImgMapNames.Count() ); +if(!aImgMapNames.empty()) +aImgMapNames.clear(); aImplicitMarks.clear(); diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index 71082c7..4ceb9b5 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -224,7 +224,7 @@ public: static const sal_Char sNewLine[]; // \015\012 #endif -SvStringsDtor aImgMapNames; // geschriebene Image Maps +std::vectorString aImgMapNames; // geschriebene Image Maps std::setString aImplicitMarks;// implizite Stprungmarken std::setString aNumRuleNames;// Names of exported num rules std::setString aScriptParaStyles;// script dependent para styles ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/doc/doctxm.cxx |6 +- sw/source/core/inc/doctxm.hxx |3 --- 2 files changed, 1 insertion(+), 8 deletions(-) New commits: commit fdb6e4171c7ab9620b739e1a1c3cbba51ba81544 Author: August Sodora aug...@gmail.com Date: Fri Jan 13 23:14:30 2012 -0500 Remove unused member variable diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 4471457..010e3a8 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -963,14 +963,11 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( _Head )); // sortierte Liste aller Verzeichnismarken und Verzeichnisbereiche void* p = 0; -String* pStr = 0; sal_uInt16 nCnt = 0, nFormMax = GetTOXForm().GetFormMax(); -SvStringsDtor aStrArr( (sal_uInt8)nFormMax ); SvPtrarr aCollArr( (sal_uInt8)nFormMax ); for( ; nCnt nFormMax; ++nCnt ) { aCollArr.Insert( p, nCnt ); -aStrArr.Insert( pStr, nCnt ); } SwNodeIndex aInsPos( *pFirstEmptyNd, 1 ); @@ -1015,7 +1012,7 @@ sNm.AppendAscii( RTL_CONSTASCII_STRINGPARAM( _Head )); } // pass node index of table-of-content section and default page description // to method GenerateText(..). -GenerateText( nCnt, nRange, aStrArr, pSectNd-GetIndex(), pDefaultPageDesc ); +GenerateText( nCnt, nRange, pSectNd-GetIndex(), pDefaultPageDesc ); nCnt += nRange - 1; } @@ -1592,7 +1589,6 @@ String lcl_GetNumString( const SwTOXSortTabBase rBase, sal_Bool bUsePrefix, sal // which page description is used, no appropriate one is found. void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx, sal_uInt16 nCount, - SvStringsDtor , const sal_uInt32 _nTOXSectNdIdx, const SwPageDesc* _pDefaultPageDesc ) { diff --git a/sw/source/core/inc/doctxm.hxx b/sw/source/core/inc/doctxm.hxx index fe0daa1..afcdb2c 100644 --- a/sw/source/core/inc/doctxm.hxx +++ b/sw/source/core/inc/doctxm.hxx @@ -28,14 +28,12 @@ #ifndef _DOCTXM_HXX #define _DOCTXM_HXX - #include svl/svarray.hxx #include tools/gen.hxx #include tox.hxx #include section.hxx class SwTOXInternational; -class SvStringsDtor; class SvPtrarr; class SwPageDesc; class SwTxtNode; @@ -76,7 +74,6 @@ class SwTOXBaseSection : public SwTOXBase, public SwSection // add parameter _TOXSectNdIdx and _pDefaultPageDesc void GenerateText( sal_uInt16 nArrayIdx, sal_uInt16 nCount, - SvStringsDtor, const sal_uInt32 _nTOXSectNdIdx, const SwPageDesc* _pDefaultPageDesc ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/html/swhtml.cxx |4 sw/source/ui/index/cnttab.cxx|4 2 files changed, 8 deletions(-) New commits: commit 322afee279afd6ce5a99212757d0747858959d80 Author: Caolán McNamara caol...@redhat.com Date: Tue Jan 10 11:38:42 2012 + MAC_WITHOUT_EXT never defined thesedays diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 019c9dd..23cc0df 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -165,16 +165,13 @@ String HTMLReader::GetTemplateName() const sTemplate += INET_PATH_TOKEN; sTemplate.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM(html) ); String sTemplateWithoutExt( sTemplate ); -#ifndef MAC_WITHOUT_EXT // first search for OpenDocument Writer/Web template sTemplate.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM(.oth) ); -#endif SvtPathOptions aPathOpt; // OpenDocument Writer/Web template (extension .oth) sal_Bool bSet = aPathOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE ); -#ifndef MAC_WITHOUT_EXT if( !bSet ) { // 6.0 (extension .stw) @@ -184,7 +181,6 @@ String HTMLReader::GetTemplateName() const sTemplate.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM(.stw) ); bSet = aPathOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE ); } -#endif if( !bSet ) { diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 59382cb..414bc5f 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -513,15 +513,12 @@ IMPL_LINK( SwMultiTOXTabDialog, ShowPreviewHdl, CheckBox *, pBox ) sTemplate += INET_PATH_TOKEN; sTemplate.AppendAscii( RTL_CONSTASCII_STRINGPARAM(idxexample) ); String sTemplateWithoutExt( sTemplate ); -#ifndef MAC_WITHOUT_EXT sTemplate.AppendAscii( RTL_CONSTASCII_STRINGPARAM(.odt) ); -#endif SvtPathOptions aOpt; // 6.0 (extension .sxw) sal_Bool bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE ); -#ifndef MAC_WITHOUT_EXT if( !bExist ) { // 6.0 (extension .sxw) @@ -536,7 +533,6 @@ IMPL_LINK( SwMultiTOXTabDialog, ShowPreviewHdl, CheckBox *, pBox ) sTemplate.AppendAscii( RTL_CONSTASCII_STRINGPARAM(.sdw) ); bExist = aOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE ); } -#endif if(!bExist) { ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/filter/ww8/docxattributeoutput.cxx |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit 2df1c40b4b7cb3107a68984db644f10097f04c3c Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Mon Jan 9 15:51:10 2012 +0100 don't use an invalidated iterator diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index b23bcc0..df37cf0 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -518,7 +518,7 @@ void DocxAttributeOutput::StartRun( const SwRedlineData* pRedlineData ) void DocxAttributeOutput::EndRun() { // Write field starts -for ( std::vectorFieldInfos::iterator pIt = m_Fields.begin(); pIt != m_Fields.end(); ++pIt ) +for ( std::vectorFieldInfos::iterator pIt = m_Fields.begin(); pIt != m_Fields.end(); ) { // Add the fields starts for all but hyperlinks and TOCs if ( pIt-bOpen pIt-pField ) @@ -529,10 +529,11 @@ void DocxAttributeOutput::EndRun() // Unknown fields sould be removed too if ( !pIt-bClose || ( pIt-eType == ww::eUNKNOWN ) ) { -m_Fields.erase( pIt ); ---pIt; +pIt = m_Fields.erase( pIt ); +continue; } } +++pIt; } // write the run properties + the text, already in the correct order ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/frmedt/fefly1.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 3d3584237424b8efefdb0579e131892e1ddf00a9 Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Mon Jan 9 18:15:11 2012 +0100 fdo#36681: refresh the layout after inserting a picture diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 97c6a5d..473f6f3 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -846,6 +846,12 @@ void SwFEShell::Insert( const String rGrfName, const String rFltName, const Point aPt( GetCrsrDocPos() ); SwFlyFrm* pFrm = pFmt-GetFrm( aPt ); +// Invalidate the content and layout to refresh the picture anchoring +// properly +SwPageFrm* pPageFrm = pFrm-FindPageFrmOfAnchor(); +pPageFrm-InvalidateFlyLayout(); +pPageFrm-InvalidateCntnt(); + if( pFrm ) SelectFlyFrm( *pFrm, sal_True ); else ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/ui/table/tabledlg.src |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 717e3912ed94a10c9405ac11c08eff6caba107ea Author: Andras Timar ati...@suse.com Date: Sun Jan 8 19:55:22 2012 +0100 UI elements begin with upper case diff --git a/sw/source/ui/table/tabledlg.src b/sw/source/ui/table/tabledlg.src index dbaa2a0..ded80e1 100644 --- a/sw/source/ui/table/tabledlg.src +++ b/sw/source/ui/table/tabledlg.src @@ -748,8 +748,8 @@ TabPage TP_TABLE_TEXTFLOW Border = TRUE; StringList [ en-US ] = { - horizontal ; 0; ; - vertical ; 2; ; + Horizontal ; 0; ; + Vertical ; 2; ; Use superordinate object settings ; 4; ; }; }; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/edit/edtox.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 41cd78b805a36d5676b2075a4860e9aee7bc5491 Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Fri Jan 6 10:01:22 2012 +0100 fdo#32726: search for index entries in the whole document, not only the body diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index 6ce4b44..3a178ed 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -428,7 +428,7 @@ void SwEditShell::ApplyAutoMark() // todo/mba: assuming that notes shouldn't be searched sal_Bool bSearchInNotes = sal_False; sal_uLong nRet = Find( aSearchOpt, bSearchInNotes, DOCPOS_START, DOCPOS_END, bCancel, - (FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY), + (FindRanges)(FND_IN_SELALL|FND_IN_BODYONLY|FND_IN_OTHER), sal_False ); if(nRet) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source toolkit/source ucb/source ucb/workben unodevtools/source
sw/source/core/edit/edundo.cxx |6 +- sw/source/core/tox/toxhlp.cxx| 12 ++--- sw/source/core/unocore/unoparagraph.cxx |4 - sw/source/core/unocore/unoport.cxx |6 +- sw/source/core/unocore/unorefmk.cxx |2 sw/source/core/unocore/unosect.cxx |2 sw/source/core/unocore/unostyle.cxx |4 - sw/source/filter/xml/swxml.cxx | 10 ++-- toolkit/source/awt/vclxtoolkit.cxx |8 +-- toolkit/source/controls/tree/treecontrol.cxx |8 +-- ucb/source/ucp/expand/ucpexpand.cxx |2 ucb/source/ucp/webdav/DAVResourceAccess.cxx | 40 +-- ucb/source/ucp/webdav/DAVResourceAccess.hxx |2 ucb/workben/ucb/ucbdemo.cxx |4 - unodevtools/source/skeletonmaker/cppcompskeleton.cxx |4 - 15 files changed, 57 insertions(+), 57 deletions(-) New commits: commit e4ce7225dd987f9b2f250f055d9688de79931444 Author: Takeshi Abe t...@fixedpoint.jp Date: Sat Jan 7 15:50:41 2012 +0900 catch exception by constant reference diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx index 7b2ae83..95c9252 100644 --- a/sw/source/core/edit/edundo.cxx +++ b/sw/source/core/edit/edundo.cxx @@ -136,7 +136,7 @@ bool SwEditShell::Undo(sal_uInt16 const nCount) bRet = GetDoc()-GetIDocumentUndoRedo().Undo() || bRet; } -} catch (::com::sun::star::uno::Exception e) { +} catch (const ::com::sun::star::uno::Exception e) { OSL_TRACE(SwEditShell::Undo(): exception caught:\n %s, ::rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8) .getStr()); @@ -187,7 +187,7 @@ bool SwEditShell::Redo(sal_uInt16 const nCount) bRet = GetDoc()-GetIDocumentUndoRedo().Redo() || bRet; } -} catch (::com::sun::star::uno::Exception e) { +} catch (const ::com::sun::star::uno::Exception e) { OSL_TRACE(SwEditShell::Redo(): exception caught:\n %s, ::rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8) .getStr()); @@ -217,7 +217,7 @@ bool SwEditShell::Repeat(sal_uInt16 const nCount) ::sw::RepeatContext context(*GetDoc(), *GetCrsr()); bRet = GetDoc()-GetIDocumentUndoRedo().Repeat( context, nCount ) || bRet; -} catch (::com::sun::star::uno::Exception e) { +} catch (const ::com::sun::star::uno::Exception e) { OSL_TRACE(SwEditShell::Repeat(): exception caught:\n %s, ::rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8) .getStr()); diff --git a/sw/source/core/tox/toxhlp.cxx b/sw/source/core/tox/toxhlp.cxx index 95e5a20..f1ae986 100644 --- a/sw/source/core/tox/toxhlp.cxx +++ b/sw/source/core/tox/toxhlp.cxx @@ -55,7 +55,7 @@ IndexEntrySupplierWrapper::IndexEntrySupplierWrapper() x = xIES; } } -catch ( UNO_NMSPC::Exception +catch (const UNO_NMSPC::Exception #if OSL_DEBUG_LEVEL 0 e #endif @@ -81,7 +81,7 @@ String IndexEntrySupplierWrapper::GetIndexKey( const String rTxt, try { sRet = xIES-getIndexKey( rTxt, rTxtReading, rLocale ); } -catch ( UNO_NMSPC::Exception +catch (const UNO_NMSPC::Exception #if OSL_DEBUG_LEVEL 0 e #endif @@ -102,7 +102,7 @@ String IndexEntrySupplierWrapper::GetFollowingText( sal_Bool bMorePages ) const try { sRet = xIES-getIndexFollowPageWord( bMorePages, aLcl ); } -catch ( UNO_NMSPC::Exception +catch (const UNO_NMSPC::Exception #if OSL_DEBUG_LEVEL 0 e #endif @@ -125,7 +125,7 @@ IndexEntrySupplierWrapper::GetAlgorithmList( const STAR_NMSPC::lang::Locale rLc try { sRet = xIES-getAlgorithmList( rLcl ); } -catch ( UNO_NMSPC::Exception +catch (const UNO_NMSPC::Exception #if OSL_DEBUG_LEVEL 0 e #endif @@ -148,7 +148,7 @@ sal_Bool IndexEntrySupplierWrapper::LoadAlgorithm( try { bRet = xIES-loadAlgorithm( rLcl, sSortAlgorithm, nOptions ); } -catch ( UNO_NMSPC::Exception +catch (const UNO_NMSPC::Exception #if OSL_DEBUG_LEVEL 0 e #endif @@ -174,7 +174,7 @@ sal_Int16 IndexEntrySupplierWrapper::CompareIndexEntry( nRet = xIES-compareIndexEntry( rTxt1, rTxtReading1, rLocale1, rTxt2, rTxtReading2, rLocale2 ); } -catch ( UNO_NMSPC::Exception +catch (const UNO_NMSPC::Exception #if OSL_DEBUG_LEVEL 0 e #endif diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 930eaf9..0f8a412 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -432,7 +432,7 @@ throw
[Libreoffice-commits] .: sw/source
sw/source/ui/docvw/PageBreakWin.cxx | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) New commits: commit 3a326395a48db313b907b4a35392216d7b2e2a11 Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Thu Jan 5 11:34:49 2012 +0100 Page Break: center the tab on the mouse and remove click on the line diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index b16e51f..f954b6e 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -125,7 +125,6 @@ namespace m_pWin( pWin ) {}; virtual void MouseMove( const MouseEvent rMEvt ); -virtual void MouseButtonDown( const MouseEvent rMEvt ); }; void SwBreakDashedLine::MouseMove( const MouseEvent rMEvt ) @@ -148,16 +147,6 @@ namespace m_pWin-UpdatePosition( pPtr ); } } - -void SwBreakDashedLine::MouseButtonDown( const MouseEvent rMEvt ) -{ -sal_uInt16 nItemId = m_pWin-GetPopupMenu()-Execute( this, rMEvt.GetPosPixel() ); -if ( nItemId ) -{ -m_pWin-SetCurItemId( nItemId ); -m_pWin-Select(); -} -} } SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm ) : @@ -452,14 +441,10 @@ void SwPageBreakWin::UpdatePosition( const Point* pEvtPt ) if ( m_pMousePt ) { -nBtnLeft = nLineLeft + m_pMousePt-X(); +nBtnLeft = nLineLeft + m_pMousePt-X() - aBtnSize.getWidth() / 2; -if ( Application::GetSettings().GetLayoutRTL() ) -{ -nBtnLeft -= aBtnSize.getWidth(); -if ( nBtnLeft nLineLeft ) -nBtnLeft = nLineLeft; -} +if ( nBtnLeft nLineLeft ) +nBtnLeft = nLineLeft; else if ( ( nBtnLeft + aBtnSize.getWidth() ) nLineRight ) nBtnLeft = nLineRight - aBtnSize.getWidth(); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/crsr/crsrsh.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit b7d6bff10a85986e5e6ebfa961f29fa8b3815b40 Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Thu Jan 5 16:59:22 2012 +0100 Header/Footer: fix some bad indicators updates due to wrong call order diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 049a867..36fe86d 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1315,22 +1315,22 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd ) return; // wenn nicht, dann kein Update !! } -if ( IsInHeaderFooter() != IsHeaderFooterEdit() ) -ToggleHeaderFooterEdit(); sal_Bool bInHeader= sal_True; if ( IsInHeaderFooter( bInHeader ) ) { -if ( IsShowHeaderFooterSeparator( Header ) !bInHeader ) +if ( !bInHeader ) { SetShowHeaderFooterSeparator( Footer, true ); SetShowHeaderFooterSeparator( Header, false ); } -else if ( IsShowHeaderFooterSeparator( Footer ) bInHeader ) +else { SetShowHeaderFooterSeparator( Header, true ); SetShowHeaderFooterSeparator( Footer, false ); } } +if ( IsInHeaderFooter() != IsHeaderFooterEdit() ) +ToggleHeaderFooterEdit(); // #i27301# ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/core/edit/eddel.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f8c361927f9ae05887c1a8f337a9df88abb19474 Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Thu Jan 5 17:53:10 2012 +0100 fdo#40250: safer protection check... why using the layout for this? diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index 85d27e4..67deb43 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -89,7 +89,7 @@ void SwEditShell::DeleteSel( SwPaM rPam, sal_Bool* pUndo ) } // geschuetze Boxen ueberspringen ! if( !pNd-IsCntntNode() || -!((SwCntntNode*)pNd)-getLayoutFrm( GetLayout() )-IsProtected() ) +!pNd-IsInProtectSect() ) { // alles loeschen GetDoc()-DeleteAndJoin( aDelPam ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/ui/docvw/PageBreakWin.cxx | 96 +--- sw/source/ui/inc/PageBreakWin.hxx |4 + 2 files changed, 38 insertions(+), 62 deletions(-) New commits: commit 965e72d64c3e38780a69cace3f1bcc5fb35d6c1e Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Wed Jan 4 09:33:44 2012 +0100 Page Break: show the page break right under the mouse diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index 538f6d7..300aa4d 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -68,59 +68,22 @@ using namespace drawinglayer::primitive2d; namespace { -static B2DPolygon lcl_CreatePolygon( B2DRectangle aBounds, bool bMirror ) +static B2DPolygon lcl_CreatePolygon( B2DRectangle aBounds ) { B2DPolygon aRetval; const double nRadius = 1; const double nKappa((M_SQRT2 - 1.0) * 4.0 / 3.0); -// Create the top left corner -{ -B2DPoint aTLCorner = aBounds.getMinimum(); -B2DPoint aStart( 0.0, nRadius ); -B2DPoint aEnd( nRadius, 0.0 ); -aRetval.append( aStart ); -aRetval.appendBezierSegment( -interpolate( aStart, aTLCorner, nKappa ), -interpolate( aEnd, aTLCorner, nKappa ), -aEnd ); -} - -// Create the top right angle -{ -B2DPoint aTMCorner( aBounds.getWidth() - ARROW_WIDTH, 0.0 ); -B2DPoint aStart = aTMCorner + B2DVector( - nRadius, 0.0 ); -B2DVector aEndVect( double( ARROW_WIDTH ), aBounds.getHeight() / 2.0 ); -aEndVect.setLength( nRadius ); -B2DPoint aEnd = aTMCorner + aEndVect; -aRetval.append( aStart ); -aRetval.appendBezierSegment( -interpolate( aStart, aTMCorner, nKappa ), -interpolate( aEnd, aTMCorner, nKappa ), -aEnd ); -} - -// Create the right corner +// Create the top right corner { -B2DPoint aMRCorner( aBounds.getWidth(), aBounds.getHeight() / 2.0 ); -B2DVector aStartVect( double( - ARROW_WIDTH ), - aBounds.getHeight() / 2.0 ); -aStartVect.setLength( nRadius ); -B2DPoint aStart = aMRCorner + aStartVect; -B2DVector aEndVect( double( - ARROW_WIDTH ), aBounds.getHeight() / 2.0 ); -aEndVect.setLength( nRadius ); -B2DPoint aEnd = aMRCorner + aEndVect; -aRetval.append( aStart ); -aRetval.appendBezierSegment( -interpolate( aStart, aMRCorner, nKappa ), -interpolate( aEnd, aMRCorner, nKappa ), -aEnd ); +B2DPoint aTMCorner( aBounds.getWidth(), 0.0 ); +aRetval.append( aTMCorner ); } -// Create the bottom right angle +// Create the bottom right corner { -B2DPoint aBMCorner( aBounds.getWidth() - ARROW_WIDTH, aBounds.getHeight() ); -B2DVector aStartVect( double( ARROW_WIDTH ), - aBounds.getHeight() / 2.0 ); -aStartVect.setLength( nRadius ); +B2DPoint aBMCorner( aBounds.getWidth(), aBounds.getHeight() ); +B2DVector aStartVect( 0.0, - nRadius ); B2DPoint aStart = aBMCorner + aStartVect; B2DPoint aEnd = aBMCorner + B2DVector( - nRadius, 0.0 ); aRetval.append( aStart ); @@ -142,13 +105,10 @@ namespace aEnd ); } -aRetval.setClosed( true ); - -if ( bMirror ) +// Create the top left corner { -B2DHomMatrix bRotMatrix = createRotateAroundPoint( -aBounds.getCenterX(), aBounds.getCenterY(), M_PI ); -aRetval.transform( bRotMatrix ); +B2DPoint aTLCorner = aBounds.getMinimum(); +aRetval.append( aTLCorner ); } return aRetval; @@ -178,7 +138,12 @@ namespace m_pWin-Fade( false ); } else if ( !m_pWin-IsVisible() ) +{ m_pWin-Fade( true ); +} + +Point* pPtr = new Point( rMEvt.GetPosPixel() ); +m_pWin-UpdatePosition( pPtr ); } void SwBreakDashedLine::MouseButtonDown( const MouseEvent rMEvt ) @@ -199,7 +164,8 @@ SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm ) m_pLine( NULL ), m_bIsAppearing( false ), m_nFadeRate( 100 ), -m_bDestroyed( false ) +m_bDestroyed( false ), +m_pMousePt( NULL ) { // Use pixels for the rest of the drawing SetMapMode( MapMode ( MAP_PIXEL ) ); @@ -224,6 +190,7 @@ SwPageBreakWin::~SwPageBreakWin( ) delete m_pPopupMenu; delete m_pLine; +delete m_pMousePt; } void SwPageBreakWin::Paint( const Rectangle ) @@ -255,7 +222,7 @@ void SwPageBreakWin::Paint( const Rectangle )
[Libreoffice-commits] .: sw/source
sw/source/core/crsr/crsrsh.cxx | 15 +++ 1 file changed, 15 insertions(+) New commits: commit fef489ad0f1f14bd9f018552c47a93a80e8b353d Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Wed Jan 4 20:42:17 2012 +0100 Header/Footer: switch cursor between header and footer using the cursor This fixes commit cce76e658af88813e17dea4f04388a29d7e582df. diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 0d1efa3..049a867 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1317,6 +1317,21 @@ void SwCrsrShell::UpdateCrsr( sal_uInt16 eFlags, sal_Bool bIdleEnd ) if ( IsInHeaderFooter() != IsHeaderFooterEdit() ) ToggleHeaderFooterEdit(); +sal_Bool bInHeader= sal_True; +if ( IsInHeaderFooter( bInHeader ) ) +{ +if ( IsShowHeaderFooterSeparator( Header ) !bInHeader ) +{ +SetShowHeaderFooterSeparator( Footer, true ); +SetShowHeaderFooterSeparator( Header, false ); +} +else if ( IsShowHeaderFooterSeparator( Footer ) bInHeader ) +{ +SetShowHeaderFooterSeparator( Header, true ); +SetShowHeaderFooterSeparator( Footer, false ); +} +} + // #i27301# SwNotifyAccAboutInvalidTextSelections aInvalidateTextSelections( *this ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits