[Libreoffice-commits] .: unoxml/source

2011-10-11 Thread David Tardon
 unoxml/source/rdf/librdf_repository.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 3d146fb86823591004bf2e64f803375b71d99013
Author: David Tardon dtar...@redhat.com
Date:   Tue Oct 11 10:20:45 2011 +0200

deprecated decl. from ext. lib.

diff --git a/unoxml/source/rdf/librdf_repository.cxx 
b/unoxml/source/rdf/librdf_repository.cxx
index 317ba30..7f8b183 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -463,8 +463,10 @@ librdf_node* librdf_GraphResult::getContext() const
 {
 if (!m_pStream.get() || librdf_stream_end(m_pStream.get()))
 return NULL;
+SAL_WNODEPRECATED_DECLARATIONS_PUSH;
 librdf_node *pCtxt( static_castlibrdf_node *
 (librdf_stream_get_context(m_pStream.get())) );
+SAL_WNODEPRECATED_DECLARATIONS_POP;
 if (pCtxt)
 return pCtxt;
 return m_pContext.get();
@@ -1616,8 +1618,10 @@ librdf_statement *rdfa_context_stream_map_handler(
 {
 OSL_ENSURE(i_pStream, rdfa_context_stream_map_handler: stream null);
 if (i_pStream) {
+SAL_WNODEPRECATED_DECLARATIONS_PUSH;
 librdf_node *pCtxt( static_castlibrdf_node *
 (librdf_stream_get_context(i_pStream)) );
+SAL_WNODEPRECATED_DECLARATIONS_POP;
 OSL_ENSURE(pCtxt, rdfa_context_stream_map_handler: context null);
 if (pCtxt  isInternalContext(pCtxt)) {
 return i_pStatement;
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: writerperfect/source

2011-10-11 Thread Fridrich Strba
 writerperfect/source/filter/OdgGenerator.cxx |   20 
 1 file changed, 20 insertions(+)

New commits:
commit 7700e8e82084acb403eefce0d934bd339ffbca30
Author: Fridrich Å trba fridrich.st...@bluewin.ch
Date:   Wed Oct 12 01:57:50 2011 +0200

write out the text margins in text block

diff --git a/writerperfect/source/filter/OdgGenerator.cxx 
b/writerperfect/source/filter/OdgGenerator.cxx
index a848b35..65c72f8 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -1309,6 +1309,26 @@ void OdgGenerator::startTextObject(WPXPropertyList const 
propList, WPXPropertyL
 pDrawFrameOpenElement-addAttribute(fo:max-height, 
propList[fo:max-height]-getStr());
 pStyleGraphicPropertiesOpenElement-addAttribute(fo:max-height, 
propList[fo:max-height]-getStr());
 }
+if (propList[fo:padding-top])
+{
+pDrawFrameOpenElement-addAttribute(fo:padding-top, 
propList[fo:padding-top]-getStr());
+pStyleGraphicPropertiesOpenElement-addAttribute(fo:padding-top, 
propList[fo:padding-top]-getStr());
+}
+if (propList[fo:padding-bottom])
+{
+pDrawFrameOpenElement-addAttribute(fo:padding-bottom, 
propList[fo:padding-bottom]-getStr());
+pStyleGraphicPropertiesOpenElement-addAttribute(fo:padding-bottom, 
propList[fo:padding-bottom]-getStr());
+}
+if (propList[fo:padding-left])
+{
+pDrawFrameOpenElement-addAttribute(fo:padding-left, 
propList[fo:padding-left]-getStr());
+pStyleGraphicPropertiesOpenElement-addAttribute(fo:padding-left, 
propList[fo:padding-left]-getStr());
+}
+if (propList[fo:padding-right])
+{
+pDrawFrameOpenElement-addAttribute(fo:padding-right, 
propList[fo:padding-right]-getStr());
+pStyleGraphicPropertiesOpenElement-addAttribute(fo:padding-right, 
propList[fo:padding-right]-getStr());
+}
 mpImpl-mBodyElements.push_back(pDrawFrameOpenElement);
 mpImpl-mBodyElements.push_back(new TagOpenElement(draw:text-box));
 
mpImpl-mGraphicsAutomaticStyles.push_back(pStyleGraphicPropertiesOpenElement);
___
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: 3 commits - sw/source

2011-10-11 Thread Cédric Bosdonnat
 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 cedric.bosdon...@free.fr
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 drawinglayer/attribute/fillgradientattribute.hxx
 #include drawinglayer/attribute/fontattribute.hxx
 #include drawinglayer/primitive2d/fillgradientprimitive2d.hxx
+#include drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx
 #include drawinglayer/primitive2d/polygonprimitive2d.hxx
 #include drawinglayer/primitive2d/polypolygonprimitive2d.hxx
 #include drawinglayer/primitive2d/textlayoutdevice.hxx
@@ -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