[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/view/viewsh.cxx | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) New commits: commit 43b48f05e5aa3359a0227550b9a5c88851a582d2 Author: Caolán McNamara caol...@redhat.com Date: Sat Apr 14 07:56:45 2012 +0100 optimize: traverse children with WINDOW_FIRSTCHILD/WINDOW_NEXT Signed-off-by: Petr Mladek pmla...@suse.cz diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 0413382..f0dd635 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -368,25 +368,29 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd ) if ( GetWin() ) { Window rWindow = *(GetWin()); -if(rWindow.IsChildTransparentModeEnabled() rWindow.GetChildCount()) +if (rWindow.IsChildTransparentModeEnabled()) { -const Rectangle aRectanglePixel(rWindow.LogicToPixel(aRect.SVRect())); - -for ( sal_uInt16 a(0); a rWindow.GetChildCount(); a++ ) +Window* pCandidate = rWindow.GetWindow( WINDOW_FIRSTCHILD ); +if (pCandidate) { -Window* pCandidate = rWindow.GetChild(a); +const Rectangle aRectanglePixel(rWindow.LogicToPixel(aRect.SVRect())); -if ( pCandidate pCandidate-IsPaintTransparent() ) +while (pCandidate) { -const Rectangle aCandidatePosSizePixel( -pCandidate-GetPosPixel(), - pCandidate-GetSizePixel()); - -if ( aCandidatePosSizePixel.IsOver(aRectanglePixel) ) +if ( pCandidate-IsPaintTransparent() ) { -pCandidate-Invalidate( INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN ); -pCandidate-Update(); -} +const Rectangle aCandidatePosSizePixel( + pCandidate-GetPosPixel(), + pCandidate-GetSizePixel()); + +if ( aCandidatePosSizePixel.IsOver(aRectanglePixel) ) +{ +pCandidate-Invalidate( INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN ); +pCandidate-Update(); +} +} + +pCandidate = pCandidate-GetWindow( WINDOW_NEXT ); } } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/layout/paintfrm.cxx | 67 - 1 file changed, 67 deletions(-) New commits: commit f20c1f3081c98cfb03940318e4ba7ec33f624aec Author: Michael Stahl mst...@redhat.com Date: Mon Apr 16 16:12:39 2012 +0200 fdo#38635: fix border printing: Apparently this special case in lcl_PaintLeftRightLine for printer output devices is no longer necessary with the new drawing layer borders and causes the vertical border lines to be far too short, leading to visible gaps in the PDF. (regression from 0f0896c26fb260d1bbf31d7a886df3f61837f0f2) (cherry picked from commit 502c93143ef29989692ca3e63e3e6abc255fd53f) Signed-off-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 3a93e47..659606f 100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -4462,73 +4462,6 @@ void lcl_PaintLeftRightLine( const sal_Bool _bLeft, if ( _rAttrs.JoinedWithNext( _rFrm ) ) pBottomBorder = NULL; } -// OD 06.05.2003 #107169# - adjustments for printer output device -if ( bPrtOutputDev ) -{ -// substract width of outer top line. -if ( rBox.GetTop() (!bCnt || _rAttrs.GetTopLine( _rFrm )) ) -{ -long nDist = ::lcl_AlignHeight( rBox.GetTop()-GetOutWidth() ); -(aRect.*_rRectFn-fnSubTop)( -nDist ); -// OD 19.05.2003 #109667# - If outer top line is hair line, calculated -// top has to be adjusted. -if ( nDist == 1 ) -{ -if ( _rFrm.IsVertical() ) -{ -// right of border rectangle has to be checked and adjusted -Point aCompPt( aRect.Right(), 0 ); -Point aRefPt( aCompPt.X() + 1, aCompPt.Y() ); -lcl_CompPxPosAndAdjustPos( *(pGlobalShell-GetOut()), - aRefPt, aCompPt, - sal_True, -1 ); -aRect.Right( aCompPt.X() ); -} -else -{ -// top of border rectangle has to be checked and adjusted -Point aCompPt( 0, aRect.Top() ); -Point aRefPt( aCompPt.X(), aCompPt.Y() - 1 ); -lcl_CompPxPosAndAdjustPos( *(pGlobalShell-GetOut()), - aRefPt, aCompPt, - sal_False, +1 ); -aRect.Top( aCompPt.Y() ); -} -} -} -// substract width of outer bottom line. -if ( rBox.GetBottom() (!bCnt || _rAttrs.GetBottomLine( _rFrm )) ) -{ -long nDist = ::lcl_AlignHeight( rBox.GetBottom()-GetOutWidth()); -(aRect.*_rRectFn-fnAddBottom)( -nDist ); -// OD 19.05.2003 #109667# - If outer bottom line is hair line, calculated -// top has to be adjusted. -if ( nDist == 1 ) -{ -if ( _rFrm.IsVertical() ) -{ -// left of border rectangle has to be checked and adjusted -Point aCompPt( aRect.Left(), 0 ); -Point aRefPt( aCompPt.X() - 1, aCompPt.Y() ); -lcl_CompPxPosAndAdjustPos( *(pGlobalShell-GetOut()), - aRefPt, aCompPt, - sal_True, +1 ); -aRect.Left( aCompPt.X() ); -} -else -{ -// bottom of border rectangle has to be checked and adjusted -Point aCompPt( 0, aRect.Bottom() ); -Point aRefPt( aCompPt.X(), aCompPt.Y() + 1 ); -lcl_CompPxPosAndAdjustPos( *(pGlobalShell-GetOut()), - aRefPt, aCompPt, - sal_False, -1 ); -aRect.Bottom( aCompPt.Y() ); -} -} -} -} - if ( !pLeftRightBorder-GetInWidth() ) { // OD 06.05.2003 #107169# - add 6th parameter ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/layout/pagechg.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 2d7ce65af37195343ff74b9e01c60f4b86eb6ebe Author: Andreas Schierl openoff...@schierla.de Date: Mon Jan 30 23:34:56 2012 +0100 ClrContourCache for SwAnchoredDrawObjects (fdo#45376) call it only for contour wrapped drawing objects Signed-off-by: Petr Mladek pmla...@suse.cz diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 79d7d1b..ef0d1c8 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 @@ -2035,6 +2036,10 @@ 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 +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] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/edit/edundo.cxx |4 1 file changed, 4 insertions(+) New commits: commit 4822b5312b61c1b7991ad028c4c43a2d8fce513f Author: Michael Stahl mst...@redhat.com Date: Thu Mar 22 23:03:05 2012 +0100 fdo#39003: fix autoformat Undo cursors: SwEditShell::Undo: Because the Undo actions nowadays create new shell cursors directly (while previously they worked on a SwUndoIter), it is necessary to remove the shell cursor ring before Pop() because Pop(false) only restores the current cursor from the stack, not the rest of the ring. (regression from CWS undoapi, 1ba0c1878116ada5dc4ebdecdb1e0a3da9758547) (cherry picked from commit f24153cded54954da7f0d80941707715c78e4627) Signed-off-by: Caolán McNamara caol...@redhat.com diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx index 7b2ae83..118b3f9 100644 --- a/sw/source/core/edit/edundo.cxx +++ b/sw/source/core/edit/edundo.cxx @@ -142,6 +142,10 @@ bool SwEditShell::Undo(sal_uInt16 const nCount) .getStr()); } +if (bRestoreCrsr) +{ // fdo#39003 Pop does not touch the rest of the cursor ring +KillPams(); // so call this first to get rid of unwanted cursors +} Pop( !bRestoreCrsr ); GetDoc()-SetRedlineMode( eOld ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/docnode/nodes.cxx | 34 +- sw/source/core/txtnode/ndtxt.cxx |6 ++ 2 files changed, 23 insertions(+), 17 deletions(-) New commits: commit b8fe125186a6a99f12a22e50d578e4aabd8aac14 Author: Michael Stahl mst...@redhat.com Date: Wed Mar 21 10:25:45 2012 +0100 rhbz#789022: SwNodes: fix inconsistent outline check: SwNodes::UpdateOutlineNode will add/remove the node from SwNodes::pOutlineNds depending on IsOutline(), while various SwNodes methods that move and delete nodes check GetAttrOutlineLevel() != 0, which may be false even if IsOutline() is true. (cherry picked from commit 082906e1f4cf58fdfab1a4064e2b7955fcdaeb8a) Signed-off-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 6d0e45b..55c1613 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -173,7 +173,7 @@ void SwNodes::ChgNode( SwNodeIndex rDelPos, sal_uLong nSz, pTxtNode-RemoveFromList(); -if ( pTxtNode-GetAttrOutlineLevel() != 0 )//-end,zhaojianwei +if (pTxtNode-IsOutline()) { const SwNodePtr pSrch = (SwNodePtr)rNd; pOutlineNds-Remove( pSrch ); @@ -188,8 +188,7 @@ void SwNodes::ChgNode( SwNodeIndex rDelPos, sal_uLong nSz, rTxtNd.AddToList(); -if( bInsOutlineIdx -0 != rTxtNd.GetAttrOutlineLevel() )//-end,zhaojianwei +if (bInsOutlineIdx rTxtNd.IsOutline()) { const SwNodePtr pSrch = (SwNodePtr)rNd; pOutlineNds-Insert( pSrch ); @@ -232,9 +231,11 @@ void SwNodes::ChgNode( SwNodeIndex rDelPos, sal_uLong nSz, { SwTxtNode* pTxtNd = (SwTxtNode*)pNd; -// loesche die Gliederungs-Indizies aus dem alten Nodes-Array -if( 0 != pTxtNd-GetAttrOutlineLevel() )//-end,zhaojianwei +// remove outline index from old nodes array +if (pTxtNd-IsOutline()) +{ pOutlineNds-Remove( pNd ); +} // muss die Rule kopiere werden? if( pDestDoc ) @@ -269,8 +270,7 @@ void SwNodes::ChgNode( SwNodeIndex rDelPos, sal_uLong nSz, { SwpHints * const pHts = pTxtNd-GetpSwpHints(); // OultineNodes set the new nodes in the array -if( bInsOutlineIdx -0 != pTxtNd-GetAttrOutlineLevel() ) //#outline level,added by zhaojianwei +if (bInsOutlineIdx pTxtNd-IsOutline()) { rNds.pOutlineNds-Insert( pTxtNd ); } @@ -537,12 +537,12 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange aRange, SwNodes rNodes, if( pTmpNd-IsTxtNode() ) ((SwTxtNode*)pTmpNd)-RemoveFromList(); -// setze bei Start/EndNodes die richtigen Indizies -// loesche die Gliederungs-Indizies aus -// dem alten Nodes-Array -if( pCNd-IsTxtNode() 0 != -((SwTxtNode*)pCNd)-GetAttrOutlineLevel() )//-end,by zhaojianwei +// remove outline index from old nodes array +if (pCNd-IsTxtNode() +static_castSwTxtNode*(pCNd)-IsOutline()) +{ pOutlineNds-Remove( pCNd ); +} else pCNd = 0; } @@ -572,7 +572,7 @@ sal_Bool SwNodes::_MoveNodes( const SwNodeRange aRange, SwNodes rNodes, SwNode* pNd = aMvIdx.GetNode(); const bool bOutlNd = pNd-IsTxtNode() -0 != ((SwTxtNode*)pNd)-GetAttrOutlineLevel();//-end,zhaojianwei +static_castSwTxtNode*(pNd)-IsOutline(); // loesche die Gliederungs-Indizies aus // dem alten Nodes-Array if( bOutlNd ) @@ -1221,14 +1221,15 @@ void SwNodes::Delete(const SwNodeIndex rIndex, sal_uLong nNodes) if( pNd-IsTxtNode() ) { -if( 0 != ((SwTxtNode*)pNd)-GetAttrOutlineLevel() //-end,zhaojianwei +SwTxtNode *const pTxtNode(static_castSwTxtNode*(pNd)); +if (pTxtNode-IsOutline() pOutlineNds-Seek_Entry( pNd, nIdxPos )) {
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/doc/doc.cxx |1 sw/source/core/inc/layouter.hxx |9 sw/source/core/layout/layouter.cxx | 48 sw/source/core/layout/objectformattertxtfrm.cxx |6 --- sw/source/core/text/txtfly.cxx |3 - 5 files changed, 1 insertion(+), 66 deletions(-) New commits: commit b4b8f6966d5c2d308874f6213e68ecc620e92777 Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Thu Mar 22 14:52:37 2012 +0100 n#750258: removed strange non-wrapping condition In the bug file, some text wrapping was badly computed when showing the document (but not at the first rendering) due to that weird NotToWrap mecahnism in SwLayouter. Checked the original issue i#40155 that removing this does hurt. (cherry picked from commit 8a233f17ae589b33e3b54ef9ebb1fcff41ef6cd7) Signed-off-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index d07ef90..5a2f44c 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1822,7 +1822,6 @@ void SwDoc::ClearSwLayouterEntries() { SwLayouter::ClearMovedFwdFrms( *this ); SwLayouter::ClearObjsTmpConsiderWrapInfluence( *this ); -SwLayouter::ClearFrmsNotToWrap( *this ); // #i65250# SwLayouter::ClearMoveBwdLayoutInfo( *this ); } diff --git a/sw/source/core/inc/layouter.hxx b/sw/source/core/inc/layouter.hxx index 135263e..4350b95 100644 --- a/sw/source/core/inc/layouter.hxx +++ b/sw/source/core/inc/layouter.hxx @@ -68,9 +68,6 @@ class SwLayouter SwMovedFwdFrmsByObjPos* mpMovedFwdFrms; // -- #i35911# SwObjsMarkedAsTmpConsiderWrapInfluence* mpObjsTmpConsiderWrapInfl; -// -- #i40155# - data structure to collect frames, which are -// marked not to wrap around objects. -std::vector const SwFrm* maFrmsNotToWrap; public: // -- #i65250# @@ -148,12 +145,6 @@ public: static void InsertObjForTmpConsiderWrapInfluence( const SwDoc _rDoc, SwAnchoredObject _rAnchoredObj ); -// -- #i40155# -static void ClearFrmsNotToWrap( const SwDoc _rDoc ); -static void InsertFrmNotToWrap( const SwDoc _rDoc, -const SwFrm _rFrm ); -static bool FrmNotToWrap( const IDocumentLayoutAccess _rIDLA, - const SwFrm _rFrm ); // -- #i65250# static bool MoveBwdSuppressed( const SwDoc p_rDoc, const SwFlowFrm p_rFlowFrm, diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx index 3105bce..5ed1712 100644 --- a/sw/source/core/layout/layouter.cxx +++ b/sw/source/core/layout/layouter.cxx @@ -440,54 +440,6 @@ void SwLayouter::InsertObjForTmpConsiderWrapInfluence( _rDoc.GetLayouter()-mpObjsTmpConsiderWrapInfl-Insert( _rAnchoredObj ); } -// #i40155# -void SwLayouter::ClearFrmsNotToWrap( const SwDoc _rDoc ) -{ -if ( _rDoc.GetLayouter() ) -{ -const_castSwDoc(_rDoc).GetLayouter()-maFrmsNotToWrap.clear(); -} -} - -void SwLayouter::InsertFrmNotToWrap( const SwDoc _rDoc, - const SwFrm _rFrm ) -{ -if ( !_rDoc.GetLayouter() ) -{ -const_castSwDoc(_rDoc).SetLayouter( new SwLayouter() ); -} - -if ( !SwLayouter::FrmNotToWrap( _rDoc, _rFrm ) ) -{ -const_castSwDoc(_rDoc).GetLayouter()-maFrmsNotToWrap.push_back( _rFrm ); -} -} - -bool SwLayouter::FrmNotToWrap( const IDocumentLayoutAccess _rDLA, - const SwFrm _rFrm ) -{ -const SwLayouter* pLayouter = _rDLA.GetLayouter(); -if ( !pLayouter ) -{ -return false; -} -else -{ -bool bFrmNotToWrap( false ); -std::vector const SwFrm* ::const_iterator aIter = -pLayouter-maFrmsNotToWrap.begin(); -for ( ; aIter != pLayouter-maFrmsNotToWrap.end(); ++aIter ) -{ -const SwFrm* pFrm = *(aIter); -if ( pFrm == _rFrm ) -{ -bFrmNotToWrap = true; -break; -} -} -return bFrmNotToWrap; -} -} void LOOPING_LOUIE_LIGHT( bool bCondition, const SwTxtFrm rTxtFrm ) { diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx index 3ceb54a..c1d8eb8 100644 --- a/sw/source/core/layout/objectformattertxtfrm.cxx +++ b/sw/source/core/layout/objectformattertxtfrm.cxx @@ -296,9 +296,6 @@ bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject _rAnchoredObj, mrAnchorTxtFrm.GetFollow() mrAnchorTxtFrm.GetFollow()-GetOfst() == 0 ) { -SwLayouter::InsertFrmNotToWrap( - *(mrAnchorTxtFrm.FindPageFrm()-GetFmt()-GetDoc()), -
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/filter/ww8/docxattributeoutput.cxx |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit 6eea398000f04c68f422ab07353ea4631f4edb5e Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Mon Jan 9 15:51:10 2012 +0100 fdo#46337: don't use an invalidated iterator (cherry picked from commit 2df1c40b4b7cb3107a68984db644f10097f04c3c) Signed-off-by: Michael Stahl mst...@redhat.com diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index d9f3376..0ea06b7 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -517,7 +517,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 ) @@ -528,10 +528,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] .: Branch 'libreoffice-3-5' - sw/source
sw/source/filter/xml/xmltexte.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 8a8eb870b8037801f81c680441d10a1ef95bfb06 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. Signed-off-by: Michael Stahl mst...@redhat.com diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index c49ec0d..1610a71 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -227,7 +227,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] .: Branch 'libreoffice-3-5' - sw/source
sw/source/filter/rtf/rtffly.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit a12a832280db27877c30ee177e9a079cd9c2eed9 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 (cherry picked from commits 4c8307053e3003af6cef5056e36a650f19c8cdb3 and b208f71ddd19f1419558e7eb8c413d17d7e9f9da) diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx index 92a7ca9..b4c6573 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_back(); } else { ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 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 efae3866d2f3ff23f403d81f58e719a69bf070e9 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 Signed-off-by: Fridrich Štrba fridrich.st...@bluewin.ch diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 54a7825..9bf93d2 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] .: Branch 'libreoffice-3-5' - sw/source
sw/source/ui/docvw/PageBreakWin.cxx |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) New commits: commit 66cf06ebdd4eeb95e801de114af06b49119fc7fe 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 (cherry picked from commit 9baee86cbdec44c657d06f355bdba0537fb12a1a) Signed-off-by: Tor Lillqvist tlillqv...@suse.com 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] .: Branch 'libreoffice-3-5' - sw/source
sw/source/ui/lingu/olmenu.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0fe67dc40760b4ff7cdc1325bb4e97a3ce259ccb Author: László Németh nem...@numbertext.org Date: Tue Dec 13 21:35:25 2011 +0100 Fix FullCommentURL for grammar checking (local menu) Signed-off-by: Cédric Bosdonnat cedric.bosdonnat@free.fr diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 0e1a7cd..b85dfaa 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -589,7 +589,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) beans::PropertyValues aProperties = rResult.aErrors[ nErrorInResult ].aProperties; { sal_Int32 i = 0; -while ( !sExplanationLink.isEmpty() i aProperties.getLength() ) +while ( sExplanationLink.isEmpty() i aProperties.getLength() ) { if ( aProperties[i].Name.equalsAscii( FullCommentURL ) ) { ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/layout/paintfrm.cxx |3 + sw/source/ui/docvw/HeaderFooterWin.cxx | 97 +++-- sw/source/ui/docvw/PageBreakWin.cxx| 46 +++ sw/source/ui/inc/HeaderFooterWin.hxx |1 4 files changed, 70 insertions(+), 77 deletions(-) New commits: commit de03d27c597b1f56d5d68d1a8181e2889dc5b1cb Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Mon Feb 13 11:20:22 2012 +0100 Header/Footer, Page Break: don't show them in RO mode (fdo#45548) Signed-off-by: Jan Holesovsky ke...@suse.cz diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index dced1b7..f7be549 100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3341,6 +3341,7 @@ void SwPageFrm::PaintBreak( ) const { if ( pGlobalShell-GetOut()-GetOutDevType() != OUTDEV_PRINTER !pGlobalShell-GetViewOptions()-IsPDFExport() + !pGlobalShell-GetViewOptions()-IsReadonly() !pGlobalShell-IsPreView() ) { const SwFrm* pBodyFrm = Lower(); @@ -3377,6 +3378,7 @@ void SwColumnFrm::PaintBreak( ) const { if ( pGlobalShell-GetOut()-GetOutDevType() != OUTDEV_PRINTER !pGlobalShell-GetViewOptions()-IsPDFExport() + !pGlobalShell-GetViewOptions()-IsReadonly() !pGlobalShell-IsPreView() ) { const SwFrm* pBodyFrm = Lower(); @@ -3486,6 +3488,7 @@ void SwPageFrm::PaintDecorators( ) const if ( pGlobalShell-GetOut()-GetOutDevType() != OUTDEV_PRINTER !pGlobalShell-GetViewOptions()-IsPDFExport() !pGlobalShell-IsPreView() + !pGlobalShell-GetViewOptions()-IsReadonly() ( pGlobalShell-IsShowHeaderFooterSeparator( Header ) || pGlobalShell-IsShowHeaderFooterSeparator( Footer ) ) ) { diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index 330c1ff..32e8767 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -148,7 +148,6 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag SwFrameControl( pEditWin, pPageFrm ), m_sLabel( ), m_bIsHeader( bHeader ), -m_bReadonly( false ), m_pPopupMenu( NULL ), m_pLine( NULL ), m_bIsAppearing( false ), @@ -329,57 +328,54 @@ void SwHeaderFooterWin::Paint( const Rectangle ) com::sun::star::lang::Locale(), aLineColor ) ); -// Create the 'plus' or 'arrow' primitive if not readonly -if ( !m_bReadonly ) -{ -B2DRectangle aSignArea( B2DPoint( aRect.Right() - BUTTON_WIDTH, 0.0 ), -B2DSize( aRect.Right(), aRect.getHeight() ) ); +// Create the 'plus' or 'arrow' primitive +B2DRectangle aSignArea( B2DPoint( aRect.Right() - BUTTON_WIDTH, 0.0 ), +B2DSize( aRect.Right(), aRect.getHeight() ) ); -B2DPolygon aSign; -if ( IsEmptyHeaderFooter( ) ) -{ -// Create the + polygon -double nLeft = aSignArea.getMinX() + TEXT_PADDING; -double nRight = aSignArea.getMaxX() - TEXT_PADDING; -double nHalfW = ( nRight - nLeft ) / 2.0; - -double nTop = aSignArea.getCenterY() - nHalfW; -double nBottom = aSignArea.getCenterY() + nHalfW; - -aSign.append( B2DPoint( nLeft, aSignArea.getCenterY() - 1.0 ) ); -aSign.append( B2DPoint( aSignArea.getCenterX() - 1.0, aSignArea.getCenterY() - 1.0 ) ); -aSign.append( B2DPoint( aSignArea.getCenterX() - 1.0, nTop ) ); -aSign.append( B2DPoint( aSignArea.getCenterX() + 1.0, nTop ) ); -aSign.append( B2DPoint( aSignArea.getCenterX() + 1.0, aSignArea.getCenterY() - 1.0 ) ); -aSign.append( B2DPoint( nRight, aSignArea.getCenterY() - 1.0 ) ); -aSign.append( B2DPoint( nRight, aSignArea.getCenterY() + 1.0 ) ); -aSign.append( B2DPoint( aSignArea.getCenterX() + 1.0, aSignArea.getCenterY() + 1.0 ) ); -aSign.append( B2DPoint( aSignArea.getCenterX() + 1.0, nBottom ) ); -aSign.append( B2DPoint( aSignArea.getCenterX() - 1.0, nBottom ) ); -aSign.append( B2DPoint( aSignArea.getCenterX() - 1.0, aSignArea.getCenterY() + 1.0 ) ); -aSign.append( B2DPoint( nLeft, aSignArea.getCenterY() + 1.0 ) ); -aSign.setClosed( true ); -} -else -{ -// Create the v polygon -B2DPoint aLeft( aSignArea.getMinX() + TEXT_PADDING, aSignArea.getCenterY() ); -B2DPoint aRight( aSignArea.getMaxX() - TEXT_PADDING, aSignArea.getCenterY() ); -B2DPoint aBottom( ( aLeft.getX() + aRight.getX() ) / 2.0, aLeft.getY() + 4.0 ); -aSign.append( aLeft ); -aSign.append( aRight ); -aSign.append( aBottom ); -
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/layout/paintfrm.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit b7c1826f1babea87835f082a86ff9209fd9e614a Author: Ivan Timofeev timofeev@gmail.com Date: Mon Feb 13 19:34:58 2012 +0400 Header/Footer: don't show in web layout mode (cherry picked from commit 19d80a257b0e5c9d45985e49f33493f38c5d5f10) Signed-off-by: Caolán McNamara caol...@redhat.com diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index f7be549..4de8650 100755 --- 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] .: Branch 'libreoffice-3-5' - sw/source
sw/source/ui/uiview/viewport.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit 77249060109a68783358af87a2bcdfc4c710d760 Author: Ivan Timofeev timofeev@gmail.com Date: Thu Feb 9 21:06:06 2012 +0400 always use the *real* visibility of the SwScrollbar [this is a follow-up of fdo#30788] Signed-off-by: Jan Holesovsky ke...@suse.cz diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx index e4fc725..2ba6b0a 100644 --- a/sw/source/ui/uiview/viewport.cxx +++ b/sw/source/ui/uiview/viewport.cxx @@ -838,9 +838,7 @@ void SwView::CalcAndSetBorderPixel( SvBorder rToFill, sal_Bool /*bInner*/ ) else rToFill.Right() = nTmp; } -//#i32913# in browse mode the visibility of the horizontal scrollbar -// depends on the content (fixed width tables may require a scrollbar) -if ( pHScrollbar-IsVisible(pWrtShell-GetViewOptions()-getBrowseMode()) ) +if ( pHScrollbar-IsVisible(sal_True) ) rToFill.Bottom() = nTmp; SetBorderPixel( rToFill ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/undo/undobj.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit de998662158e3654ac14469989d27ce963cce935 Author: Michael Stahl mst...@redhat.com Date: Mon Feb 6 22:01:27 2012 +0100 fdo#38745: fix hilariously stupid stack guards: The UndoRedoRedlineGuards that SwUndo::{Un,Re}doWithContext wants to put on the stack aren't actually variables, so the destructor gets invoked before the function call that the guard is supposed to protect. Regression from CWS undoapi. (cherry picked from commit 13424b43c25389e303774c3fb2f2beb3e20ceae5) Signed-off-by: Stephan Bergmann sberg...@redhat.com diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index f815398..b2a5243 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -249,7 +249,7 @@ void SwUndo::UndoWithContext(SfxUndoContext rContext) dynamic_cast ::sw::UndoRedoContext * ( rContext)); OSL_ASSERT(pContext); if (!pContext) { return; } -UndoRedoRedlineGuard(*pContext, *this); +UndoRedoRedlineGuard const g(*pContext, *this); UndoImpl(*pContext); } @@ -259,7 +259,7 @@ void SwUndo::RedoWithContext(SfxUndoContext rContext) dynamic_cast ::sw::UndoRedoContext * ( rContext)); OSL_ASSERT(pContext); if (!pContext) { return; } -UndoRedoRedlineGuard(*pContext, *this); +UndoRedoRedlineGuard const g(*pContext, *this); RedoImpl(*pContext); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/layout/paintfrm.cxx | 16 1 file changed, 16 insertions(+) New commits: commit 52416a69ccb2bc9f6d5de89ff92086ec78d3dd66 Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Tue Jan 31 15:39:54 2012 +0100 fdo#44836: Hide all the page breaks of the pages before the first visible one Signed-off-by: Petr Mladek pmla...@suse.cz diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 074a54a..dced1b7 100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2850,6 +2850,22 @@ SwRootFrm::Paint(SwRect const rRect, SwPrintData const*const pPrintData) const // #i68597# const bool bGridPainting(pSh-GetWin() pSh-Imp()-HasDrawView() pSh-Imp()-GetDrawView()-IsGridVisible()); +// Hide all page break controls before showing them again +SwWrtShell* pWrtSh = dynamic_cast SwWrtShell* ( pGlobalShell ); +if ( pWrtSh ) +{ +SwEditWin rEditWin = pWrtSh-GetView().GetEditWin(); +SwFrameControlsManager rMngr = rEditWin.GetFrameControlsManager(); +const SwPageFrm* pHiddenPage = pPage; +while ( pHiddenPage-GetPrev() != NULL ) +{ +pHiddenPage = static_cast const SwPageFrm* ( pHiddenPage-GetPrev() ); +SwFrameControlPtr pControl = rMngr.GetControl( PageBreak, pHiddenPage ); +if ( pControl.get() ) +pControl-ShowAll( false ); +} +} + // #i76669# SwViewObjectContactRedirector aSwRedirector( *pSh ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/filter/ww8/ww8scan.cxx | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) New commits: commit 6594688df45cb491042470c4ae5289c47192994a 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) Signed-off-by: Michael Meeks michael.me...@suse.com diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 9ef2ff9..b149478 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -1996,10 +1996,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 @@ -2154,9 +2155,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) { @@ -2335,10 +2334,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] .: Branch 'libreoffice-3-5' - sw/source
sw/source/filter/rtf/swparrtf.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 85fb62b9103428ee83e5b9f9ef7bdcb736e04ff9 Author: Miklos Vajna vmik...@frugalware.org Date: Wed Jan 25 16:33:25 2012 +0100 fdo#43869 use the old rtf importer for paste Signed-off-by: Cédric Bosdonnat cedric.bosdon...@free.fr diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 5378d07..2fc6756 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] .: Branch 'libreoffice-3-5' - 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 17ccd3cfc9dd86e2911a0a31f6dcbba8d7e7950a 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 (cherry picked from commit db0f839920c38973f8448df0f74de7c4c95c832c) Signed-off-by: Michael Stahl mst...@redhat.com diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 36643e4..ca700d0 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1189,6 +1189,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 ) @@ -1213,7 +1220,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 ); } } @@ -1268,6 +1283,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 a56f584..7b4b738 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -470,6 +470,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 ); } @@ -477,6 +479,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] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/frmedt/fefly1.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 4463a523ae78a9eff1776668825ec6be944c1574 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] .: Branch 'libreoffice-3-5' - sw/source
sw/source/ui/table/tabledlg.src |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit ee61862a385466be28eede2def90674df891fd6e 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] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/edit/edtox.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 376488f5747cdbcfc4905aa12a531a266303658d 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 ba104fc..282becc 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -430,7 +430,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] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/edit/eddel.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 71f9c3a5c108161661d047beb7d63352622a0474 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] .: Branch 'libreoffice-3-5' - sw/source
sw/source/ui/docvw/DashedLine.cxx |8 sw/source/ui/docvw/HeaderFooterWin.cxx |3 +-- sw/source/ui/docvw/PageBreakWin.cxx|7 +++ sw/source/ui/inc/DashedLine.hxx|4 ++-- 4 files changed, 10 insertions(+), 12 deletions(-) New commits: commit 3b5a556fe6b1de0e71af2fae554e48b0553e750c Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Wed Jan 4 15:20:22 2012 +0100 Page Break, Header/Footer: fixed the line color change if config changes diff --git a/sw/source/ui/docvw/DashedLine.cxx b/sw/source/ui/docvw/DashedLine.cxx index 0470733..3cb66b1 100644 --- a/sw/source/ui/docvw/DashedLine.cxx +++ b/sw/source/ui/docvw/DashedLine.cxx @@ -36,9 +36,9 @@ #include svx/sdr/contact/objectcontacttools.hxx #include vcl/svapp.hxx -SwDashedLine::SwDashedLine( Window* pParent, const basegfx::BColor rColor ) : +SwDashedLine::SwDashedLine( Window* pParent, Color ( *pColorFn )() ) : FixedLine( pParent, WB_DIALOGCONTROL | WB_HORZ ), -m_aColor( rColor ) +m_pColorFn( pColorFn ) { } @@ -69,7 +69,7 @@ void SwDashedLine::Paint( const Rectangle ) const StyleSettings rSettings = Application::GetSettings().GetStyleSettings(); std::vector double aStrokePattern; -basegfx::BColor aColor = m_aColor; +basegfx::BColor aColor = m_pColorFn().getBColor(); if ( rSettings.GetHighContrastMode( ) ) { // Only a solid line in high contrast mode @@ -103,7 +103,7 @@ void SwDashedLine::Paint( const Rectangle ) drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D * pLine = new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D ( basegfx::B2DPolyPolygon( aPolygon ), -drawinglayer::attribute::LineAttribute( m_aColor ), +drawinglayer::attribute::LineAttribute( m_pColorFn().getBColor() ), drawinglayer::attribute::StrokeAttribute( aStrokePattern ) ); aSeq[ aSeq.getLength() - 1 ] = drawinglayer::primitive2d::Primitive2DReference( pLine ); diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index df39978..180b975 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -163,8 +163,7 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag SetMapMode( MapMode ( MAP_PIXEL ) ); // Create the line control -basegfx::BColor aColor = SwViewOption::GetHeaderFooterMarkColor().getBColor(); -m_pLine = new SwDashedLine( GetEditWin(), aColor ); +m_pLine = new SwDashedLine( GetEditWin(), SwViewOption::GetHeaderFooterMarkColor ); m_pLine-SetZOrder( this, WINDOW_ZORDER_BEFOR ); // Create and set the PopupMenu diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index 7c1f00e..4799320 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -160,8 +160,8 @@ namespace SwPageBreakWin* m_pWin; public: -SwBreakDashedLine( Window* pParent, const BColor rColor, SwPageBreakWin* pWin ) : -SwDashedLine( pParent, rColor ), +SwBreakDashedLine( Window* pParent, Color ( *pColorFn )(), SwPageBreakWin* pWin ) : +SwDashedLine( pParent, pColorFn ), m_pWin( pWin ) {}; virtual void MouseMove( const MouseEvent rMEvt ); @@ -206,8 +206,7 @@ SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm ) SetMapMode( MapMode ( MAP_PIXEL ) ); // Create the line control -BColor aColor = SwViewOption::GetPageBreakColor().getBColor(); -m_pLine = new SwBreakDashedLine( GetEditWin(), aColor, this ); +m_pLine = new SwBreakDashedLine( GetEditWin(), SwViewOption::GetPageBreakColor, this ); // Create the popup menu m_pPopupMenu = new PopupMenu( SW_RES( MN_PAGEBREAK_BUTTON ) ); diff --git a/sw/source/ui/inc/DashedLine.hxx b/sw/source/ui/inc/DashedLine.hxx index 671024a..21719ea 100644 --- a/sw/source/ui/inc/DashedLine.hxx +++ b/sw/source/ui/inc/DashedLine.hxx @@ -35,10 +35,10 @@ */ class SwDashedLine : public FixedLine { -basegfx::BColor m_aColor; +Color (*m_pColorFn)(); public: -SwDashedLine( Window* pParent, const basegfx::BColor rColor ); +SwDashedLine( Window* pParent, Color ( *pColorFn )() ); ~SwDashedLine( ); virtual void Paint( const Rectangle rRect ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/filter/ww8/rtfexportfilter.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit 99fccadd08d41e8a4abcc062d075886d4a0910be Author: Miklos Vajna vmik...@frugalware.org Date: Tue Jan 3 12:22:45 2012 +0100 fdo#37161 RTF: update layout (if present) before export (cherry picked from commit 83fbebfea32b27cd722466607aa978244ac53575) diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx index 7c59694..257c43b 100644 --- a/sw/source/filter/ww8/rtfexportfilter.cxx +++ b/sw/source/filter/ww8/rtfexportfilter.cxx @@ -31,6 +31,7 @@ #include rtfexport.hxx #include docsh.hxx +#include editsh.hxx #include unotxdoc.hxx #include comphelper/mediadescriptor.hxx @@ -72,6 +73,12 @@ sal_Bool RtfExportFilter::filter( const uno::Sequence beans::PropertyValue a return sal_False; } +// fdo#37161 - update layout (if present), for SwWriteTable +ViewShell* pViewShell = NULL; +pDoc-GetEditShell(pViewShell); +if (pViewShell != NULL) +pViewShell-CalcLayout(); + // get SwPaM* // we get SwPaM for the entire document; copypaste is handled internally, not via UNO SwPaM aPam( pDoc-GetNodes().GetEndOfContent() ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/ui/index/cnttab.src |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 02870470f069120dc0e65b2cdfef5fd2c426e1e9 Author: Jan Holesovsky ke...@suse.cz Date: Tue Dec 27 13:19:42 2011 +0100 Fix position of the 'evaluate up to level' text and numeric field. diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src index 821a2c7..71f034d 100644 --- a/sw/source/ui/index/cnttab.src +++ b/sw/source/ui/index/cnttab.src @@ -196,14 +196,14 @@ TabPage TP_TOX_SELECT }; FixedText FT_LEVEL { -Pos = MAP_APPFONT ( 130 , 70 ) ; -Size = MAP_APPFONT ( 60 , 8 ) ; +Pos = MAP_APPFONT ( 130 , 72 ) ; +Size = MAP_APPFONT ( 95 , 8 ) ; Text [ en-US ] = Evaluate up to level; }; NumericFieldNF_LEVEL { HelpID = sw:NumericField:TP_TOX_SELECT:NF_LEVEL; -Pos = MAP_APPFONT ( 231 , 72 ) ; +Pos = MAP_APPFONT ( 231 , 70 ) ; Size = MAP_APPFONT ( 20 , 12 ) ; Border = TRUE ; TabStop = TRUE ; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source vcl/source
sw/source/ui/index/cnttab.src |2 +- vcl/source/window/tabdlg.cxx |7 +++ 2 files changed, 4 insertions(+), 5 deletions(-) New commits: commit 114b4806e9233140fc42cba0b174a8f21e323a79 Author: Jan Holesovsky ke...@suse.cz Date: Tue Dec 27 15:41:22 2011 +0100 Thanks to Ivan Timofeev, fix the 'Preview' checkbox in 'Indexes and Tables...' diff --git a/sw/source/ui/index/cnttab.src b/sw/source/ui/index/cnttab.src index 71f034d..c2ce533 100644 --- a/sw/source/ui/index/cnttab.src +++ b/sw/source/ui/index/cnttab.src @@ -106,7 +106,7 @@ TabDialog DLG_MULTI_TOX }; CheckBox CB_SHOWEXAMPLE { -Size = MAP_APPFONT ( 200, 10 ) ; +Size = MAP_APPFONT ( 45, 10 ) ; Text [ en-US ] = Preview; }; Text [ en-US ] = Insert Index/Table; diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx index eaf4a14..9313211 100644 --- a/vcl/source/window/tabdlg.cxx +++ b/vcl/source/window/tabdlg.cxx @@ -61,12 +61,11 @@ void TabDialog::ImplPosControls() pTabControl = (TabControl*)pChild; else if ( pTabControl ) { -long nTxtWidth = pChild-GetCtrlTextWidth( pChild-GetText() ); -nTxtWidth += IMPL_EXTRA_BUTTON_WIDTH; +Size aOptimalSize( pChild-GetOptimalSize( WINDOWSIZE_PREFERRED ) ); +long nTxtWidth = aOptimalSize.Width(); if ( nTxtWidth aCtrlSize.Width() ) aCtrlSize.Width() = nTxtWidth; -long nTxtHeight = pChild-GetTextHeight(); -nTxtHeight += IMPL_EXTRA_BUTTON_HEIGHT; +long nTxtHeight = aOptimalSize.Height(); if ( nTxtHeight aCtrlSize.Height() ) aCtrlSize.Height() = nTxtHeight; nDownCtrl++; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/ui/index/idxmrk.src |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d3912cccfa4ae18c8d8b14b0bdc9f78b6ed87c54 Author: Lior Kaplan kaplanl...@gmail.com Date: Tue Dec 27 00:08:29 2011 +0200 Remove an unnecessary full stop diff --git a/sw/source/ui/index/idxmrk.src b/sw/source/ui/index/idxmrk.src index 31c2ee7..af743fa 100644 --- a/sw/source/ui/index/idxmrk.src +++ b/sw/source/ui/index/idxmrk.src @@ -251,7 +251,7 @@ Text [ en-US ] = Phonetic reading;\ Pos = MAP_APPFONT ( IDX_COL1 , 90 ) ; \ Size = MAP_APPFONT ( 140 , 12 ) ; \ Hide = TRUE; \ -Text [ en-US ] = ~Apply to all similar texts.;\ +Text [ en-US ] = ~Apply to all similar texts;\ }; \ CheckBox CB_CASESENSITIVE \ { \ ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/tox/tox.cxx|4 +++- sw/source/ui/index/cnttab.cxx |2 +- 2 files changed, 4 insertions(+), 2 deletions(-) New commits: commit dfa082d3836d34b19a07b326c46d1e069ed5f50b Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Fri Dec 23 11:27:26 2011 +0100 Writer: Hyperlinks on ToX have 'Index Link' style by default diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index 002dabf..cc949ed 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -323,7 +323,9 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237# SwFormTokens aTokens; if (TOX_CONTENT == eType) { -aTokens.push_back(SwFormToken(TOKEN_LINK_START)); +SwFormToken aLinkStt (TOKEN_LINK_START); +aLinkStt.sCharStyleName = String(SW_RES(STR_POOLCHR_TOXJUMP)); +aTokens.push_back(aLinkStt); aTokens.push_back(SwFormToken(TOKEN_ENTRY_NO)); aTokens.push_back(SwFormToken(TOKEN_ENTRY_TEXT)); } diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index cab0b19..dfb2ab5 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -2441,7 +2441,7 @@ IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, PushButton*, pBtn) { sText.AssignAscii(SwForm::aFormLinkStt); eTokenType = TOKEN_LINK_START; -sCharStyle = String(SW_RES(STR_POOLCHR_INET_NORMAL)); +sCharStyle = String(SW_RES(STR_POOLCHR_TOXJUMP)); } else if(pBtn == aTabPB) { ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source vcl/inc
sw/source/ui/docvw/PageBreakWin.cxx | 77 +--- sw/source/ui/inc/PageBreakWin.hxx |2 vcl/inc/vcl/menubtn.hxx |3 - 3 files changed, 50 insertions(+), 32 deletions(-) New commits: commit e095be2fd4a54d7cd876a6d2f86363a99ddb5ed8 Author: Jan Holesovsky ke...@suse.cz Date: Thu Dec 22 11:59:36 2011 +0100 Improve usability of the Page Break control. - use the same fade in/out values that we use for headers/footers - clicking on the line opens the menu too - clicking outside the menu hides the button - leaving the line or the button hides the button immediately diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index 9279c00..7c1f00e 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -68,7 +68,7 @@ using namespace drawinglayer::primitive2d; namespace { -B2DPolygon lcl_CreatePolygon( B2DRectangle aBounds, bool bMirror ) +static B2DPolygon lcl_CreatePolygon( B2DRectangle aBounds, bool bMirror ) { B2DPolygon aRetval; const double nRadius = 1; @@ -164,17 +164,33 @@ namespace SwDashedLine( pParent, rColor ), m_pWin( pWin ) {}; - virtual void MouseMove( const MouseEvent rMEvt ); +virtual void MouseButtonDown( const MouseEvent rMEvt ); }; void SwBreakDashedLine::MouseMove( const MouseEvent rMEvt ) { if ( rMEvt.IsLeaveWindow() ) -m_pWin-Fade( false ); +{ +// don't fade if we just move to the 'button' +Rectangle aRect( m_pWin-GetPosPixel(), m_pWin-GetSizePixel() ); +Point aEventPos( GetPosPixel() + rMEvt.GetPosPixel() ); +if ( !aRect.IsInside( aEventPos ) ) +m_pWin-Fade( false ); +} else if ( !m_pWin-IsVisible() ) m_pWin-Fade( true ); } + +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 ) : @@ -195,9 +211,10 @@ SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm ) // Create the popup menu m_pPopupMenu = new PopupMenu( SW_RES( MN_PAGEBREAK_BUTTON ) ); +m_pPopupMenu-SetDeactivateHdl( LINK( this, SwPageBreakWin, HideHandler ) ); SetPopupMenu( m_pPopupMenu ); -m_aFadeTimer.SetTimeout( 500 ); +m_aFadeTimer.SetTimeout( 50 ); m_aFadeTimer.SetTimeoutHdl( LINK( this, SwPageBreakWin, FadeHandler ) ); } @@ -383,7 +400,13 @@ void SwPageBreakWin::Select( ) void SwPageBreakWin::MouseMove( const MouseEvent rMEvt ) { if ( rMEvt.IsLeaveWindow() ) -Fade( false ); +{ +// don't fade if we just move to the 'line', or the popup menu is open +Rectangle aRect( m_pLine-GetPosPixel(), m_pLine-GetSizePixel() ); +Point aEventPos( GetPosPixel() + rMEvt.GetPosPixel() ); +if ( !aRect.IsInside( aEventPos ) !PopupMenu::IsInExecute() ) +Fade( false ); +} else if ( !IsVisible() ) Fade( true ); } @@ -457,13 +480,13 @@ void SwPageBreakWin::UpdatePosition( ) long nRight = std::min( nPgRight + aBtnSize.getWidth() - ARROW_WIDTH / 2, aVisArea.Right() ); nBtnLeft = nRight - aBtnSize.getWidth(); if ( IsVisible() ) - nLineRight = nBtnLeft - ARROW_WIDTH / 2; + nLineRight = nBtnLeft; } else { nBtnLeft = std::max( nPgLeft - aBtnSize.Width() + ARROW_WIDTH / 2, aVisArea.Left() ); if ( IsVisible() ) - nLineLeft = nBtnLeft + aBtnSize.Width( ) + ARROW_WIDTH / 2; + nLineLeft = nBtnLeft + aBtnSize.Width(); } // Set the button position @@ -493,22 +516,26 @@ void SwPageBreakWin::SetReadonly( bool bReadonly ) void SwPageBreakWin::Fade( bool bFadeIn ) { -if ( !PopupMenu::IsInExecute() ) -{ -m_bIsAppearing = bFadeIn; -if ( !m_bDestroyed m_aFadeTimer.IsActive( ) ) -m_aFadeTimer.Stop(); -if ( !m_bDestroyed ) -m_aFadeTimer.Start( ); -} +m_bIsAppearing = bFadeIn; +if ( !m_bDestroyed m_aFadeTimer.IsActive( ) ) +m_aFadeTimer.Stop(); +if ( !m_bDestroyed ) +m_aFadeTimer.Start( ); +} + +IMPL_LINK( SwPageBreakWin, HideHandler, void *, EMPTYARG ) +{ +Fade( false ); + +return 0; } IMPL_LINK( SwPageBreakWin, FadeHandler, Timer *, EMPTYARG ) { if ( m_bIsAppearing m_nFadeRate 0 ) -m_nFadeRate -= 10; +m_nFadeRate -= 25; else if ( !m_bIsAppearing m_nFadeRate 100 ) -m_nFadeRate += 10; +m_nFadeRate += 25; if ( m_nFadeRate != 100 !IsVisible() )
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/layout/paintfrm.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit e09b9a635ee23ce162e1733fc804a2cc182bc25f Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Wed Dec 21 22:09:46 2011 +0100 Header/Footer,Page Break: fix bad test for printing mode (fdo#43962) diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index c33da28..387d8a3 100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3323,7 +3323,7 @@ drawinglayer::primitive2d::Primitive2DSequence lcl_CreateDashedIndicatorPrimitiv void SwPageFrm::PaintBreak( ) const { -if ( !pGlobalShell-GetViewOptions()-IsPrinting() +if ( pGlobalShell-GetOut()-GetOutDevType() != OUTDEV_PRINTER !pGlobalShell-GetViewOptions()-IsPDFExport() !pGlobalShell-IsPreView() ) { @@ -3358,7 +3358,7 @@ void SwPageFrm::PaintBreak( ) const void SwColumnFrm::PaintBreak( ) const { -if ( !pGlobalShell-GetViewOptions()-IsPrinting() +if ( pGlobalShell-GetOut()-GetOutDevType() != OUTDEV_PRINTER !pGlobalShell-GetViewOptions()-IsPDFExport() !pGlobalShell-IsPreView() ) { @@ -3465,7 +3465,7 @@ void SwPageFrm::PaintDecorators( ) const { SwRect aBodyRect( pBody-Frm() ); -if ( !pGlobalShell-GetViewOptions()-IsPrinting() +if ( pGlobalShell-GetOut()-GetOutDevType() != OUTDEV_PRINTER !pGlobalShell-GetViewOptions()-IsPDFExport() !pGlobalShell-IsPreView() pGlobalShell-IsShowHeaderFooterSeparator( ) ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/access/acccontext.cxx | 15 +++ 1 file changed, 15 insertions(+) New commits: commit 33e1bb84abcb1ba60595a26884f8772249f7416b Author: Vincent Povirk madewokh...@gmail.com Date: Mon Dec 19 14:51:18 2011 +0100 sw: Fix cursor accessibility API (fdo#43390) diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index 8c38ba1..2949c1e 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -40,6 +40,7 @@ #include viewsh.hxx #include crsrsh.hxx #include fesh.hxx +#include wrtsh.hxx #include txtfrm.hxx #include ndtxt.hxx #include pagefrm.hxx @@ -1359,6 +1360,10 @@ sal_Bool SwAccessibleContext::Select( SwPaM *pPaM, SdrObject *pObj, if( pFEShell ) pFEShell-FinishOLEObj(); +SwWrtShell* pWrtShell = pCrsrShell-ISA( SwWrtShell ) +? static_castSwWrtShell*( pCrsrShell ) +: 0; + sal_Bool bRet = sal_False; if( pObj ) { @@ -1383,7 +1388,17 @@ sal_Bool SwAccessibleContext::Select( SwPaM *pPaM, SdrObject *pObj, bCallShowCrsr = sal_True; } pCrsrShell-KillPams(); +if( pWrtShell pPaM-HasMark() ) +// We have to do this or SwWrtShell can't figure out that it needs +// to kill the selection later, when the user moves the cursor. +pWrtShell-SttSelect(); pCrsrShell-SetSelection( *pPaM ); +if( pPaM-HasMark() *pPaM-GetPoint() == *pPaM-GetMark()) +// Setting a Selection that starts and ends at the same spot +// should remove the selection rather than create an empty one, so +// that we get defined behavior if accessibility sets the cursor +// later. +pCrsrShell-ClearMark(); if( bCallShowCrsr ) pCrsrShell-ShowCrsr(); bRet = sal_True; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/unocore/unotext.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit a327cd771e18b8677567f576e3bd88b69d2ee200 Author: Noel Power noel.po...@novell.com Date: Mon Dec 19 16:11:04 2011 +0100 sw: avoid creating cursor with non-text node text range (fdo#40195) diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 28ff73f..820239f 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2480,6 +2480,9 @@ throw (uno::RuntimeException) SwUnoInternalPaM aPam(*GetDoc()); if (::sw::XTextRangeToSwPaM(aPam, xTextPosition)) { +if ( !aPam.GetNode()-GetTxtNode() ) +throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(Invalid text range) ), uno::Reference uno::XInterface () ); + SwNode rNode = GetDoc()-GetNodes().GetEndOfContent(); SwStartNode* p1 = aPam.GetNode()-StartOfSectionNode(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/ui/dbui/mmmergepage.src | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 3c6197f501c1b6d59ebb4dabad5a129b62c6f051 Author: Ivan Timofeev timofeev@gmail.com Date: Mon Dec 19 09:23:33 2011 +0400 mailmerge: move overlapped controls diff --git a/sw/source/ui/dbui/mmmergepage.src b/sw/source/ui/dbui/mmmergepage.src index a66480a..93b9390 100644 --- a/sw/source/ui/dbui/mmmergepage.src +++ b/sw/source/ui/dbui/mmmergepage.src @@ -69,8 +69,8 @@ TabPage DLG_MM_MERGE_PAGE Edit ED_FIND { HelpID = sw:Edit:DLG_MM_MERGE_PAGE:ED_FIND; -Pos = MAP_APPFONT ( 55 ,114 ) ; -Size = MAP_APPFONT ( 140 , 12 ) ; +Pos = MAP_APPFONT ( 65 ,114 ) ; +Size = MAP_APPFONT ( 130 , 12 ) ; Border = TRUE; }; PushButton PB_FIND @@ -83,21 +83,21 @@ TabPage DLG_MM_MERGE_PAGE CheckBox CB_WHOLEWORDS { HelpID = sw:CheckBox:DLG_MM_MERGE_PAGE:CB_WHOLEWORDS; -Pos = MAP_APPFONT ( 55 , 131 ) ; +Pos = MAP_APPFONT ( 65 , 131 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; Text [ en-US ] = Whole wor~ds only; }; CheckBox CB_BACKWARDS { HelpID = sw:CheckBox:DLG_MM_MERGE_PAGE:CB_BACKWARDS; -Pos = MAP_APPFONT ( 55 , 144 ) ; +Pos = MAP_APPFONT ( 65 , 144 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; Text [ en-US ] = Back~wards; }; CheckBox CB_MATCHCASE { HelpID = sw:CheckBox:DLG_MM_MERGE_PAGE:CB_MATCHCASE; -Pos = MAP_APPFONT ( 55 , 157 ) ; +Pos = MAP_APPFONT ( 65 , 157 ) ; Size = MAP_APPFONT ( 180 , 10 ) ; Text [ en-US ] = Ma~tch case; }; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/filter/ww8/rtfattributeoutput.cxx |8 ++-- sw/source/filter/ww8/rtfattributeoutput.hxx |4 2 files changed, 10 insertions(+), 2 deletions(-) New commits: commit ddc7af3e7963d1a625ef939ad0cd9830eb3ddd99 Author: Miklos Vajna vmik...@frugalware.org Date: Sun Dec 18 02:33:54 2011 +0100 fdo#37498 RTF export: handle url fields without a field result (cherry picked from commit 6ab183533ef543ea96e15fcc5155321298c758a8) diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 2cd6033..17b2de3 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -460,6 +460,7 @@ bool RtfAttributeOutput::StartURL( const String rUrl, const String rTarget ) } m_aStyles.append(}); +m_bHadFieldResult = false; return true; } @@ -468,7 +469,8 @@ bool RtfAttributeOutput::EndURL() OSL_TRACE(%s, OSL_THIS_FUNC); // close the fldrslt group -m_aRunText.append('}'); +if (m_bHadFieldResult) +m_aRunText.append('}'); // close the field group m_aRunText.append('}'); return true; @@ -2249,6 +2251,7 @@ void RtfAttributeOutput::TextINetFormat( const SwFmtINetFmt rURL ) const SwTxtINetFmt* pTxtAtr = rURL.GetTxtINetFmt(); m_aStyles.append({ OOO_STRING_SVTOOLS_RTF_FLDRSLT ); +m_bHadFieldResult = true; if( pTxtAtr 0 != ( pFmt = pTxtAtr-GetCharFmt() )) { sal_uInt16 nStyle = m_rExport.GetId( *pFmt ); @@ -2989,7 +2992,8 @@ RtfAttributeOutput::RtfAttributeOutput( RtfExport rExport ) m_bBufferSectionBreaks( false ), m_bBufferSectionHeaders( false ), m_bLastTable( true ), -m_bWroteCellInfo( false ) +m_bWroteCellInfo( false ), +m_bHadFieldResult( false ) { OSL_TRACE(%s, OSL_THIS_FUNC); } diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx index 856b14f..c96de2c 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.hxx +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -529,6 +529,10 @@ private: */ bool m_bWroteCellInfo; +/* + * If we had a field result in the URL. + */ +bool m_bHadFieldResult; public: RtfAttributeOutput( RtfExport rExport ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source vcl/source
sw/source/core/layout/paintfrm.cxx |4 sw/source/ui/docvw/HeaderFooterWin.cxx | 20 sw/source/ui/docvw/PageBreakWin.cxx| 16 ++-- vcl/source/control/menubtn.cxx |2 ++ vcl/source/window/floatwin.cxx |8 ++-- 5 files changed, 26 insertions(+), 24 deletions(-) New commits: commit 588857a86bcbc85e21b70ca95a9ab0c0b782a996 Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Thu Dec 15 12:02:29 2011 +0100 fdo#43790: RTL PopupMenu position fixes Fixed the Writer PageBreak and Header/Footer indicator position. It also fixed the popup menu position in RTL UI for all PopupButton instances. diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index ec104f5..c33da28 100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3470,6 +3470,8 @@ void SwPageFrm::PaintDecorators( ) const !pGlobalShell-IsPreView() pGlobalShell-IsShowHeaderFooterSeparator( ) ) { +bool bRtl = Application::GetSettings().GetLayoutRTL(); + // Header const SwFrm* pHeaderFrm = Lower(); if ( !pHeaderFrm-IsHeaderFrm() ) @@ -3477,6 +3479,8 @@ void SwPageFrm::PaintDecorators( ) const const SwRect rVisArea = pGlobalShell-VisArea(); long nXOff = std::min( aBodyRect.Right(), rVisArea.Right() ); +if ( bRtl ) +nXOff = std::max( aBodyRect.Left(), rVisArea.Left() ); long nHeaderYOff = aBodyRect.Top(); Point nOutputOff = rEditWin.LogicToPixel( Point( nXOff, nHeaderYOff ) ); diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index d3ce419..64e75e4 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -223,6 +223,11 @@ void SwHeaderFooterWin::SetOffset( Point aOffset, long nXLineStart, long nXLineE Point aBoxPos( aOffset.X() - aBoxSize.Width() - BOX_DISTANCE, aOffset.Y() - nYFooterOff ); +if ( Application::GetSettings().GetLayoutRTL() ) +{ +aBoxPos.setX( aOffset.X() + BOX_DISTANCE ); +} + // Set the position Size of the window SetPosSizePixel( aBoxPos, aBoxSize ); @@ -284,8 +289,6 @@ void SwHeaderFooterWin::Paint( const Rectangle ) aSeq[1] = Primitive2DReference( new PolygonHairlinePrimitive2D( aPolygon, aLineColor ) ); -bool bRtl = Application::GetSettings().GetLayoutRTL(); - // Create the text primitive B2DVector aFontSize; FontAttribute aFontAttr = getFontAttributeFromVclFont( @@ -296,11 +299,7 @@ void SwHeaderFooterWin::Paint( const Rectangle ) FontMetric aFontMetric = GetFontMetric( GetFont() ); double nTextOffsetY = aFontMetric.GetHeight() - aFontMetric.GetDescent() + TEXT_PADDING; -double nTextOffsetX = TEXT_PADDING; -if ( bRtl ) -nTextOffsetX = aRect.GetWidth( ) - aTextRect.GetWidth() - TEXT_PADDING; - -Point aTextPos( nTextOffsetX, nTextOffsetY ); +Point aTextPos( TEXT_PADDING, nTextOffsetY ); basegfx::B2DHomMatrix aTextMatrix( createScaleTranslateB2DHomMatrix( aFontSize.getX(), aFontSize.getY(), @@ -317,11 +316,8 @@ void SwHeaderFooterWin::Paint( const Rectangle ) // Create the 'plus' or 'arrow' primitive if not readonly if ( !m_bReadonly ) { -double aSignPosX = aRect.Right() - BUTTON_WIDTH; -if ( bRtl ) -aSignPosX = aRect.Left(); -B2DRectangle aSignArea( B2DPoint( aSignPosX, 0.0 ), -B2DSize( aSignPosX + BUTTON_WIDTH, aRect.getHeight() ) ); +B2DRectangle aSignArea( B2DPoint( aRect.Right() - BUTTON_WIDTH, 0.0 ), +B2DSize( aRect.Right(), aRect.getHeight() ) ); B2DPolygon aSign; if ( IsEmptyHeaderFooter( ) ) diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index 2194bd9..9279c00 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -68,7 +68,7 @@ using namespace drawinglayer::primitive2d; namespace { -B2DPolygon lcl_CreatePolygon( B2DRectangle aBounds, bool bShowOnRight ) +B2DPolygon lcl_CreatePolygon( B2DRectangle aBounds, bool bMirror ) { B2DPolygon aRetval; const double nRadius = 1; @@ -144,7 +144,7 @@ namespace aRetval.setClosed( true ); -if ( bShowOnRight ) +if ( bMirror ) { B2DHomMatrix bRotMatrix = createRotateAroundPoint( aBounds.getCenterX(), aBounds.getCenterY(), M_PI ); @@ -233,11 +233,13 @@ void SwPageBreakWin::Paint( const Rectangle ) } bool bShowOnRight = ShowOnRight( ); +bool bRtl = Application::GetSettings().GetLayoutRTL(); Primitive2DSequence aSeq( 3
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/layout/trvlfrm.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit c5f868147909111ad235e433d6f8368294080b35 Author: Cédric Bosdonnat cedric.bosdon...@free.fr Date: Tue Dec 13 17:25:51 2011 +0100 n#676858: Fix selection of background pictures vs text diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 4b54a68..d2c3d4e 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -31,6 +31,7 @@ #include hintids.hxx #include hints.hxx #include tools/bigint.hxx +#include editeng/opaqitem.hxx #include editeng/protitem.hxx #include vcl/settings.hxx #include vcl/outdev.hxx @@ -78,7 +79,8 @@ namespace { static_castconst SwVirtFlyDrawObj*(aIter()); const SwAnchoredObject* pAnchoredObj = GetUserCall( aIter() )-GetAnchoredObj( aIter() ); const SwFmtSurround rSurround = pAnchoredObj-GetFrmFmt().GetSurround(); -bool bInBackground = ( rSurround.GetSurround() == SURROUND_THROUGHT ); +const SvxOpaqueItem rOpaque = pAnchoredObj-GetFrmFmt().GetOpaque(); +bool bInBackground = ( rSurround.GetSurround() == SURROUND_THROUGHT ) !rOpaque.GetValue(); bool bBackgroundMatches = ( bInBackground bSearchBackground ) || ( !bInBackground !bSearchBackground ); @@ -274,7 +276,7 @@ sal_Bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point rPoint, } // TODO Pick up the best approaching selection -if ( bTextRet bBackRet ( nTextSurface nBackSurface ) ) +if ( bTextRet bBackRet ( nTextSurface nBackSurface ) ) { bRet = bBackRet; pPos-nNode = aBackPos.nNode; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/filter/ww8/docxattributeoutput.cxx | 28 ++- sw/source/filter/ww8/docxattributeoutput.hxx | 10 + 2 files changed, 17 insertions(+), 21 deletions(-) New commits: commit 5cd2ae45c3da7b018b45ce00153f7ca4791a5d11 Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Mon Dec 12 18:11:17 2011 +0100 fix docx hyperlink writing This is a rewrite of the fix for fdo#35826, needed for writing the document from bnc#706138 as docx. The sequence there is startURL(), runText(), endRun(), endUrl(), startUrl(), runText(), endUrl(), endRun(), so by the second endRun(), it is needed to close both the previous and current hyperlink run. diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 42a132d..d9f3376 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -516,8 +516,6 @@ void DocxAttributeOutput::StartRun( const SwRedlineData* pRedlineData ) void DocxAttributeOutput::EndRun() { -if ( m_nCloseHyperlinkStatus == Detected ) -m_nCloseHyperlinkStatus = EndInThisRun; // Write field starts for ( std::vectorFieldInfos::iterator pIt = m_Fields.begin(); pIt != m_Fields.end(); ++pIt ) { @@ -543,6 +541,11 @@ void DocxAttributeOutput::EndRun() // before postponed run start) m_pSerializer-mark(); // let's call it actual run start +if ( m_closeHyperlinkInPreviousRun ) +{ +m_pSerializer-endElementNS( XML_w, XML_hyperlink ); +m_closeHyperlinkInPreviousRun = false; +} // prepend the actual run start if ( m_pHyperlinkAttrList ) { @@ -551,11 +554,6 @@ void DocxAttributeOutput::EndRun() m_pSerializer-startElementNS( XML_w, XML_hyperlink, xAttrList ); m_pHyperlinkAttrList = NULL; } -if ( m_nCloseHyperlinkStatus == EndInPrevRun) -{ -m_pSerializer-endElementNS( XML_w, XML_hyperlink ); -m_nCloseHyperlinkStatus = Undetected; -} // Write the hyperlink and toc fields starts for ( std::vectorFieldInfos::iterator pIt = m_Fields.begin(); pIt != m_Fields.end(); ) @@ -592,10 +590,10 @@ void DocxAttributeOutput::EndRun() EndField_Impl( m_Fields.front( ) ); m_Fields.erase( m_Fields.begin( ) ); } -if ( m_nCloseHyperlinkStatus == EndInThisRun) +if ( m_closeHyperlinkInThisRun ) { m_pSerializer-endElementNS( XML_w, XML_hyperlink ); -m_nCloseHyperlinkStatus = Undetected; +m_closeHyperlinkInThisRun = false; } // if there is some redlining in the document, output it @@ -1043,8 +1041,11 @@ static void impl_WriteRunText( FSHelperPtr pSerializer, sal_Int32 nTextToken, void DocxAttributeOutput::RunText( const String rText, rtl_TextEncoding /*eCharSet*/ ) { -if ( m_nCloseHyperlinkStatus == Detected ) -m_nCloseHyperlinkStatus = EndInPrevRun; +if( m_closeHyperlinkInThisRun ) +{ +m_closeHyperlinkInPreviousRun = true; +m_closeHyperlinkInThisRun = false; +} OUString aText( rText ); // one text can be split into more w:tblah/w:t's by line breaks etc. @@ -1232,7 +1233,7 @@ bool DocxAttributeOutput::StartURL( const String rUrl, const String rTarget ) bool DocxAttributeOutput::EndURL() { -m_nCloseHyperlinkStatus = Detected; +m_closeHyperlinkInThisRun = true; return true; } @@ -4350,7 +4351,8 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport rExport, FSHelperPtr pSeri m_bParagraphOpened( false ), m_nColBreakStatus( COLBRK_NONE ), m_pParentFrame( NULL ), - m_nCloseHyperlinkStatus( Undetected ), + m_closeHyperlinkInThisRun( false ), + m_closeHyperlinkInPreviousRun( false ), m_postponedGraphic( NULL ), m_postponedMath( NULL ), m_postitFieldsMaxId( 0 ) diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 10ee7cd..79c8b02 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -588,14 +588,8 @@ private: const sw::Frame *m_pParentFrame; // close of hyperlink needed -enum HyperLinkCloseState -{ -Undetected = 0, -Detected, -EndInPrevRun, -EndInThisRun -}; -HyperLinkCloseState m_nCloseHyperlinkStatus; +bool m_closeHyperlinkInThisRun; +bool m_closeHyperlinkInPreviousRun; struct PostponedGraphic { ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/core/fields/reffld.cxx | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit da8d70bcac0276a4ac9dcdd65e90e16211f45dc3 Author: Cédric Bosdonnat cedric.bosdonnat@free.fr Date: Thu Dec 8 12:34:39 2011 +0100 fdo#43521: Don't shown the name of a reference field if it's empty diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index ff29f49..98111d0 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -276,10 +276,15 @@ String SwGetRefField::Expand() const String SwGetRefField::GetFieldName() const { -String aStr(GetTyp()-GetName()); -aStr += ' '; -aStr += sSetRefName; -return aStr; +if ( GetTyp()-GetName().Len() 0 || sSetRefName.Len() 0 ) +{ +String aStr(GetTyp()-GetName()); +aStr += ' '; +aStr += sSetRefName; +return aStr; +} +else +return Expand(); } // #i81002# - parameter pFldTxtAttr added ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/filter/ww8/ww8par.cxx | 69 ++-- 1 file changed, 59 insertions(+), 10 deletions(-) New commits: commit 7614f8a7781c0d33e86d7a5f0988f4e1f30087aa Author: Caolán McNamara caol...@redhat.com Date: Thu Dec 8 12:39:07 2011 + Resolves: fdo#43337 optimize weak-char overriding When writer would choose the same bias automatically that word implies or this doc hard-codes, then elide the font-forcing. (cherry picked from commit 3e6ae8428a2d9da28c392c58bf8b3b15738088ff) Signed-off-by: Caolán McNamara caol...@redhat.com diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 4d47144..9923768 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2777,6 +2777,26 @@ namespace } return nPos; } + +sal_Int32 lcl_getWriterScriptType( +const uno::Referencei18n::XBreakIterator rBI, +const rtl::OUString rString, sal_Int32 nPos) +{ +sal_Int16 nScript = i18n::ScriptType::WEAK; + +if (rString.isEmpty()) +return nScript; + +while (nPos = 0) +{ +nScript = rBI-getScriptType(rString, nPos); +if (nScript != i18n::ScriptType::WEAK) +break; +--nPos; +} + +return nScript; +} } //In writer we categorize text into CJK, CTL and Western for everything else. @@ -2817,6 +2837,14 @@ void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const rtl::OUString rAddS sal_Int16 nScript = lcl_getScriptType(xBI, rAddString, 0); sal_Int32 nLen = rAddString.getLength(); +rtl::OUString sParagraphText; +const SwCntntNode *pCntNd = pPaM-GetCntntNode(); +const SwTxtNode* pNd = pCntNd ? pCntNd-GetTxtNode() : NULL; +if (pNd) +sParagraphText = pNd-GetTxt(); +sal_Int32 nParaOffset = sParagraphText.getLength(); +sParagraphText = sParagraphText + rAddString; + sal_Int32 nPos = 0; while (nPos nLen) { @@ -2853,20 +2881,41 @@ void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const rtl::OUString rAddS break; } -const SvxFontItem *pSourceFont = (const SvxFontItem*)GetFmtAttr(nForceFromFontId); +//Now we know that word would use the nForceFromFontId font for this range +//Try and determine what script writer would assign this range to + +sal_Int32 nWriterScript = lcl_getWriterScriptType(xBI, sParagraphText, +nPos + nParaOffset); + +bool bWriterWillUseSameFontAsWordAutomatically = false; + +if ( + (nWriterScript == i18n::ScriptType::ASIAN nForceFromFontId == RES_CHRATR_CJK_FONT) || + (nWriterScript == i18n::ScriptType::COMPLEX nForceFromFontId == RES_CHRATR_CTL_FONT) || + (nWriterScript == i18n::ScriptType::LATIN nForceFromFontId == RES_CHRATR_FONT) + ) +{ +bWriterWillUseSameFontAsWordAutomatically = true; +} -for (size_t i = 0; i SAL_N_ELEMENTS(aIds); ++i) +//Writer won't use the same font as word, so force the issue +if (!bWriterWillUseSameFontAsWordAutomatically) { -const SvxFontItem *pDestFont = (const SvxFontItem*)GetFmtAttr(aIds[i]); -aForced[i] = aIds[i] != nForceFromFontId *pSourceFont != *pDestFont; -if (aForced[i]) +const SvxFontItem *pSourceFont = (const SvxFontItem*)GetFmtAttr(nForceFromFontId); + +for (size_t i = 0; i SAL_N_ELEMENTS(aIds); ++i) { -pOverriddenItems[i] = -(const SvxFontItem*)pCtrlStck-GetStackAttr(*pPaM-GetPoint(), aIds[i]); +const SvxFontItem *pDestFont = (const SvxFontItem*)GetFmtAttr(aIds[i]); +aForced[i] = aIds[i] != nForceFromFontId *pSourceFont != *pDestFont; +if (aForced[i]) +{ +pOverriddenItems[i] = +(const SvxFontItem*)pCtrlStck-GetStackAttr(*pPaM-GetPoint(), aIds[i]); -SvxFontItem aForceFont(*pSourceFont); -aForceFont.SetWhich(aIds[i]); -pCtrlStck-NewAttr(*pPaM-GetPoint(), aForceFont); +SvxFontItem aForceFont(*pSourceFont); +aForceFont.SetWhich(aIds[i]); +pCtrlStck-NewAttr(*pPaM-GetPoint(), aForceFont); +} } } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits