[Libreoffice-commits] .: 3 commits - sw/source
sw/source/core/layout/paintfrm.cxx | 231 ++--- 1 file changed, 142 insertions(+), 89 deletions(-) New commits: commit 502c93143ef29989692ca3e63e3e6abc255fd53f Author: Michael Stahl Date: Mon Apr 16 16:12:39 2012 +0200 fdo#38635: fix border printing: Apparently this special case in lcl_PaintLeftRightLine for printer output devices is no longer necessary with the new drawing layer borders and causes the vertical border lines to be far too short, leading to visible gaps in the PDF. (regression from 0f0896c26fb260d1bbf31d7a886df3f61837f0f2) diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 1fbe09c..255cf14 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -4595,73 +4595,6 @@ void lcl_PaintLeftRightLine( const sal_Bool _bLeft, if ( _rAttrs.JoinedWithNext( _rFrm ) ) pBottomBorder = NULL; } -// OD 06.05.2003 #107169# - adjustments for printer output device -if ( bPrtOutputDev ) -{ -// substract width of outer top line. -if ( rBox.GetTop() && (!bCnt || _rAttrs.GetTopLine( _rFrm )) ) -{ -long nDist = ::lcl_AlignHeight( rBox.GetTop()->GetOutWidth() ); -(aRect.*_rRectFn->fnSubTop)( -nDist ); -// OD 19.05.2003 #109667# - If outer top line is hair line, calculated -// top has to be adjusted. -if ( nDist == 1 ) -{ -if ( _rFrm.IsVertical() ) -{ -// right of border rectangle has to be checked and adjusted -Point aCompPt( aRect.Right(), 0 ); -Point aRefPt( aCompPt.X() + 1, aCompPt.Y() ); -lcl_CompPxPosAndAdjustPos( *(pGlobalShell->GetOut()), - aRefPt, aCompPt, - sal_True, -1 ); -aRect.Right( aCompPt.X() ); -} -else -{ -// top of border rectangle has to be checked and adjusted -Point aCompPt( 0, aRect.Top() ); -Point aRefPt( aCompPt.X(), aCompPt.Y() - 1 ); -lcl_CompPxPosAndAdjustPos( *(pGlobalShell->GetOut()), - aRefPt, aCompPt, - sal_False, +1 ); -aRect.Top( aCompPt.Y() ); -} -} -} -// substract width of outer bottom line. -if ( rBox.GetBottom() && (!bCnt || _rAttrs.GetBottomLine( _rFrm )) ) -{ -long nDist = ::lcl_AlignHeight( rBox.GetBottom()->GetOutWidth()); -(aRect.*_rRectFn->fnAddBottom)( -nDist ); -// OD 19.05.2003 #109667# - If outer bottom line is hair line, calculated -// top has to be adjusted. -if ( nDist == 1 ) -{ -if ( _rFrm.IsVertical() ) -{ -// left of border rectangle has to be checked and adjusted -Point aCompPt( aRect.Left(), 0 ); -Point aRefPt( aCompPt.X() - 1, aCompPt.Y() ); -lcl_CompPxPosAndAdjustPos( *(pGlobalShell->GetOut()), - aRefPt, aCompPt, - sal_True, +1 ); -aRect.Left( aCompPt.X() ); -} -else -{ -// bottom of border rectangle has to be checked and adjusted -Point aCompPt( 0, aRect.Bottom() ); -Point aRefPt( aCompPt.X(), aCompPt.Y() + 1 ); -lcl_CompPxPosAndAdjustPos( *(pGlobalShell->GetOut()), - aRefPt, aCompPt, - sal_False, -1 ); -aRect.Bottom( aCompPt.Y() ); -} -} -} -} - if ( !pLeftRightBorder->GetInWidth() ) { // OD 06.05.2003 #107169# - add 6th parameter commit 0868a0155a2b57daf7b862d120aead0458372b17 Author: Michael Stahl Date: Mon Apr 16 16:12:36 2012 +0200 fdo#38215: merge consecutive border lines: This re-implements the merging that was done by SwLineRects::AddLineRect, SwLineRect::MakeUnion with the drawing layer border lines. This is used to merge borders of paragraphs and of tables that have the "separating" border-model, which fixes both the tiny dividing gaps between successive borders in the second bugdoc and the weird subtly differently rendered successive borders in the first bugdoc. (regression from 0f0896c26fb260d1bbf31d7a886df3f61837f0f2) diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index ba22f6f..1fbe09c 100644 --- a/sw/
[Libreoffice-commits] .: 3 commits - sw/source vcl/source
sw/source/core/doc/doclay.cxx |3 +++ sw/source/core/docnode/ndcopy.cxx |2 +- sw/source/core/unocore/unotext.cxx|6 -- vcl/source/glyphs/graphite_layout.cxx |2 +- 4 files changed, 5 insertions(+), 8 deletions(-) New commits: commit 91fab30f3b1617024ee2eadf3c7ad1ea84d7f6dd Author: Michael Stahl Date: Wed Feb 22 23:58:04 2012 +0100 fdo#46482: prevent duplication of frames: SwDoc::MakeFlySection: abuse the SwDoc::mbRedlineMove flag, which (with the fix for fdo#40599) does exactly what is necessary to prevent the spurious copies. Also, remove the ugly hack to work around this problem from SwXText::convertToTextFrame. diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 17264ca..c184135 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -840,8 +840,10 @@ if( GetIDocumentUndoRedo().DoesUndo() ) SwPaM* pTmp = (SwPaM*)&rPam; sal_Bool bOldFlag = mbCopyIsMove; bool const bOldUndo = GetIDocumentUndoRedo().DoesUndo(); +bool const bOldRedlineMove(IsRedlineMove()); mbCopyIsMove = sal_True; GetIDocumentUndoRedo().DoUndo(false); +SetRedlineMove(true); do { if( pTmp->HasMark() && *pTmp->GetPoint() != *pTmp->GetMark() ) @@ -850,6 +852,7 @@ if( GetIDocumentUndoRedo().DoesUndo() ) } pTmp = static_cast(pTmp->GetNext()); } while ( &rPam != pTmp ); +SetRedlineMove(bOldRedlineMove); mbCopyIsMove = bOldFlag; GetIDocumentUndoRedo().DoUndo(bOldUndo); diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 2c25700..c83d243 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1720,12 +1720,6 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) SwFmtAnchor aAnchor((*i)->GetAnchor()); aAnchor.SetAnchor(aMovePam.Start()); m_pImpl->m_pDoc->SetAttr(aAnchor, *(*i)); - -// delete the old anchor -SwSpzFrmFmts* pFrmFmts = m_pImpl->m_pDoc->GetSpzFrmFmts(); -// here we rely on that fact that this is a sorted list, where the last element is the newly created frame -SwFrmFmt *pFrmFmt = (*pFrmFmts)[pFrmFmts->Count()-1]; -m_pImpl->m_pDoc->DelLayoutFmt(pFrmFmt); } } } commit 23e52c207760c596cc2f841ef59f3100c110d591 Author: Michael Stahl Date: Wed Feb 22 23:48:57 2012 +0100 fdo#40599 i#112763: fix frame duplication: SwDoc::CopyFlyInFlyImpl: When called from SwRedline::CopyToSection, do not copy frames that are anchored at the redline end node by checking IsRedlineMove(); these frames are not deleted by DelCopyOfSection and were thus duplicated on every Show/Hide redlines. (regression from 62ebbb006b4a11974e14dd61d3c453a98336f951 (CWS os131)) diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index 07bf4a4..2461505 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -1431,7 +1431,7 @@ void SwDoc::CopyFlyInFlyImpl( const SwNodeRange& rRg, bool bAdd = false; if( pAPos->nNode < rRg.aEnd ) bAdd = true; -if( !bAdd ) +if (!bAdd && !IsRedlineMove()) // fdo#40599: not for redline move { bool bEmptyNode = false; bool bLastNode = false; commit d066f7e4afb3c9e395932ba7bf8715ad0770bcdd Author: Michael Stahl Date: Wed Feb 22 23:48:52 2012 +0100 vcl: crash in GraphiteLayout::expandOrCondense: When printing the bugdoc from i#103958: error: attempt to subscript container with out-of-bounds index 5, but container only holds 5 elements. #4 0x7fd37902be5e in GraphiteLayout::expandOrCondense (this=0x35296a8, rArgs=...) at vcl/source/glyphs/graphite_layout.cxx:848 #5 0x7fd37902bc54 in GraphiteLayout::AdjustLayout (this=0x35296a8, rArgs=...) at vcl/source/glyphs/graphite_layout.cxx:812 #6 0x7fd3790345c8 in GraphiteServerFontLayout::AdjustLayout (this=0x3529640, rArgs=...) at vcl/inc/graphite_serverfont.hxx:76 #7 0x7fd378d5c91d in OutputDevice::forceFallbackFontToFit (this=0x35022c0, rFallback=..., rFallbackFont=..., rFontSelData=..., nFallbackLevel=1, rLayoutArgs=..., rOrigMetric=...) at vcl/source/gdi/outdev3.cxx:6094 #8 0x7fd378d5cece in OutputDevice::ImplGlyphFallbackLayout (this=0x35022c0, pSalLayout=0x36136c0, rLayoutArgs=...) at vcl/source/gdi/outdev3.cxx:6206 #9 0x7fd378d5c6fe in OutputDevice::ImplLayou
[Libreoffice-commits] .: 3 commits - sw/source
sw/source/ui/docvw/HeaderFooterWin.cxx | 14 +++- sw/source/ui/docvw/PageBreakWin.cxx| 108 ++--- sw/source/ui/inc/HeaderFooterWin.hxx |1 sw/source/ui/inc/PageBreakWin.hxx |3 4 files changed, 37 insertions(+), 89 deletions(-) New commits: commit 60c968e9a2ef14aa289e677bd7f40d2c4724fd12 Author: Jan Holesovsky Date: Sat Jan 7 04:27:25 2012 +0100 Page Breaks: IsLeaveWindow() is unreliable, we do not need it here. diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index 0edeb61..ff5050b 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -83,17 +83,11 @@ namespace void SwBreakDashedLine::MouseMove( const MouseEvent& rMEvt ) { -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 ); -} +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() ) { @@ -309,13 +303,9 @@ void SwPageBreakWin::Select( ) void SwPageBreakWin::MouseMove( const MouseEvent& rMEvt ) { -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 ); -} +Point aEventPos( rMEvt.GetPosPixel() + rMEvt.GetPosPixel() ); +if ( !Contains( aEventPos ) && !PopupMenu::IsInExecute() ) +Fade( false ); else if ( !IsVisible() ) Fade( true ); } commit aa3bfbe776bcefd7e7b143e6843315df6b2a5ecb Author: Jan Holesovsky Date: Sat Jan 7 04:16:44 2012 +0100 Header/Footer, Page Breaks: Delay appearing by 500ms. The delay was a good idea, just the 1s was too long. diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index ff7d50e..330c1ff 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -153,6 +153,7 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag m_pLine( NULL ), m_bIsAppearing( false ), m_nFadeRate( 100 ), +m_nDelayAppearing( 0 ), m_aFadeTimer( ) { // Get the font and configure it @@ -243,6 +244,9 @@ void SwHeaderFooterWin::ShowAll( bool bShow ) if ( !PopupMenu::IsInExecute() ) { m_bIsAppearing = bShow; +if ( bShow ) +m_nDelayAppearing = 0; + if ( m_aFadeTimer.IsActive( ) ) m_aFadeTimer.Stop(); m_aFadeTimer.Start( ); @@ -516,6 +520,14 @@ void SwHeaderFooterWin::Select( ) IMPL_LINK( SwHeaderFooterWin, FadeHandler, Timer *, EMPTYARG ) { +const int TICKS_BEFORE_WE_APPEAR = 10; +if ( m_bIsAppearing && m_nDelayAppearing < TICKS_BEFORE_WE_APPEAR ) +{ +++m_nDelayAppearing; +m_aFadeTimer.Start(); +return 0; +} + if ( m_bIsAppearing && m_nFadeRate > 0 ) m_nFadeRate -= 25; else if ( !m_bIsAppearing && m_nFadeRate < 100 ) @@ -535,7 +547,7 @@ IMPL_LINK( SwHeaderFooterWin, FadeHandler, Timer *, EMPTYARG ) Invalidate(); if ( IsVisible( ) && m_nFadeRate > 0 && m_nFadeRate < 100 ) -m_aFadeTimer.Start(); +m_aFadeTimer.Start(); return 0; } diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index 0617101..0edeb61 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -110,6 +110,7 @@ SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm ) m_pLine( NULL ), m_bIsAppearing( false ), m_nFadeRate( 100 ), +m_nDelayAppearing( 0 ), m_bDestroyed( false ), m_pMousePt( NULL ) { @@ -424,6 +425,9 @@ void SwPageBreakWin::SetReadonly( bool bReadonly ) void SwPageBreakWin::Fade( bool bFadeIn ) { m_bIsAppearing = bFadeIn; +if ( bFadeIn ) +m_nDelayAppearing = 0; + if ( !m_bDestroyed && m_aFadeTimer.IsActive( ) ) m_aFadeTimer.Stop(); if ( !m_bDestroyed ) @@ -439,6 +443,14 @@ IMPL_LINK( SwPageBreakWin, HideHandler, void *, EMPTYARG ) IMPL_LINK( SwPageBreakWin, FadeHandler, Timer *, EMPTYARG ) { +const int TICKS_BEFORE_WE_APPEAR = 10; +if ( m_bIsAppearing && m_nDelayAppearing < TICKS_BEFORE_WE_APPEAR ) +{ +++m_nDelayAppearing; +m_aFadeTimer.Start(); +return 0; +} + if ( m_bIsAppearing && m_nFadeRate > 0 ) m_nFadeRate -= 25; else if ( !m_bIsAppearing && m_nFadeRate < 100 )
[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] .: 3 commits - sw/source unotools/inc unotools/source unusedcode.easy vcl/inc vcl/source
sw/source/ui/wrtsh/select.cxx | 23 --- unotools/inc/unotools/lingucfg.hxx |1 - unotools/source/config/lingucfg.cxx | 15 --- unusedcode.easy | 36 ++-- vcl/inc/vcl/button.hxx |1 - vcl/source/control/button.cxx |6 -- 6 files changed, 50 insertions(+), 32 deletions(-) New commits: commit 8fa8a59cad3970bbe68724fbbb93797fb5786c37 Author: Caolán McNamara Date: Wed Nov 2 16:03:57 2011 + update unused list diff --git a/unusedcode.easy b/unusedcode.easy index a8cece3..e895bbc 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -487,8 +487,6 @@ ScInputBarGroup::LinkStubImpl_ScrollHdl(void*, void*) ScJobSetup::ScJobSetup(SfxPrinter*) ScLeftFooterEditPage::GetRanges() ScLeftHeaderEditPage::GetRanges() -ScMacrosTest::testStarBasic() -ScMacrosTest::testVba() ScMatrix::CalcOffset(unsigned long, unsigned long) const ScMultiTextWnd::GetLineCount() ScMyCellInfo::ScMyCellInfo() @@ -1269,6 +1267,7 @@ VCLUnoHelper::CreatePointer() VCLXDevice::IsCreatedWithToolkit() const VCLXPrinterServer::getImplementationId() VCLXPrinterServer::getTypes() +VCLXRadioButton::getFirstActionListener() VbaFontBase::getUnderline() VbaFontBase::setUnderline(com::sun::star::uno::Any const&) VbaFoundFilesEnum::SetFileList(com::sun::star::uno::Sequence&) @@ -2136,7 +2135,40 @@ graphite2::TtfUtil::GlyfLookup(unsigned short, void const*, void const*, unsigne jfw_plugin::VendorBase::createInstance() jfw_plugin::VendorBase::getJavaExePaths(int*) jvmaccess::ClassPath::doLoadClass(com::sun::star::uno::Reference const&, void*, rtl::OUString const&, rtl::OUString const&) +layout::Box::Box(layout::Context const*, char const*) +layout::Box::Box(rtl::OUString const&, int, bool) +layout::Box::setProps(com::sun::star::uno::Reference, bool, bool, int) +layout::Button::GetButton() const +layout::Container::ShowAll(bool) +layout::ControlImpl::GetGetFocusHdl() +layout::ControlImpl::GetLoseFocusHdl() +layout::Dialog::GetDialog() const +layout::Edit::GetEdit() const +layout::ErrorBox::ErrorBox(Window*, char const*, char const*, char const*, rtl::OString const&, char const*, char const*) +layout::ErrorBox::ErrorBox(Window*, long, char const*, char const*, char const*, rtl::OString const&, char const*, char const*) +layout::ErrorBox::ErrorBox(Window*, long, rtl::OUString const&, rtl::OUString, rtl::OUString, rtl::OString const&, char const*, char const*) +layout::ErrorBox::ErrorBox(Window*, rtl::OUString const&, rtl::OUString, rtl::OUString, rtl::OString const&, char const*, char const*) +layout::InfoBox::InfoBox(Window*, char const*, char const*, char const*, rtl::OString const&, char const*, char const*) +layout::InfoBox::InfoBox(Window*, long, char const*, char const*, char const*, rtl::OString const&, char const*, char const*) +layout::InfoBox::InfoBox(Window*, long, rtl::OUString const&, rtl::OUString, rtl::OUString, rtl::OString const&, char const*, char const*) +layout::InfoBox::InfoBox(Window*, rtl::OUString const&, rtl::OUString, rtl::OUString, rtl::OString const&, char const*, char const*) +layout::ListBox::GetEntry(unsigned short) const +layout::ListBox::GetEntryPos(String const&) const +layout::ListBox::GetSelectEntryPos(unsigned short) const +layout::ListBox::SelectEntryPos(unsigned short, bool) +layout::MetricFormatter::MetricFormatter(layout::FormatterBaseImpl*) +layout::MetricFormatter::getFormatImpl() const +layout::NumericFormatter::NumericFormatter(layout::FormatterBaseImpl*) +layout::NumericFormatter::getFormatImpl() const +layout::PushButton::Check(bool) +layout::PushButton::GetPushButton() const +layout::TabControl::SetCurPageId(unsigned short) +layout::Table::setProps(com::sun::star::uno::Reference, bool, bool, int, int) +layout::Window::CreatePeer(layout::Window*, long, char const*) +layout::Window::getContext() +layout::WindowImpl::getProperty(char const*) layoutimpl::LayoutRoot::addItem(rtl::OUString const&, com::sun::star::uno::Reference const&) +layoutimpl::VCLXPlugin::SetPlugin(Control*) layoutimpl::VCLXTabControl::AddChild(com::sun::star::uno::Reference const&) layoutimpl::WidgetFactory::sfx2CreateWindow(VCLXWindow**, Window*, rtl::OUString const&, long&) layoutimpl::getParent(com::sun::star::uno::Reference) commit da0bd7a50139b06e14c1917af044b37d10ebaf4f Author: Caolán McNamara Date: Wed Nov 2 16:03:45 2011 + drop freshly unused methods diff --git a/unotools/inc/unotools/lingucfg.hxx b/unotools/inc/unotools/lingucfg.hxx index 4ae1020..668cb26 100644 --- a/unotools/inc/unotools/lingucfg.hxx +++ b/unotools/inc/unotools/lingucfg.hxx @@ -225,7 +225,6 @@ public: std::vector< SvtLinguConfigDictionaryEntry > GetActiveDictionariesByFormat( const rtl::OUString &rFormatName ); // functions returning file URLs to the respective images (if found) and empty string otherwise -::rtl::OUString GetSpellAndGrammarDialogImage( const ::
[Libreoffice-commits] .: 3 commits - sw/source
sw/source/ui/docvw/HeaderFooterWin.cxx | 288 +++-- sw/source/ui/docvw/PageBreakWin.cxx| 20 +- sw/source/ui/inc/HeaderFooterWin.hxx |6 3 files changed, 223 insertions(+), 91 deletions(-) New commits: commit f7ffa5f14758fb49ca85b4cea7f705c2d438710e Author: Cédric Bosdonnat Date: Wed Oct 12 02:01:03 2011 +0200 Header/Footer: Implemented fade in/out diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index c536fe9..0c0aa00 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include @@ -149,7 +150,10 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag m_bIsHeader( bHeader ), m_bReadonly( false ), m_pPopupMenu( NULL ), -m_pLine( NULL ) +m_pLine( NULL ), +m_bIsAppearing( false ), +m_nFadeRate( 100 ), +m_aFadeTimer( ) { // Get the font and configure it Font aFont = GetSettings().GetStyleSettings().GetToolFont(); @@ -186,6 +190,9 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag aText = m_pPopupMenu->GetItemText( FN_HEADERFOOTER_DELETE ); m_pPopupMenu->SetItemText( FN_HEADERFOOTER_DELETE, aRewriter.Apply( aText ) ); SetPopupMenu( m_pPopupMenu ); + +m_aFadeTimer.SetTimeout( 500 ); +m_aFadeTimer.SetTimeoutHdl( LINK( this, SwHeaderFooterWin, FadeHandler ) ); } SwHeaderFooterWin::~SwHeaderFooterWin( ) @@ -229,8 +236,13 @@ void SwHeaderFooterWin::SetOffset( Point aOffset, long nXLineStart, long nXLineE void SwHeaderFooterWin::ShowAll( bool bShow ) { -Show( bShow ); -m_pLine->Show( bShow ); +if ( !PopupMenu::IsInExecute() ) +{ +m_bIsAppearing = bShow; +if ( m_aFadeTimer.IsActive( ) ) +m_aFadeTimer.Stop(); +m_aFadeTimer.Start( ); +} } void SwHeaderFooterWin::Paint( const Rectangle& ) @@ -356,8 +368,12 @@ void SwHeaderFooterWin::Paint( const Rectangle& ) *this, aNewViewInfos ); // TODO Ghost it all if needed +Primitive2DSequence aGhostedSeq( 1 ); +double nFadeRate = double( m_nFadeRate ) / 100.0; +aGhostedSeq[0] = Primitive2DReference( new ModifiedColorPrimitive2D( +aSeq, BColorModifier( Color( COL_WHITE ).getBColor(), 1.0 - nFadeRate, BCOLORMODIFYMODE_INTERPOLATE ) ) ); -pProcessor->process( aSeq ); +pProcessor->process( aGhostedSeq ); } bool SwHeaderFooterWin::IsEmptyHeaderFooter( ) @@ -482,4 +498,30 @@ void SwHeaderFooterWin::Select( ) ExecuteCommand( GetCurItemId() ); } +IMPL_LINK( SwHeaderFooterWin, FadeHandler, Timer *, EMPTYARG ) +{ +if ( m_bIsAppearing && m_nFadeRate > 0 ) +m_nFadeRate -= 10; +else if ( !m_bIsAppearing && m_nFadeRate < 100 ) +m_nFadeRate += 10; + +if ( m_nFadeRate != 100 && !IsVisible() ) +{ +Show( true ); +m_pLine->Show( true ); +} +else if ( m_nFadeRate == 100 && IsVisible( ) ) +{ +Show( false ); +m_pLine->Show( false ); +} +else +Invalidate(); + +if ( IsVisible( ) && m_nFadeRate > 0 && m_nFadeRate < 100 ) +m_aFadeTimer.Start(); + +return 0; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index 8e871e2..b48e450 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -376,7 +376,7 @@ void SwPageBreakWin::MouseMove( const MouseEvent& rMEvt ) void SwPageBreakWin::Activate( ) { -m_aFadeTimer.Stop(); +Fade( true ); MenuButton::Activate(); } diff --git a/sw/source/ui/inc/HeaderFooterWin.hxx b/sw/source/ui/inc/HeaderFooterWin.hxx index 5ab8ef5..247678e 100644 --- a/sw/source/ui/inc/HeaderFooterWin.hxx +++ b/sw/source/ui/inc/HeaderFooterWin.hxx @@ -44,6 +44,9 @@ class SwHeaderFooterWin : public MenuButton, public SwFrameControl bool m_bReadonly; PopupMenu*m_pPopupMenu; Window* m_pLine; +bool m_bIsAppearing; +int m_nFadeRate; +Timer m_aFadeTimer; public: SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm, bool bHeader ); @@ -64,6 +67,9 @@ public: void ExecuteCommand(sal_uInt16 nSlot); void SetReadonly( bool bReadonly ); + +private: +DECL_LINK( FadeHandler, Timer * ); }; #endif commit 01e704121ace2d9c732fbf0fad0ef69cd3c39378 Author: Cédric Bosdonnat Date: Wed Oct 12 00:24:17 2011 +0200 Page Break: Make the line control thicker to ease fade in/out diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index ebcd215..8e871e2 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -455,8 +455,8 @
[Libreoffice-commits] .: 3 commits - sw/source
sw/source/core/inc/bodyfrm.hxx |1 sw/source/core/inc/colfrm.hxx |3 sw/source/core/inc/ftnfrm.hxx |1 sw/source/core/inc/pagefrm.hxx |2 sw/source/core/inc/sectfrm.hxx |2 sw/source/core/layout/paintfrm.cxx | 393 +++-- 6 files changed, 257 insertions(+), 145 deletions(-) New commits: commit 0803f08bb135ec52d58171279d95b9ef542bcabd Author: Cédric Bosdonnat Date: Mon Sep 19 18:42:37 2011 +0200 Page Break: draw a dashed line using the header/footer separator code diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 0e1ff5c..4fd60c3 100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3265,32 +3265,27 @@ void SwLayoutFrm::Paint(SwRect const& rRect, SwPrintData const*const) const } } -drawinglayer::primitive2d::Primitive2DSequence lcl_CreateHeaderFooterSeparatorPrimitives( -const SwPageFrm* pPageFrm, double nLineY ) +drawinglayer::primitive2d::Primitive2DSequence lcl_CreateDashedIndicatorPrimitive( +basegfx::B2DPoint aStart, basegfx::B2DPoint aEnd, +basegfx::BColor aColor ) { -// Adjust the Y-coordinate of the line to the header/footer box drawinglayer::primitive2d::Primitive2DSequence aSeq( 1 ); -basegfx::B2DPoint aLeft ( pPageFrm->Frm().Left(), nLineY ); -basegfx::B2DPoint aRight( pPageFrm->Frm().Right(), nLineY ); - -basegfx::BColor aLineColor = SwViewOption::GetHeaderFooterMarkColor().getBColor(); - std::vector< double > aStrokePattern; basegfx::B2DPolygon aLinePolygon; -aLinePolygon.append( aLeft ); -aLinePolygon.append( aRight ); +aLinePolygon.append( aStart ); +aLinePolygon.append( aEnd ); const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); if ( rSettings.GetHighContrastMode( ) ) { // Only a solid line in high contrast mode -aLineColor = rSettings.GetDialogTextColor().getBColor(); +aColor = rSettings.GetDialogTextColor().getBColor(); } else { // Get a color for the contrast -basegfx::BColor aHslLine = basegfx::tools::rgb2hsl( aLineColor ); +basegfx::BColor aHslLine = basegfx::tools::rgb2hsl( aColor ); double nLuminance = aHslLine.getZ() * 2.5; if ( nLuminance == 0 ) nLuminance = 0.5; @@ -3318,7 +3313,7 @@ drawinglayer::primitive2d::Primitive2DSequence lcl_CreateHeaderFooterSeparatorPr drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D * pLine = new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D ( basegfx::B2DPolyPolygon( aLinePolygon ), -drawinglayer::attribute::LineAttribute( aLineColor ), +drawinglayer::attribute::LineAttribute( aColor ), drawinglayer::attribute::StrokeAttribute( aStrokePattern ) ); aSeq[ aSeq.getLength( ) - 1 ] = drawinglayer::primitive2d::Primitive2DReference( pLine ); @@ -3326,6 +3321,18 @@ drawinglayer::primitive2d::Primitive2DSequence lcl_CreateHeaderFooterSeparatorPr return aSeq; } +drawinglayer::primitive2d::Primitive2DSequence lcl_CreateHeaderFooterSeparatorPrimitives( +const SwPageFrm* pPageFrm, double nLineY ) +{ +// Adjust the Y-coordinate of the line to the header/footer box +basegfx::B2DPoint aLeft ( pPageFrm->Frm().Left(), nLineY ); +basegfx::B2DPoint aRight( pPageFrm->Frm().Right(), nLineY ); + +basegfx::BColor aLineColor = SwViewOption::GetHeaderFooterMarkColor().getBColor(); + +return lcl_CreateDashedIndicatorPrimitive( aLeft, aRight, aLineColor ); +} + void SwPageFrm::PaintBreak( ) const { if ( !pGlobalShell->GetViewOptions()->IsPrinting() && @@ -3347,19 +3354,16 @@ void SwPageFrm::PaintBreak( ) const double nYLineOffset = double( pPageFrm->Frm().Top() + pPrevPageFrm->Frm().Bottom() ) / 2.0; SwRect aRect = pPageFrm->GetBoundRect(); -// Draw the line -basegfx::B2DPolygon aLine; -aLine.append( basegfx::B2DPoint( double( aRect.Left() ), nYLineOffset ) ); -aLine.append( basegfx::B2DPoint( double( aRect.Right() ), nYLineOffset ) ); - -basegfx::BColor aLineColor = SwViewOption::GetPageBreakColor().getBColor(); +basegfx::BColor aColor = SwViewOption::GetPageBreakColor().getBColor(); -drawinglayer::primitive2d::PolygonHairlinePrimitive2D* pLine = -new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( -aLine, aLineColor ); +// Draw the line +drawinglayer::primitive2d::Primitive2DSequence aSeq = +lcl_CreateDashedIndicatorPrimitive( +basegfx::B2DPoint( double( aRect.Left() ), nYLineOffset ), +basegfx::B2DPoint( double( aRec