[Libreoffice-commits] .: Branch 'libreoffice-3-5-3' - 2 commits - sw/source
sw/source/core/layout/paintfrm.cxx | 43 - 1 file changed, 33 insertions(+), 10 deletions(-) New commits: commit 32b854ee4a63da1be42294c5afe6c62e54ae72d3 Author: Michael Stahl Date: Wed Apr 4 22:35:08 2012 +0200 fdo#45562: paint borders in SwFlyFrm::Paint: Painting borders of Flys in the heaven layer cannot be done correctly in SwRootFrm::Paint, because delaying until then paints over other drawing objects that are on top of the frame, so do it in SwFlyFrm::Paint, like the old border painting code used to. (regression from 804d0a896731629397c5328c13c04a45bc55f459) (cherry picked from commit 5913506b2193e93ca2767ab7365ab2e76ed7848f) Signed-off-by: Caolán McNamara Signed-off by: Miklos Vajna Signed-off-by: Cédric Bosdonnat diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 435571a..1fd7013 100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3031,8 +3031,6 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const if ( bExtraData ) pPage->RefreshExtraData( aPaintRect ); -// have to paint frame borders added in heaven layer here... -ProcessPrimitives(g_pBorderLines->GetBorderLines_Clear()); DELETEZ(g_pBorderLines); pVout->Leave(); @@ -3751,12 +3749,28 @@ void SwCellFrm::Paint(SwRect const& rRect, SwPrintData const*const) const void MA_FASTCALL lcl_PaintLowerBorders( const SwLayoutFrm *pLay, const SwRect &rRect, const SwPageFrm *pPage ); +struct BorderLinesGuard +{ +explicit BorderLinesGuard() : m_pBorderLines(g_pBorderLines) +{ +g_pBorderLines = new BorderLines; +} +~BorderLinesGuard() +{ +delete g_pBorderLines; +g_pBorderLines = m_pBorderLines; +} +private: +BorderLines *const m_pBorderLines; +}; + void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { //wegen der Ueberlappung von Rahmen und Zeichenobjekten muessen die //Flys ihre Umrandung (und die der Innenliegenden) direkt ausgeben. //z.B. #33066# pLines->LockLines(sal_True); +BorderLinesGuard blg; // this should not paint borders added from PaintBaBo SwRect aRect( rRect ); aRect._Intersection( Frm() ); @@ -3966,6 +3980,8 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const // and then unlock other lines. pLines->PaintLines( pOut ); pLines->LockLines( sal_False ); +// have to paint frame borders added in heaven layer here... +ProcessPrimitives(g_pBorderLines->GetBorderLines_Clear()); pOut->Pop(); commit 1a34e28c9f80542bb8c0b120421f7a02832ad038 Author: Michael Stahl Date: Fri Mar 23 14:08:31 2012 +0100 fdo#42750 fdo#45562 fdo#47717: border paint ordering: Paint borders after subsidiary lines and hell layer, but before heaven layer. (cherry picked from commit 1024c172a5bfb3d85a86fcf7a046aa2b03950edd) Signed-off-by: Caolán McNamara Signed-off-by: Miklos Vajna Signed-off-by: Cédric Bosdonnat diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 69e32ff..435571a 100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -231,9 +231,12 @@ public: { m_Lines.push_back(xLine); } -drawinglayer::primitive2d::Primitive2DSequence GetBorderLines() const +drawinglayer::primitive2d::Primitive2DSequence GetBorderLines_Clear() { -return m_Lines.getAsConstList(); +::comphelper::SequenceAsVector< +::drawinglayer::primitive2d::Primitive2DReference> lines; +::std::swap(m_Lines, lines); +return lines.getAsConstList(); } }; @@ -3002,6 +3005,16 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const } pLines->PaintLines( pSh->GetOut() ); +if ( pSh->GetWin() ) +{ +pSubsLines->PaintSubsidiary( pSh->GetOut(), pLines ); +DELETEZ( pSubsLines ); +DELETEZ( pSpecSubsLines ); +} +// fdo#42750: delay painting these until after subsidiary lines +// fdo#45562: delay painting these until after hell layer +// fdo#47717: but do it before heaven layer +ProcessPrimitives(g_pBorderLines->GetBorderLines_Clear()); if ( pSh->Imp()->HasDrawView() ) { @@ -3018,14 +3031,8 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const if ( bExtraData ) pPage->RefreshExtraData( aPaintRect ); -if ( pSh->GetWin() ) -{ -pSubs
[Libreoffice-commits] .: 3 commits - sw/inc sw/source
sw/inc/editsh.hxx | 38 +++- sw/source/core/edit/edattr.cxx | 63 +++ sw/source/ui/inc/formatclipboard.hxx|7 sw/source/ui/uiview/formatclipboard.cxx | 270 ++-- 4 files changed, 258 insertions(+), 120 deletions(-) New commits: commit 357fac9713875302d30185feabaf5c165e040ca4 Author: Maxime de Roucy Date: Wed Mar 14 16:07:57 2012 +0100 Rewrite of the format paintbrush With this patch the format paintbrush differentiate automatic character attributes apply to character than those apply to paragraph. Character attributes applied to paragraph are treat as paragraph format when paragraph format are copied (and so apply to paragraph), and treat as character format when paragraph format are not copied. It also change the behavior of the format paintbrush on "restart numbering" and "restart numbering at" attributes. With this patch those attributes are simply copied⦠as expected. diff --git a/sw/source/ui/inc/formatclipboard.hxx b/sw/source/ui/inc/formatclipboard.hxx index 4cca4e7..aa89f99 100644 --- a/sw/source/ui/inc/formatclipboard.hxx +++ b/sw/source/ui/inc/formatclipboard.hxx @@ -81,8 +81,11 @@ public: private: int m_nSelectionType; -/** automatic/named character and paragraph attribute set */ -SfxItemSet* m_pItemSet; +/** automatic/named character attribute set */ +SfxItemSet* m_pItemSet_TxtAttr; +/** automatic/named paragraph attribute set + * (it can be caractere attribute applyied to the paragraph) */ +SfxItemSet* m_pItemSet_ParAttr; /** table attribute set */ SfxItemSet* m_pTableItemSet; diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx index 61dfd31..8b09cba 100644 --- a/sw/source/ui/uiview/formatclipboard.cxx +++ b/sw/source/ui/uiview/formatclipboard.cxx @@ -84,12 +84,9 @@ RES_TEXTGRID, RES_FRMATR_END-1, #define FORMAT_PAINTBRUSH_PARAGRAPH_IDS \ RES_PARATR_BEGIN, RES_PARATR_END -1, \ RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END -1, \ -FORMAT_PAINTBRUSH_FRAME_IDS \ -FN_NUMBER_NEWSTART, FN_NUMBER_NEWSTART, \ -FN_NUMBER_NEWSTART_AT, FN_NUMBER_NEWSTART_AT, +FORMAT_PAINTBRUSH_FRAME_IDS -SfxItemSet* lcl_CreateEmptyItemSet( int nSelectionType, SfxItemPool& rPool -, bool bNoCharacterFormats = false, bool bNoParagraphFormats = false ) +SfxItemSet* lcl_CreateEmptyItemSet( int nSelectionType, SfxItemPool& rPool, bool bNoParagraphFormats = false ) { SfxItemSet* pItemSet = 0; if( nSelectionType & (nsSelectionType::SEL_FRM | nsSelectionType::SEL_OLE | nsSelectionType::SEL_GRF) ) @@ -102,30 +99,9 @@ SfxItemSet* lcl_CreateEmptyItemSet( int nSelectionType, SfxItemPool& rPool { //is handled different } -else if( nSelectionType == nsSelectionType::SEL_TBL ) -{ -pItemSet = new SfxItemSet(rPool, -SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_SHADOW, //SID_ATTR_BORDER_OUTER is inbetween -RES_BACKGROUND, RES_SHADOW, //RES_BOX is inbetween -SID_ATTR_BRUSH_ROW, SID_ATTR_BRUSH_TABLE, -RES_BREAK, RES_BREAK, -RES_PAGEDESC, RES_PAGEDESC, -RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT, -RES_ROW_SPLIT, RES_ROW_SPLIT, -RES_KEEP, RES_KEEP, -RES_FRAMEDIR, RES_FRAMEDIR, -FN_PARAM_TABLE_HEADLINE, FN_PARAM_TABLE_HEADLINE, -FN_TABLE_BOX_TEXTORIENTATION, FN_TABLE_BOX_TEXTORIENTATION, -FN_TABLE_SET_VERT_ALIGN, FN_TABLE_SET_VERT_ALIGN, -0); -} else if( nSelectionType & nsSelectionType::SEL_TXT ) { -if( bNoCharacterFormats ) -pItemSet = new SfxItemSet(rPool, -FORMAT_PAINTBRUSH_PARAGRAPH_IDS -0); -else if( bNoParagraphFormats ) +if( bNoParagraphFormats ) pItemSet = new SfxItemSet(rPool, RES_CHRATR_BEGIN, RES_CHRATR_END - 1, 0); @@ -270,20 +246,23 @@ void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh ) SwFormatClipboard::SwFormatClipboard() : m_nSelectionType(0) -, m_pItemSet(0) +, m_pItemSet_TxtAttr(0) +, m_pItemSet_ParAttr(0) , m_pTableItemSet(0) , m_bPersistentCopy(false) { } SwFormatClipboard::~SwFormatClipboard() { -delete m_pItemSet; +delete m_pItemSet_TxtAttr; +delete m_pItemSet_ParAttr; delete m_pTableItemSet; } bool SwFormatClipboard::HasContent() const { -return m_pItemSet!=0 +return m_pItemSet_TxtAttr!=0 +|| m_pItemSet_ParAttr!=0 || m_pTableItemSet != 0 || m_aCharStyle.Len() || m_aParaStyle.Len
[Libreoffice-commits] .: oox/inc oox/source
oox/inc/oox/vml/vmlshape.hxx |1 + oox/source/token/properties.txt|2 ++ oox/source/vml/vmlshape.cxx|9 - oox/source/vml/vmlshapecontext.cxx |1 + 4 files changed, 12 insertions(+), 1 deletion(-) New commits: commit 3751ab6910d06ca01d1980fce40792560afc9ebb Author: Cédric Bosdonnat Date: Fri Mar 23 15:28:29 2012 +0100 n#751573: docx, no mso-fit-shape-to-text means the textbox size is fixed diff --git a/oox/inc/oox/vml/vmlshape.hxx b/oox/inc/oox/vml/vmlshape.hxx index 37e9c09..8c68337 100644 --- a/oox/inc/oox/vml/vmlshape.hxx +++ b/oox/inc/oox/vml/vmlshape.hxx @@ -80,6 +80,7 @@ struct ShapeTypeModel ::rtl::OUString maMarginLeft; /// X position of the shape bounding box to shape anchor (number with unit). ::rtl::OUString maMarginTop;/// Y position of the shape bounding box to shape anchor (number with unit). ::rtl::OUString maPositionVerticalRelative; /// The Y position is relative to this. +sal_BoolmbAutoHeight; /// If true, the height value is a minimum value (mostly used for textboxes) StrokeModel maStrokeModel; /// Border line formatting. FillModel maFillModel;/// Shape fill formatting. diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 560f879..97555c8 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -180,6 +180,7 @@ FooterIsDynamicHeight FooterIsOn FooterIsShared FormulaConvention +FrameIsAutomaticHeight Function GapwidthSequence Geometry3D @@ -418,6 +419,7 @@ Size Size100thMM SizePixel SizeProtect +SizeType SkipDuplicates SortInfo Sound diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index bdecb8b..ec34f0e 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -113,7 +113,8 @@ Rectangle lclGetAbsRect( const Rectangle& rRelRect, const Rectangle& rShapeRect, // -ShapeTypeModel::ShapeTypeModel() +ShapeTypeModel::ShapeTypeModel(): +mbAutoHeight( sal_False ) { } @@ -368,6 +369,12 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes Reference< XShape > xShape = mrDrawing.createAndInsertXShape( maService, rxShapes, rShapeRect ); convertShapeProperties( xShape ); +if ( maService.equalsAscii( "com.sun.star.text.TextFrame" ) ) +{ +PropertySet( xShape ).setAnyProperty( PROP_FrameIsAutomaticHeight, makeAny( maTypeModel.mbAutoHeight ) ); +PropertySet( xShape ).setAnyProperty( PROP_SizeType, makeAny( maTypeModel.mbAutoHeight ? SizeType::MIN : SizeType::FIX ) ); +} + // Import Legacy Fragments (if any) if( xShape.is() && !maShapeModel.maLegacyDiagramPath.isEmpty() ) { diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index 91703fc..12d2dc4 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -347,6 +347,7 @@ void ShapeTypeContext::setStyle( const OUString& rStyle ) else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "margin-left" ) ) ) mrTypeModel.maMarginLeft = aValue; else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "margin-top" ) ) )mrTypeModel.maMarginTop = aValue; else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "mso-position-vertical-relative" ) ) ) mrTypeModel.maPositionVerticalRelative = aValue; +else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "mso-fit-shape-to-text" ) ) ) mrTypeModel.mbAutoHeight = sal_True; } } } ___ 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 | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) New commits: commit 1a412714031bf6cf3f7962b044b2edea74899b46 Author: Cédric Bosdonnat Date: Fri Mar 23 10:38:40 2012 +0100 fixed crash due to use of STL deque for SwLineRects diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index ad0e241..aa0438b 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -945,13 +945,16 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut, SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pOut ); // Remove all help line that are almost covered (tables) -for (SwSubsRects::iterator it = this->begin(); it != this->end(); ++it) +SwSubsRects::iterator it = this->begin(); +while ( it != this->end() ) { SwLineRect &rLi = *it; const bool bVerticalSubs = rLi.Height() > rLi.Width(); -for (SwSubsRects::iterator itK = it; itK != this->end(); ++itK) +SwSubsRects::iterator itK = it; +while ( itK != this->end() ) { +bool bRemoved = false; SwLineRect &rLk = (*itK); if ( rLi.SSize() == rLk.SSize() ) { @@ -969,6 +972,7 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut, // don't continue with inner loop any more: // the array may shrink! itK = this->end(); +bRemoved = true; } } else @@ -983,11 +987,17 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut, // don't continue with inner loop any more: // the array may shrink! itK = this->end(); +bRemoved = true; } } } } + +if ( !bRemoved ) +++itK; } + +++it; } if ( pRects && (!pRects->empty()) ) @@ -1008,7 +1018,7 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut, pOut->SetDrawMode( 0 ); } -for (SwSubsRects::iterator it = this->begin(); it != this->end(); ++it) +for (it = this->begin(); it != this->end(); ++it) { SwLineRect &rLRect = (*it); // Add condition to prevent paint of locked subsidiary lines. ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - 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 | 10 +++-- 5 files changed, 7 insertions(+), 67 deletions(-) New commits: commit 8a233f17ae589b33e3b54ef9ebb1fcff41ef6cd7 Author: Cédric Bosdonnat 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. diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 64f14f4..4761473 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1898,7 +1898,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 344b388..aa2ac46 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_cast(_rDoc).GetLayouter()->maFrmsNotToWrap.clear(); -} -} - -void SwLayouter::InsertFrmNotToWrap( const SwDoc& _rDoc, - const SwFrm& _rFrm ) -{ -if ( !_rDoc.GetLayouter() ) -{ -const_cast(_rDoc).SetLayouter( new SwLayouter() ); -} - -if ( !SwLayouter::FrmNotToWrap( _rDoc, _rFrm ) ) -{ -const_cast(_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()), -mrAnchorTxtFrm ); SwLayouter::RemoveMovedFwdFrm( *(mrAnchorTxtFrm.Fi
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 4 commits - sw/source writerfilter/source
sw/source/core/layout/paintfrm.cxx | 44 ++--- writerfilter/source/dmapper/BorderHandler.cxx |2 - writerfilter/source/rtftok/rtfdocumentimpl.cxx | 18 -- 3 files changed, 42 insertions(+), 22 deletions(-) New commits: commit c7524ab32f801910673da5c9c68669ada7c98769 Author: Michael Stahl Date: Fri Mar 16 15:35:49 2012 +0100 fdo#42750: delay painting borders until after subsidiary lines With commit 0f0896c26fb260d1bbf31d7a886df3f61837f0f2, borders are drawn immediately, but then the subsidiary lines are drawn over the borders, hiding 1 twip wide borders completely. Signed-off-by: Cédric Bosdonnat diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 4de8650..3a93e47 100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -119,6 +119,7 @@ #include #include #include +#include #include #include #include @@ -220,6 +221,22 @@ public: inline void Ins( const SwRect &rRect, const sal_uInt8 nSCol ); }; +class BorderLines +{ +::comphelper::SequenceAsVector< + ::drawinglayer::primitive2d::Primitive2DReference> m_Lines; +public: +void AddBorderLine( +::drawinglayer::primitive2d::Primitive2DReference const& xLine) +{ +m_Lines.push_back(xLine); +} +drawinglayer::primitive2d::Primitive2DSequence GetBorderLines() const +{ +return m_Lines.getAsConstList(); +} +}; + //- End of classes for border lines -- static ViewShell *pGlobalShell = 0; @@ -253,6 +270,7 @@ static double aEdgeScale = 0.5; // be compared with pLines before the work in order to avoid help lines // to hide borders. // bTablines is sal_True during the Paint of a table. +static BorderLines *g_pBorderLines = 0; static SwLineRects *pLines = 0; static SwSubsRects *pSubsLines = 0; // global variable for sub-lines of body, header, footer, section and footnote frames. @@ -335,6 +353,7 @@ class SwSavePaintStatics SwFlyFrm *pSRetoucheFly, *pSRetoucheFly2, *pSFlyOnlyDraw; +BorderLines*pBLines; SwLineRects*pSLines; SwSubsRects*pSSubsLines; SwSubsRects*pSSpecSubsLines; @@ -360,6 +379,7 @@ SwSavePaintStatics::SwSavePaintStatics() : pSRetoucheFly ( pRetoucheFly ), pSRetoucheFly2 ( pRetoucheFly2 ), pSFlyOnlyDraw ( pFlyOnlyDraw ), +pBLines ( g_pBorderLines), pSLines ( pLines), pSSubsLines ( pSubsLines), pSSpecSubsLines ( pSpecSubsLines), @@ -384,6 +404,7 @@ SwSavePaintStatics::SwSavePaintStatics() : aScaleX = aScaleY = 1.0; aMinDistScale = 0.73; aEdgeScale = 0.5; +g_pBorderLines = 0; pLines = 0; pSubsLines = 0; pSpecSubsLines = 0L; @@ -398,6 +419,7 @@ SwSavePaintStatics::~SwSavePaintStatics() pRetoucheFly = pSRetoucheFly; pRetoucheFly2 = pSRetoucheFly2; pFlyOnlyDraw = pSFlyOnlyDraw; +g_pBorderLines = pBLines; pLines = pSLines; pSubsLines = pSSubsLines; pSpecSubsLines = pSSpecSubsLines; @@ -2888,6 +2910,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const pSubsLines = new SwSubsRects; pSpecSubsLines = new SwSubsRects; } +g_pBorderLines = new BorderLines; aPaintRect._Intersection( aRect ); @@ -3001,6 +3024,9 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const DELETEZ( pSubsLines ); DELETEZ( pSpecSubsLines ); } +// fdo#42750: delay painting these until after subsidiary lines +ProcessPrimitives(g_pBorderLines->GetBorderLines()); +DELETEZ(g_pBorderLines); pVout->Leave(); // #i68597# @@ -4509,11 +4535,8 @@ void lcl_PaintLeftRightLine( const sal_Bool _bLeft, ::lcl_SubTopBottom( aRect, rBox, _rAttrs, _rFrm, _rRectFn, bPrtOutputDev ); } -// TODO Postpone the processing of the primitives if ( lcl_GetLineWidth( pLeftRightBorder ) > 0 ) { -drawinglayer::primitive2d::Primitive2DSequence aSequence( 1 ); - double nExtentIS = lcl_GetExtent( pTopBorder, NULL ); double nExtentIE = lcl_GetExtent( pBottomBorder, NULL ); double nExtentOS = lcl_GetExtent( NULL, pTopBorder ); @@ -4535,21 +4558,22 @@ void lcl_PaintLeftRightLine( const sal_Bool _bLeft, Color aLeftColor = _bLeft ? pLeftRightBorder->GetColorOut( _bLeft ) : pLeftRightBorder->GetColorIn( _bLeft ); Color aRightColor = _bLeft ? pLeftRightBorder->GetColorIn( _bLeft ) : pLeftRightBorder->GetColorOut( _bL
[Libreoffice-commits] .: sc/source svx/source
sc/source/ui/view/formatsh.cxx |9 + svx/source/tbxctrls/tbcontrl.cxx |4 2 files changed, 13 insertions(+) New commits: commit 0466a30ca52dc531887c75e2d42b007cc83778f3 Author: Winfried Donkers Date: Wed Mar 7 17:39:03 2012 +0100 fdo#45671 fix for transparent colour split button diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 61522d6..dc75138 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -1435,6 +1435,15 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq ) pTabViewShell->ExecuteCellFormatDlg( rReq, TP_FONT ); // wenn ToolBar vertikal break; +case SID_BACKGROUND_COLOR: +{ +SvxBrushItem aBrushItem( (const SvxBrushItem&) + pTabViewShell->GetSelectionPattern()->GetItem( ATTR_BACKGROUND ) ); +aBrushItem.SetColor( COL_TRANSPARENT ); +pTabViewShell->ApplyAttr( aBrushItem ); +} +break; + case SID_ATTR_ALIGN_LINEBREAK: // ohne Parameter als Toggle { const ScPatternAttr* pAttrs = pTabViewShell->GetSelectionPattern(); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index b434e00..0ecf87d 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2250,6 +2250,10 @@ SvxColorExtToolBoxControl::SvxColorExtToolBoxControl( switch( nSlotId ) { case SID_ATTR_CHAR_COLOR: +addStatusListener( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:Color" ))); +nMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW; +break; + case SID_ATTR_CHAR_COLOR2: addStatusListener( OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:CharColorExt" ))); nMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - sw/source
sw/source/core/inc/frame.hxx|3 +- sw/source/core/text/frmform.cxx | 49 sw/source/core/text/txtfly.cxx | 36 ++--- sw/source/core/text/xmldump.cxx | 44 +-- 4 files changed, 52 insertions(+), 80 deletions(-) New commits: commit 1483c90ddc4a9f47b9a7da2d65da12f3e71cee60 Author: Cédric Bosdonnat Date: Thu Mar 8 17:06:29 2012 +0100 sw: SwTxtFrm formatting, cleaned up useless debug code and translated comments diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index e417e84..1d1d444 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -1772,26 +1772,6 @@ void SwTxtFrm::_Format( SwParaPortion *pPara ) void SwTxtFrm::Format( const SwBorderAttrs * ) { -#if OSL_DEBUG_LEVEL > 1 -const XubString aXXX = GetTxtNode()->GetTxt(); -const SwTwips nDbgY = Frm().Top(); -(void)nDbgY; -const SwPageFrm *pDbgPage = FindPageFrm(); -const MSHORT nDbgPageNr = pDbgPage->GetPhyPageNum(); -(void)nDbgPageNr; -// Um zu gucken, ob es einen Ftn-Bereich gibt. -const SwFrm *pDbgFtnCont = (const SwFrm*)(FindPageFrm()->FindFtnCont()); -(void)pDbgFtnCont; - -// nStopAt laesst sich vom CV bearbeiten. -static MSHORT nStopAt = 0; -if( nStopAt == GetFrmId() ) -{ -int i = GetFrmId(); -(void)i; -} -#endif - SWRECTFN( this ) CalcAdditionalFirstLineOffset(); @@ -1951,35 +1931,8 @@ void SwTxtFrm::Format( const SwBorderAttrs * ) if ( pPara ) pPara->SetPrepMustFit( sal_False ); -#if OSL_DEBUG_LEVEL > 1 -// Hier ein Instrumentarium, um ungewoehnlichen Master/Follow-Kombinationen, -// insbesondere bei Fussnoten, auf die Schliche zu kommen -if( IsFollow() || GetFollow() ) -{ -SwTxtFrm *pTmpFrm = IsFollow() ? FindMaster() : this; -const SwPageFrm *pTmpPage = pTmpFrm->FindPageFrm(); -MSHORT nPgNr = pTmpPage->GetPhyPageNum(); -MSHORT nLast; -MSHORT nDummy = 0; // nur zum Breakpoint setzen -while( pTmpFrm->GetFollow() ) -{ -pTmpFrm = pTmpFrm->GetFollow(); -nLast = nPgNr; -pTmpPage = pTmpFrm->FindPageFrm(); -nPgNr = pTmpPage->GetPhyPageNum(); -if( nLast > nPgNr ) -++nDummy; // schon fast eine Assertion wert -else if( nLast == nPgNr ) -++nDummy; // bei Spalten voellig normal, aber sonst!? -else if( nLast < nPgNr - 1 ) -++nDummy; // kann schon mal temporaer vorkommen -} -} -#endif - CalcBaseOfstForFly(); -// OD 2004-03-17 #i11860# -_CalcHeightOfLastLine(); +_CalcHeightOfLastLine(); // #i11860# } /* diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index 0fc70b8..a3b4630 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -2013,16 +2013,16 @@ void SwTxtFly::CalcLeftMargin( SwRect &rFly, (rFly.*fnRect->fnSetLeft)( nLeft ); } -/* - * SwTxtFly::FlyToRect() - * - * IN: dokumentglobal (rRect) - * OUT: dokumentglobal (return-Wert) - * Liefert zu einem SwFlyFrm das von ihm in Anspruch genommene Rechteck - * unter Beruecksichtigung der eingestellten Attribute fuer den Abstand - * zum Text zurueck. - */ // #i68520# +/** + Computes the bounds of an anchored object. This takes the + object wrapping and contour into account. + + @param pAnchoredObj the object for which to get the bounds + @param rLine the bounds of the line to format + + @return the flying object bounds + */ SwRect SwTxtFly::AnchoredObjToRect( const SwAnchoredObject* pAnchoredObj, const SwRect &rLine ) const { @@ -2044,15 +2044,15 @@ SwRect SwTxtFly::AnchoredObjToRect( const SwAnchoredObject* pAnchoredObj, // des Rahmens waechst. SwAnchoredObjList::size_type nFlyPos = GetPos( pAnchoredObj ); -// Bei LEFT und RIGHT vergroessern wir das Rechteck. -// Hier gibt es einige Probleme, wenn mehrere Frames zu sehen sind. -// Zur Zeit wird nur der einfachste Fall angenommen: -// LEFT bedeutet, dass der Text links vom Frame fliessen soll, -// d.h. der Frame blaeht sich bis zum rechten Rand der Printarea -// oder bis zum naechsten Frame auf. -// Bei RIGHT ist es umgekehrt. -// Ansonsten wird immer der eingestellte Abstand zwischen Text -// und Frame aufaddiert. +// LEFT and RIGHT, we grow the rectangle. +// We have some problems, when several frames are to be seen. +// At the moment, only the easier case is assumed: +// + LEFT means that the text muss flaw on the left
[Libreoffice-commits] .: 2 commits - writerfilter/source
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 106 +- writerfilter/source/dmapper/DomainMapper_Impl.hxx | 18 ++- 2 files changed, 58 insertions(+), 66 deletions(-) New commits: commit d4fd86e3a48defbff29bfbabfbf0d2c5d95d39f5 Author: Cédric Bosdonnat Date: Mon Mar 5 17:25:41 2012 +0100 n#693238, n#747471: create TableManager for inside shapes When a texbox is contained inside a table cell... we were running into some troubles when creating the table: the reference to the paragraphs inside the textbox were passed to the TableManager. This was leading to missing references when converting to a table because the paragraph references within the textbox were dropped. diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 9047784..066416e 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1524,6 +1524,9 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape { xProps->setPropertyValue( rPropNameSupplier.GetName( PROP_ANCHOR_TYPE ), bIsGraphic ? uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) : uno::makeAny( text::TextContentAnchorType_AT_PARAGRAPH ) ); } + +appendTableManager( ); +getTableManager().startLevel(); } catch ( const uno::Exception& e ) { @@ -1537,6 +1540,9 @@ void DomainMapper_Impl::PopShapeContext() { if ( m_aAnchoredStack.size() > 0 ) { +getTableManager().endLevel(); +popTableManager(); + // For OLE object replacement shape, the text append context was already removed // or the OLE object couldn't be inserted. if ( !m_aAnchoredStack.top().bToRemove ) commit 4a0e2d6dc8ba3208f38e3a814ed806384a86ee9a Author: Cédric Bosdonnat Date: Mon Mar 5 10:50:27 2012 +0100 n#747471, n#693238: Textboxes import is a mess with OLE objects inside diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 8e5b9ea..9047784 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -191,8 +191,6 @@ DomainMapper_Impl::DomainMapper_Impl( m_bIsFirstSection( true ), m_bIsColumnBreakDeferred( false ), m_bIsPageBreakDeferred( false ), -m_bIsInShape( false ), -m_bShapeContextAdded( false ), m_pLastSectionContext( ), m_nCurrentTabStopIndex( 0 ), m_sCurrentParaStyleId(), @@ -584,37 +582,6 @@ void DomainMapper_Impl::clearDeferredBreaks() m_bIsPageBreakDeferred = false; } -bool lcl_removeShape( const uno::Reference< text::XTextDocument >& rDoc, const uno::Reference< drawing::XShape >& rShape, TextContentStack& rAnchoredStack,TextAppendStack& rTextAppendStack ) -{ -bool bRet = false; -// probably unecessary but just double check that indeed the top of Anchored stack -// does contain the shape we intend to remove -uno::Reference< drawing::XShape > xAnchorShape(rAnchoredStack.top( ), uno::UNO_QUERY ); -if ( xAnchorShape == rShape ) -{ -// because we only want to process the embedded object and not the associated -// shape we need to get rid of that shape from the Draw page and Anchored and -// Append stacks so it wont be processed further -try -{ -uno::Reference xDrawPageSupplier(rDoc, uno::UNO_QUERY_THROW); -uno::Reference xDrawPage = xDrawPageSupplier->getDrawPage(); -if ( xDrawPage.is() ) -{ -xDrawPage->remove( rShape ); -} -rAnchoredStack.pop(); -rTextAppendStack.pop(); -bRet = true; -} -catch( uno::Exception& ) -{ -} -} -return bRet; -} - - void lcl_MoveBorderPropertiesToFrame(uno::Sequence& rFrameProperties, uno::Reference xStartTextRange, @@ -1049,21 +1016,6 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) xTextAppend->finishParagraph( aProperties ); getTableManager( ).handle(xTextRange); -// Set the anchor of the objects to the created paragraph -while ( m_aAnchoredStack.size( ) > 0 && !m_bIsInShape ) -{ -uno::Reference< text::XTextContent > xObj = m_aAnchoredStack.top( ); -try -{ -xObj->attach( xTextRange ); -} -catch ( uno::RuntimeException& ) -{ -// this is normal: the shape is already attached -} -m_aAnchoredStack.pop( ); -} - // Get the end of paragraph character inserted
[Libreoffice-commits] .: cui/source
cui/source/dialogs/SpellDialog.cxx | 175 ++--- 1 file changed, 86 insertions(+), 89 deletions(-) New commits: commit adf45eced404c33be6db884a3e809725e7975872 Author: Cédric Bosdonnat Date: Mon Feb 27 17:00:40 2012 +0100 fdo#46531: Fixed SpellCheck dialog display issues More robust, handling of the explanations message and link display. diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 483058e..cd9b273 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -402,6 +402,92 @@ void SpellDialog::UpdateBoxes_Impl() aIgnoreRulePB.Enable(pSpellErrorDescription && !pSpellErrorDescription->sRuleId.isEmpty()); aAutoCorrPB.Show( bShowChangeAll && rParent.HasAutoCorrection() ); +bool bHasGrammarChecking = rParent.HasGrammarChecking(); +aCheckGrammarCB.Show( bHasGrammarChecking ); +if( !bHasGrammarChecking ) +{ +//resize the dialog to hide the hidden area of the CheckBox +Size aBackSize = aBackgroundGB.GetSizePixel(); +sal_Int32 nDiff = aBackgroundGB.GetPosPixel().Y() + aBackSize.Height() +- aCheckGrammarCB.GetPosPixel().Y(); +aBackSize.Height() -= nDiff; +aBackgroundGB.SetSizePixel(aBackSize); +Button* aButtons[] = { &aHelpPB, &aOptionsPB, &aUndoPB, &aClosePB, 0 }; +sal_Int32 nButton = 0; +while( aButtons[nButton]) +{ +Point aPos = aButtons[nButton]->GetPosPixel(); +aPos.Y() -= nDiff; +aButtons[nButton]->SetPosPixel(aPos); +++nButton; +} +Size aDlgSize = GetSizePixel(); +aDlgSize.Height() -= nDiff; +SetSizePixel( aDlgSize ); +} +else +{ +bool bHasExplainLink = aExplainLink.GetURL().Len() != 0; +aExplainLink.Show( bHasExplainLink ); + +sal_Int32 nExplainWidth = aExplainLink.GetPosPixel().X() - aExplainFT.GetPosPixel().X(); +if ( !bHasExplainLink ) +nExplainWidth += aExplainLink.GetSizePixel().Width(); +sal_Int32 nExplainHeight = aExplainFT.GetActualHeight(); +sal_Int32 nCurrentHeight = aExplainFT.GetSizePixel().Height(); +if( aExplainFT.GetText().Len() == 0 ) +{ +nExplainHeight = 0; +aExplainFT.Hide(); +aExplainLink.Hide(); +} + +Size aCtlSize = aExplainFT.GetSizePixel(); +aCtlSize.Height() = nExplainHeight; +aCtlSize.Width() = nExplainWidth; +aExplainFT.SetSizePixel( aCtlSize ); + +aCtlSize = aExplainLink.GetSizePixel(); +aCtlSize.Height() = nExplainHeight; +aExplainLink.SetSizePixel( aCtlSize ); + +sal_Int32 nDiff = - ( nCurrentHeight - nExplainHeight ); +if ( nDiff != 0 ) +{ +Control* aControls[] = { +&aNotInDictFT, +&aSentenceED, +&aSuggestionFT, +&aSuggestionLB, +&aIgnorePB, +&aIgnoreAllPB, +&aIgnoreRulePB, +&aAddToDictMB, +&aChangePB, +&aChangeAllPB, +&aAutoCorrPB, +&aCheckGrammarCB, +&aHelpPB, +&aOptionsPB, +&aUndoPB, +&aClosePB, +&aBackgroundGB, +0 +}; +sal_Int32 nControl = 0; +while( aControls[nControl]) +{ +Point aPos = aControls[nControl]->GetPosPixel(); +aPos.Y() += nDiff; +aControls[nControl]->SetPosPixel(aPos); +++nControl; +} +Size aDlgSize = GetSizePixel(); +aDlgSize.Height() += nDiff; +SetSizePixel( aDlgSize ); +Invalidate(); +} +} } // --- @@ -468,95 +554,6 @@ IMPL_STATIC_LINK( SpellDialog, InitHdl, SpellDialog *, EMPTYARG ) pThis->aClosePB.GrabFocus(); pThis->LockFocusChanges(false); //show grammar CheckBox depending on the modules abilities -bool bHasGrammarChecking = pThis->rParent.HasGrammarChecking(); -pThis->aCheckGrammarCB.Show( bHasGrammarChecking ); -if( !bHasGrammarChecking ) -{ -//resize the dialog to hide the hidden area of the CheckBox -Size aBackSize = pThis->aBackgroundGB.GetSizePixel(); -sal_Int32 nDiff = pThis->aBackgroundGB.GetPosPixel().Y() + aBackSize.Height() -- pThis->aCheckGrammarCB.GetPosPixel().Y(); -aBackSize.Height() -= nDiff; -pThis->aBackgroundGB.SetSizePixel(aBackSize); -Button* aButtons[] = { &pThis->aHelpPB, &pThis->aOptionsPB, &pThis->aUndoPB, &pThis->aClosePB, 0 }; -sal_Int32 nButton = 0; -while( aButtons[nButton]) -{ -Point aPos =
[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 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] .: 4 commits - comphelper/inc comphelper/source editeng/inc editeng/source oox/source sw/inc sw/source writerfilter/source
comphelper/inc/comphelper/TypeGeneration.hxx |1 comphelper/source/property/TypeGeneration.cxx |2 editeng/inc/editeng/memberids.hrc |2 editeng/source/items/frmitems.cxx | 48 ++ oox/source/vml/vmldrawing.cxx | 26 ++- sw/inc/unoprnms.hxx |6 ++ sw/source/core/layout/paintfrm.cxx|3 - sw/source/core/unocore/unoframe.cxx | 13 + sw/source/core/unocore/unomap.cxx |4 + sw/source/core/unocore/unoprnms.cxx |3 + writerfilter/source/dmapper/DomainMapper_Impl.cxx |3 - 11 files changed, 98 insertions(+), 13 deletions(-) New commits: commit e3e7623bf6cecf0e32912347a58e5a2c7297099d Author: Cédric Bosdonnat Date: Thu Feb 23 13:52:17 2012 +0100 fdo#45560: Fixed docx textbox borders style and width import diff --git a/comphelper/inc/comphelper/TypeGeneration.hxx b/comphelper/inc/comphelper/TypeGeneration.hxx index c987b2a..9492ac8 100644 --- a/comphelper/inc/comphelper/TypeGeneration.hxx +++ b/comphelper/inc/comphelper/TypeGeneration.hxx @@ -71,6 +71,7 @@ namespace comphelper CPPUTYPE_SEQDEPTXTFLD, //getCppuType( (Sequence >*)0 ) CPPUTYPE_TXTCNTANCHOR, //getCppuType( (text::TextContentAnchorType*)0 ) CPPUTYPE_WRAPTXTMODE, //getCppuType( (text::WrapTextMode*)0 ) +CPPUTYPE_LINESTYLE, //getCppuType( (drawing::LineStyle*)0 ) CPPUTYPE_COLORMODE, //getCppuType( (drawing::ColorMode*)0 ) CPPUTYPE_PAGESTYLELAY, //getCppuType( (style::PageStyleLayout*)0 ) CPPUTYPE_VERTALIGN, //getCppuType( (style::VerticalAlignment*)0 ) diff --git a/comphelper/source/property/TypeGeneration.cxx b/comphelper/source/property/TypeGeneration.cxx index 62c6d05..93c255c 100644 --- a/comphelper/source/property/TypeGeneration.cxx +++ b/comphelper/source/property/TypeGeneration.cxx @@ -128,6 +128,7 @@ #include #include #include +#include using ::rtl::OUString; using namespace ::com::sun::star; @@ -225,6 +226,7 @@ namespace comphelper case CPPUTYPE_REFXGRAPHIC: pType = &::getCppuType( (Reference< graphic::XGraphic >*)0); break; case CPPUTYPE_TABLEBORDERDISTANCES: pType = &::getCppuType( (table::TableBorderDistances*)0 ); break; case CPPUTPYE_REFEMBEDDEDOBJECT:pType = &embed::XEmbeddedObject::static_type(); break; +case CPPUTYPE_LINESTYLE:pType = &::getCppuType( (drawing::LineStyle*)0 ); break; default: OSL_FAIL( "Unknown CPPU type" ); } diff --git a/editeng/inc/editeng/memberids.hrc b/editeng/inc/editeng/memberids.hrc index fa57ab1..b53276c 100755 --- a/editeng/inc/editeng/memberids.hrc +++ b/editeng/inc/editeng/memberids.hrc @@ -168,6 +168,8 @@ #define MID_RIGHT_BORDER11 #define MID_TOP_BORDER 12 #define MID_BOTTOM_BORDER 13 +#define LINE_STYLE 14 +#define LINE_WIDTH 15 //BrushItem #define MID_BACK_COLOR 0 diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 50484b8..b10218d 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -29,6 +29,7 @@ // include --- #include +#include #include #include #include @@ -1920,6 +1921,53 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) case MID_TOP_BORDER: nLine = BOX_LINE_TOP; break; +case LINE_STYLE: +{ +drawing::LineStyle eDrawingStyle; +rVal >>= eDrawingStyle; +editeng::SvxBorderStyle eBorderStyle = editeng::NO_STYLE; +switch ( eDrawingStyle ) +{ +default: +case drawing::LineStyle_NONE: +eBorderStyle = editeng::NO_STYLE; +break; +case drawing::LineStyle_SOLID: +eBorderStyle = editeng::SOLID; +break; +case drawing::LineStyle_DASH: +eBorderStyle = editeng::DASHED; +break; +} + +// Set the line style on all borders +const sal_uInt16 aBorders[] = { BOX_LINE_LEFT, BOX_LINE_RIGHT, BOX_LINE_BOTTOM, BOX_LINE_TOP }; +for (int n(0); n != SAL_N_ELEMENTS(aBorders); ++n) +{ +editeng::SvxBorderLine* pLine = const_cast< editeng::SvxBorderLine* >( GetLine( aBorders[n] ) ); +pLine->SetStyle( eBorderStyle ); +} +return sal_True; +} +break; +case LINE_WIDTH: +{ +
[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 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/docvw/PageBreakWin.cxx |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) New commits: commit 9baee86cbdec44c657d06f355bdba0537fb12a1a Author: Cédric Bosdonnat 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] .: Branch 'libreoffice-3-4' - 3 commits - sw/source
sw/source/core/frmedt/tblsel.cxx |2 - sw/source/core/inc/flowfrm.hxx | 28 +-- sw/source/core/layout/flowfrm.cxx | 38 + sw/source/core/layout/laycache.cxx |1 sw/source/core/layout/sectfrm.cxx | 11 -- sw/source/core/layout/ssfrm.cxx|3 -- sw/source/core/layout/tabfrm.cxx |1 sw/source/core/text/frmform.cxx|5 +--- sw/source/core/text/xmldump.cxx| 12 +-- 9 files changed, 54 insertions(+), 47 deletions(-) New commits: commit 4c36086e3a8b546d906e0dd9f0472abd7013852e Author: Michael Stahl Date: Mon Feb 13 18:36:28 2012 +0100 fdo#41712: sw: remove superfluous flag: This removes SwFlowFrm::bIsFollow, which is pointless duplication of m_pPrecede; this fixes lots of assertions (probably some real problem as well). Signed-off-by: Cédric Bosdonnat diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 34fd69d..4397073 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -2250,7 +2250,7 @@ void _FndBox::SetTableLines( const SwTable &rTable ) inline void UnsetFollow( SwFlowFrm *pTab ) { -pTab->bIsFollow = sal_False; +pTab->m_pPrecede = 0; } void _FndBox::DelFrms( SwTable &rTable ) diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx index 9617988..8facb39 100644 --- a/sw/source/core/inc/flowfrm.hxx +++ b/sw/source/core/inc/flowfrm.hxx @@ -117,7 +117,6 @@ protected: SwFlowFrm *m_pFollow; SwFlowFrm *m_pPrecede; -sal_Bool bIsFollow :1; //Ist's ein Follow sal_Bool bLockJoin :1; //Join (und damit deleten) verboten wenn sal_True! sal_Bool bUndersized:1; // wir sind kleiner als gewuenscht sal_Bool bFtnAtEnd :1; // For sectionfrms only: footnotes at the end of section @@ -168,8 +167,7 @@ public: void MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling = 0 ); sal_Bool HasFollow() const{ return m_pFollow ? sal_True : sal_False; } - sal_Bool IsFollow() const { return bIsFollow; } -inline void _SetIsFollow( sal_Bool bSet ) { bIsFollow = bSet; } + sal_Bool IsFollow() const { return 0 != m_pPrecede; } const SwFlowFrm *GetFollow() const { return m_pFollow; } SwFlowFrm *GetFollow() { return m_pFollow; } sal_Bool IsAnFollow( const SwFlowFrm *pFlow ) const; diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index c5e083f..5b4a588 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -84,7 +84,7 @@ SwFlowFrm::SwFlowFrm( SwFrm &rFrm ) : m_pFollow( 0 ), m_pPrecede( 0 ) { -bLockJoin = bIsFollow = bCntntLock = bOwnFtnNum = +bLockJoin = bCntntLock = bOwnFtnNum = bFtnLock = bFlyLock = sal_False; } diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 850e38b..61b40ce 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -934,7 +934,6 @@ sal_Bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) { SwTxtFrm *pNew = new SwTxtFrm( ((SwTxtFrm*)rpFrm)-> GetTxtNode(), rpFrm ); -pNew->_SetIsFollow( sal_True ); pNew->ManipOfst( nOfst ); pNew->SetFollow( ((SwTxtFrm*)rpFrm)->GetFollow() ); ((SwTxtFrm*)rpFrm)->SetFollow( pNew ); diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index eee5a68..60e6d2d 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -102,15 +102,11 @@ SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, sal_Bool bMaster ) : { SwSectionFrm* pMaster = rSect.FindMaster(); pMaster->SetFollow( this ); -bIsFollow = sal_True; } -else -rSect.bIsFollow = sal_True; SetFollow( &rSect ); } else { -bIsFollow = sal_True; SetFollow( rSect.GetFollow() ); rSect.SetFollow( this ); if( !GetFollow() ) @@ -171,7 +167,6 @@ SwSectionFrm::~SwSectionFrm() else if( HasFollow() ) { PROTOCOL( this, PROT_SECTION, ACT_DEL_MASTER, GetFollow() ) -GetFollow()->bIsFollow = sal_False; } } } @@ -219,10 +214,7 @@ void SwSectionFrm::DelEmpty( sal_Bool bRemove ) // freigeben, deshalb wird die Size des Masters invalidiert. if( !GetFollow() && !pMaster->IsColLocked() ) pMaster->InvalidateSize(); -bIsFollow = sal_False; } -else if( HasFollow() ) -GetFollow()->bIsFollow = sal_False;
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 5 commits - sw/source writerfilter/source
sw/source/core/frmedt/tblsel.cxx |2 - sw/source/core/inc/flowfrm.hxx | 28 ++ sw/source/core/layout/flowfrm.cxx | 37 ++--- sw/source/core/layout/laycache.cxx |1 sw/source/core/layout/sectfrm.cxx | 11 --- sw/source/core/layout/ssfrm.cxx|3 -- sw/source/core/layout/tabfrm.cxx |1 sw/source/core/text/frmform.cxx|5 +-- sw/source/core/text/xmldump.cxx| 12 sw/source/filter/ww8/rtfattributeoutput.cxx| 28 -- sw/source/filter/ww8/rtfattributeoutput.hxx|6 writerfilter/source/rtftok/rtfdocumentimpl.cxx | 14 - 12 files changed, 96 insertions(+), 52 deletions(-) New commits: commit 47ce6dc0ecb4503d87564d08d3f86fb3e01c39ac Author: Michael Stahl Date: Sun Feb 12 22:16:53 2012 +0100 fdo#41712: sw: remove superfluous flag: This removes SwFlowFrm::bIsFollow, which is pointless duplication of m_pPrecede; this fixes lots of assertions (probably some real problem as well). Signed-off-by: Cédric Bosdonnat diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 1848a02..4d18a40 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -2208,7 +2208,7 @@ void _FndBox::SetTableLines( const SwTable &rTable ) inline void UnsetFollow( SwFlowFrm *pTab ) { -pTab->bIsFollow = sal_False; +pTab->m_pPrecede = 0; } void _FndBox::DelFrms( SwTable &rTable ) diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx index 99e12a1..d0aad08 100644 --- a/sw/source/core/inc/flowfrm.hxx +++ b/sw/source/core/inc/flowfrm.hxx @@ -117,7 +117,6 @@ protected: SwFlowFrm *m_pFollow; SwFlowFrm *m_pPrecede; -sal_Bool bIsFollow :1; //Ist's ein Follow sal_Bool bLockJoin :1; //Join (und damit deleten) verboten wenn sal_True! sal_Bool bUndersized:1; // wir sind kleiner als gewuenscht sal_Bool bFlyLock :1; // Stop positioning of at-character flyframes @@ -163,8 +162,7 @@ public: void MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling = 0 ); sal_Bool HasFollow() const{ return m_pFollow ? sal_True : sal_False; } - sal_Bool IsFollow() const { return bIsFollow; } -inline void _SetIsFollow( sal_Bool bSet ) { bIsFollow = bSet; } + sal_Bool IsFollow() const { return 0 != m_pPrecede; } const SwFlowFrm *GetFollow() const{ return m_pFollow; } SwFlowFrm *GetFollow() { return m_pFollow; } sal_Bool IsAnFollow( const SwFlowFrm *pFlow ) const; diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index a7ef489..9b25c4b 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -81,7 +81,6 @@ SwFlowFrm::SwFlowFrm( SwFrm &rFrm ) : rThis( rFrm ), m_pFollow( 0 ), m_pPrecede( 0 ), -bIsFollow( false ), bLockJoin( false ), bUndersized( false ), bFlyLock( false ) diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index b04de85..d5f041d 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -924,7 +924,6 @@ sal_Bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) { SwTxtFrm *pNew = new SwTxtFrm( ((SwTxtFrm*)rpFrm)-> GetTxtNode(), rpFrm ); -pNew->_SetIsFollow( sal_True ); pNew->ManipOfst( nOfst ); pNew->SetFollow( ((SwTxtFrm*)rpFrm)->GetFollow() ); ((SwTxtFrm*)rpFrm)->SetFollow( pNew ); diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 4ff80e1..3f2ea28 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -102,15 +102,11 @@ SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, sal_Bool bMaster ) : { SwSectionFrm* pMaster = rSect.FindMaster(); pMaster->SetFollow( this ); -bIsFollow = sal_True; } -else -rSect.bIsFollow = sal_True; SetFollow( &rSect ); } else { -bIsFollow = sal_True; SetFollow( rSect.GetFollow() ); rSect.SetFollow( this ); if( !GetFollow() ) @@ -171,7 +167,6 @@ SwSectionFrm::~SwSectionFrm() else if( HasFollow() ) { PROTOCOL( this, PROT_SECTION, ACT_DEL_MASTER, GetFollow() ) -GetFollow()->bIsFollow = sal_False; } } } @@ -218,10 +213,7 @@ void SwSectionFrm::DelEmpty( sal_Bool bRemove ) // freigeben, deshalb wird die Size des Masters invalidiert. if( !G
[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 Date: Tue Dec 13 21:35:25 2011 +0100 Fix FullCommentURL for grammar checking (local menu) Signed-off-by: Cédric Bosdonnat 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] .: 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 beb8a85796c78d4cdcf6497b6725fce8f7141d75 Author: Cédric Bosdonnat Date: Mon Feb 13 11:20:22 2012 +0100 Header/Footer, Page Break: don't show them in RO mode (fdo#45548) diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 8aee0ec..74abd70 100644 --- 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 ); -aSign.setClosed( true ); -
[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 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/layout/frmtool.cxx | 43 ++ 1 file changed, 16 insertions(+), 27 deletions(-) New commits: commit 2a22e664811e10ca58ec66ba8fd10b1a6185c178 Author: Cédric Bosdonnat Date: Wed Feb 8 18:58:13 2012 +0100 fdo#39006: Fixed layout loop OD's comment was right: forcing a restart of the layout may cause loops... and we falled into that case. As this seems to be useless, removed the whole thing. diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 9bc3957..c19dbf7 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -724,33 +724,22 @@ SwFlyNotify::~SwFlyNotify() ( !pFly->ISA(SwFlyFreeFrm) || !static_cast(pFly)->IsNoMoveOnCheckClip() ) ) { -// #i54138# - suppress restart of the layout process -// on changed frame height. -// Note: It doesn't seem to be necessary and can cause layout loops. -if ( bPosChgd ) -{ -// indicate a restart of the layout process -pFly->SetRestartLayoutProcess( true ); -} -else -{ -// lock position -pFly->LockPosition(); - -if ( !pFly->ConsiderForTextWrap() ) -{ -// indicate that object has to be considered for text wrap -pFly->SetConsiderForTextWrap( true ); -// invalidate 'background' in order to allow its 'background' -// to wrap around it. -pFly->NotifyBackground( pFly->GetPageFrm(), -pFly->GetObjRectWithSpaces(), -PREP_FLY_ARRIVE ); -// invalidate position of anchor frame in order to force -// a re-format of the anchor frame, which also causes a -// re-format of the invalid previous frames of the anchor frame. -pFly->AnchorFrm()->InvalidatePos(); -} +// lock position +pFly->LockPosition(); + +if ( !pFly->ConsiderForTextWrap() ) +{ +// indicate that object has to be considered for text wrap +pFly->SetConsiderForTextWrap( true ); +// invalidate 'background' in order to allow its 'background' +// to wrap around it. +pFly->NotifyBackground( pFly->GetPageFrm(), +pFly->GetObjRectWithSpaces(), +PREP_FLY_ARRIVE ); +// invalidate position of anchor frame in order to force +// a re-format of the anchor frame, which also causes a +// re-format of the invalid previous frames of the anchor frame. +pFly->AnchorFrm()->InvalidatePos(); } } } ___ 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 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] .: Branch 'libreoffice-3-5' - writerfilter/Library_rtftok.mk writerfilter/source
writerfilter/Library_rtftok.mk |1 + writerfilter/source/rtftok/rtfdocumentimpl.cxx | 25 - writerfilter/source/rtftok/rtfdocumentimpl.hxx |7 +++ 3 files changed, 32 insertions(+), 1 deletion(-) New commits: commit 68e458cef973fcf568b8efa5614ee978e8ea9d55 Author: Miklos Vajna Date: Tue Feb 7 16:56:27 2012 +0100 n#192129 fix RTF import of PNG images with bogus width/height For example Apache FOP generates RTF output where the \picw and \pich values are even negative, SvxRTFParser::ReadBmpData() used the same trick to solve the issue. Signed-off-by: Cédric Bosdonnat diff --git a/writerfilter/Library_rtftok.mk b/writerfilter/Library_rtftok.mk index 3835a5d..1afdd27 100644 --- a/writerfilter/Library_rtftok.mk +++ b/writerfilter/Library_rtftok.mk @@ -52,6 +52,7 @@ $(eval $(call gb_Library_add_linked_libs,rtftok,\ cppuhelper \ oox \ sal \ + svt \ ucbhelper \ utl \ tl \ diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index a96d821..e87e880 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -41,6 +41,10 @@ #include #include #include +#include +#include +#include +#include #include // NS_sprm namespace #include // NS_rtf namespace @@ -584,6 +588,20 @@ int RTFDocumentImpl::resolvePict(bool bInline) aExtHeader.yExt = m_aStates.top().aPicture.nHeight; OUString aGraphicUrl = m_pGraphicHelper->importGraphicObject(xInputStream, &aExtHeader); +if (m_aStates.top().aPicture.nStyle == BMPSTYLE_PNG) +{ +// In case of PNG, the real size is known, don't use the values +// provided by picw and pich. +OString aURLBS(OUStringToOString(aGraphicUrl, RTL_TEXTENCODING_UTF8)); +const char aURLBegin[] = "vnd.sun.star.GraphicObject:"; +Graphic aGraphic = GraphicObject(aURLBS.copy(RTL_CONSTASCII_LENGTH(aURLBegin))).GetTransformedGraphic(); +Size aSize(aGraphic.GetPrefSize()); +MapMode aMap(MAP_100TH_MM); +aSize = Application::GetDefaultDevice()->PixelToLogic( aSize, aMap ); +m_aStates.top().aPicture.nWidth = aSize.Width(); +m_aStates.top().aPicture.nHeight = aSize.Height(); +} + // Wrap it in an XShape. uno::Reference xShape; OUString aService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GraphicObjectShape")); @@ -1910,6 +1928,9 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) case RTF_FORMSHADE: // Noop, this is the default in Writer. break; +case RTF_PNGBLIP: +m_aStates.top().aPicture.nStyle = BMPSTYLE_PNG; +break; case RTF_POSYT: m_aStates.top().aFrame.nVertAlign = NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_top; break; case RTF_POSYB: m_aStates.top().aFrame.nVertAlign = NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_bottom; break; case RTF_POSYC: m_aStates.top().aFrame.nVertAlign = NS_ooxml::LN_Value_wordprocessingml_ST_YAlign_center; break; @@ -1929,6 +1950,7 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) case RTF_POSXO: m_aStates.top().aFrame.nHoriAlign = NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_outside; break; case RTF_POSXL: m_aStates.top().aFrame.nHoriAlign = NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_left; break; case RTF_POSXR: m_aStates.top().aFrame.nHoriAlign = NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_right; break; + default: #if OSL_DEBUG_LEVEL > 1 OSL_TRACE("%s: TODO handle flag '%s'", OSL_THIS_FUNC, lcl_RtfToString(nKeyword)); @@ -3313,7 +3335,8 @@ RTFPicture::RTFPicture() nCropB(0), nCropL(0), nCropR(0), -eWMetafile(0) +eWMetafile(0), +nStyle(BMPSTYLE_NONE) { } diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 12d414c..90ecc98 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -150,6 +150,12 @@ namespace writerfilter { FORMFIELD_LIST }; +enum RTFBmpStyles +{ +BMPSTYLE_NONE, +BMPSTYLE_PNG +}; + /// A buffer storing dmapper calls. typedef std::deque< std::pair > RTFBuffer_t; @@ -184,6 +190,7 @@ namespace writerfilter { sal_uInt16 nScaleX, nScaleY; short nCropT, nCropB, nCropL, nCropR; sal_uInt16 eWMetafile; +RTFBmpStyles nStyle; }; /// Stores the properties of a frame ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - writerfilter/source
writerfilter/source/dmapper/DomainMapperTableManager.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 06c62190b2c28720294a603d26878c2cb0b35b9c Author: Miklos Vajna Date: Mon Feb 6 10:58:12 2012 +0100 n#228839 an empty table grid can't have implicit merges Signed-off-by: Cédric Bosdonnat diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 31d46bd..2331e57 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -477,7 +477,7 @@ void DomainMapperTableManager::endOfRowAction() #endif insertRowProps(pPropMap); } -else if (m_bImplicitMerges) +else if (m_bImplicitMerges && pTableGrid->size()) { // More grid than cells definitions? Then take the last ones. // This feature is used by the RTF implicit horizontal cell merges. ___ 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 | 16 1 file changed, 16 insertions(+) New commits: commit 9babbf346c4d6f76e8b3a243a00e73a173c16ba6 Author: Cédric Bosdonnat Date: Tue Jan 31 15:39:54 2012 +0100 fdo#44836: Hide all the page breaks of the pages before the first visible one diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index e7d16a3..8aee0ec 100644 --- 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] .: sw/source
sw/source/core/fields/reffld.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 458d56d9b35f2ecb2eea2589737079390b10ee26 Author: Cédric Bosdonnat Date: Mon Jan 30 11:35:42 2012 +0100 fdo#35669: more robust references merging diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 5f1aa3a..05c3eda 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -974,11 +974,13 @@ void _RefIdsMap::Init( SwDoc& rDoc, SwDoc& rDestDoc, sal_Bool bField ) GetFieldIdsFromDoc( rDoc, aDstIds ); // Define the mappings now -sal_uInt16 nMaxDstId = *aIds.end(); +sal_uInt16 nMaxDstId = -1; +if ( !aIds.empty() ) +nMaxDstId = *aIds.rbegin(); // Map all the src fields to their value + nMaxDstId for ( std::set::iterator pIt = aDstIds.begin(); pIt != aDstIds.end(); ++pIt ) -AddId( nMaxDstId++, *pIt ); +AddId( ++nMaxDstId, *pIt ); // Change the Sequence number of all the SetExp fields in the destination document SwFieldType* pType = rDoc.GetFldType( RES_SETEXPFLD, aName, false ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 3 commits - editeng/qa editeng/source sw/source
editeng/qa/items/borderline_test.cxx |2 +- editeng/source/items/borderline.cxx | 21 ++--- sw/source/filter/xml/xmlithlp.cxx| 35 ++- 3 files changed, 41 insertions(+), 17 deletions(-) New commits: commit f05b865607a832cdc1b9b4bfdfd07bcfdc7431cc Author: Michael Stahl Date: Wed Jan 25 22:43:39 2012 +0100 fdo#38542: SvxBorderLine::GuessLinesWidths: Importing style:border-line-width="0.002cm 0.088cm 0.141cm" (which older OOo/LO apparently could write) fails, because GuessLinesWidths can't find a matching style (result: standard "double" border, 3 equal width parts). Try to create a custom BorderWidthImpl of type DOUBLE instead, that preserves the individual widths. Signed-off-by: Cédric Bosdonnat diff --git a/editeng/qa/items/borderline_test.cxx b/editeng/qa/items/borderline_test.cxx index 80a840c..4b32ec6 100644 --- a/editeng/qa/items/borderline_test.cxx +++ b/editeng/qa/items/borderline_test.cxx @@ -106,7 +106,7 @@ void BorderLineTest::testGuessWidthNoMatch() line.GuessLinesWidths( DOUBLE, TEST_WIDTH + 1, TEST_WIDTH + 2, TEST_WIDTH + 3 ); CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetStyle() ); -CPPUNIT_ASSERT_EQUAL( long( 0 ), line.GetWidth() ); +CPPUNIT_ASSERT_EQUAL( long( (3 * TEST_WIDTH) + 6 ), line.GetWidth() ); } void BorderLineTest::testGuessWidthThinthickSmallgap() diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index e729343..61cecce 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -277,10 +277,25 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa // If anything matched, then set it if ( nWidth > 0 ) +{ nStyle = nTestStyle; - -SetStyle( nStyle ); -m_nWidth = nWidth; +SetStyle( nStyle ); +m_nWidth = nWidth; +} +else +{ +// fdo#38542: not a known double, default to something custom... +SetStyle( nStyle ); +m_nWidth = nOut + nIn + nDist; +if (nOut + nIn + nDist) +{ +m_aWidthImpl = BorderWidthImpl( +CHANGE_LINE1 | CHANGE_LINE2 | CHANGE_DIST, +static_cast(nOut ) / static_cast(m_nWidth), +static_cast(nIn ) / static_cast(m_nWidth), +static_cast(nDist) / static_cast(m_nWidth)); +} +} } else { commit 858d8a4a2312139545e910cc0854c45f5d65a296 Author: Michael Stahl Date: Wed Jan 25 17:56:08 2012 +0100 fdo#38542: sw: ODF import: prevent border width overriding: If there is a width in fo:border{,-left,-right,-top,-bottom}, then it should not override the values from style:border-line-width{,-left,-right,-top,-bottom}, which are more specific in case of "double" borders. Signed-off-by: Cédric Bosdonnat diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx index f1bfca6..c6c762c 100644 --- a/sw/source/filter/xml/xmlithlp.cxx +++ b/sw/source/filter/xml/xmlithlp.cxx @@ -198,23 +198,28 @@ sal_Bool lcl_frmitems_setXMLBorder( SvxBorderLine*& rpLine, sal_Bool bDouble = (bHasWidth && API_LINE_DOUBLE == nStyle ) || rpLine->GetDistance(); - // The width has to be changed - if( bHasWidth && USHRT_MAX != nNamedWidth ) + // fdo#38542: for double borders, do not override the width + // set via style:border-line-width{,-left,-right,-top,-bottom} + if (!bDouble || !rpLine->GetWidth()) { - if ( bDouble ) - rpLine->SetStyle( ::editeng::DOUBLE ); - rpLine->SetWidth( aBorderWidths[nNamedWidth] ); - } - else - { - if( !bHasWidth ) - nWidth = rpLine->GetInWidth() + rpLine->GetDistance() + - rpLine->GetOutWidth(); - - rpLine->SetWidth( nWidth ); - if (bDouble) - { // fdo#38542: divide width by 3 for outer line, gap, inner line - rpLine->ScaleMetrics(1, 3); + // The width has to be changed + if (bHasWidth && USHRT_MAX != nNamedWidth) + { + if (bDouble) + rpLine->SetStyle( ::editeng::DOUBLE ); + rpLine->SetWidth( aBorderWidths[nNamedWidth] ); + } + else + { + if (!bHasWidth) + nWidth = rpLine->GetInWidth() + rpLine->GetDistance() + + rpLine->GetOutWidth(); + + rpLine->SetWidth( nWidth ); + if (bDouble) + { // fdo#38542: divide width by 3 for outer line, gap, inner line + rpLine->ScaleMetrics(1, 3); + } } } lcl_frmitems_setXMLBorderStyle( *rpLine, nStyle ); commit 7cda0a
[Libreoffice-commits] .: 3 commits - editeng/qa editeng/source sw/source
editeng/qa/items/borderline_test.cxx |2 +- editeng/source/items/borderline.cxx | 21 ++--- sw/source/filter/xml/xmlithlp.cxx| 35 ++- 3 files changed, 41 insertions(+), 17 deletions(-) New commits: commit e549f52f16c4a519ed3eddb9c66c19bacc247590 Author: Michael Stahl Date: Wed Jan 25 22:43:39 2012 +0100 fdo#38542: SvxBorderLine::GuessLinesWidths: Importing style:border-line-width="0.002cm 0.088cm 0.141cm" (which older OOo/LO apparently could write) fails, because GuessLinesWidths can't find a matching style (result: standard "double" border, 3 equal width parts). Try to create a custom BorderWidthImpl of type DOUBLE instead, that preserves the individual widths. diff --git a/editeng/qa/items/borderline_test.cxx b/editeng/qa/items/borderline_test.cxx index 80a840c..4b32ec6 100644 --- a/editeng/qa/items/borderline_test.cxx +++ b/editeng/qa/items/borderline_test.cxx @@ -106,7 +106,7 @@ void BorderLineTest::testGuessWidthNoMatch() line.GuessLinesWidths( DOUBLE, TEST_WIDTH + 1, TEST_WIDTH + 2, TEST_WIDTH + 3 ); CPPUNIT_ASSERT_EQUAL( DOUBLE, line.GetStyle() ); -CPPUNIT_ASSERT_EQUAL( long( 0 ), line.GetWidth() ); +CPPUNIT_ASSERT_EQUAL( long( (3 * TEST_WIDTH) + 6 ), line.GetWidth() ); } void BorderLineTest::testGuessWidthThinthickSmallgap() diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index e729343..61cecce 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -277,10 +277,25 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa // If anything matched, then set it if ( nWidth > 0 ) +{ nStyle = nTestStyle; - -SetStyle( nStyle ); -m_nWidth = nWidth; +SetStyle( nStyle ); +m_nWidth = nWidth; +} +else +{ +// fdo#38542: not a known double, default to something custom... +SetStyle( nStyle ); +m_nWidth = nOut + nIn + nDist; +if (nOut + nIn + nDist) +{ +m_aWidthImpl = BorderWidthImpl( +CHANGE_LINE1 | CHANGE_LINE2 | CHANGE_DIST, +static_cast(nOut ) / static_cast(m_nWidth), +static_cast(nIn ) / static_cast(m_nWidth), +static_cast(nDist) / static_cast(m_nWidth)); +} +} } else { commit 7add8abf8e88dcae0591e21f525f3f2fa4baee56 Author: Michael Stahl Date: Wed Jan 25 17:56:08 2012 +0100 fdo#38542: sw: ODF import: prevent border width overriding: If there is a width in fo:border{,-left,-right,-top,-bottom}, then it should not override the values from style:border-line-width{,-left,-right,-top,-bottom}, which are more specific in case of "double" borders. diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx index cd383b5..8de48ab 100644 --- a/sw/source/filter/xml/xmlithlp.cxx +++ b/sw/source/filter/xml/xmlithlp.cxx @@ -198,23 +198,28 @@ sal_Bool lcl_frmitems_setXMLBorder( SvxBorderLine*& rpLine, sal_Bool bDouble = (bHasWidth && API_LINE_DOUBLE == nStyle ) || rpLine->GetDistance(); - // The width has to be changed - if( bHasWidth && USHRT_MAX != nNamedWidth ) + // fdo#38542: for double borders, do not override the width + // set via style:border-line-width{,-left,-right,-top,-bottom} + if (!bDouble || !rpLine->GetWidth()) { - if ( bDouble ) - rpLine->SetStyle( ::editeng::DOUBLE ); - rpLine->SetWidth( aBorderWidths[nNamedWidth] ); - } - else - { - if( !bHasWidth ) - nWidth = rpLine->GetInWidth() + rpLine->GetDistance() + - rpLine->GetOutWidth(); - - rpLine->SetWidth( nWidth ); - if (bDouble) - { // fdo#38542: divide width by 3 for outer line, gap, inner line - rpLine->ScaleMetrics(1, 3); + // The width has to be changed + if (bHasWidth && USHRT_MAX != nNamedWidth) + { + if (bDouble) + rpLine->SetStyle( ::editeng::DOUBLE ); + rpLine->SetWidth( aBorderWidths[nNamedWidth] ); + } + else + { + if (!bHasWidth) + nWidth = rpLine->GetInWidth() + rpLine->GetDistance() + + rpLine->GetOutWidth(); + + rpLine->SetWidth( nWidth ); + if (bDouble) + { // fdo#38542: divide width by 3 for outer line, gap, inner line + rpLine->ScaleMetrics(1, 3); + } } } lcl_frmitems_setXMLBorderStyle( *rpLine, nStyle ); commit e2ffb71305c5f085eec6d396651c76d6daee3406 Author: Michael Stahl Date: Wed Jan 25 17:44:36
[Libreoffice-commits] .: Branch 'libreoffice-3-5-0' - filter/source
filter/source/config/cache/typedetection.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 611472edb12ba1d8a38bda1857c952eef0bb3568 Author: Fridrich Štrba Date: Thu Jan 26 14:30:24 2012 +0100 Sort the catch-all detection at the end Signed-off-by: Cédric Bosdonnat diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index cc91746..25b3742 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -814,9 +814,9 @@ namespace if (rA == rB) return false; if (rA.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.FormatDetector"))) -return true; -if (rB.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.FormatDetector"))) return false; +if (rB.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.FormatDetector"))) +return true; return rA < rB; } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - sw/source
sw/source/core/fields/reffld.cxx| 37 +--- sw/source/ui/docvw/PageBreakWin.cxx | 22 +++-- 2 files changed, 38 insertions(+), 21 deletions(-) New commits: commit 5e51960dede5015b862df05b7b16f02884647889 Author: Cédric Bosdonnat Date: Thu Jan 26 15:30:01 2012 +0100 fdo#35669: properly merge ref fields in master documents diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index e031700..5f1aa3a 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -972,6 +972,26 @@ void _RefIdsMap::Init( SwDoc& rDoc, SwDoc& rDestDoc, sal_Bool bField ) { GetFieldIdsFromDoc( rDestDoc, aIds ); GetFieldIdsFromDoc( rDoc, aDstIds ); + +// Define the mappings now +sal_uInt16 nMaxDstId = *aIds.end(); + +// Map all the src fields to their value + nMaxDstId +for ( std::set::iterator pIt = aDstIds.begin(); pIt != aDstIds.end(); ++pIt ) +AddId( nMaxDstId++, *pIt ); + +// Change the Sequence number of all the SetExp fields in the destination document +SwFieldType* pType = rDoc.GetFldType( RES_SETEXPFLD, aName, false ); +if( pType ) +{ +SwIterator aIter( *pType ); +for( SwFmtFld* pF = aIter.First(); pF; pF = aIter.Next() ) +if( pF->GetTxtFld() ) +{ +sal_uInt16 n = ((SwSetExpField*)pF->GetFld())->GetSeqNumber( ); +((SwSetExpField*)pF->GetFld())->SetSeqNumber( sequencedIds[ n ] ); +} +} } else { @@ -1030,21 +1050,8 @@ void _RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rFld, AddId( n, nSeqNo ); rFld.SetSeqNo( n ); -// und noch die Felder oder Fuss-/EndNote auf die neue -// Id umsetzen -if( bField ) -{ -SwFieldType* pType = rDoc.GetFldType( RES_SETEXPFLD, aName, false ); -if( pType ) -{ -SwIterator aIter( *pType ); -for( SwFmtFld* pF = aIter.First(); pF; pF = aIter.Next() ) -if( pF->GetTxtFld() && nSeqNo == -((SwSetExpField*)pF->GetFld())->GetSeqNumber() ) -((SwSetExpField*)pF->GetFld())->SetSeqNumber( n ); -} -} -else +// und noch die Fuss-/EndNote auf die neue Id umsetzen +if( !bField ) { SwTxtFtn* pFtnIdx; for( sal_uInt16 i = 0, nCnt = rDoc.GetFtnIdxs().Count(); i < nCnt; ++i ) commit 5fd72b4dc0191610e4d7b9cc30c5ec5b345150cb Author: Cédric Bosdonnat Date: Fri Jan 20 16:20:55 2012 +0100 Revert "Page Breaks: IsLeaveWindow() is unreliable, we do not need it here." This reverts commit 60c968e9a2ef14aa289e677bd7f40d2c4724fd12. This introduced flickering page break button diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index ff5050b..0edeb61 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -83,11 +83,17 @@ namespace void SwBreakDashedLine::MouseMove( const MouseEvent& rMEvt ) { -Point aEventPos( GetPosPixel() + rMEvt.GetPosPixel() ); -if ( !m_pWin->Contains( aEventPos ) ) -m_pWin->Fade( false ); +if ( rMEvt.IsLeaveWindow() ) +{ +// don't fade if we just move to the 'button' +Point aEventPos( GetPosPixel() + rMEvt.GetPosPixel() ); +if ( !m_pWin->Contains( aEventPos ) ) +m_pWin->Fade( false ); +} else if ( !m_pWin->IsVisible() ) +{ m_pWin->Fade( true ); +} if ( !rMEvt.IsSynthetic() ) { @@ -303,9 +309,13 @@ void SwPageBreakWin::Select( ) void SwPageBreakWin::MouseMove( const MouseEvent& rMEvt ) { -Point aEventPos( rMEvt.GetPosPixel() + rMEvt.GetPosPixel() ); -if ( !Contains( aEventPos ) && !PopupMenu::IsInExecute() ) -Fade( false ); +if ( rMEvt.IsLeaveWindow() ) +{ +// don't fade if we just move to the 'line', or the popup menu is open +Point aEventPos( rMEvt.GetPosPixel() + rMEvt.GetPosPixel() ); +if ( !Contains( aEventPos ) && !PopupMenu::IsInExecute() ) +Fade( false ); +} else if ( !IsVisible() ) Fade( 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/filter/rtf/swparrtf.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 85fb62b9103428ee83e5b9f9ef7bdcb736e04ff9 Author: Miklos Vajna Date: Wed Jan 25 16:33:25 2012 +0100 fdo#43869 use the old rtf importer for paste Signed-off-by: Cédric Bosdonnat 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 #include #include +#include #include #include #include @@ -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' - 2 commits - sw/source writerfilter/source
sw/source/ui/docvw/PageBreakWin.cxx| 22 -- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 19 --- 2 files changed, 32 insertions(+), 9 deletions(-) New commits: commit 23ac66dd14d09acc07868ee75da05073c6a78f44 Author: Miklos Vajna Date: Fri Jan 20 01:36:25 2012 +0100 Fix RTF import of dotted and word underline The problem was that these are flags, not toggles. Signed-off-by: Cédric Bosdonnat diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 82b2a31..62445de 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1455,6 +1455,21 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) checkUnicode(); RTFSkipDestination aSkip(*this); int nParam = -1; +int nSprm = -1; + +// Map all underline flags to a single sprm. +switch (nKeyword) +{ +case RTF_ULD: nSprm = 4; break; +case RTF_ULW: nSprm = 2; break; +default: break; +} +if (nSprm >= 0) +{ +RTFValue::Pointer_t pValue(new RTFValue(nSprm)); +m_aStates.top().aCharacterSprms->push_back(make_pair(NS_sprm::LN_CKul, pValue)); +return 0; +} // Indentation switch (nKeyword) @@ -2558,11 +2573,10 @@ int RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam int nSprm = -1; RTFValue::Pointer_t pBoolValue(new RTFValue(!bParam || nParam != 0)); -// Map all underline keywords to a single sprm. +// Map all underline toggles to a single sprm. switch (nKeyword) { case RTF_UL: nSprm = 1; break; -case RTF_ULD: nSprm = 4; break; case RTF_ULDASH: nSprm = 7; break; case RTF_ULDASHD: nSprm = 9; break; case RTF_ULDASHDD: nSprm = 10; break; @@ -2576,7 +2590,6 @@ int RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam case RTF_ULTHDASHDD: nSprm = 26; break; case RTF_ULTHLDASH: nSprm = 55; break; case RTF_ULULDBWAVE: nSprm = 43; break; -case RTF_ULW: nSprm = 2; break; case RTF_ULWAVE: nSprm = 11; break; default: break; } commit 0c8c85ec6ec3a19f86df844b59b2f540d8972186 Author: Cédric Bosdonnat Date: Fri Jan 20 15:40:02 2012 +0100 Revert "Page Breaks: IsLeaveWindow() is unreliable, we do not need it here." This reverts commit 1e0de54d88a79c99f0671f608f7de096cb721537. This commit introduces the button flickering behavior. diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index ff5050b..0edeb61 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -83,11 +83,17 @@ namespace void SwBreakDashedLine::MouseMove( const MouseEvent& rMEvt ) { -Point aEventPos( GetPosPixel() + rMEvt.GetPosPixel() ); -if ( !m_pWin->Contains( aEventPos ) ) -m_pWin->Fade( false ); +if ( rMEvt.IsLeaveWindow() ) +{ +// don't fade if we just move to the 'button' +Point aEventPos( GetPosPixel() + rMEvt.GetPosPixel() ); +if ( !m_pWin->Contains( aEventPos ) ) +m_pWin->Fade( false ); +} else if ( !m_pWin->IsVisible() ) +{ m_pWin->Fade( true ); +} if ( !rMEvt.IsSynthetic() ) { @@ -303,9 +309,13 @@ void SwPageBreakWin::Select( ) void SwPageBreakWin::MouseMove( const MouseEvent& rMEvt ) { -Point aEventPos( rMEvt.GetPosPixel() + rMEvt.GetPosPixel() ); -if ( !Contains( aEventPos ) && !PopupMenu::IsInExecute() ) -Fade( false ); +if ( rMEvt.IsLeaveWindow() ) +{ +// don't fade if we just move to the 'line', or the popup menu is open +Point aEventPos( rMEvt.GetPosPixel() + rMEvt.GetPosPixel() ); +if ( !Contains( aEventPos ) && !PopupMenu::IsInExecute() ) +Fade( false ); +} else if ( !IsVisible() ) Fade( true ); } ___ 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 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] .: Branch 'libreoffice-3-5' - 2 commits - sw/source
sw/source/ui/index/cnttab.cxx |3 +++ sw/source/ui/uiview/scroll.cxx |5 + 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit e611a2edceffba59e153e802ca15e8041301a117 Author: Cédric Bosdonnat Date: Fri Jan 13 16:08:17 2012 +0100 fdo#38515: Fixed crasher in dialog destructor diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index dfb2ab5..30f3a84 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -356,6 +356,9 @@ SwMultiTOXTabDialog::~SwMultiTOXTabDialog() { SW_MOD()->GetModuleConfig()->SetShowIndexPreview(aShowExampleCB.IsChecked()); +// fdo#38515 Avoid setting focus on deleted controls in the destructors +EnableInput( sal_False ); + for(sal_uInt16 i = 0; i < nTypeCount; i++) { delete pFormArr[i]; commit f80ed35b8b2f12a89dee257b82022141e0486362 Author: Cédric Bosdonnat Date: Fri Jan 13 12:00:19 2012 +0100 fdo#30788: why not showing horizontal scrollbar when needed? diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx index cd33e92..2bf1d6d 100644 --- a/sw/source/ui/uiview/scroll.cxx +++ b/sw/source/ui/uiview/scroll.cxx @@ -132,10 +132,7 @@ void SwScrollbar::AutoShow() if(ScrollBar::IsVisible()) ScrollBar::Show(sal_False); } -else if ( !ScrollBar::IsVisible() && - (!bHori || nVis) )//Optimierung fuer Browser. -//Horizontaler Scrollbar per -//default aus. +else if ( !ScrollBar::IsVisible() ) { ScrollBar::Show(sal_True); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: sw/source
sw/source/ui/index/cnttab.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 4914b23e7e91b184d69eb00a74ce1c463c5754a7 Author: Cédric Bosdonnat Date: Fri Jan 13 16:08:17 2012 +0100 fdo#38515: Fixed crasher in dialog destructor diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 414bc5f..b4fc42a 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -356,6 +356,9 @@ SwMultiTOXTabDialog::~SwMultiTOXTabDialog() { SW_MOD()->GetModuleConfig()->SetShowIndexPreview(aShowExampleCB.IsChecked()); +// fdo#38515 Avoid setting focus on deleted controls in the destructors +EnableInput( sal_False ); + for(sal_uInt16 i = 0; i < nTypeCount; i++) { delete pFormArr[i]; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - sw/source
sw/source/filter/ww8/wrtw8sty.cxx |3 ++- sw/source/ui/uiview/scroll.cxx|5 + 2 files changed, 3 insertions(+), 5 deletions(-) New commits: commit d38a56fcf0cd3052f44d6de5157fe8ef8cec3e36 Author: Cédric Bosdonnat Date: Fri Jan 13 12:00:19 2012 +0100 fdo#30788: why not showing horizontal scrollbar when needed? diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx index cd33e92..2bf1d6d 100644 --- a/sw/source/ui/uiview/scroll.cxx +++ b/sw/source/ui/uiview/scroll.cxx @@ -132,10 +132,7 @@ void SwScrollbar::AutoShow() if(ScrollBar::IsVisible()) ScrollBar::Show(sal_False); } -else if ( !ScrollBar::IsVisible() && - (!bHori || nVis) )//Optimierung fuer Browser. -//Horizontaler Scrollbar per -//default aus. +else if ( !ScrollBar::IsVisible() ) { ScrollBar::Show(sal_True); } commit 516bb47afcc71e69f8f6c6a6246455a2c4269c4c Author: Cédric Bosdonnat Date: Tue Jan 10 14:53:56 2012 +0100 n#715421 - Word 2010 validation: no plcfhdd if ccpHdd is 0 diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 2207f37..21dc7c7 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -1830,7 +1830,8 @@ void WW8_WrPlcSepx::WritePlcSed( WW8Export& rWrt ) const void WW8_WrPlcSepx::WritePlcHdd( WW8Export& rWrt ) const { -if( pTxtPos && pTxtPos->Count() ) +// Don't write out the PlcfHdd if ccpHdd is 0: it's a validation failure case. +if( rWrt.pFib->ccpHdr != 0 && pTxtPos && pTxtPos->Count() ) { rWrt.pFib->fcPlcfhdd = rWrt.pTableStrm->Tell(); pTxtPos->Write( *rWrt.pTableStrm ); // Plc0 ___ 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 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/core/frmedt/fefly1.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 3d3584237424b8efefdb0579e131892e1ddf00a9 Author: Cédric Bosdonnat 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' - xmloff/source
xmloff/source/style/PageMasterExportPropMapper.cxx | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) New commits: commit bdf67a728996489fabc281ce24d8b81cd6287588 Author: Cédric Bosdonnat Date: Fri Jan 6 10:33:19 2012 +0100 fdo#43862: reintroduce fo:margin-* on top of fo:margin for backward compat diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx index ba0f45b..eedb4a4 100644 --- a/xmloff/source/style/PageMasterExportPropMapper.cxx +++ b/xmloff/source/style/PageMasterExportPropMapper.cxx @@ -151,14 +151,8 @@ void XMLPropertyStateBuffer::ContextFilter( ::std::vector< XMLPropertyState >& ) pPMMarginLeft->maValue >>= nLeft; pPMMarginRight->maValue >>= nRight; -if ((nTop == nBottom) && (nBottom == nLeft) && (nLeft == nRight)) -{ -lcl_RemoveState( pPMMarginTop ); -lcl_RemoveState( pPMMarginBottom ); -lcl_RemoveState( pPMMarginLeft ); -lcl_RemoveState( pPMMarginRight ); -} -else +// Don't remove the Margin Left,Right,Top,Bottom for backward compatibility +if ((nTop != nBottom) || (nBottom != nLeft) || (nLeft != nRight)) lcl_RemoveState( pPMMarginAll ); } else ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: xmloff/source
xmloff/source/style/PageMasterExportPropMapper.cxx | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) New commits: commit 0100280a5c5b121fab2aa932092a7a887bbb507c Author: Cédric Bosdonnat Date: Fri Jan 6 10:33:19 2012 +0100 fdo#43862: reintroduce fo:margin-* on top of fo:margin for backward compat diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx index ba0f45b..eedb4a4 100644 --- a/xmloff/source/style/PageMasterExportPropMapper.cxx +++ b/xmloff/source/style/PageMasterExportPropMapper.cxx @@ -151,14 +151,8 @@ void XMLPropertyStateBuffer::ContextFilter( ::std::vector< XMLPropertyState >& ) pPMMarginLeft->maValue >>= nLeft; pPMMarginRight->maValue >>= nRight; -if ((nTop == nBottom) && (nBottom == nLeft) && (nLeft == nRight)) -{ -lcl_RemoveState( pPMMarginTop ); -lcl_RemoveState( pPMMarginBottom ); -lcl_RemoveState( pPMMarginLeft ); -lcl_RemoveState( pPMMarginRight ); -} -else +// Don't remove the Margin Left,Right,Top,Bottom for backward compatibility +if ((nTop != nBottom) || (nBottom != nLeft) || (nLeft != nRight)) lcl_RemoveState( pPMMarginAll ); } 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/edit/edtox.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 376488f5747cdbcfc4905aa12a531a266303658d Author: Cédric Bosdonnat 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] .: sw/source
sw/source/core/edit/edtox.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 41cd78b805a36d5676b2075a4860e9aee7bc5491 Author: Cédric Bosdonnat 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] .: 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 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/core/edit/eddel.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f8c361927f9ae05887c1a8f337a9df88abb19474 Author: Cédric Bosdonnat 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/core/crsr/crsrsh.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit b7d6bff10a85986e5e6ebfa961f29fa8b3815b40 Author: Cédric Bosdonnat 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] .: dictionaries/fr_FR
dev/null |binary dictionaries/fr_FR/description.xml |2 +- dictionaries/fr_FR/icon.png|binary dictionaries/fr_FR/makefile.mk |2 +- 4 files changed, 2 insertions(+), 2 deletions(-) New commits: commit ebf1e88855bf294968fe2475ecf82b21f7e90193 Author: Olivier R Date: Thu Jan 5 14:36:38 2012 +0100 New icon for French extension (language code) diff --git a/dictionaries/fr_FR/description.xml b/dictionaries/fr_FR/description.xml index ad2dd05..c375fc9 100644 --- a/dictionaries/fr_FR/description.xml +++ b/dictionaries/fr_FR/description.xml @@ -10,7 +10,7 @@ - + http://www.dicollecte.org/"; lang="fr">Dicollecte diff --git a/dictionaries/fr_FR/french_flag.png b/dictionaries/fr_FR/french_flag.png deleted file mode 100644 index ed12585..000 Binary files a/dictionaries/fr_FR/french_flag.png and /dev/null differ diff --git a/dictionaries/fr_FR/icon.png b/dictionaries/fr_FR/icon.png new file mode 100644 index 000..9e13bbd Binary files /dev/null and b/dictionaries/fr_FR/icon.png differ diff --git a/dictionaries/fr_FR/makefile.mk b/dictionaries/fr_FR/makefile.mk index 368be74..51ac0b7 100644 --- a/dictionaries/fr_FR/makefile.mk +++ b/dictionaries/fr_FR/makefile.mk @@ -60,7 +60,7 @@ COMPONENT_FILES= \ $(EXTENSIONDIR)$/hyph-fr.tex \ $(EXTENSIONDIR)$/hyph_fr.dic \ $(EXTENSIONDIR)$/thes_fr.dat \ -$(EXTENSIONDIR)$/french_flag.png \ +$(EXTENSIONDIR)$/icon.png \ $(EXTENSIONDIR)$/package-description.txt COMPONENT_CONFIGDEST=. ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - dictionaries/fr_FR
dev/null |binary dictionaries/fr_FR/description.xml |2 +- dictionaries/fr_FR/icon.png|binary dictionaries/fr_FR/makefile.mk |2 +- 4 files changed, 2 insertions(+), 2 deletions(-) New commits: commit e8972a8656c7eedc670dd357b6d06a303db3c2d6 Author: Olivier R Date: Thu Jan 5 14:36:38 2012 +0100 New icon for French extension (language code) diff --git a/dictionaries/fr_FR/description.xml b/dictionaries/fr_FR/description.xml index ad2dd05..c375fc9 100644 --- a/dictionaries/fr_FR/description.xml +++ b/dictionaries/fr_FR/description.xml @@ -10,7 +10,7 @@ - + http://www.dicollecte.org/"; lang="fr">Dicollecte diff --git a/dictionaries/fr_FR/french_flag.png b/dictionaries/fr_FR/french_flag.png deleted file mode 100644 index ed12585..000 Binary files a/dictionaries/fr_FR/french_flag.png and /dev/null differ diff --git a/dictionaries/fr_FR/icon.png b/dictionaries/fr_FR/icon.png new file mode 100644 index 000..9e13bbd Binary files /dev/null and b/dictionaries/fr_FR/icon.png differ diff --git a/dictionaries/fr_FR/makefile.mk b/dictionaries/fr_FR/makefile.mk index 368be74..51ac0b7 100644 --- a/dictionaries/fr_FR/makefile.mk +++ b/dictionaries/fr_FR/makefile.mk @@ -60,7 +60,7 @@ COMPONENT_FILES= \ $(EXTENSIONDIR)$/hyph-fr.tex \ $(EXTENSIONDIR)$/hyph_fr.dic \ $(EXTENSIONDIR)$/thes_fr.dat \ -$(EXTENSIONDIR)$/french_flag.png \ +$(EXTENSIONDIR)$/icon.png \ $(EXTENSIONDIR)$/package-description.txt COMPONENT_CONFIGDEST=. ___ 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 | 21 +++-- 1 file changed, 3 insertions(+), 18 deletions(-) New commits: commit 3a326395a48db313b907b4a35392216d7b2e2a11 Author: Cédric Bosdonnat 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] .: Branch 'libreoffice-3-5' - dictionaries/fr_FR
dictionaries/fr_FR/README_fr.txt |4 dictionaries/fr_FR/description.xml |3 dictionaries/fr_FR/fr.aff | 56 ++--- dictionaries/fr_FR/fr.dic | 283 ++--- dictionaries/fr_FR/french_flag.png |binary dictionaries/fr_FR/makefile.mk |1 dictionaries/fr_FR/package-description.txt |2 7 files changed, 180 insertions(+), 169 deletions(-) New commits: commit b8719c4a9a10ba290abab059d675f7d55f702318 Author: Olivier R Date: Wed Jan 4 18:56:37 2012 +0100 Update French dictionaries 4.4 -> 4.4.1 + flag diff --git a/dictionaries/fr_FR/README_fr.txt b/dictionaries/fr_FR/README_fr.txt index 500bbe8..2e7f88d 100644 --- a/dictionaries/fr_FR/README_fr.txt +++ b/dictionaries/fr_FR/README_fr.txt @@ -1,7 +1,7 @@ ___ - DICTIONNAIRE ORTHOGRAPHIQUE FRANÃAIS «Moderne» - version 4.4 + DICTIONNAIRE ORTHOGRAPHIQUE FRANÃAIS «MODERNE» + version 4.4.1 Olivier R. - dicollectefreefr Dicollecte : http://www.dicollecte.org/ diff --git a/dictionaries/fr_FR/description.xml b/dictionaries/fr_FR/description.xml index 6d536d9..ad2dd05 100644 --- a/dictionaries/fr_FR/description.xml +++ b/dictionaries/fr_FR/description.xml @@ -9,6 +9,9 @@ + + + http://www.dicollecte.org/"; lang="fr">Dicollecte diff --git a/dictionaries/fr_FR/fr.aff b/dictionaries/fr_FR/fr.aff index e3f5f66..f91bcb0 100644 --- a/dictionaries/fr_FR/fr.aff +++ b/dictionaries/fr_FR/fr.aff @@ -1,6 +1,6 @@ -# AFFIXES DU DICTIONNAIRE FRANÃAIS «Moderne» v4.4 +# AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÃAIS «MODERNE» v4.4.1 # par Olivier R. -- licences LGPL, GPL, MPL -# Généré le 20 December 2011 à 17:03 +# Généré le 28 December 2011 à 21:22 # Pour améliorer le dictionnaire, allez sur http://www.dicollecte.org/ @@ -163,7 +163,7 @@ COMPOUNDFLAG == -AM 298 +AM 296 AM po:nom is:mas AM po:nom is:fem AM po:adj @@ -377,12 +377,10 @@ AM po:v1t is:infi AM po:v1iîp AM po:v1itpm AM po:v1itm -AM po:v1 AM po:v0e AM po:v0a AM po:tag -AM po:prn po:geo is:fem -AM po:prn is:fem +AM po:prn po:geo is:epi is:inv AM po:pfx AM po:patr is:fem is:inv AM po:patr @@ -576,6 +574,7 @@ AF f3p+() AF f1p.() AF a5p.() AF Ui() +AF S= AF yU() AF xP() AF xO() @@ -595,7 +594,6 @@ AF iDq+() AF c5p.() AF b0p.() AF a8p+() -AF S= AF L'D'Q'Q* AF D'Q'Qj AF A*() @@ -792,15 +790,15 @@ PFX Q' Å qu'Å Å 97 PFX Q' æ qu'à æ 97 PFX Q* Y 3 -PFX Q* 0 quoiqu' [aà âeèéêiîoôuyhÅæAÃÃEÃÃÃIÃOÃUYHÅÃ] 292 -PFX Q* 0 puisqu' [aà âeèéêiîoôuyhÅæAÃÃEÃÃÃIÃOÃUYHÅÃ] 293 -PFX Q* 0 lorsqu' [aà âeèéêiîoôuyhÅæAÃÃEÃÃÃIÃOÃUYHÅÃ] 296 +PFX Q* 0 quoiqu' [aà âeèéêiîoôuyhÅæAÃÃEÃÃÃIÃOÃUYHÅÃ] 290 +PFX Q* 0 puisqu' [aà âeèéêiîoôuyhÅæAÃÃEÃÃÃIÃOÃUYHÅÃ] 291 +PFX Q* 0 lorsqu' [aà âeèéêiîoôuyhÅæAÃÃEÃÃÃIÃOÃUYHÅÃ] 294 PFX Qj Y 1 -PFX Qj 0 jusqu' [aà âeèéêiîoôuyhÅæ] 297 +PFX Qj 0 jusqu' [aà âeèéêiîoôuyhÅæ] 295 PFX Si Y 1 -PFX Si 0 s' . 290 +PFX Si 0 s' . 288 SFX S. Y 2 SFX S. 0 0 . 118 @@ -1120,7 +1118,7 @@ PFX U. 0 z . PFX U. 0 y . PFX n' Y 1 -PFX n' 0 n' [aà âeèéêiîoôuyhÅæ] 294 +PFX n' 0 n' [aà âeèéêiîoôuyhÅæ] 292 PFX q' Y 1 PFX q' 0 qu' [aà âeèéêiîoôuyhÅæ] 201 @@ -1129,7 +1127,7 @@ PFX d' Y 1 PFX d' 0 d' [aà âeèéêiîoôuyhÅæ] 97 PFX j' Y 1 -PFX j' 0 j' [aà âeèéêiîoôuyhÅæ] 298 +PFX j' 0 j' [aà âeèéêiîoôuyhÅæ] 296 PFX c' Y 2 PFX c' 0 c' [eé] 202 @@ -1139,13 +1137,13 @@ PFX l' Y 1 PFX l' 0 l' [aà âeèéêiîoôuyhÅæ] 108 PFX m' Y 1 -PFX m' 0 m' [aà âeèéêiîoôuyhÅæ] 295 +PFX m' 0 m' [aà âeèéêiîoôuyhÅæ] 293 PFX t' Y 1 -PFX t' 0 t' [aà âeèéêiîoôuyhÅæ] 289 +PFX t' 0 t' [aà âeèéêiîoôuyhÅæ] 287 PFX s' Y 1 -PFX s' 0 s' [aà âeèéêiîoôuyhÅæ] 291 +PFX s' 0 s' [aà âeèéêiîoôuyhÅæ] 289 SFX zA Y 52 SFX zA voir voir/225 avoir 62 @@ -1207,16 +1205,16 @@ SFX zE être étant/6 être 48 SFX zE être été être 104 SFX zE être suis être 34 SFX zE être es/20 être 35 -SFX zE être est/123 être 21 +SFX zE être est/124 être 21 SFX zE être sommes être 55 SFX zE tre tes/14 être 71 SFX zE être sont être 26 SFX zE être étais/22 être 64 SFX zE être étais/20 être 63 -SFX zE être était/123 être 50 +SFX zE être était/124 être 50 SFX zE être étions/17 être 77 SFX zE être étiez/14 être 76 -SFX zE être étaient/123 être 51 +SFX zE être étaient/124 être 51 SFX zE être fus être 69 SFX zE être fussé-je être 163 SFX zE être fus être 68 @@ -4986,7 +4984,7 @@ SFX c4 éger égeons/46 éger 57 SFX c4 er ez/31 er 75 SFX c5 Y 263 -SFX c5 er er/124 er 62 +SFX c5 er er/125 er 62 SFX c5 er ant/159 [^cg]er 48 SFX c5 écer éçant/159 écer 48 SFX c5 éger égeant/
[Libreoffice-commits] .: dictionaries/fr_FR
dictionaries/fr_FR/README_fr.txt |4 dictionaries/fr_FR/description.xml |3 dictionaries/fr_FR/fr.aff | 56 ++--- dictionaries/fr_FR/fr.dic | 283 ++--- dictionaries/fr_FR/french_flag.png |binary dictionaries/fr_FR/makefile.mk |1 dictionaries/fr_FR/package-description.txt |2 7 files changed, 180 insertions(+), 169 deletions(-) New commits: commit 3913f7b98aa13db4b62d3aee9313a49c05ec86e0 Author: Olivier R Date: Wed Jan 4 18:56:37 2012 +0100 Update French dictionaries 4.4 -> 4.4.1 + flag diff --git a/dictionaries/fr_FR/README_fr.txt b/dictionaries/fr_FR/README_fr.txt index 500bbe8..2e7f88d 100644 --- a/dictionaries/fr_FR/README_fr.txt +++ b/dictionaries/fr_FR/README_fr.txt @@ -1,7 +1,7 @@ ___ - DICTIONNAIRE ORTHOGRAPHIQUE FRANÃAIS «Moderne» - version 4.4 + DICTIONNAIRE ORTHOGRAPHIQUE FRANÃAIS «MODERNE» + version 4.4.1 Olivier R. - dicollectefreefr Dicollecte : http://www.dicollecte.org/ diff --git a/dictionaries/fr_FR/description.xml b/dictionaries/fr_FR/description.xml index 6d536d9..ad2dd05 100644 --- a/dictionaries/fr_FR/description.xml +++ b/dictionaries/fr_FR/description.xml @@ -9,6 +9,9 @@ + + + http://www.dicollecte.org/"; lang="fr">Dicollecte diff --git a/dictionaries/fr_FR/fr.aff b/dictionaries/fr_FR/fr.aff index e3f5f66..f91bcb0 100644 --- a/dictionaries/fr_FR/fr.aff +++ b/dictionaries/fr_FR/fr.aff @@ -1,6 +1,6 @@ -# AFFIXES DU DICTIONNAIRE FRANÃAIS «Moderne» v4.4 +# AFFIXES DU DICTIONNAIRE ORTHOGRAPHIQUE FRANÃAIS «MODERNE» v4.4.1 # par Olivier R. -- licences LGPL, GPL, MPL -# Généré le 20 December 2011 à 17:03 +# Généré le 28 December 2011 à 21:22 # Pour améliorer le dictionnaire, allez sur http://www.dicollecte.org/ @@ -163,7 +163,7 @@ COMPOUNDFLAG == -AM 298 +AM 296 AM po:nom is:mas AM po:nom is:fem AM po:adj @@ -377,12 +377,10 @@ AM po:v1t is:infi AM po:v1iîp AM po:v1itpm AM po:v1itm -AM po:v1 AM po:v0e AM po:v0a AM po:tag -AM po:prn po:geo is:fem -AM po:prn is:fem +AM po:prn po:geo is:epi is:inv AM po:pfx AM po:patr is:fem is:inv AM po:patr @@ -576,6 +574,7 @@ AF f3p+() AF f1p.() AF a5p.() AF Ui() +AF S= AF yU() AF xP() AF xO() @@ -595,7 +594,6 @@ AF iDq+() AF c5p.() AF b0p.() AF a8p+() -AF S= AF L'D'Q'Q* AF D'Q'Qj AF A*() @@ -792,15 +790,15 @@ PFX Q' Å qu'Å Å 97 PFX Q' æ qu'à æ 97 PFX Q* Y 3 -PFX Q* 0 quoiqu' [aà âeèéêiîoôuyhÅæAÃÃEÃÃÃIÃOÃUYHÅÃ] 292 -PFX Q* 0 puisqu' [aà âeèéêiîoôuyhÅæAÃÃEÃÃÃIÃOÃUYHÅÃ] 293 -PFX Q* 0 lorsqu' [aà âeèéêiîoôuyhÅæAÃÃEÃÃÃIÃOÃUYHÅÃ] 296 +PFX Q* 0 quoiqu' [aà âeèéêiîoôuyhÅæAÃÃEÃÃÃIÃOÃUYHÅÃ] 290 +PFX Q* 0 puisqu' [aà âeèéêiîoôuyhÅæAÃÃEÃÃÃIÃOÃUYHÅÃ] 291 +PFX Q* 0 lorsqu' [aà âeèéêiîoôuyhÅæAÃÃEÃÃÃIÃOÃUYHÅÃ] 294 PFX Qj Y 1 -PFX Qj 0 jusqu' [aà âeèéêiîoôuyhÅæ] 297 +PFX Qj 0 jusqu' [aà âeèéêiîoôuyhÅæ] 295 PFX Si Y 1 -PFX Si 0 s' . 290 +PFX Si 0 s' . 288 SFX S. Y 2 SFX S. 0 0 . 118 @@ -1120,7 +1118,7 @@ PFX U. 0 z . PFX U. 0 y . PFX n' Y 1 -PFX n' 0 n' [aà âeèéêiîoôuyhÅæ] 294 +PFX n' 0 n' [aà âeèéêiîoôuyhÅæ] 292 PFX q' Y 1 PFX q' 0 qu' [aà âeèéêiîoôuyhÅæ] 201 @@ -1129,7 +1127,7 @@ PFX d' Y 1 PFX d' 0 d' [aà âeèéêiîoôuyhÅæ] 97 PFX j' Y 1 -PFX j' 0 j' [aà âeèéêiîoôuyhÅæ] 298 +PFX j' 0 j' [aà âeèéêiîoôuyhÅæ] 296 PFX c' Y 2 PFX c' 0 c' [eé] 202 @@ -1139,13 +1137,13 @@ PFX l' Y 1 PFX l' 0 l' [aà âeèéêiîoôuyhÅæ] 108 PFX m' Y 1 -PFX m' 0 m' [aà âeèéêiîoôuyhÅæ] 295 +PFX m' 0 m' [aà âeèéêiîoôuyhÅæ] 293 PFX t' Y 1 -PFX t' 0 t' [aà âeèéêiîoôuyhÅæ] 289 +PFX t' 0 t' [aà âeèéêiîoôuyhÅæ] 287 PFX s' Y 1 -PFX s' 0 s' [aà âeèéêiîoôuyhÅæ] 291 +PFX s' 0 s' [aà âeèéêiîoôuyhÅæ] 289 SFX zA Y 52 SFX zA voir voir/225 avoir 62 @@ -1207,16 +1205,16 @@ SFX zE être étant/6 être 48 SFX zE être été être 104 SFX zE être suis être 34 SFX zE être es/20 être 35 -SFX zE être est/123 être 21 +SFX zE être est/124 être 21 SFX zE être sommes être 55 SFX zE tre tes/14 être 71 SFX zE être sont être 26 SFX zE être étais/22 être 64 SFX zE être étais/20 être 63 -SFX zE être était/123 être 50 +SFX zE être était/124 être 50 SFX zE être étions/17 être 77 SFX zE être étiez/14 être 76 -SFX zE être étaient/123 être 51 +SFX zE être étaient/124 être 51 SFX zE être fus être 69 SFX zE être fussé-je être 163 SFX zE être fus être 68 @@ -4986,7 +4984,7 @@ SFX c4 éger égeons/46 éger 57 SFX c4 er ez/31 er 75 SFX c5 Y 263 -SFX c5 er er/124 er 62 +SFX c5 er er/125 er 62 SFX c5 er ant/159 [^cg]er 48 SFX c5 écer éçant/159 écer 48 SFX c5 éger égeant/
[Libreoffice-commits] .: sw/source
sw/source/ui/docvw/PageBreakWin.cxx | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) New commits: commit a0fa723ed5761609d2c31061fdd0282a2f1df6e7 Author: Cédric Bosdonnat Date: Wed Jan 4 21:54:05 2012 +0100 Page Break: fixed position of tab in RTL and added dirty hack for freezes diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index aa1085c..b16e51f 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -142,8 +142,11 @@ namespace m_pWin->Fade( true ); } -Point* pPtr = new Point( rMEvt.GetPosPixel() ); -m_pWin->UpdatePosition( pPtr ); +if ( !rMEvt.IsSynthetic() ) +{ +Point* pPtr = new Point( rMEvt.GetPosPixel() ); +m_pWin->UpdatePosition( pPtr ); +} } void SwBreakDashedLine::MouseButtonDown( const MouseEvent& rMEvt ) @@ -450,7 +453,14 @@ void SwPageBreakWin::UpdatePosition( const Point* pEvtPt ) if ( m_pMousePt ) { nBtnLeft = nLineLeft + m_pMousePt->X(); -if ( ( nBtnLeft + aBtnSize.getWidth() ) > nLineRight ) + +if ( Application::GetSettings().GetLayoutRTL() ) +{ +nBtnLeft -= aBtnSize.getWidth(); +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 | 15 +++ 1 file changed, 15 insertions(+) New commits: commit fef489ad0f1f14bd9f018552c47a93a80e8b353d Author: Cédric Bosdonnat 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
[Libreoffice-commits] .: sw/source
sw/source/core/layout/paintfrm.cxx | 15 --- sw/source/ui/docvw/FrameControlsManager.cxx |8 sw/source/ui/inc/FrameControlsManager.hxx |1 + 3 files changed, 17 insertions(+), 7 deletions(-) New commits: commit 58c4853f5489d8e23ae7aabdb544cde80a711ece Author: Cédric Bosdonnat Date: Wed Jan 4 17:31:52 2012 +0100 Page Break: fix remaining indicator in some cases When creating a new page without using a page break, before a page break, there was a remaining indicator. These are now checked and removed to avoid such cases. diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index dd0c0a7..074a54a 100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3341,15 +3341,16 @@ void SwPageFrm::PaintBreak( ) const if ( pFirstFrm && pFirstFrm->IsTabFrm() ) pFlowFrm = static_cast< const SwTabFrm* >( pFirstFrm ); -if ( pFlowFrm && pFlowFrm->IsPageBreak( sal_True ) ) +SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( pGlobalShell ); +if ( pWrtSh ) { -SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( pGlobalShell ); -if ( pWrtSh ) -{ -SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin(); -SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager(); +SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin(); +SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager(); + +if ( pFlowFrm && pFlowFrm->IsPageBreak( sal_True ) ) rMngr.SetPageBreakControl( this ); -} +else +rMngr.RemoveControlsByType( PageBreak, this ); } } SwLayoutFrm::PaintBreak( ); diff --git a/sw/source/ui/docvw/FrameControlsManager.cxx b/sw/source/ui/docvw/FrameControlsManager.cxx index 40527a6..b262132 100644 --- a/sw/source/ui/docvw/FrameControlsManager.cxx +++ b/sw/source/ui/docvw/FrameControlsManager.cxx @@ -122,6 +122,14 @@ void SwFrameControlsManager::RemoveControls( const SwFrm* pFrm ) } } +void SwFrameControlsManager::RemoveControlsByType( FrameControlType eType, const SwFrm* pFrm ) +{ +vector< SwFrameControlPtr >& aVect = m_aControls[eType]; +aVect.erase( remove_if( aVect.begin(), +aVect.end(), +FramePredicate( pFrm ) ), aVect.end() ); +} + void SwFrameControlsManager::HideControls( FrameControlType eType ) { diff --git a/sw/source/ui/inc/FrameControlsManager.hxx b/sw/source/ui/inc/FrameControlsManager.hxx index ec78b1d..06e618c 100644 --- a/sw/source/ui/inc/FrameControlsManager.hxx +++ b/sw/source/ui/inc/FrameControlsManager.hxx @@ -61,6 +61,7 @@ class SwFrameControlsManager std::vector< SwFrameControlPtr >& GetControls( FrameControlType eType ); void AddControl( FrameControlType eType, SwFrameControlPtr pControl ); void RemoveControls( const SwFrm* pFrm ); +void RemoveControlsByType( FrameControlType eType, const SwFrm* pFrm ); void HideControls( FrameControlType eType ); void SetReadonlyControls( bool bReadonly ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - cui/source sw/source
cui/source/dialogs/SpellDialog.cxx |2 +- sw/source/core/layout/paintfrm.cxx | 15 --- sw/source/ui/docvw/FrameControlsManager.cxx |8 sw/source/ui/inc/FrameControlsManager.hxx |1 + 4 files changed, 18 insertions(+), 8 deletions(-) New commits: commit fd399133ded7f5ec1eb8768eb7fd1d7b269b6e73 Author: László Németh Date: Tue Dec 13 10:18:52 2011 +0100 Fix always-false condition of FullCommentURL diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index fee3bdd..cb68f6b 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1233,7 +1233,7 @@ bool SpellDialog::GetNextSentence_Impl(bool bUseSavedSentence, bool bRecheck) beans::PropertyValues aProperties = aStart->aGrammarError.aProperties; rtl::OUString sFullCommentURL; sal_Int32 i = 0; -while ( !sFullCommentURL.isEmpty() && i < aProperties.getLength() ) +while ( sFullCommentURL.isEmpty() && i < aProperties.getLength() ) { if ( aProperties[i].Name.equalsAscii( "FullCommentURL" ) ) { commit 8005d9db022c83fdfd64f6bb203e489dad13a664 Author: Cédric Bosdonnat Date: Wed Jan 4 17:31:52 2012 +0100 Page Break: fix remaining indicator in some cases When creating a new page without using a page break, before a page break, there was a remaining indicator. These are now checked and removed to avoid such cases. diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 387d8a3..55a2b71 100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3341,15 +3341,16 @@ void SwPageFrm::PaintBreak( ) const if ( pFirstFrm && pFirstFrm->IsTabFrm() ) pFlowFrm = static_cast< const SwTabFrm* >( pFirstFrm ); -if ( pFlowFrm && pFlowFrm->IsPageBreak( sal_True ) ) +SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( pGlobalShell ); +if ( pWrtSh ) { -SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( pGlobalShell ); -if ( pWrtSh ) -{ -SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin(); -SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager(); +SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin(); +SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager(); + +if ( pFlowFrm && pFlowFrm->IsPageBreak( sal_True ) ) rMngr.SetPageBreakControl( this ); -} +else +rMngr.RemoveControlsByType( PageBreak, this ); } } SwLayoutFrm::PaintBreak( ); diff --git a/sw/source/ui/docvw/FrameControlsManager.cxx b/sw/source/ui/docvw/FrameControlsManager.cxx index 6b00d56..40e461d 100644 --- a/sw/source/ui/docvw/FrameControlsManager.cxx +++ b/sw/source/ui/docvw/FrameControlsManager.cxx @@ -122,6 +122,14 @@ void SwFrameControlsManager::RemoveControls( const SwFrm* pFrm ) } } +void SwFrameControlsManager::RemoveControlsByType( FrameControlType eType, const SwFrm* pFrm ) +{ +vector< SwFrameControlPtr >& aVect = m_aControls[eType]; +aVect.erase( remove_if( aVect.begin(), +aVect.end(), +FramePredicate( pFrm ) ), aVect.end() ); +} + void SwFrameControlsManager::HideControls( FrameControlType eType ) { diff --git a/sw/source/ui/inc/FrameControlsManager.hxx b/sw/source/ui/inc/FrameControlsManager.hxx index 453466e..c9e0aed 100644 --- a/sw/source/ui/inc/FrameControlsManager.hxx +++ b/sw/source/ui/inc/FrameControlsManager.hxx @@ -64,6 +64,7 @@ class SwFrameControlsManager std::vector< SwFrameControlPtr >& GetControls( FrameControlType eType ); void AddControl( FrameControlType eType, SwFrameControlPtr pControl ); void RemoveControls( const SwFrm* pFrm ); +void RemoveControlsByType( FrameControlType eType, const SwFrm* pFrm ); void HideControls( FrameControlType eType ); void SetReadonlyControls( bool bReadonly ); ___ 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/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 dbd83924fb5b30c0a4ba280d2d61a0f17b166453 Author: Cédric Bosdonnat 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 #include -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 70e5b3d..ff7d50e 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 300aa4d..aa1085c 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -120,8 +120,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 ); @@ -171,8 +171,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/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 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 #include -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] .: 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 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& ) B2DRectangle aBRect( double(
[Libreoffice-commits] .: sw/source
sw/source/ui/docvw/PageBreakWin.cxx |6 -- 1 file changed, 6 deletions(-) New commits: commit 5807b07161d84ef105cc1a2292c8c1f09888e39f Author: Cédric Bosdonnat Date: Mon Jan 2 10:58:12 2012 +0100 Page Breaks: avoid flickering of the tab by drawing it over the line diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index 7e6232d..538f6d7 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -477,15 +477,9 @@ void SwPageBreakWin::UpdatePosition( ) { long nRight = std::min( nPgRight + aBtnSize.getWidth() - ARROW_WIDTH / 2, aVisArea.Right() ); nBtnLeft = nRight - aBtnSize.getWidth(); -if ( IsVisible() ) - nLineRight = nBtnLeft; } else -{ nBtnLeft = std::max( nPgLeft - aBtnSize.Width() + ARROW_WIDTH / 2, aVisArea.Left() ); -if ( IsVisible() ) - nLineLeft = nBtnLeft + aBtnSize.Width(); -} // Set the button position Point aBtnPos( nBtnLeft, nYLineOffset - aBtnSize.Height() / 2 ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 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 4c75e57a42251b86683253a832c534d8909a9f23 Author: Cédric Bosdonnat 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 3e07f62..c042eda 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
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 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] .: sw/source
sw/source/ui/config/optpage.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9ea15fea21487b82636bae516a220bf15f805a84 Author: Cédric Bosdonnat Date: Fri Dec 23 09:29:49 2011 +0100 WaE: possibly uninitialized variable diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 37f03bc..231d7bf 100755 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1770,7 +1770,7 @@ sal_Bool SwCompareOptionsTabPage::FillItemSet( SfxItemSet& ) aWordRB.IsChecked() != aWordRB.GetSavedValue() || aCharRB.IsChecked() != aCharRB.GetSavedValue() ) { -SvxCompareMode eCmpMode; +SvxCompareMode eCmpMode = SVX_CMP_AUTO; if ( aAutoRB.IsChecked() ) eCmpMode = SVX_CMP_AUTO; if ( aWordRB.IsChecked() ) eCmpMode = SVX_CMP_BY_WORD; ___ 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 |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 5e772cda4008fc26bdbd015041d40806b5c339f0 Author: Cédric Bosdonnat 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/layout/paintfrm.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit e09b9a635ee23ce162e1733fc804a2cc182bc25f Author: Cédric Bosdonnat 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] .: writerfilter/source
writerfilter/source/dmapper/DomainMapper_Impl.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit e040d2931658b411bfbd1c668dc96422374a74be Author: Cédric Bosdonnat Date: Tue Dec 20 16:27:46 2011 +0100 RTF/DOCX import: fixed the import of consecutive frames (n#703032) When we have two consecutive paragraphs with different frame properties, the second frame wasn't created. Now store the current paragraph properties in order to create the frame later. diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 4bd3f18..484895a 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1005,6 +1005,13 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) { //handles (8)(9) and completes (6) CheckUnregisteredFrameConversion( ); + +// If different frame properties are set on this paragraph, keep them. +if ( !bIsDropCap && pParaContext->IsFrameMode() ) +{ +pToBeSavedProperties.reset( new ParagraphProperties(*pParaContext) ); +lcl_AddRangeAndStyle(pToBeSavedProperties, xTextAppend, pPropertyMap); +} } } ___ 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 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] .: sw/source
sw/source/core/unocore/unotext.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit ab218a565ee9cc033d97d71ab52e9d87b02b1874 Author: Noel Power 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/core/access/acccontext.cxx | 15 +++ 1 file changed, 15 insertions(+) New commits: commit 33e1bb84abcb1ba60595a26884f8772249f7416b Author: Vincent Povirk 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 #include #include +#include #include #include #include @@ -1359,6 +1360,10 @@ sal_Bool SwAccessibleContext::Select( SwPaM *pPaM, SdrObject *pObj, if( pFEShell ) pFEShell->FinishOLEObj(); +SwWrtShell* pWrtShell = pCrsrShell->ISA( SwWrtShell ) +? static_cast( 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] .: sw/source
sw/source/core/access/acccontext.cxx | 15 +++ 1 file changed, 15 insertions(+) New commits: commit d6dc60ab350824bd0dffbf699cac13a3efd1e289 Author: Vincent Povirk 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 #include #include +#include #include #include #include @@ -1359,6 +1360,10 @@ sal_Bool SwAccessibleContext::Select( SwPaM *pPaM, SdrObject *pObj, if( pFEShell ) pFEShell->FinishOLEObj(); +SwWrtShell* pWrtShell = pCrsrShell->ISA( SwWrtShell ) +? static_cast( 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 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 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 ); B2DRe
[Libreoffice-commits] .: 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 f6b679e831ebf4a85b3baf37ea0198959f58fa1f Author: Cédric Bosdonnat 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 ); B2DRe
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/source
sw/source/ui/docvw/HeaderFooterWin.cxx | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) New commits: commit e355b05c90d5182ecf97fd5e1f762b5460b7d45c Author: Cédric Bosdonnat Date: Wed Dec 14 16:31:51 2011 +0100 Header/Footer: RTL display fixes (fdo#43793) diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index d8f6395..d3ce419 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -284,6 +284,8 @@ 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( @@ -294,8 +296,11 @@ 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( TEXT_PADDING, nTextOffsetY ); +Point aTextPos( nTextOffsetX, nTextOffsetY ); basegfx::B2DHomMatrix aTextMatrix( createScaleTranslateB2DHomMatrix( aFontSize.getX(), aFontSize.getY(), @@ -312,8 +317,11 @@ void SwHeaderFooterWin::Paint( const Rectangle& ) // 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() ) ); +double aSignPosX = aRect.Right() - BUTTON_WIDTH; +if ( bRtl ) +aSignPosX = aRect.Left(); +B2DRectangle aSignArea( B2DPoint( aSignPosX, 0.0 ), +B2DSize( aSignPosX + BUTTON_WIDTH, aRect.getHeight() ) ); B2DPolygon aSign; if ( IsEmptyHeaderFooter( ) ) ___ 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/HeaderFooterWin.cxx | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) New commits: commit 829c5338b7102e7add7a080c50b938100a38b2e5 Author: Cédric Bosdonnat Date: Wed Dec 14 16:31:51 2011 +0100 Header/Footer: RTL display fixes (fdo#43793) diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index d8f6395..d3ce419 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -284,6 +284,8 @@ 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( @@ -294,8 +296,11 @@ 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( TEXT_PADDING, nTextOffsetY ); +Point aTextPos( nTextOffsetX, nTextOffsetY ); basegfx::B2DHomMatrix aTextMatrix( createScaleTranslateB2DHomMatrix( aFontSize.getX(), aFontSize.getY(), @@ -312,8 +317,11 @@ void SwHeaderFooterWin::Paint( const Rectangle& ) // 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() ) ); +double aSignPosX = aRect.Right() - BUTTON_WIDTH; +if ( bRtl ) +aSignPosX = aRect.Left(); +B2DRectangle aSignArea( B2DPoint( aSignPosX, 0.0 ), +B2DSize( aSignPosX + BUTTON_WIDTH, aRect.getHeight() ) ); B2DPolygon aSign; if ( IsEmptyHeaderFooter( ) ) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - writerfilter/source
writerfilter/source/rtftok/rtfdocumentimpl.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 42d176fd3e7c310c63d325826e6d3ffb3124c777 Author: Cédric Bosdonnat Date: Wed Dec 14 15:44:07 2011 +0100 n#228839: Fix RTF import crasher with \keep in table properties diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 57d8b9b..4c8648e 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1609,8 +1609,8 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) // Trivial paragraph flags switch (nKeyword) { -case RTF_KEEP: nParam = NS_sprm::LN_PFKeep; break; -case RTF_KEEPN: nParam = NS_sprm::LN_PFKeepFollow; break; +case RTF_KEEP: if (m_pCurrentBuffer != &m_aTableBuffer) nParam = NS_sprm::LN_PFKeep; break; +case RTF_KEEPN: if (m_pCurrentBuffer != &m_aTableBuffer) nParam = NS_sprm::LN_PFKeepFollow; break; case RTF_INTBL: m_pCurrentBuffer = &m_aTableBuffer; nParam = NS_sprm::LN_PFInTable; break; case RTF_PAGEBB: nParam = NS_sprm::LN_PFPageBreakBefore; break; default: break; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: writerfilter/source
writerfilter/source/rtftok/rtfdocumentimpl.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 31622ae00925ea07642151e7c97b30929d9a90a4 Author: Cédric Bosdonnat Date: Wed Dec 14 15:44:07 2011 +0100 n#228839: Fix RTF import crasher with \keep in table properties diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 2b6aa61..3f1deb6 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1604,8 +1604,8 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) // Trivial paragraph flags switch (nKeyword) { -case RTF_KEEP: nParam = NS_sprm::LN_PFKeep; break; -case RTF_KEEPN: nParam = NS_sprm::LN_PFKeepFollow; break; +case RTF_KEEP: if (m_pCurrentBuffer != &m_aTableBuffer) nParam = NS_sprm::LN_PFKeep; break; +case RTF_KEEPN: if (m_pCurrentBuffer != &m_aTableBuffer) nParam = NS_sprm::LN_PFKeepFollow; break; case RTF_INTBL: m_pCurrentBuffer = &m_aTableBuffer; nParam = NS_sprm::LN_PFInTable; break; case RTF_PAGEBB: nParam = NS_sprm::LN_PFPageBreakBefore; break; default: break; ___ 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/trvlfrm.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit c5f868147909111ad235e433d6f8368294080b35 Author: Cédric Bosdonnat 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 #include #include +#include #include #include #include @@ -78,7 +79,8 @@ namespace { static_cast(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] .: 3 commits - sw/inc sw/source
sw/inc/doc.hxx |2 -- sw/inc/ndarr.hxx|2 -- sw/inc/ndtxt.hxx|2 -- sw/inc/node.hxx |4 sw/source/core/docnode/nodedump.cxx |7 +++ sw/source/core/layout/trvlfrm.cxx |6 -- sw/source/filter/ww8/WW8Sttbf.cxx |2 +- sw/source/ui/docvw/edtwin.cxx |4 +--- 8 files changed, 9 insertions(+), 20 deletions(-) New commits: commit 8e17c11e25d7e0ecd3a8a5ab4a4a3bd98d8c81b7 Author: Cédric Bosdonnat 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 #include #include +#include #include #include #include @@ -78,7 +79,8 @@ namespace { static_cast(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; commit 3c1bc2311c297bbabba45e62e123d44061bd348c Author: Cédric Bosdonnat Date: Tue Dec 13 18:21:52 2011 +0100 sw: build hidden debug features in all cases To activate the layout and node dumping features in sw, set the SW_DEBUG environement variable to anything before running the office. F12 will then dump the layout as a layout.xml file in the working directory, and Shift+F12 will dump the nodes structure as nodes.xml at the same place. diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 8165a57..c7255d9 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -2038,13 +2038,11 @@ public: ::sw::UndoManager const& GetUndoManager() const; SfxObjectShell* CreateCopy(bool bCallInitNew) const; -#ifdef DBG_UTIL /** * Dumps the entire nodes structure to the given destination (file nodes.xml in the current directory by default) * @since 3.5 */ void dumpAsXml( xmlTextWriterPtr writer = NULL ); -#endif /// must be called only in SwDocShell::InitNew, causes UpdateDrawDefaults to be called when drawing layer is created void SetDrawDefaults(); diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index 389069b..d560637 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -337,13 +337,11 @@ public: SwNode * DocumentSectionStartNode(SwNode * pNode) const; SwNode * DocumentSectionEndNode(SwNode * pNode) const; -#ifdef DBG_UTIL /** * Dumps the entire nodes structure to the given destination (file nodes.xml in the current directory by default) * @since 3.5 */ void dumpAsXml( xmlTextWriterPtr writer = NULL ); -#endif }; #endif diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 52bae7a..b4a772d 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -801,9 +801,7 @@ public: bool IsCollapse() const; -#ifdef DBG_UTIL virtual void dumpAsXml( xmlTextWriterPtr writer = NULL ); -#endif DECL_FIXEDMEMPOOL_NEWDEL(SwTxtNode) }; diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index bbe3c59..f75091a 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -292,13 +292,11 @@ public: sal_uInt8 HasPrevNextLayNode() const; -#ifdef DBG_UTIL /** * Dumps the node structure to the given destination (file nodes.xml in the current directory by default) * @since 3.5 */ virtual void dumpAsXml( xmlTextWriterPtr writer = NULL ); -#endif private: // Private constructor because copying is never allowed!! @@ -333,9 +331,7 @@ public: // Call ChkCondcoll to all ContentNodes of section. void CheckSectionCondColl() const; -#ifdef DBG_UTIL virtual void dumpAsXml( xmlTextWriterPtr writer = NULL ); -#endif private: // Private constructor because copying is never allowed!! diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx index 0e723ce..447967c 100644 --- a/sw/source/core/docnode/nodedump.cxx +++ b/sw/source/core/docnode/nodedump.cx
[Libreoffice-commits] .: writerfilter/source
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 25 + writerfilter/source/rtftok/rtfdocumentimpl.hxx |1 + 2 files changed, 22 insertions(+), 4 deletions(-) New commits: commit e7fc2624a1aa4aaaf29fe302a30cc43a297106e5 Author: Cédric Bosdonnat Date: Tue Dec 13 14:22:44 2011 +0100 n#703032: Fixed an RTF import crash when handling formdata in non-FORM fields diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 8b25e4e..2b6aa61 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -288,6 +288,7 @@ RTFDocumentImpl::RTFDocumentImpl(uno::Reference const& x m_aStyleTableEntries(), m_nCurrentStyleIndex(0), m_bEq(false), +m_bFormField(false), m_bWasInFrame(false), m_bIsInFrame(false), m_aUnicodeBuffer() @@ -969,18 +970,32 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) break; case RTF_FLDINST: { +// Look for the field type sal_Int32 nPos = Strm().Tell(); OStringBuffer aBuf; char ch; -for (int i = 0; i < 4; ++i) +bool bFoundCode = false; +bool bInKeyword = false; +while (!bFoundCode && ch != '}') { Strm() >> ch; -aBuf.append(ch); +if ('\\' == ch) +bInKeyword = true; +if (!bInKeyword && isalnum(ch)) +aBuf.append(ch); +else if (bInKeyword && isspace(ch)) +bInKeyword = false; +if (aBuf.getLength() > 0 && !isalnum(ch)) +bFoundCode = true; } Strm().Seek(nPos); +// Form data should be handled only for form fields if any +if (aBuf.toString().indexOf(OString("FORM")) != -1 ) +m_bFormField = true; + // EQ fields are not really fields in fact. -if (aBuf.toString().equals("{ EQ")) +if (aBuf.toString().equals("EQ")) m_bEq = true; else { @@ -2871,7 +2886,7 @@ int RTFDocumentImpl::popState() RTFValue::Pointer_t pValue(new RTFValue(m_aStates.top().aDestinationText.makeStringAndClear())); m_aFormfieldSprms->push_back(make_pair(NS_ooxml::LN_CT_FFDDList_listEntry, pValue)); } -else if (m_aStates.top().nDestinationState == DESTINATION_DATAFIELD) +else if (m_aStates.top().nDestinationState == DESTINATION_DATAFIELD && m_bFormField) { OString aStr = OUStringToOString(m_aStates.top().aDestinationText.makeStringAndClear(), m_aStates.top().nCurrentEncoding); // decode hex dump @@ -2914,6 +2929,8 @@ int RTFDocumentImpl::popState() m_aFormfieldSprms->push_back(make_pair(NS_ooxml::LN_CT_FFData_name, pNValue)); RTFValue::Pointer_t pDValue(new RTFValue(OStringToOUString(aDefaultText, m_aStates.top().nCurrentEncoding))); m_aFormfieldSprms->push_back(make_pair(NS_ooxml::LN_CT_FFTextInput_default, pDValue)); + +m_bFormField = false; } else if (m_aStates.top().nDestinationState == DESTINATION_CREATIONTIME && m_xDocumentProperties.is()) m_xDocumentProperties->setCreationDate(lcl_getDateTime(m_aStates)); diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 729e5e5..4370d9a 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -425,6 +425,7 @@ namespace writerfilter { RTFReferenceTable::Entries_t m_aStyleTableEntries; int m_nCurrentStyleIndex; bool m_bEq; +bool m_bFormField; /// If we were in a frame. bool m_bWasInFrame; /// If a frame start token is already sent to dmapper (nesting them is not OK). ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - writerfilter/source
writerfilter/source/rtftok/rtfdocumentimpl.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 2857e160a599d4df97e3d890f480561abe99cedb Author: Cédric Bosdonnat Date: Tue Dec 13 10:35:24 2011 +0100 RTF import: default scale for images is 100% not 0% This fixes the import of pictures in n#228839 and n#77738 diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index a378e83..718d60e 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -3223,8 +3223,8 @@ RTFPicture::RTFPicture() nHeight(0), nGoalWidth(0), nGoalHeight(0), -nScaleX(0), -nScaleY(0), +nScaleX(100), +nScaleY(100), nCropT(0), nCropB(0), nCropL(0), ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: writerfilter/source
writerfilter/source/rtftok/rtfdocumentimpl.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit b1a096a7d5be33982294d3eb4f67a4bc4daff803 Author: Cédric Bosdonnat Date: Tue Dec 13 10:35:24 2011 +0100 RTF import: default scale for images is 100% not 0% This fixes the import of pictures in n#228839 and n#77738 diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index b76dceb..8b25e4e 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -3213,8 +3213,8 @@ RTFPicture::RTFPicture() nHeight(0), nGoalWidth(0), nGoalHeight(0), -nScaleX(0), -nScaleY(0), +nScaleX(100), +nScaleY(100), nCropT(0), nCropB(0), nCropL(0), ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: writerfilter/source
writerfilter/source/rtftok/rtfdocumentimpl.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 1d1f049859e080b403c743f7e0604bd72475a824 Author: Cédric Bosdonnat Date: Fri Dec 9 17:04:13 2011 +0100 rtf import: Check for the first run even when getting \par diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index b29fc5b..b76dceb 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1274,6 +1274,7 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) break; case RTF_PAR: { +checkFirstRun(); checkNeedPap(); if (!m_pCurrentBuffer) parBreak(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: writerfilter/source
writerfilter/source/filter/RtfFilter.cxx |6 +- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 10 -- 2 files changed, 1 insertion(+), 15 deletions(-) New commits: commit 2075a648aced631422eede159d35e2e7804334ca Author: Cédric Bosdonnat Date: Fri Dec 9 15:13:07 2011 +0100 Removed useless code due to the move to SAL_INFO diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx index 80fba44..b2316fb 100644 --- a/writerfilter/source/filter/RtfFilter.cxx +++ b/writerfilter/source/filter/RtfFilter.cxx @@ -101,11 +101,7 @@ sal_Bool RtfFilter::filter( const uno::Sequence< beans::PropertyValue >& aDescri } catch (const uno::Exception& e) { -#if OSL_DEBUG_LEVEL > 1 -SAL_INFO("writerfilter", "Exception caught: " << -rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); -#endif -(void)e; +SAL_INFO("writerfilter", "Exception caught: " << e.Message()); return sal_False; } } diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 06f0580..a60a77b 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1226,9 +1226,7 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) m_aStates.top().nDestinationState = DESTINATION_SKIP; break; default: -#if OSL_DEBUG_LEVEL > 1 SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle destination '" << lcl_RtfToString(nKeyword) << "'"); -#endif // Make sure we skip destinations (even without \*) till we don't handle them m_aStates.top().nDestinationState = DESTINATION_SKIP; aSkip.setParsed(false); @@ -1411,9 +1409,7 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) // Nothing to do, dmapper assumes this is the default. break; default: -#if OSL_DEBUG_LEVEL > 1 SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle symbol '" << lcl_RtfToString(nKeyword) << "'"); -#endif aSkip.setParsed(false); break; } @@ -1869,9 +1865,7 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword) case RTF_POSXL: m_aStates.top().aFrame.nHoriAlign = NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_left; break; case RTF_POSXR: m_aStates.top().aFrame.nHoriAlign = NS_ooxml::LN_Value_wordprocessingml_ST_XAlign_right; break; default: -#if OSL_DEBUG_LEVEL > 1 SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle flag '" << lcl_RtfToString(nKeyword) << "'"); -#endif aSkip.setParsed(false); break; } @@ -2514,9 +2508,7 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) m_aStates.top().aPicture.eWMetafile = nParam; break; default: -#if OSL_DEBUG_LEVEL > 1 SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle value '" << lcl_RtfToString(nKeyword) << "'"); -#endif aSkip.setParsed(false); break; } @@ -2613,9 +2605,7 @@ int RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam } break; default: -#if OSL_DEBUG_LEVEL > 1 SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle toggle '" << lcl_RtfToString(nKeyword) << "'"); -#endif aSkip.setParsed(false); break; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: writerfilter/source
writerfilter/source/dmapper/DomainMapperTableManager.cxx |4 - writerfilter/source/filter/RtfFilter.cxx |4 - writerfilter/source/rtftok/rtfdocumentimpl.cxx | 33 +++ writerfilter/source/rtftok/rtfsdrimport.cxx |8 +-- writerfilter/source/rtftok/rtfskipdestination.cxx|2 writerfilter/source/rtftok/rtftokenizer.cxx | 14 +++--- 6 files changed, 33 insertions(+), 32 deletions(-) New commits: commit 52422457d4aada3d9a12cd8cf2945c46dea7b275 Author: Cédric Bosdonnat Date: Thu Dec 8 21:43:19 2011 +0100 Writerfilter: replace OSL_TRACE(...) by SAL_INFO("writerfilter",...) diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 3bfb463..bca93f9 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -261,13 +261,13 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) // Binary filter takes BiDirection into account ( but I have no idea about that here ) // or even what it is. But... here's where to handle it if it becomes an issue pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( VERT_TOP_RIGHT )); -OSL_TRACE("Have inserted textDirection %d", nIntValue ); +SAL_INFO( "writerfilter", "Have inserted textDirection " << nIntValue ); break; case 3: // btLr // We have to fake this text direction pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( HORI_LEFT_TOP )); pPropMap->Insert( PROP_CHAR_ROTATION, false, uno::makeAny( sal_Int16( 900 ) )); -OSL_TRACE("Have inserted textDirection %d", nIntValue ); +SAL_INFO( "writerfilter", "Have inserted textDirection " << nIntValue ); break; case 4: // lrTbV pPropMap->Insert( PROP_FRM_DIRECTION, false, uno::makeAny( HORI_LEFT_TOP )); diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx index 8786539..80fba44 100644 --- a/writerfilter/source/filter/RtfFilter.cxx +++ b/writerfilter/source/filter/RtfFilter.cxx @@ -54,7 +54,7 @@ RtfFilter::~RtfFilter() sal_Bool RtfFilter::filter( const uno::Sequence< beans::PropertyValue >& aDescriptor ) throw (uno::RuntimeException) { -OSL_TRACE("%s", OSL_THIS_FUNC); +SAL_INFO("writerfilter", OSL_THIS_FUNC); if( m_xSrcDoc.is() ) { uno::Reference< lang::XMultiServiceFactory > xMSF(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW); @@ -102,7 +102,7 @@ sal_Bool RtfFilter::filter( const uno::Sequence< beans::PropertyValue >& aDescri catch (const uno::Exception& e) { #if OSL_DEBUG_LEVEL > 1 -OSL_TRACE( "Exception caught: %s", +SAL_INFO("writerfilter", "Exception caught: " << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); #endif (void)e; diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index a378e83..06f0580 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -374,9 +374,9 @@ void RTFDocumentImpl::resolveSubstream(sal_uInt32 nPos, Id nId, OUString& rIgnor m_aAuthor = OUString(); } pImpl->seek(nPos); -OSL_TRACE("substream start"); +SAL_INFO("writerfilter", "substream start"); Mapper().substream(nId, pImpl); -OSL_TRACE("substream end"); +SAL_INFO("writerfilter", "substream end"); Strm().Seek(nCurrent); nPos = 0; } @@ -523,25 +523,25 @@ void RTFDocumentImpl::resolve(Stream & rMapper) switch (m_pTokenizer->resolveParse()) { case ERROR_OK: -OSL_TRACE("%s: finished without errors", OSL_THIS_FUNC); +SAL_INFO("writerfilter", OSL_THIS_FUNC << ": finished without errors"); break; case ERROR_GROUP_UNDER: -OSL_TRACE("%s: unmatched '}'", OSL_THIS_FUNC); +SAL_INFO("writerfilter", OSL_THIS_FUNC << ": unmatched '}'"); break; case ERROR_GROUP_OVER: -OSL_TRACE("%s: unmatched '{'", OSL_THIS_FUNC); +SAL_INFO("writerfilter", OSL_THIS_FUNC << ": unmatched '{'"); throw io::UnexpectedEOFException(); break; case ERROR_EOF: -OSL_TRACE("%s: unexpected end of file", OSL_THIS_FUNC); +SAL_INFO("writerfilter", OSL_THIS_FUNC << ": unexpected end of file"); throw io::UnexpectedEOFException(); break; case ERROR_HEX_INVALID: -OSL_TRACE("%s: invalid hex char", OSL_THIS_FUNC); +
[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 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 added ___ 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 | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit 2e2c804b20db136691dcd8a25ceccffceeefd280 Author: Cédric Bosdonnat 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 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/ui/docvw/HeaderFooterWin.cxx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit f378c85a705be23ddc7523c3122807393d27095a Author: Cédric Bosdonnat Date: Wed Dec 7 16:09:26 2011 +0100 Header/Footer: update the label as the page style may have changed diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index 076ce17..d8f6395 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -162,13 +162,6 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag // Use pixels for the rest of the drawing SetMapMode( MapMode ( MAP_PIXEL ) ); -// Compute the text to show -m_sLabel = ResId::toString( SW_RES( STR_HEADER_TITLE ) ); -if ( !m_bIsHeader ) -m_sLabel = ResId::toString( SW_RES( STR_FOOTER_TITLE ) ); -sal_Int32 nPos = m_sLabel.lastIndexOf( rtl::OUString::createFromAscii( "%1" ) ); -m_sLabel = m_sLabel.replaceAt( nPos, 2, GetPageFrame()->GetPageDesc()->GetName() ); - // Create the line control basegfx::BColor aColor = SwViewOption::GetHeaderFooterMarkColor().getBColor(); m_pLine = new SwDashedLine( GetEditWin(), aColor ); @@ -208,6 +201,13 @@ const SwPageFrm* SwHeaderFooterWin::GetPageFrame( ) void SwHeaderFooterWin::SetOffset( Point aOffset, long nXLineStart, long nXLineEnd ) { +// Compute the text to show +m_sLabel = ResId::toString( SW_RES( STR_HEADER_TITLE ) ); +if ( !m_bIsHeader ) +m_sLabel = ResId::toString( SW_RES( STR_FOOTER_TITLE ) ); +sal_Int32 nPos = m_sLabel.lastIndexOf( rtl::OUString::createFromAscii( "%1" ) ); +m_sLabel = m_sLabel.replaceAt( nPos, 2, GetPageFrame()->GetPageDesc()->GetName() ); + // Compute the text size and get the box position & size from it Rectangle aTextRect; GetTextBoundRect( aTextRect, String( m_sLabel ) ); ___ 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/HeaderFooterWin.cxx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit a0afe6f397b508d2b649dab4bfdd05caecf4bd8a Author: Cédric Bosdonnat Date: Wed Dec 7 16:09:26 2011 +0100 Header/Footer: update the label as the page style may have changed diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index 076ce17..d8f6395 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -162,13 +162,6 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag // Use pixels for the rest of the drawing SetMapMode( MapMode ( MAP_PIXEL ) ); -// Compute the text to show -m_sLabel = ResId::toString( SW_RES( STR_HEADER_TITLE ) ); -if ( !m_bIsHeader ) -m_sLabel = ResId::toString( SW_RES( STR_FOOTER_TITLE ) ); -sal_Int32 nPos = m_sLabel.lastIndexOf( rtl::OUString::createFromAscii( "%1" ) ); -m_sLabel = m_sLabel.replaceAt( nPos, 2, GetPageFrame()->GetPageDesc()->GetName() ); - // Create the line control basegfx::BColor aColor = SwViewOption::GetHeaderFooterMarkColor().getBColor(); m_pLine = new SwDashedLine( GetEditWin(), aColor ); @@ -208,6 +201,13 @@ const SwPageFrm* SwHeaderFooterWin::GetPageFrame( ) void SwHeaderFooterWin::SetOffset( Point aOffset, long nXLineStart, long nXLineEnd ) { +// Compute the text to show +m_sLabel = ResId::toString( SW_RES( STR_HEADER_TITLE ) ); +if ( !m_bIsHeader ) +m_sLabel = ResId::toString( SW_RES( STR_FOOTER_TITLE ) ); +sal_Int32 nPos = m_sLabel.lastIndexOf( rtl::OUString::createFromAscii( "%1" ) ); +m_sLabel = m_sLabel.replaceAt( nPos, 2, GetPageFrame()->GetPageDesc()->GetName() ); + // Compute the text size and get the box position & size from it Rectangle aTextRect; GetTextBoundRect( aTextRect, String( m_sLabel ) ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: cppunit/makefile.mk
cppunit/makefile.mk |2 ++ 1 file changed, 2 insertions(+) New commits: commit faa285f2679c842b641ca721141218d826bf7ab7 Author: Cédric Bosdonnat Date: Fri Dec 2 16:04:53 2011 +0100 cppunit build: fix the lib64 libdir on some linux distros diff --git a/cppunit/makefile.mk b/cppunit/makefile.mk index 551a0ea..20addae 100644 --- a/cppunit/makefile.mk +++ b/cppunit/makefile.mk @@ -142,6 +142,8 @@ DEBUGFLAG=-g CONFIGURE_FLAGS = --prefix=$(shell cd $(PACKAGE_DIR) && \ pwd $(PWDFLAGS))/$(TARFILE_ROOTDIR)/ooo-install \ + --libdir=$(shell cd $(PACKAGE_DIR) && \ + pwd $(PWDFLAGS))/$(TARFILE_ROOTDIR)/ooo-install/lib \ --disable-dependency-tracking --disable-static --disable-doxygen \ --disable-html-docs --disable-latex-docs CC='$(CC)' CXX='$(CXX)' \ CXXFLAGS='$(EXTRA_CFLAGS) $(DEBUGFLAG) $(EXTRA_CDEFS)' \ ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/source
oox/source/helper/graphichelper.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 65be3e7908f21355fc8cc443192338d1cc8a8d61 Author: Cédric Bosdonnat Date: Fri Nov 25 11:16:29 2011 +0100 Docx crasher: there may be no External Header for pictures. diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx index fd3046e..6ddb986 100644 --- a/oox/source/helper/graphichelper.cxx +++ b/oox/source/helper/graphichelper.cxx @@ -257,7 +257,7 @@ Reference< XGraphic > GraphicHelper::importGraphic( const Reference< XInputStrea aArgs[ 0 ].Name = CREATE_OUSTRING( "InputStream" ); aArgs[ 0 ].Value <<= rxInStrm; -if ( pExtHeader->mapMode > 0 ) +if ( pExtHeader && pExtHeader->mapMode > 0 ) { aArgs.realloc( aArgs.getLength() + 1 ); Sequence< PropertyValue > aFilterData( 3 ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: writerfilter/source
writerfilter/source/rtftok/rtfcontrolwords.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 52e6bfeb324574f2330d191c208860ddc2d532e0 Author: Cédric Bosdonnat Date: Fri Nov 25 10:02:02 2011 +0100 RTF import: fixed the missing paragraph breaks from fdo#43206. "\\\n" is used as an equivalent to \par even though I couldn't find it in the specs. diff --git a/writerfilter/source/rtftok/rtfcontrolwords.cxx b/writerfilter/source/rtftok/rtfcontrolwords.cxx index 3b82e80..3dd2672 100644 --- a/writerfilter/source/rtftok/rtfcontrolwords.cxx +++ b/writerfilter/source/rtftok/rtfcontrolwords.cxx @@ -38,6 +38,7 @@ RTFSymbol aRTFControlWords[] = { {"*", CONTROL_SYMBOL, RTF_IGNORE}, {":", CONTROL_SYMBOL, RTF_SUBENTRY}, {"\\", CONTROL_SYMBOL, RTF_BACKSLASH}, +{"\n", CONTROL_SYMBOL, RTF_PAR}, {"_", CONTROL_SYMBOL, RTF_NOBRKHYPH}, {"{", CONTROL_SYMBOL, RTF_LBRACE}, {"|", CONTROL_SYMBOL, RTF_FORMULA}, ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: editeng/source oox/inc oox/source svtools/inc svtools/source writerfilter/source
editeng/source/rtf/rtfgrf.cxx |9 --- oox/inc/oox/helper/graphichelper.hxx |8 ++- oox/source/helper/graphichelper.cxx| 65 - svtools/inc/svtools/filter.hxx |6 +- svtools/inc/svtools/wmf.hxx| 48 ++ svtools/source/filter/filter.cxx |8 +-- svtools/source/filter/wmf/winmtf.hxx | 14 +++-- svtools/source/filter/wmf/winwmf.cxx | 62 --- svtools/source/filter/wmf/wmf.cxx |4 - svtools/source/graphic/provider.cxx| 42 +++- writerfilter/source/rtftok/rtfcontrolwords.cxx |2 writerfilter/source/rtftok/rtfdocumentimpl.cxx | 19 ++- writerfilter/source/rtftok/rtfdocumentimpl.hxx |1 13 files changed, 187 insertions(+), 101 deletions(-) New commits: commit f4f4a899f0d5520a497bbd07ccfef9086c54ca1c Author: Cédric Bosdonnat Date: Thu Nov 24 15:05:25 2011 +0100 RTF import: partly fixed the WMF images scaling. diff --git a/editeng/source/rtf/rtfgrf.cxx b/editeng/source/rtf/rtfgrf.cxx index 4ff9f35..2906caa 100644 --- a/editeng/source/rtf/rtfgrf.cxx +++ b/editeng/source/rtf/rtfgrf.cxx @@ -495,15 +495,8 @@ sal_Bool SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) } String sTmpStr; -WMF_APMFILEHEADER aAPMHeader; -aAPMHeader.left=0; -aAPMHeader.top=0; -aAPMHeader.right=rPicType.nWidth; -aAPMHeader.bottom=rPicType.nHeight; - -WMF_APMFILEHEADER *pAPMHeader=(aAPMHeader.right>0 && aAPMHeader.bottom>0?&aAPMHeader:NULL); pTmpFile->Seek( STREAM_SEEK_TO_BEGIN ); -bValidBmp = 0 == rGF.ImportGraphic( rGrf, sTmpStr, *pTmpFile, nImportFilter, NULL, 0, pAPMHeader ); +bValidBmp = 0 == rGF.ImportGraphic( rGrf, sTmpStr, *pTmpFile, nImportFilter ); } } diff --git a/oox/inc/oox/helper/graphichelper.hxx b/oox/inc/oox/helper/graphichelper.hxx index f144cd1..d3507fa 100644 --- a/oox/inc/oox/helper/graphichelper.hxx +++ b/oox/inc/oox/helper/graphichelper.hxx @@ -37,6 +37,8 @@ #include "oox/helper/binarystreambase.hxx" #include "oox/helper/storagebase.hxx" +struct WMF_EXTERNALHEADER; + namespace com { namespace sun { namespace star { namespace awt { struct Point; } namespace awt { struct Size; } @@ -115,7 +117,8 @@ public: /** Imports a graphic from the passed input stream. */ ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > importGraphic( -const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rxInStrm ) const; +const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rxInStrm, +const WMF_EXTERNALHEADER* pExtHeader = NULL ) const; /** Imports a graphic from the passed binary memory block. */ ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > @@ -133,7 +136,8 @@ public: /** Creates a persistent graphic object from the passed input stream. @return The URL of the created and internally cached graphic object. */ ::rtl::OUString importGraphicObject( -const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rxInStrm ) const; +const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rxInStrm, +const WMF_EXTERNALHEADER* pExtHeader = NULL ) const; /** Creates a persistent graphic object from the passed binary memory block. @return The URL of the created and internally cached graphic object. */ diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx index 941cc80..fd3046e 100644 --- a/oox/source/helper/graphichelper.cxx +++ b/oox/source/helper/graphichelper.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include "oox/helper/containerhelper.hxx" #include "oox/helper/propertyset.hxx" #include "oox/token/tokens.hxx" @@ -47,7 +48,8 @@ namespace oox { // -using namespace ::com::sun::star::awt; + +using namespace ::com::sun::star; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::graphic; @@ -130,7 +132,7 @@ GraphicHelper::GraphicHelper( const Reference< XComponentContext >& rxContext, c maDeviceInfo.PixelPerMeterX = maDeviceInfo.PixelPerMeterY = 3500.0; // some default just in case if( xFrame.is() ) try { -Reference< XDevice > xDevice( xFrame->getContainerWindow(), UNO_QUERY_THROW ); +Reference< awt::XDevice > xDevice( xFrame->getContainerWindow(), UNO_QUERY_THROW ); mxUnitConv
[Libreoffice-commits] .: 2 commits - svx/source writerfilter/source
svx/source/unodraw/unoshape.cxx|5 - writerfilter/source/filter/RtfFilter.cxx |7 ++- writerfilter/source/rtftok/rtfdocumentimpl.cxx |2 +- 3 files changed, 11 insertions(+), 3 deletions(-) New commits: commit e846db644868651556b38f91737b81c43f3c4f3c Author: Cédric Bosdonnat Date: Wed Nov 23 11:22:28 2011 +0100 RTF: OLE object import with graphic result fixed, the file can now be opened diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 2a46fb0..2e31bc7 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -597,7 +597,7 @@ int RTFDocumentImpl::resolvePict(bool bInline) m_xContext), uno::UNO_QUERY_THROW); uno::Reference xGraphic = xGraphicProvider->queryGraphic(aMediaProperties); - xPropertySet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Bitmap")), uno::Any(xGraphic)); + xPropertySet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Graphic")), uno::Any(xGraphic)); RTFValue::Pointer_t pShapeValue(new RTFValue(xShape)); m_aObjectAttributes->push_back(make_pair(NS_ooxml::LN_shape, pShapeValue)); commit a45c82f930c1224928fd0a8f9ca3690ddd162366 Author: Cédric Bosdonnat Date: Tue Nov 22 18:01:32 2011 +0100 Show some exception message when getting one in RtfFilter diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index e3bfaf3..b676551 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1720,7 +1720,10 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const throw beans::UnknownPropertyException(); if( (pMap->nFlags & beans::PropertyAttribute::READONLY ) != 0 ) -throw beans::PropertyVetoException(); +throw beans::PropertyVetoException( rtl::OUString::createFromAscii( +OSL_FORMAT( "Readonly property can't be set: %s", +rtl::OUStringToOString( rPropertyName, RTL_TEXTENCODING_UTF8 ).getStr() ) ), +uno::Reference< drawing::XShape >( this ) ); mpModel->SetChanged(); diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx index 4b214ab..8786539 100644 --- a/writerfilter/source/filter/RtfFilter.cxx +++ b/writerfilter/source/filter/RtfFilter.cxx @@ -99,8 +99,13 @@ sal_Bool RtfFilter::filter( const uno::Sequence< beans::PropertyValue >& aDescri #endif return sal_True; } -catch (const uno::Exception&) +catch (const uno::Exception& e) { +#if OSL_DEBUG_LEVEL > 1 +OSL_TRACE( "Exception caught: %s", +rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr() ); +#endif +(void)e; return sal_False; } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 3 commits - writerfilter/source
writerfilter/source/resourcemodel/TagLogger.cxx | 13 ++--- writerfilter/source/rtftok/rtfdocumentimpl.cxx | 18 -- 2 files changed, 22 insertions(+), 9 deletions(-) New commits: commit 98f32b2b8ebefe50dfa99b5c72ceb2639bf63787 Author: Cédric Bosdonnat Date: Tue Nov 22 15:14:33 2011 +0100 RTF import: better implement \trrh to import fixed height rows diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index b6f33c3..2a46fb0 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2288,8 +2288,23 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) break; case RTF_TRRH: { +rtl::OUString hRule = rtl::OUString::createFromAscii("auto"); +if ( nParam < 0 ) +{ +RTFValue::Pointer_t pAbsValue(new RTFValue(-nParam)); +pIntValue.swap( pAbsValue ); + +hRule = rtl::OUString::createFromAscii("exact"); +} +else if ( nParam > 0 ) +hRule = rtl::OUString::createFromAscii("atLeast"); + lcl_putNestedAttribute(m_aStates.top().aTableRowSprms, NS_ooxml::LN_CT_TrPrBase_trHeight, NS_ooxml::LN_CT_Height_val, pIntValue); + +RTFValue::Pointer_t pHRule(new RTFValue(hRule)); +lcl_putNestedAttribute(m_aStates.top().aTableRowSprms, +NS_ooxml::LN_CT_TrPrBase_trHeight, NS_ooxml::LN_CT_Height_hRule, pHRule); } break; case RTF_COLS: commit b03fbe13f31bde4a9844985afa7abecbf1834848 Author: Cédric Bosdonnat Date: Tue Nov 22 15:09:27 2011 +0100 writerfilter: Fixed crasher when importing docx files with dbglevel>1 diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx b/writerfilter/source/resourcemodel/TagLogger.cxx index 9cfaba1..7b63ce0 100644 --- a/writerfilter/source/resourcemodel/TagLogger.cxx +++ b/writerfilter/source/resourcemodel/TagLogger.cxx @@ -235,10 +235,10 @@ namespace writerfilter class PropertySetDumpHandler : public Properties { IdToString::Pointer_t mpIdToString; -TagLogger::Pointer_t m_pLogger; +TagLogger* m_pLogger; public: -PropertySetDumpHandler(TagLogger::Pointer_t pLogger, +PropertySetDumpHandler(TagLogger* pLogger, IdToString::Pointer_t pIdToString); virtual ~PropertySetDumpHandler(); @@ -248,11 +248,11 @@ namespace writerfilter virtual void sprm(Sprm & sprm); }; -PropertySetDumpHandler::PropertySetDumpHandler(TagLogger::Pointer_t pLogger, +PropertySetDumpHandler::PropertySetDumpHandler(TagLogger* pLogger, IdToString::Pointer_t pIdToString) : -mpIdToString(pIdToString) +mpIdToString(pIdToString), +m_pLogger(pLogger) { -m_pLogger = pLogger; } PropertySetDumpHandler::~PropertySetDumpHandler() @@ -302,8 +302,7 @@ namespace writerfilter { startElement( "propertySet" ); -TagLogger::Pointer_t pLogger( this ); -PropertySetDumpHandler handler( pLogger, pIdToString ); +PropertySetDumpHandler handler( this, pIdToString ); handler.resolve( props ); endElement( ); commit 07b5fe3b8c858c1d6f8c21e89ac940663cd97f62 Author: Cédric Bosdonnat Date: Mon Nov 21 18:27:51 2011 +0100 n#417818: empty paragraphs in tables weren't considered in the table. The paragraph properties weren't propagated to the empty paragraphs in the tables. Called checkNeedPap() to do that job when finding \par. diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 3b79937..b6f33c3 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -1302,8 +1302,7 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword) break; case RTF_PAR: { -if (m_bNeedPap) -checkChangedFrame(); +checkNeedPap(); if (!m_pCurrentBuffer) parBreak(); else if (m_aStates.top().nDestinationState != DESTINATION_SHAPETEXT) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 5 commits - filter/source sw/source
filter/source/xslt/import/wordml/wordml2ooo_draw.xsl |1 sw/source/core/tox/tox.cxx |4 + sw/source/core/unocore/unotext.cxx |3 - sw/source/ui/docvw/HeaderFooterWin.cxx |6 +- sw/source/ui/inc/olmenu.hxx |1 sw/source/ui/lingu/olmenu.cxx| 45 +++ sw/source/ui/lingu/olmenu.hrc|2 sw/source/ui/lingu/olmenu.src|5 +- 8 files changed, 62 insertions(+), 5 deletions(-) New commits: commit 6af8887b41a8438d29b4743f238be7330516ecbc Author: Cédric Bosdonnat Date: Mon Nov 21 13:49:06 2011 +0100 d#648250: added missing include in wordml2ooo_draw.xsl diff --git a/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl b/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl index 448923f..e36d7cd 100644 --- a/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl +++ b/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl @@ -27,6 +27,7 @@ --> http://www.w3.org/1999/XSL/Transform"; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"; xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"; xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:aml="http://schemas.microsoft.com/aml/2001/core"; xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:xlink="http://www.w3.org/1999/xlink"; xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:dat astyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML"; xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office"; xmlns:ooow="http://openoffice.org/2004/writer"; xmlns:oooc="http://openoffice.org/2004/calc"; xmlns:dom="http://www.w3.org/2001/xml-events"; xmlns:ole="http://libreoffice.org/2011/xslt/ole"; exclude-result-prefixes="w wx aml o dt v"> + commit 9562b31e594eba4e6abf7879575b77a691ac1f88 Author: Cédric Bosdonnat Date: Mon Nov 21 12:05:22 2011 +0100 sw, added a message to a thrown uno::RuntimeException diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 2886b36..c9d02d5 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -2501,7 +2501,8 @@ throw (uno::RuntimeException) } if(!aRef.is()) { -throw uno::RuntimeException(); +throw uno::RuntimeException( rtl::OUString::createFromAscii( "End of content node doesn't have the proper start node" ), + uno::Reference< uno::XInterface >( *this ) ); } return aRef; } commit a1efc7fdcd80484977bc289d1d27b7b6d33757ff Author: Thomas Collerton Date: Fri Nov 18 12:17:13 2011 +0100 Improved Header/Footer UI framerate diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index 1db769a..076ce17 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -191,7 +191,7 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag m_pPopupMenu->SetItemText( FN_HEADERFOOTER_DELETE, aRewriter.Apply( aText ) ); SetPopupMenu( m_pPopupMenu ); -m_aFadeTimer.SetTimeout( 500 ); +m_aFadeTimer.SetTimeout( 50 ); m_aFadeTimer.SetTimeoutHdl( LINK( this, SwHeaderFooterWin, FadeHandler ) ); } @@ -501,9 +501,9 @@ void SwHeaderFooterWin::Select( ) IMPL_LINK( SwHeaderFooterWin, 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() ) { commit 2cc144286d81236e8677a551a458172ca9546c29 Author: Cédric Bosdonnat Date: Mon Nov 21 11:48:16 2011 +0100 sw, Add hyperlinks by default in Table of Contents diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index 57102e8..62e95ec 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -325,6 +3
[Libreoffice-commits] .: 3 commits - sw/inc sw/source writerfilter/source
sw/inc/IDocumentSettingAccess.hxx |1 + sw/inc/doc.hxx |1 + sw/source/core/doc/dbgoutsw.cxx|6 +++--- sw/source/core/doc/doc.cxx |5 + sw/source/core/doc/docnew.cxx |1 + sw/source/core/text/guess.cxx |8 ++-- sw/source/filter/ww8/ww8par.cxx|1 + sw/source/filter/xml/xmlimp.cxx| 10 ++ sw/source/ui/uno/SwXDocumentSettings.cxx | 16 +++- writerfilter/source/filter/ImportFilter.cxx|9 + writerfilter/source/rtftok/rtfdocumentimpl.cxx |4 11 files changed, 56 insertions(+), 6 deletions(-) New commits: commit 8a232f007458c9f474c6bf8fdf1f7f2c5ae467cf Author: Cédric Bosdonnat Date: Fri Nov 11 22:11:58 2011 +0100 RTF import: Fixed unicode characters import, fdo#42109 Actually implemented the \uc to skip the ANSI representation after the unicode value. diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 9cc025c..7ba5249 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2221,6 +2221,10 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) } } break; +case RTF_UC: +if ((SAL_MIN_INT16 <= nParam) && (nParam <= SAL_MAX_INT16)) +m_aStates.top().nUc = nParam; +break; case RTF_U: if ((SAL_MIN_INT16 <= nParam) && (nParam <= SAL_MAX_INT16)) { commit 74b6759ee81c95ae75046dd411d2bd0bd2324a8b Author: Cédric Bosdonnat Date: Thu Nov 10 16:10:25 2011 +0100 n#707157: Word doesn't break the numberings and prefers hiding them Added a compatibility option to reproduce Word's behavior when importing Doc, docx and RTF files. The default behavior isn't changed. diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx index 50e8096..d912376 100644 --- a/sw/inc/IDocumentSettingAccess.hxx +++ b/sw/inc/IDocumentSettingAccess.hxx @@ -83,6 +83,7 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd COLLAPSE_EMPTY_CELL_PARA, SMALL_CAPS_PERCENTAGE_66, TAB_OVERFLOW, + UNBREAKABLE_NUMBERINGS, // COMPATIBILITY FLAGS END BROWSE_MODE, diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index e4848f5..8427b17 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -579,6 +579,7 @@ private: bool mbTabAtLeftIndentForParagraphsInList; // #i89181# - see above bool mbSmallCapsPercentage66; bool mbTabOverflow; +bool mbUnbreakableNumberings; bool mbLastBrowseMode : 1; diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index bdded6f..326cfde 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -203,6 +203,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const case COLLAPSE_EMPTY_CELL_PARA: return mbCollapseEmptyCellPara; case SMALL_CAPS_PERCENTAGE_66: return mbSmallCapsPercentage66; case TAB_OVERFLOW: return mbTabOverflow; +case UNBREAKABLE_NUMBERINGS: return mbUnbreakableNumberings; case BROWSE_MODE: return mbLastBrowseMode; // Attention: normally the ViewShell has to be asked! case HTML_MODE: return mbHTMLMode; @@ -341,6 +342,10 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) case TAB_OVERFLOW: mbTabOverflow = value; break; + +case UNBREAKABLE_NUMBERINGS: +mbUnbreakableNumberings = value; +break; // COMPATIBILITY FLAGS END case BROWSE_MODE: //can be used temporary (load/save) when no ViewShell is avaiable diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index f8a0ce2..656fb20 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -358,6 +358,7 @@ SwDoc::SwDoc() mbCollapseEmptyCellPara = true;// hidden mbSmallCapsPercentage66 = false;// hidden mbTabOverflow = true; +mbUnbreakableNumberings = false; // // COMPATIBILITY FLAGS END diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index bc84437..83c1758 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -125,8 +125,12 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf, if ( nLineWidth < 0 ) nLineWidth = 0; } +const bool bUnbreakableNumberings = rInf.GetTxtFrm()->GetTxtNode()-> + getIDocumentSettingAccess()->get(IDocumentSettingAccess::UNBREAKABLE_NUMBERINGS); + // first check if everything f
[Libreoffice-commits] .: 3 commits - sw/source writerfilter/debug_setup.mk writerfilter/inc writerfilter/source
sw/source/core/access/accmap.cxx |1 sw/source/core/tox/toxhlp.cxx|1 sw/source/core/unocore/unotext.cxx |8 + sw/source/ui/config/optpage.cxx |2 writerfilter/debug_setup.mk |2 writerfilter/inc/resourcemodel/TableManager.hxx | 64 +++ writerfilter/source/dmapper/DomainMapperTableHandler.cxx |4 writerfilter/source/dmapper/DomainMapper_Impl.cxx| 15 +-- writerfilter/source/dmapper/DomainMapper_Impl.hxx|2 9 files changed, 55 insertions(+), 44 deletions(-) New commits: commit 0e26bd20978cbdd7c59368044c2a21b98ffba164 Author: Cédric Bosdonnat Date: Tue Nov 8 14:39:31 2011 +0100 writerfilter import, fixed the shapes import In some cases like an OLE object inside a textbox, the imported document was empty. This was due to unremoved text context in dmapper. diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index b65cb21..0f90573 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -188,7 +188,7 @@ DomainMapper_Impl::DomainMapper_Impl( m_bIsColumnBreakDeferred( false ), m_bIsPageBreakDeferred( false ), m_bIsInShape( false ), -m_bShapeContextAdded( false ), +m_bRemovedLastAnchored( false ), m_pLastSectionContext( ), m_nCurrentTabStopIndex( 0 ), m_sCurrentParaStyleId(), @@ -928,6 +928,8 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) // this is normal: the shape is already attached } m_aAnchoredStack.pop( ); +m_aTextAppendStack.pop( ); +m_bRemovedLastAnchored = true; } // Get the end of paragraph character inserted @@ -1065,10 +1067,10 @@ void DomainMapper_Impl::appendOLE( const ::rtl::OUString& rStreamName, OLEHandle // gives a better ( visually ) result xOLEProperties->setPropertyValue(PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_ANCHOR_TYPE ), uno::makeAny( text::TextContentAnchorType_AS_CHARACTER ) ); // remove ( if valid ) associated shape ( used for graphic replacement ) -if ( m_bShapeContextAdded ) +if ( m_aAnchoredStack.size() > 0 ) { if ( lcl_removeShape( m_xTextDocument, pOLEHandler->getShape(), m_aAnchoredStack, m_aTextAppendStack ) ) -m_bShapeContextAdded = false; // ensure PopShapeContext processing doesn't pop the append stack +m_bRemovedLastAnchored = true; // ensure PopShapeContext processing doesn't pop the append stack } // @@ -1080,7 +1082,6 @@ void DomainMapper_Impl::appendOLE( const ::rtl::OUString& rStreamName, OLEHandle (void)rEx; OSL_FAIL( "Exception in creation of OLE object" ); } - } @@ -1373,7 +1374,7 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape { // Add the shape to the text append stack m_aTextAppendStack.push( uno::Reference< text::XTextAppend >( xShape, uno::UNO_QUERY_THROW ) ); -m_bShapeContextAdded = true; +m_bRemovedLastAnchored = false; // Add the shape to the anchored objects stack uno::Reference< text::XTextContent > xTxtContent( xShape, uno::UNO_QUERY_THROW ); @@ -1418,11 +1419,11 @@ void DomainMapper_Impl::PushShapeContext( const uno::Reference< drawing::XShape void DomainMapper_Impl::PopShapeContext() { -if ( m_bShapeContextAdded ) +if ( !m_bRemovedLastAnchored && m_aAnchoredStack.size() > 0 ) { RemoveLastParagraph(); m_aTextAppendStack.pop(); -m_bShapeContextAdded = false; +m_aAnchoredStack.pop(); } m_bIsInShape = false; } diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index b9e9af1..e3b3fa1 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -295,7 +295,7 @@ private: bool m_bIsColumnBreakDeferred; bool m_bIsPageBreakDeferred; bool m_bIsInShape; -bool m_bShapeContextAdded; +bool m_bRemovedLastAnchored; LineNumberSettings m_aLineNumberSettings; commit b
[Libreoffice-commits] .: canvas/source slideshow/source
canvas/source/tools/spriteredrawmanager.cxx | 21 +++-- slideshow/source/engine/shapes/drawshape.cxx |1 - 2 files changed, 19 insertions(+), 3 deletions(-) New commits: commit 7ffe517dea4190334c1ddf376af17ddfc1d3f128 Author: Cédric Bosdonnat Date: Thu Nov 3 08:13:08 2011 +0100 RangeExpander functor removed, but needed in one place. Added a local class for it: there may be a better fix, but it avoids the build to break. Removed a few remaining includes diff --git a/canvas/source/tools/spriteredrawmanager.cxx b/canvas/source/tools/spriteredrawmanager.cxx index 32faba6..730361c 100644 --- a/canvas/source/tools/spriteredrawmanager.cxx +++ b/canvas/source/tools/spriteredrawmanager.cxx @@ -36,7 +36,6 @@ #include #include #include -#include #include #include @@ -223,6 +222,24 @@ namespace canvas SpriteRedrawManager::SpriteConnectedRanges& mrUpdater; const SpriteRedrawManager::VectorOfChangeRecords& mrChangeContainer; }; + +class RangeExpander +{ +private: +basegfx::B2DRange& mrBounds; + +public: +typedef voidresult_type; + +RangeExpander( basegfx::B2DRange& rBounds ) : mrBounds( rBounds ) +{ +} + +void operator()( const basegfx::B2DRange& rBounds ) +{ +mrBounds.expand( rBounds ); +} +}; } void SpriteRedrawManager::setupUpdateAreas( SpriteConnectedRanges& rUpdateAreas ) const @@ -424,7 +441,7 @@ namespace canvas ::basegfx::B2DRange aTrueArea( aBegin->second.getUpdateArea() ); ::std::for_each( aBegin, aEnd, - ::boost::bind( ::basegfx::B2DRangeExpander(aTrueArea), + ::boost::bind( RangeExpander(aTrueArea), ::boost::bind( &SpriteInfo::getUpdateArea, ::boost::bind( ::o3tl::select2nd(), _1 ) ) ) ); diff --git a/slideshow/source/engine/shapes/drawshape.cxx b/slideshow/source/engine/shapes/drawshape.cxx index 153ffb2..f4b21a9 100644 --- a/slideshow/source/engine/shapes/drawshape.cxx +++ b/slideshow/source/engine/shapes/drawshape.cxx @@ -47,7 +47,6 @@ #include #include -#include #include ___ 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/txttab.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 208c9648ec31ccf27edddc2f5dbfd1387a445fdb Author: Cédric Bosdonnat Date: Wed Nov 2 16:20:46 2011 +0100 n#693238: fixed parentheses warning diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index d237873..341bde2 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -452,7 +452,7 @@ sal_Bool SwTabPortion::PreFormat( SwTxtFormatInfo &rInf ) // tab stop position is outside the frame: bool bAtParaEnd = rInf.GetIdx() + GetLen() == rInf.GetTxt().Len(); if ( bFull && bTabCompat && - ( bTabOverflow && ( rInf.IsTabOverflow() || !IsAutoTabStop() ) || bAtParaEnd ) && + ( ( bTabOverflow && ( rInf.IsTabOverflow() || !IsAutoTabStop() ) ) || bAtParaEnd ) && GetTabPos() >= rInf.GetTxtFrm()->Frm().Width() ) { bFull = sal_False; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - sw/inc sw/source
sw/inc/IDocumentSettingAccess.hxx|3 ++- sw/inc/doc.hxx |1 + sw/source/core/doc/doc.cxx |5 + sw/source/core/doc/docnew.cxx|1 + sw/source/core/text/inftxt.cxx |5 +++-- sw/source/core/text/inftxt.hxx |4 sw/source/core/text/itrform2.cxx |3 +++ sw/source/core/text/portab.hxx |8 +--- sw/source/core/text/txttab.cxx | 18 +- sw/source/filter/ww8/ww8par.cxx |1 + sw/source/filter/ww8/ww8par3.cxx |5 - sw/source/filter/xml/xmlimp.cxx | 10 ++ sw/source/ui/uno/SwXDocumentSettings.cxx | 16 +++- 13 files changed, 67 insertions(+), 13 deletions(-) New commits: commit 8c0847593abd84d4f6c2bcf8f243202ae876dc57 Author: Cédric Bosdonnat Date: Wed Nov 2 14:41:05 2011 +0100 n#715115: WW8 numbering levels: use the WW6 indent if legacy flag is set diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 1b38b33..cb01a45 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -906,7 +906,10 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, { rNumFmt.SetIndentAt( aLVL.nDxaLeft ); rNumFmt.SetFirstLineIndent(aLVL.nDxaLeft1); -rNumFmt.SetListtabPos( nTabPos ); +if ( !aLVL.bV6 ) +rNumFmt.SetListtabPos( nTabPos ); +else +rNumFmt.SetListtabPos( aLVL.nV6Indent ); SvxNumberFormat::SvxNumLabelFollowedBy eNumLabelFollowedBy = SvxNumberFormat::LISTTAB; switch ( ixchFollow ) { commit fd886cdc6a8c047a9fb1bd10a00f901b4adb525e Author: Cédric Bosdonnat Date: Mon Oct 31 17:39:16 2011 +0100 n#693238: fixed docx import of tabs set after the end margin Added a new compatibility option to keep the previous behavior, but changed the default to avoid lines insertion for tabs when there are tab stops set beyond the end margin diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx index 1dd7699..50e8096 100644 --- a/sw/inc/IDocumentSettingAccess.hxx +++ b/sw/inc/IDocumentSettingAccess.hxx @@ -79,9 +79,10 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd PROTECT_FORM, // #i89181# TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, - INVERT_BORDER_SPACING, + INVERT_BORDER_SPACING, COLLAPSE_EMPTY_CELL_PARA, SMALL_CAPS_PERCENTAGE_66, + TAB_OVERFLOW, // COMPATIBILITY FLAGS END BROWSE_MODE, diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 3461e6d..656b0b7 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -579,6 +579,7 @@ private: bool mbCollapseEmptyCellPara: 1; bool mbTabAtLeftIndentForParagraphsInList; // #i89181# - see above bool mbSmallCapsPercentage66; +bool mbTabOverflow; bool mbLastBrowseMode : 1; diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index aef0e49..c512862 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -202,6 +202,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const case INVERT_BORDER_SPACING: return mbInvertBorderSpacing; case COLLAPSE_EMPTY_CELL_PARA: return mbCollapseEmptyCellPara; case SMALL_CAPS_PERCENTAGE_66: return mbSmallCapsPercentage66; +case TAB_OVERFLOW: return mbTabOverflow; case BROWSE_MODE: return mbLastBrowseMode; // Attention: normally the ViewShell has to be asked! case HTML_MODE: return mbHTMLMode; @@ -336,6 +337,10 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) case SMALL_CAPS_PERCENTAGE_66: mbSmallCapsPercentage66 = value; break; + +case TAB_OVERFLOW: +mbTabOverflow = value; +break; // COMPATIBILITY FLAGS END case BROWSE_MODE: //can be used temporary (load/save) when no ViewShell is avaiable diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index aa8aa3a..f8a0ce2 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -357,6 +357,7 @@ SwDoc::SwDoc() mbInvertBorderSpacing = false;// hidden mbCollapseEmptyCellPara = true;// hidden mbSmallCapsPercentage66 = false;// hidden +mbTabOverflow = true; // // COMPATIBILITY FLAGS END diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index a76d746..5d84e84 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1459,7 +1459,7 @@ void SwTxtFormatInfo::Init() // Nicht initialisieren: pRest, nLeft, nRight, nFirst, nRealWidth X(0); bA
[Libreoffice-commits] .: 2 commits - cui/source offapi/com sw/source
cui/source/dialogs/SpellAttrib.hxx | 10 cui/source/dialogs/SpellDialog.cxx | 149 cui/source/dialogs/SpellDialog.hrc |5 cui/source/dialogs/SpellDialog.src | 69 ++--- cui/source/inc/SpellDialog.hxx | 29 +- offapi/com/sun/star/linguistic2/SingleProofreadingError.idl |4 sw/source/ui/docvw/FrameControlsManager.cxx | 15 + sw/source/ui/docvw/PageBreakWin.cxx | 43 ++- sw/source/ui/inc/FrameControlsManager.hxx |1 sw/source/ui/inc/PageBreakWin.hxx |1 10 files changed, 210 insertions(+), 116 deletions(-) New commits: commit bc3c10b5ce88869871761000e9724bcad9a0d556 Author: Cédric Bosdonnat Date: Sun Oct 23 07:35:06 2011 -0700 Grammar checking dialog: reworked how explanations are shown diff --git a/cui/source/dialogs/SpellAttrib.hxx b/cui/source/dialogs/SpellAttrib.hxx index 9ebc229..731c694 100644 --- a/cui/source/dialogs/SpellAttrib.hxx +++ b/cui/source/dialogs/SpellAttrib.hxx @@ -47,6 +47,7 @@ struct SpellErrorDescription ::rtl::OUString sErrorText; ::rtl::OUString sDialogTitle; ::rtl::OUString sExplanation; +::rtl::OUString sExplanationURL; ::com::sun::star::lang::Locale aLocale; ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XProofreader > xGrammarChecker; ::rtl::OUString sServiceName; //service name of GrammarChecker/SpellChecker @@ -64,9 +65,13 @@ struct SpellErrorDescription const ::rtl::OUString& rServiceName, const ::rtl::OUString* pDialogTitle = 0, const ::rtl::OUString* pExplanation = 0, - const ::rtl::OUString* pRuleId = 0 ) : + const ::rtl::OUString* pRuleId = 0, + const ::rtl::OUString* pExplanationURL = 0 ) : bIsGrammarError( bGrammar ), sErrorText( rText ), +sDialogTitle( ), +sExplanation( ), +sExplanationURL( ), aLocale( rLocale ), xGrammarChecker( rxGrammarChecker ), sServiceName( rServiceName ), @@ -76,6 +81,8 @@ struct SpellErrorDescription sDialogTitle = *pDialogTitle; if( pExplanation ) sExplanation = *pExplanation; +if( pExplanationURL ) +sExplanationURL = *pExplanationURL; if( pRuleId ) sRuleId = *pRuleId; }; @@ -91,6 +98,7 @@ struct SpellErrorDescription xGrammarChecker == rDesc.xGrammarChecker && sDialogTitle.equals( rDesc.sDialogTitle ) && sExplanation.equals( rDesc.sExplanation ) && +sExplanationURL.equals( rDesc.sExplanationURL ) && sRuleId == rDesc.sRuleId; } }; diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 389cee6..9990e4c 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -51,6 +51,8 @@ #include #include #include +#include +#include #include #include #include @@ -68,6 +70,8 @@ #include #include "treeopt.hxx" #include +#include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -189,6 +193,26 @@ sal_uInt16 SpellUndoAction_Impl::GetId()const return m_nId; } +HelpFixedText::HelpFixedText( Window* pParent, const ResId& rResId ): +FixedText( pParent, rResId ) +{ +} + +void HelpFixedText::Paint( const Rectangle& rRect ) +{ +Rectangle aTextRect( rRect.Left() + 6, rRect.Top(), rRect.Right() - 6, rRect.Bottom() ); +DrawText( aTextRect, GetText(), TEXT_DRAW_WORDBREAK | TEXT_DRAW_MULTILINE ); +} + +long HelpFixedText::GetActualHeight( ) +{ +Rectangle rRect( GetPosPixel( ), GetSizePixel() ); +Rectangle aTextRect( rRect.Left() + 6, rRect.Top(), rRect.Right() - 6, rRect.Bottom() ); +Rectangle aBounds = GetTextRect( aTextRect, GetText(), TEXT_DRAW_WORDBREAK | TEXT_DRAW_MULTILINE ); + +return aBounds.getHeight(); +} + // class SvxSpellCheckDialog - SpellDialog::SpellDialog( @@ -200,9 +224,10 @@ SpellDialog::SpellDialog( pParent, CUI_RES(RID_SVXDLG_SPELLCHECK)), -aVendorImageFI ( this , CUI_RES( IMG_VENDOR ) ), aLanguageFT ( this, CUI_RES( FT_LANGUAGE ) ), aLanguageLB ( this, CUI_RES( LB_LANGUAGE ) ), +aExplainFT ( this, CUI_RES( FT_EXPLAIN ) ), +aExplainLink( this, CUI_RES( LINK_EXPLAIN ) ), aNotInDictFT( this, CUI_RE
[Libreoffice-commits] .: sw/inc sw/source unusedcode.easy
sw/inc/numrule.hxx |1 - sw/source/core/doc/number.cxx |6 -- sw/source/ui/config/fontcfg.cxx | 28 sw/source/ui/inc/fontcfg.hxx|5 - unusedcode.easy |2 -- 5 files changed, 42 deletions(-) New commits: commit 21352f88caba9dee73d5a87c8e3724d17ac6b428 Author: Cédric Bosdonnat Date: Thu Oct 20 16:47:44 2011 +0200 Sw styles cleanup: removed now unused methods diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx index 4401df3..0f7a3b2 100644 --- a/sw/inc/numrule.hxx +++ b/sw/inc/numrule.hxx @@ -217,7 +217,6 @@ public: static char* GetOutlineRuleName() { return pDefOutlineName; } static sal_uInt16 GetNumIndent( sal_uInt8 nLvl ); -static sal_uInt16 GetBullIndent( sal_uInt8 nLvl ); SwNumRuleType GetRuleType() const { return eRuleType; } void SetRuleType( SwNumRuleType eNew ) { eRuleType = eNew; diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 112ffd5..220aa19 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -175,12 +175,6 @@ sal_uInt16 SwNumRule::GetNumIndent( sal_uInt8 nLvl ) return aDefNumIndents[ nLvl ]; } -sal_uInt16 SwNumRule::GetBullIndent( sal_uInt8 nLvl ) -{ -OSL_ENSURE( MAXLEVEL > nLvl, "NumLevel is out of range" ); -return aDefNumIndents[ nLvl ]; -} - static void lcl_SetRuleChgd( SwTxtNode& rNd, sal_uInt8 nLevel ) { if( rNd.GetActualListLevel() == nLevel ) diff --git a/sw/source/ui/config/fontcfg.cxx b/sw/source/ui/config/fontcfg.cxx index efc3c67..0f4d4c8 100644 --- a/sw/source/ui/config/fontcfg.cxx +++ b/sw/source/ui/config/fontcfg.cxx @@ -292,34 +292,6 @@ sal_Int32 SwStdFontConfig::GetDefaultHeightFor(sal_uInt16 nFontType, LanguageTyp return nRet; } -void SwStdFontConfig::ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight ) -{ -OSL_ENSURE( nFontType < DEF_FONT_COUNT, "invalid index in SwStdFontConfig::ChangInt()"); -if( nFontType < DEF_FONT_COUNT && nDefaultFontHeight[nFontType] != nHeight) -{ -SvtLinguOptions aLinguOpt; -SvtLinguConfig().GetOptions( aLinguOpt ); - -sal_Int16 eWestern = MsLangId::resolveSystemLanguageByScriptType(aLinguOpt.nDefaultLanguage, ::com::sun::star::i18n::ScriptType::LATIN), - eCJK = MsLangId::resolveSystemLanguageByScriptType(aLinguOpt.nDefaultLanguage_CJK, ::com::sun::star::i18n::ScriptType::ASIAN), - eCTL = MsLangId::resolveSystemLanguageByScriptType(aLinguOpt.nDefaultLanguage_CTL, ::com::sun::star::i18n::ScriptType::COMPLEX); - -// #i92090# default height value sets back to -1 -const sal_Int32 nDefaultHeight = GetDefaultHeightFor(nFontType, lcl_LanguageOfType(nFontType, eWestern, eCJK, eCTL)); -const bool bIsDefaultHeight = nHeight == nDefaultHeight; -if( bIsDefaultHeight && nDefaultFontHeight[nFontType] > 0 ) -{ -SetModified(); -nDefaultFontHeight[nFontType] = -1; -} -else if( !bIsDefaultHeight && nHeight != nDefaultFontHeight[nFontType] ) -{ -SetModified(); -nDefaultFontHeight[nFontType] = nHeight; -} -} -} - sal_Int32 SwStdFontConfig::GetFontHeight( sal_uInt8 nFont, sal_uInt8 nScriptType, LanguageType eLang ) { OSL_ENSURE(nFont + FONT_PER_GROUP * nScriptType < DEF_FONT_COUNT, "wrong index in SwStdFontConfig::GetFontHeight()"); diff --git a/sw/source/ui/inc/fontcfg.hxx b/sw/source/ui/inc/fontcfg.hxx index 5acd526..3570130 100644 --- a/sw/source/ui/inc/fontcfg.hxx +++ b/sw/source/ui/inc/fontcfg.hxx @@ -79,8 +79,6 @@ class SW_DLLPUBLIC SwStdFontConfig : public utl::ConfigItem } } -void ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight ); - public: SwStdFontConfig(); ~SwStdFontConfig(); @@ -109,9 +107,6 @@ public: void SetFontIndex (const String& rSet, sal_uInt8 nFontGroup) {ChangeString(FONT_INDEX + FONT_PER_GROUP * nFontGroup, rSet);} -void SetFontHeight( sal_Int32 nHeight, sal_uInt8 nFont, sal_uInt8 nScriptType ) -{ChangeInt(nFont + FONT_PER_GROUP * nScriptType, nHeight);} - sal_Int32 GetFontHeight( sal_uInt8 nFont, sal_uInt8 nScriptType, LanguageType eLang ); static StringGetDefaultFor(sal_uInt16 nFontType, LanguageType eLang); diff --git a/unusedcode.easy b/unusedcode.easy index f7f28f0..60c838c 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -1175,7 +1175,6 @@ SwLRects::_ForEach(unsigned short, unsigned short, unsigned char (*)(SwLineRect SwLoadOptPage::LinkStubCaptionHdl(void*, void*) SwMailMergeChildWindow::GetChildWindowId() SwModify::GetClientCount() const -SwNumRule::GetBullIndent(unsigned char) SwOutlineNodes::Insert(SwNode* const&, unsigned short&) SwOutlineNodes::Insert(SwNode* const*, unsigned short) SwOutlineNodes::Insert(SwOutlineNodes const*, unsigned short, unsigned sh
[Libreoffice-commits] .: drawinglayer/inc drawinglayer/source svtools/inc svtools/source
drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx |6 +++ drawinglayer/source/primitive2d/borderlineprimitive2d.cxx |9 +++-- drawinglayer/source/processor2d/vclprocessor2d.cxx |7 +++ svtools/inc/svtools/borderhelper.hxx|3 + svtools/source/control/ctrlbox.cxx | 18 ++ 5 files changed, 40 insertions(+), 3 deletions(-) New commits: commit 8c2902ecbf135fae070ea032fa10a59bb76ec1b0 Author: Tomofumi Yagi Date: Thu Oct 20 11:03:54 2011 +0200 fdo#37129: Fix the drawing of dotted and dashed borders in Calc. diff --git a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx index 0bd537d..1449e2b 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx @@ -35,6 +35,7 @@ #include #include #include +#include // @@ -112,6 +113,11 @@ namespace drawinglayer return basegfx::fTools::equal(1.0, mfRightWidth); } +bool isSolidLine() const +{ +return (mnStyle==STYLE_SOLID); +} + bool isInsideUsed() const { return !basegfx::fTools::equalZero(mfLeftWidth); diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx index 9738e14..df6f381 100644 --- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx @@ -29,6 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_drawinglayer.hxx" +#include #include #include #include @@ -79,7 +80,7 @@ namespace drawinglayer return basegfx::B2DPolyPolygon( clipPolygon ); } -Primitive2DSequence BorderLinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const +Primitive2DSequence BorderLinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval; @@ -214,6 +215,7 @@ namespace drawinglayer // Get which is the line to show bool bIsHairline = leftIsHairline(); +bool bIsSolidline = isSolidLine(); double nWidth = getCorrectedLeftWidth(); basegfx::BColor aColor = getRGBColorLeft(); if ( basegfx::fTools::equal( 0.0, mfLeftWidth ) ) @@ -223,7 +225,7 @@ namespace drawinglayer aColor = getRGBColorRight(); } -if(bIsHairline) +if(bIsHairline && bIsSolidline) { // create hairline primitive aPolygon.append( getStart() ); @@ -237,12 +239,13 @@ namespace drawinglayer { // create filled polygon primitive const basegfx::B2DVector aLineWidthOffset(((nWidth + 1) * 0.5) * aPerpendicular); +basegfx::B2DVector aScale( rViewInformation.getInverseObjectToViewTransformation() * aVector ); aPolygon.append( aTmpStart ); aPolygon.append( aTmpEnd ); basegfx::B2DPolyPolygon aDashed = svtools::ApplyLineDashing( - aPolygon, getStyle(), MAP_100TH_MM ); + aPolygon, getStyle(), MAP_PIXEL, aScale.getLength() ); for (sal_uInt32 i = 0; i < aDashed.count(); i++ ) { basegfx::B2DPolygon aDash = aDashed.getB2DPolygon( i ); diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index a13ca70..c021519 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -837,6 +837,10 @@ namespace drawinglayer } else { +// remember that we enter a PolygonStrokePrimitive2D decomposition, +// used for AA thick line drawing +mnPolygonStrokePrimitive2D++; + mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon); if(mnPolygonStrokePrimitive2D @@ -854,6 +858,9 @@ namespace drawinglayer mpOutputDevice->DrawPolyLine(aLocalPolyPolygon.getB2DPolygon(a), 0.0); } } + +// leave PolygonStrokePrimitive2D +mnPolygonStrokePrimitive