[Libreoffice-commits] core.git: 3 commits - avmedia/source cui/source dbaccess/source extensions/source filter/source forms/source fpicker/source include/sfx2 include/svtools reportdesign/source sc/so

2016-05-12 Thread Noel Grandin
 avmedia/source/viewer/mediawindow.cxx|4 
 cui/source/customize/acccfg.cxx  |2 
 cui/source/customize/cfg.cxx |2 
 cui/source/dialogs/hldoctp.cxx   |2 
 cui/source/dialogs/insdlg.cxx|2 
 cui/source/options/doclinkdialog.cxx |2 
 cui/source/options/optinet2.cxx  |4 
 cui/source/options/optjava.cxx   |2 
 cui/source/tabpages/numpages.cxx |2 
 cui/source/tabpages/tpbitmap.cxx |4 
 cui/source/tabpages/tpcolor.cxx  |4 
 cui/source/tabpages/tpgradnt.cxx |4 
 cui/source/tabpages/tphatch.cxx  |4 
 cui/source/tabpages/tplnedef.cxx |4 
 cui/source/tabpages/tplneend.cxx |4 
 dbaccess/source/ui/app/AppController.cxx |2 
 dbaccess/source/ui/dlg/ConnectionHelper.cxx  |   14 +-
 dbaccess/source/ui/dlg/dbwizsetup.cxx|2 
 dbaccess/source/ui/dlg/generalpage.cxx   |2 
 extensions/source/dbpilots/commonpagesdbp.cxx|2 
 extensions/source/propctrlr/formcomponenthandler.cxx |6 -
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx |5 -
 filter/source/xsltdialog/xmlfiltertabpagexslt.cxx|2 
 filter/source/xsltdialog/xmlfiltertestdialog.cxx |5 -
 forms/source/component/ImageControl.cxx  |2 
 forms/source/richtext/richtextvclcontrol.cxx |2 
 fpicker/source/office/OfficeFilePicker.cxx   |   26 ++---
 fpicker/source/office/OfficeFilePicker.hxx   |4 
 fpicker/source/office/fpdialogbase.hxx   |   24 +++-
 fpicker/source/office/iodlg.cxx  |   22 ++--
 fpicker/source/office/iodlg.hxx  |4 
 include/sfx2/docinsert.hxx   |3 
 include/sfx2/filedlghelper.hxx   |   27 +++--
 include/svtools/ruler.hxx|   64 ++---
 reportdesign/source/ui/report/ReportController.cxx   |2 
 sc/source/ui/miscdlgs/datastreamdlg.cxx  |2 
 sc/source/ui/view/tabvwshb.cxx   |2 
 sd/source/ui/dlg/PhotoAlbumDialog.cxx|2 
 sd/source/ui/dlg/dlgass.cxx  |2 
 sd/source/ui/dlg/filedlg.cxx |2 
 sd/source/ui/dlg/tpaction.cxx|2 
 sd/source/ui/func/fuinsert.cxx   |2 
 sd/source/ui/func/fuinsfil.cxx   |2 
 sd/source/ui/view/sdruler.cxx|2 
 sfx2/source/appl/appopen.cxx |2 
 sfx2/source/appl/lnkbase2.cxx|2 
 sfx2/source/appl/opengrf.cxx |2 
 sfx2/source/appl/shutdownicon.cxx|2 
 sfx2/source/dialog/filedlghelper.cxx |   22 ++--
 sfx2/source/dialog/filedlgimpl.hxx   |2 
 sfx2/source/doc/docinsert.cxx|8 -
 sfx2/source/doc/guisaveas.cxx|6 -
 sfx2/source/doc/templatedlg.cxx  |2 
 svtools/source/control/ruler.cxx |   60 ++--
 svx/source/core/graphichelper.cxx|4 
 svx/source/dialog/imapdlg.cxx|4 
 svx/source/dialog/svxruler.cxx   |   93 +--
 svx/source/form/databaselocationinput.cxx|2 
 svx/source/form/datanavi.cxx |2 
 sw/source/ui/chrdlg/chardlg.cxx  |2 
 sw/source/ui/dbui/createaddresslistdialog.cxx|2 
 sw/source/ui/dbui/mmdocselectpage.cxx|2 
 sw/source/ui/fldui/javaedit.cxx  |2 
 sw/source/ui/frmdlg/frmpage.cxx  |4 
 sw/source/ui/index/cnttab.cxx|2 
 sw/source/ui/misc/glossary.cxx   |2 
 sw/source/uibase/app/docsh2.cxx  |6 -
 sw/source/uibase/dbui/dbmgr.cxx  |2 
 sw/source/uibase/dbui/mailmergehelper.cxx|2 
 sw/source/uibase/docvw/edtwin3.cxx   |8 -
 sw/source/uibase/uiview/srcview.cxx  |2 
 sw/source/uibase/uiview/view2.cxx|2 
 sw/source/uibase/uiview/viewmdi.cxx  |   10 +-
 73 files changed, 275 insertions(+), 270 deletions(-)

New commits:
commit 6bc3c2bdc5279314881b7e950d76d4d813470d11
Author: Noel Grandin 
Date:   Wed May 11 13:18:56 2016 +0200

Convert SFX_EXTRA to scoped enum

Change-Id: I57fa684d91d10a132c718152ca646edd1c7bd189
Reviewed-on: https://gerrit.libreoffice.org/24882
Tested-by: Jenkins 

[Libreoffice-commits] core.git: 3 commits - avmedia/source basctl/source basic/source

2015-12-23 Thread Noel Grandin
 avmedia/source/gstreamer/gstplayer.cxx |2 +-
 avmedia/source/gstreamer/gstwindow.cxx |3 +--
 avmedia/source/gstreamer/gstwindow.hxx |4 +---
 basctl/source/basicide/basicbox.cxx|7 +++
 basctl/source/basicide/basicbox.hxx|4 +---
 basctl/source/basicide/baside2.hxx |2 --
 basctl/source/basicide/bastypes.cxx|4 +---
 basctl/source/inc/bastypes.hxx |3 +--
 basic/source/classes/sbunoobj.cxx  |7 ++-
 basic/source/inc/dlgcont.hxx   |2 --
 basic/source/inc/namecont.hxx  |3 ---
 basic/source/inc/sbunoobj.hxx  |5 +
 basic/source/inc/scriptcont.hxx|2 --
 basic/source/uno/dlgcont.cxx   |   10 --
 basic/source/uno/namecont.cxx  |6 ++
 basic/source/uno/scriptcont.cxx|   10 --
 16 files changed, 22 insertions(+), 52 deletions(-)

New commits:
commit 2351fd5d489fde281e8d1ef97af747149a29c247
Author: Noel Grandin 
Date:   Wed Dec 23 09:53:35 2015 +0200

loplugin:unusedfields in avmedia

Change-Id: I725a80cf7b6f2b728e650d0f365d063931b17ea7

diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index d59f591..afd 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -871,7 +871,7 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL 
Player::createPlayerWindow( co
 
 if( aSize.Width > 0 && aSize.Height > 0 )
 {
-::avmedia::gstreamer::Window* pWindow = new 
::avmedia::gstreamer::Window( mxMgr );
+::avmedia::gstreamer::Window* pWindow = new 
::avmedia::gstreamer::Window;
 
 xRet = pWindow;
 
diff --git a/avmedia/source/gstreamer/gstwindow.cxx 
b/avmedia/source/gstreamer/gstwindow.cxx
index fc2a8ee..765343d 100644
--- a/avmedia/source/gstreamer/gstwindow.cxx
+++ b/avmedia/source/gstreamer/gstwindow.cxx
@@ -52,8 +52,7 @@ static ::osl::Mutex& ImplGetOwnStaticMutex()
 // Window
 
 
-Window::Window( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) :
-mxMgr( rxMgr ),
+Window::Window() :
 meZoomLevel( media::ZoomLevel_NOT_AVAILABLE ),
 mnPointerType( awt::SystemPointer::ARROW )
 {
diff --git a/avmedia/source/gstreamer/gstwindow.hxx 
b/avmedia/source/gstreamer/gstwindow.hxx
index 73bfb30..2c9af23 100644
--- a/avmedia/source/gstreamer/gstwindow.hxx
+++ b/avmedia/source/gstreamer/gstwindow.hxx
@@ -39,7 +39,7 @@ class Window : public ::cppu::WeakImplHelper< 
css::media::XPlayerWindow,
 {
 public:
 
-explicit Window( const css::uno::Reference< 
css::lang::XMultiServiceFactory >& rxMgr );
+explicit Window();
 virtual ~Window();
 
 // XPlayerWindow
@@ -79,8 +79,6 @@ public:
 
 private:
 
-css::uno::Reference< css::lang::XMultiServiceFactory > mxMgr;
-
 css::media::ZoomLevel   meZoomLevel;
 int mnPointerType;
 };
commit 472388fda8afc28d7b9f61056f45a741abfb732e
Author: Noel Grandin 
Date:   Wed Dec 23 09:51:38 2015 +0200

loplugin:unusedfields in basctl

Change-Id: I565bd86167c93ece1d65ce8a3b148144f5a7107a

diff --git a/basctl/source/basicide/basicbox.cxx 
b/basctl/source/basicide/basicbox.cxx
index 78518d1..c515c23 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -67,7 +67,7 @@ void LibBoxControl::StateChanged( sal_uInt16, SfxItemState 
eState, const SfxPool
 
 VclPtr LibBoxControl::CreateItemWindow( vcl::Window *pParent )
 {
-return VclPtr::Create( pParent, m_xFrame );
+return VclPtr::Create( pParent );
 }
 
 
@@ -133,9 +133,8 @@ void DocListenerBox::onDocumentModeChanged( const 
ScriptDocument& /*_rDocument*/
 // not interested in
 }
 
-LibBox::LibBox( vcl::Window* pParent, const uno::Reference< frame::XFrame >& 
rFrame ) :
-DocListenerBox( pParent ),
-m_xFrame( rFrame )
+LibBox::LibBox( vcl::Window* pParent ) :
+DocListenerBox( pParent )
 {
 FillBox();
 bIgnoreSelect = true;   // do not yet transfer select of 0
diff --git a/basctl/source/basicide/basicbox.hxx 
b/basctl/source/basicide/basicbox.hxx
index 9102741..77f8642 100644
--- a/basctl/source/basicide/basicbox.hxx
+++ b/basctl/source/basicide/basicbox.hxx
@@ -77,7 +77,6 @@ private:
 OUStringaCurText;
 boolbIgnoreSelect;
 boolbFillBox;
-css::uno::Reference< css::frame::XFrame > m_xFrame;
 
 static void ReleaseFocus();
 voidInsertEntries( const ScriptDocument& rDocument, 
LibraryLocation eLocation );
@@ -93,8 +92,7 @@ protected:
 virtual boolPreNotify( NotifyEvent& rNEvt ) override;
 
 public:
-LibBox( vcl::Window* pParent,
-const css::uno::Reference< css::frame::XFrame >& 
rFrame );
+LibBox( vcl::Window* pParent );
 virtual ~LibBox();
 virtual voiddispose() override;
 
diff --git 

[Libreoffice-commits] core.git: 3 commits - avmedia/source

2015-12-20 Thread Tor Lillqvist
 avmedia/source/gstreamer/gstmanager.cxx |   24 ---
 avmedia/source/gstreamer/gstplayer.cxx  |   66 
 2 files changed, 26 insertions(+), 64 deletions(-)

New commits:
commit d0652bfd2b87fad10c141e3bf3f5d0c0a8683cb5
Author: Tor Lillqvist 
Date:   Sun Dec 20 10:57:12 2015 +0200

Change a local DBG macro to SAL_INFO

But actually, I am starting to lean more and more towards the opinion
that very little of our debug output code is actually useful to keep
in the sources permanently. When somebody wants to debug some part of
the code, they will very likely want to add much more detailled
tracing anyway, temporarily.

Change-Id: I6a60a130e3b72ba3d6ad32a1b22a2a9f3ac66b27

diff --git a/avmedia/source/gstreamer/gstplayer.cxx 
b/avmedia/source/gstreamer/gstplayer.cxx
index 4e22086..158767c 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -53,18 +53,11 @@
 #include 
 #include 
 
-#if !defined DBG
-# if OSL_DEBUG_LEVEL > 2
 #ifdef AVMEDIA_GST_0_10
 #  define AVVERSION "gst 0.10: "
 #else
 #  define AVVERSION "gst 1.0: "
 #endif
-#define DBG(...) do { fprintf (stderr, "%s", AVVERSION); fprintf (stderr, 
__VA_ARGS__); fprintf (stderr, "\n"); } while (0);
-# else
-#define DBG(...)
-# endif
-#endif
 
 using namespace ::com::sun::star;
 
@@ -312,12 +305,12 @@ Player::Player( const uno::Reference< 
lang::XMultiServiceFactory >& rxMgr ) :
 
 mbInitialized = gst_init_check( , ,  );
 
-DBG( "%p Player::Player", this );
+SAL_INFO( "avmedia.gstreamer", AVVERSION << this << " Player::Player" );
 
 if (pError != nullptr)
 {
 // TODO: throw an exception?
-DBG( "%p Player::Player error '%s'", this, pError->message );
+SAL_INFO( "avmedia.gstreamer", AVVERSION << this << " Player::Player 
error '" << pError->message << "'" );
 g_error_free (pError);
 }
 }
@@ -326,7 +319,7 @@ Player::Player( const uno::Reference< 
lang::XMultiServiceFactory >& rxMgr ) :
 
 Player::~Player()
 {
-DBG( "%p Player::~Player", this );
+SAL_INFO( "avmedia.gstreamer", AVVERSION << this << " Player::~Player" );
 if( mbInitialized )
 disposing();
 }
@@ -339,7 +332,7 @@ void SAL_CALL Player::disposing()
 
 stop();
 
-DBG( "%p Player::disposing", this );
+SAL_INFO( "avmedia.gstreamer", AVVERSION << this << " Player::disposing" );
 
 // Release the elements and pipeline
 if( mbInitialized )
@@ -431,8 +424,6 @@ static gboolean wrap_element_query_duration (GstElement 
*element, GstFormat form
 
 GstBusSyncReply Player::processSyncMessage( GstMessage *message )
 {
-//DBG( "%p processSyncMessage has handle: %s", this, 
GST_MESSAGE_TYPE_NAME( message ) );
-
 #if OSL_DEBUG_LEVEL > 0
 if ( GST_MESSAGE_TYPE( message ) == GST_MESSAGE_ERROR )
 {
@@ -441,8 +432,8 @@ GstBusSyncReply Player::processSyncMessage( GstMessage 
*message )
 
 gst_message_parse_error( message, , _debug );
 SAL_WARN(
-"avmedia",
-"gstreamer error: '" << error->message << "' debug: '"
+"avmedia.gstreamer",
+"error: '" << error->message << "' debug: '"
 << error_debug << "'");
 }
 #endif
@@ -454,8 +445,8 @@ GstBusSyncReply Player::processSyncMessage( GstMessage 
*message )
 if (gst_is_video_overlay_prepare_window_handle_message (message) )
 #endif
 {
-DBG( "%p processSyncMessage prepare window id: %s %d", this,
- GST_MESSAGE_TYPE_NAME( message ), (int)mnWindowID );
+SAL_INFO( "avmedia.gstreamer", AVVERSION << this << " 
processSyncMessage prepare window id: " <<
+  GST_MESSAGE_TYPE_NAME( message ) << " " << (int)mnWindowID );
 if( mpXOverlay )
 g_object_unref( G_OBJECT ( mpXOverlay ) );
 g_object_set( GST_MESSAGE_SRC( message ), "force-aspect-ratio", FALSE, 
nullptr );
@@ -473,12 +464,11 @@ GstBusSyncReply Player::processSyncMessage( GstMessage 
*message )
 
 gst_message_parse_state_changed (message, nullptr, , 
);
 
-DBG( "%p state change received, new state %d pending %d", this,
- (int)newstate, (int)pendingstate );
+SAL_INFO( "avmedia.gstreamer", AVVERSION << this << " state change 
received, new state " << (int)newState << " pending " << (int)pendingstate );
 if( newstate == GST_STATE_PAUSED &&
 pendingstate == GST_STATE_VOID_PENDING ) {
 
-DBG( "%p change to paused received", this );
+SAL_INFO( "avmedia.gstreamer", AVVERSION << this << " change 
to paused received" );
 
 if( mnDuration == 0) {
 gint64 gst_duration = 0L;
@@ -511,7 +501,7 @@ GstBusSyncReply Player::processSyncMessage( GstMessage 
*message )
 if( pStructure ) {
 gst_structure_get_int( pStructure, "width", 
 );
   

[Libreoffice-commits] core.git: 3 commits - avmedia/source basctl/source chart2/source cui/source dbaccess/source editeng/source extensions/source framework/source include/svtools include/svx include/

2015-05-26 Thread Noel Grandin
 avmedia/source/framework/mediacontrol.cxx |2 
 basctl/source/dlged/dlged.cxx |2 
 chart2/source/controller/main/ChartWindow.cxx |6 
 chart2/source/controller/main/ChartWindow.hxx |6 
 cui/source/dialogs/cuihyperdlg.cxx|2 
 cui/source/factory/dlgfact.cxx|2 
 cui/source/factory/dlgfact.hxx|2 
 cui/source/options/connpooloptions.cxx|4 
 dbaccess/source/ui/querydesign/JoinTableView.cxx  |   10 -
 dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx |4 
 dbaccess/source/ui/querydesign/QueryTableView.cxx |4 
 dbaccess/source/ui/querydesign/TableConnection.cxx|4 
 dbaccess/source/ui/querydesign/TableWindow.cxx|4 
 dbaccess/source/ui/querydesign/TableWindowListBox.cxx |4 
 dbaccess/source/ui/querydesign/TableWindowTitle.cxx   |2 
 dbaccess/source/ui/relationdesign/RelationController.cxx  |4 
 dbaccess/source/ui/relationdesign/RelationTableView.cxx   |2 
 editeng/source/editeng/impedit.cxx|2 
 extensions/source/propctrlr/browserlistbox.cxx|6 
 extensions/source/propctrlr/standardcontrol.cxx   |2 
 framework/source/helper/vclstatusindicator.cxx|2 
 include/svtools/scrwin.hxx|2 
 include/svtools/treelistbox.hxx   |6 
 include/svx/svxdlg.hxx|2 
 include/vcl/window.hxx|   83 ++---
 offapi/com/sun/star/awt/XWindowPeer.idl   |4 
 reportdesign/source/core/sdr/RptObject.cxx|2 
 reportdesign/source/ui/misc/ColorListener.cxx |4 
 reportdesign/source/ui/report/ReportSection.cxx   |4 
 reportdesign/source/ui/report/ReportWindow.cxx|7 
 reportdesign/source/ui/report/ScrollHelper.cxx|2 
 reportdesign/source/ui/report/SectionView.cxx |2 
 reportdesign/source/ui/report/SectionWindow.cxx   |   10 -
 reportdesign/source/ui/report/StartMarker.cxx |2 
 reportdesign/source/ui/report/ViewsWindow.cxx |   16 -
 reportdesign/source/ui/report/dlgedfunc.cxx   |2 
 sc/source/ui/app/inputwin.cxx |4 
 sc/source/ui/view/gridwin.cxx |2 
 sd/source/ui/view/sdwindow.cxx|2 
 sd/source/ui/view/viewshe2.cxx|8 
 sfx2/source/doc/templatedlg.cxx   |4 
 sfx2/source/sidebar/SidebarController.cxx |2 
 svtools/source/brwbox/brwbox1.cxx |   18 +-
 svtools/source/brwbox/datwin.cxx  |4 
 svtools/source/brwbox/datwin.hxx  |6 
 svtools/source/contnr/imivctl1.cxx|   10 -
 svtools/source/contnr/ivctrl.cxx  |4 
 svtools/source/contnr/svimpbox.cxx|   10 -
 svtools/source/contnr/treelistbox.cxx |6 
 svtools/source/control/scrwin.cxx |2 
 svtools/source/table/tablecontrol_impl.cxx|   18 +-
 svx/source/accessibility/AccessibleTextHelper.cxx |2 
 svx/source/dialog/frmsel.cxx  |2 
 svx/source/sdr/overlay/overlaymanager.cxx |4 
 svx/source/svdraw/sdrpagewindow.cxx   |2 
 svx/source/svdraw/sdrpaintwindow.cxx  |2 
 svx/source/svdraw/svdglue.cxx |2 
 svx/source/svdraw/svdpntv.cxx |4 
 sw/source/core/layout/paintfrm.cxx|2 
 sw/source/core/view/viewsh.cxx|   12 -
 sw/source/ui/dbui/addresslistdialog.cxx   |2 
 sw/source/uibase/docvw/srcedtw.cxx|3 
 sw/source/uibase/inc/pview.hxx|2 
 sw/source/uibase/inc/srcedtw.hxx  |2 
 sw/source/uibase/uiview/pview.cxx |2 
 toolkit/source/awt/scrollabledialog.cxx   |2 
 toolkit/source/awt/vclxwindow.cxx |4 
 vcl/source/control/button.cxx |2 
 vcl/source/control/edit.cxx   |2 
 vcl/source/control/ilstbox.cxx|2 
 vcl/source/control/lstbox.cxx |2 
 vcl/source/control/slider.cxx |2 
 vcl/source/control/tabctrl.cxx|4 
 vcl/source/window/brdwin.cxx  |4 
 

[Libreoffice-commits] core.git: 3 commits - avmedia/source dbaccess/source editeng/source sw/source

2015-05-03 Thread Caolán McNamara
 avmedia/source/framework/mediaitem.cxx |2 +-
 avmedia/source/gstreamer/gstframegrabber.hxx   |2 +-
 avmedia/source/gstreamer/gstmanager.hxx|2 +-
 avmedia/source/gstreamer/gstplayer.hxx |2 +-
 avmedia/source/opengl/oglframegrabber.hxx  |2 +-
 avmedia/source/opengl/oglmanager.hxx   |2 +-
 avmedia/source/viewer/mediaevent_impl.hxx  |4 ++--
 avmedia/source/viewer/mediawindow_impl.hxx |6 +++---
 avmedia/source/vlc/vlcmanager.hxx  |2 +-
 avmedia/source/vlc/wrapper/Player.hxx  |2 +-
 avmedia/source/win/framegrabber.hxx|4 ++--
 avmedia/source/win/manager.hxx |2 +-
 avmedia/source/win/player.hxx  |4 ++--
 dbaccess/source/ui/querydesign/QueryDesignView.cxx |5 ++---
 editeng/source/editeng/impedit4.cxx|6 --
 sw/source/core/crsr/callnk.hxx |2 +-
 16 files changed, 21 insertions(+), 28 deletions(-)

New commits:
commit 311e6dcf94490c075558cf848d955b84a9cf68a8
Author: Caolán McNamara caol...@redhat.com
Date:   Sun May 3 09:33:59 2015 +0100

drop useless temp debugging strings

Change-Id: I8a11a3d20fc5bde984586cb7046b174568315620

diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 20c411e..934fada 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2802,9 +2802,6 @@ EditSelection ImpEditEngine::TransliterateText( const 
EditSelection rSelection,
 nCurrentEnd   = aCurWordBndry.endPos;
 sal_Int32 nLen = nCurrentEnd - nCurrentStart;
 DBG_ASSERT( nLen  0, invalid word length of 0 );
-#if OSL_DEBUG_LEVEL  1
-OUString aText(aNodeStr.copy(nCurrentStart, nLen) );
-#endif
 
 Sequence sal_Int32  aOffsets;
 OUString aNewText( 
aTransliterationWrapper.transliterate(aNodeStr,
@@ -2890,9 +2887,6 @@ EditSelection ImpEditEngine::TransliterateText( const 
EditSelection rSelection,
 {
 const sal_Int32 nLen = nCurrentEnd - nCurrentStart;
 DBG_ASSERT( nLen  0, invalid word length of 0 );
-#if OSL_DEBUG_LEVEL  1
-OUString aText( aNodeStr.copy( nCurrentStart, nLen ) );
-#endif
 
 Sequence sal_Int32  aOffsets;
 OUString aNewText( aTransliterationWrapper.transliterate( 
aNodeStr,
commit 47687ccb9d487a0f7e58ef4c956f6fba77261e02
Author: Caolán McNamara caol...@redhat.com
Date:   Sat May 2 17:18:16 2015 +0100

cppcheck: variableScope

Change-Id: Ice10ca4fdecfb446fa3f7680e89ea0d7dd2c1cb7

diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx 
b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 8c8ab55..a42e8e6 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -719,9 +719,6 @@ namespace
 OTableFields _rFieldList,
 bool bMulti )
 {
-// * must not contain a filter : have I already shown the correct 
warning ?
-bool bCritsOnAsterikWarning = false;// ** TMFS **
-
 OUString aFieldName,aCriteria,aWhereStr,aHavingStr,aWork/*,aOrderStr*/;
 // print line by line joined with AND
 sal_uInt16 nMaxCriteria = 0;
@@ -739,6 +736,8 @@ namespace
 const Reference XDatabaseMetaData   xMetaData = 
xConnection-getMetaData();
 const OUString aQuote = xMetaData-getIdentifierQuoteString();
 const IParseContext rContext = 
static_castOQueryController(_pView-getController()).getParser().getContext();
+// * must not contain a filter : have I already shown the correct 
warning ?
+bool bCritsOnAsterikWarning = false;// ** TMFS **
 
 for (sal_uInt16 i=0 ; i  nMaxCriteria ; i++)
 {
commit 8c7d151e7a8a54b0fed8dfbcc957d435b73afa51
Author: Caolán McNamara caol...@redhat.com
Date:   Sat May 2 17:12:54 2015 +0100

cppcheck: noExplicitConstructor

Change-Id: I4eb86c5a03b55e5946fe11848ca009f7ca112658

diff --git a/avmedia/source/framework/mediaitem.cxx 
b/avmedia/source/framework/mediaitem.cxx
index 2543df5..bf85b48 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -61,7 +61,7 @@ struct MediaItem::Impl
 boolm_bMute;
 ::com::sun::star::media::ZoomLevel m_eZoom;
 
-Impl(AVMediaSetMask nMaskSet)
+explicit Impl(AVMediaSetMask nMaskSet)
 : m_nMaskSet( nMaskSet )
 , m_eState( MEDIASTATE_STOP )
 , m_fTime( 0.0 )
diff --git a/avmedia/source/gstreamer/gstframegrabber.hxx 
b/avmedia/source/gstreamer/gstframegrabber.hxx
index 87a3f23..6c849c8 100644
--- a/avmedia/source/gstreamer/gstframegrabber.hxx
+++ 

[Libreoffice-commits] core.git: 3 commits - avmedia/source fpicker/source include/rtl sc/source setup_native/source shell/source sw/source vcl/win xmloff/source

2015-01-23 Thread Michael Stahl
 avmedia/source/win/player.cxx |
3 +
 fpicker/source/win32/misc/WinImplHelper.cxx   |
3 +
 include/rtl/strbuf.hxx|   
17 ++
 include/rtl/ustrbuf.hxx   |   
17 ++
 sc/source/core/data/documen4.cxx  |
3 +
 sc/source/core/data/documentimport.cxx|
3 +
 setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx |
3 +
 shell/source/win32/shlxthandler/propsheets/propsheets.cxx |
3 +
 shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx   |
3 +
 shell/source/win32/shlxthandler/util/utilities.cxx|
3 +
 sw/source/core/txtnode/ndhints.cxx|
6 ---
 vcl/win/source/app/salinst.cxx|
4 ++
 xmloff/source/text/txtparai.cxx   |
2 -
 13 files changed, 62 insertions(+), 8 deletions(-)

New commits:
commit 853c2fc71a96755a9dee629fd5d0e1cff9a48034
Author: Michael Stahl mst...@redhat.com
Date:   Thu Jan 22 14:33:23 2015 +0100

sal: try to avoid abuse of OUStringBuffer(int) ctor

... to avoid bugs like commit f0d6e0e1e21afd0adf5bd01d771b2d83d8f13a48.

Change-Id: I1e41d421609e09bf62a7a04ba34f3a8e8d118fd3

diff --git a/include/rtl/strbuf.hxx b/include/rtl/strbuf.hxx
index 9352d54..5450472 100644
--- a/include/rtl/strbuf.hxx
+++ b/include/rtl/strbuf.hxx
@@ -96,6 +96,23 @@ public:
 {
 rtl_string_new_WithLength( pData, length );
 }
+#if __cplusplus = 201103L
+explicit OStringBuffer(unsigned int length)
+: OStringBuffer(static_castint(length))
+{
+}
+explicit OStringBuffer(long length)
+: OStringBuffer(static_castint(length))
+{
+}
+explicit OStringBuffer(unsigned long length)
+: OStringBuffer(static_castint(length))
+{
+}
+// avoid obvious bugs
+explicit OStringBuffer(char) = delete;
+explicit OStringBuffer(sal_Unicode) = delete;
+#endif
 
 /**
 Constructs a string buffer so that it represents the same
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index a9252b8..0240557 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -91,6 +91,23 @@ public:
 {
 rtl_uString_new_WithLength( pData, length );
 }
+#if __cplusplus = 201103L
+explicit OUStringBuffer(unsigned int length)
+: OUStringBuffer(static_castint(length))
+{
+}
+explicit OUStringBuffer(long length)
+: OUStringBuffer(static_castint(length))
+{
+}
+explicit OUStringBuffer(unsigned long length)
+: OUStringBuffer(static_castint(length))
+{
+}
+// avoid obvious bugs
+explicit OUStringBuffer(char) = delete;
+explicit OUStringBuffer(sal_Unicode) = delete;
+#endif
 
 /**
 Constructs a string buffer so that it represents the same
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index e593351..27f8a20 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -374,7 +374,8 @@ void ScDocument::InsertTableOp(const ScTabOpParam rParam,  
// multiple (repeate
 }
 
 ScRefAddress aRef;
-OUStringBuffer aForString('=');
+OUStringBuffer aForString;
+aForString.append('=');
 aForString.append(ScCompiler::GetNativeSymbol(ocTableOp));
 aForString.append(ScCompiler::GetNativeSymbol( ocOpen));
 
diff --git a/sc/source/core/data/documentimport.cxx 
b/sc/source/core/data/documentimport.cxx
index 48878f5..4191642 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -375,7 +375,8 @@ void ScDocumentImport::setTableOpCells(const ScRange 
rRange, const ScTabOpParam
 
 ScDocument* pDoc = mpImpl-mrDoc;
 ScRefAddress aRef;
-OUStringBuffer aFormulaBuf('=');
+OUStringBuffer aFormulaBuf;
+aFormulaBuf.append('=');
 aFormulaBuf.append(ScCompiler::GetNativeSymbol(ocTableOp));
 aFormulaBuf.append(ScCompiler::GetNativeSymbol(ocOpen));
 
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 7676d74..b65135f 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -133,7 +133,7 @@ void XMLCharContext::EndElement()
 }
 else
 {
-OUStringBuffer sBuff( m_nCount );
+OUStringBuffer sBuff(static_castint(m_nCount));
 while( m_nCount-- )
 sBuff.append( m_c, 1 );
 
commit ba68436e3fea34b4ae696f96f8048502865cdc79
Author: Michael Stahl mst...@redhat.com
Date:   Thu Jan 22 22:16:34 2015 +0100

Win SDK 8.1: apparently VersionHelpers.h needs to be included explicitly



[Libreoffice-commits] core.git: 3 commits - avmedia/source basctl/source cui/source editeng/source forms/source include/svl reportdesign/source sc/source sd/source sfx2/source starmath/source svl/sour

2014-09-10 Thread Stephan Bergmann
 avmedia/source/framework/mediatoolbox.cxx |2 
 basctl/source/basicide/basicbox.cxx   |4 
 cui/source/dialogs/cuihyperdlg.cxx|2 
 cui/source/dialogs/postdlg.cxx|6 
 cui/source/options/treeopt.cxx|   10 
 cui/source/tabpages/backgrnd.cxx  |   20 -
 cui/source/tabpages/border.cxx|2 
 cui/source/tabpages/page.cxx  |   12 -
 cui/source/tabpages/paragrph.cxx  |   34 +--
 editeng/source/editeng/editdbg.cxx|6 
 editeng/source/editeng/editdoc.cxx|   56 ++---
 editeng/source/editeng/editobj.cxx|   10 
 editeng/source/editeng/impedit4.cxx   |6 
 editeng/source/editeng/impedit5.cxx   |   18 -
 editeng/source/outliner/outliner.cxx  |4 
 editeng/source/uno/unofored.cxx   |2 
 forms/source/richtext/rtattributehandler.cxx  |2 
 include/svl/poolitem.hxx  |5 
 reportdesign/source/ui/misc/statusbarcontroller.cxx   |4 
 reportdesign/source/ui/misc/toolboxcontroller.cxx |2 
 sc/source/core/data/patattr.cxx   |2 
 sc/source/filter/html/htmlexp.cxx |2 
 sc/source/ui/cctrl/tbinsert.cxx   |2 
 sc/source/ui/cctrl/tbzoomsliderctrl.cxx   |2 
 sc/source/ui/drawfunc/drawsh2.cxx |2 
 sc/source/ui/drawfunc/drtxtob.cxx |4 
 sc/source/ui/optdlg/tpview.cxx|2 
 sc/source/ui/pagedlg/tptable.cxx  |6 
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx   |4 
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx|4 
 sc/source/ui/view/formatsh.cxx|2 
 sd/source/core/sdpage.cxx |   10 
 sd/source/filter/html/htmlex.cxx  |   14 -
 sd/source/ui/annotations/annotationmanager.cxx|8 
 sd/source/ui/app/sdmod1.cxx   |   10 
 sd/source/ui/app/tbxww.cxx|2 
 sd/source/ui/app/tmplctrl.cxx |2 
 sd/source/ui/dlg/animobjs.cxx |2 
 sd/source/ui/dlg/diactrl.cxx  |2 
 sd/source/ui/dlg/dlgolbul.cxx |4 
 sd/source/ui/dlg/gluectrl.cxx |2 
 sd/source/ui/dlg/navigatr.cxx |4 
 sd/source/ui/dlg/paragr.cxx   |4 
 sd/source/ui/dlg/tpoption.cxx |6 
 sd/source/ui/func/fubullet.cxx|   16 -
 sd/source/ui/func/fuolbull.cxx|2 
 sd/source/ui/func/futempl.cxx |2 
 sd/source/ui/sidebar/AllMasterPagesSelector.cxx   |2 
 sd/source/ui/slidesorter/controller/SlideSorterController.cxx |   10 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx|   52 ++--
 sd/source/ui/view/drawview.cxx|8 
 sd/source/ui/view/drtxtob1.cxx|4 
 sd/source/ui/view/drviews2.cxx|4 
 sd/source/ui/view/drviews3.cxx|8 
 sd/source/ui/view/drviews6.cxx|   16 -
 sd/source/ui/view/drviews7.cxx|  112 +-
 sd/source/ui/view/drviewsa.cxx|8 
 sd/source/ui/view/drviewsf.cxx|   16 -
 sd/source/ui/view/drviewsj.cxx|   98 
 sd/source/ui/view/outlnvsh.cxx|   34 +--
 sd/source/ui/view/outlview.cxx|2 
 sd/source/ui/view/viewshe3.cxx|   10 
 sd/source/ui/view/viewshel.cxx|2 
 sfx2/source/control/bindings.cxx  |   18 -
 sfx2/source/control/ctrlitem.cxx  |4 
 sfx2/source/control/dispatch.cxx  |4 
 sfx2/source/control/querystatus.cxx   |2 
 sfx2/source/control/request.cxx   |2 
 sfx2/source/control/sfxstatuslistener.cxx |2 
 sfx2/source/control/shell.cxx 

[Libreoffice-commits] core.git: 3 commits - avmedia/source chart2/Library_chartcontroller.mk chart2/source sc/source

2014-07-20 Thread Zolnai Tamás
 avmedia/source/viewer/mediawindow_impl.cxx|4 +
 chart2/Library_chartcontroller.mk |1 
 chart2/source/controller/main/ChartController.cxx |3 +
 chart2/source/controller/main/ChartWindow.cxx |   35 --
 chart2/source/controller/main/ChartWindow.hxx |9 ++-
 chart2/source/model/main/ChartModel.cxx   |1 
 chart2/source/view/charttypes/GL3DBarChart.cxx|   54 +-
 chart2/source/view/inc/AbstractShapeFactory.hxx   |2 
 chart2/source/view/inc/GL3DBarChart.hxx   |6 +-
 chart2/source/view/inc/OpenglShapeFactory.hxx |2 
 chart2/source/view/inc/ShapeFactory.hxx   |2 
 chart2/source/view/main/ChartView.cxx |   16 +-
 chart2/source/view/main/DummyXShape.hxx   |1 
 chart2/source/view/main/OpenglShapeFactory.cxx|6 ++
 sc/source/ui/drawfunc/fuins2.cxx  |   18 ---
 15 files changed, 104 insertions(+), 56 deletions(-)

New commits:
commit cbc50c90ad63f0e59b8cf3bbfb6b5b1f61db09b9
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Sun Jul 20 09:52:04 2014 +0200

Fix OpenGL chart reinitializing

Problem after ChartWindow was disabled and enabled
again, OpenGL content was lost.

Two things:
-After setting a new OpenGLWindow the corresponding
IRenderer must be set (x3DWindowProvider-update)
-InitOpenGL() call should not depend on DummyChart, but on
OpenGLWindow (OpenGLContext).

Change-Id: If74e1945de9973d3921ceea1ca6fef39311add7a

diff --git a/chart2/source/controller/main/ChartWindow.cxx 
b/chart2/source/controller/main/ChartWindow.cxx
index 37335c4..40e6933 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -64,6 +64,7 @@ ChartWindow::ChartWindow( ChartController* pController, 
Window* pParent, WinBits
 uno::Reference chart2::X3DChartWindowProvider  
x3DWindowProvider(pController-getModel(), uno::UNO_QUERY_THROW);
 sal_uInt64 nWindowPtr = reinterpret_castsal_uInt64(m_pOpenGLWindow);
 x3DWindowProvider-setWindow(nWindowPtr);
+x3DWindowProvider-update();
 }
 
 ChartWindow::~ChartWindow()
@@ -72,6 +73,7 @@ ChartWindow::~ChartWindow()
 {
 uno::Reference chart2::X3DChartWindowProvider  
x3DWindowProvider(m_pWindowController-getModel(), uno::UNO_QUERY_THROW);
 x3DWindowProvider-setWindow(0);
+x3DWindowProvider-update();
 }
 delete m_pOpenGLWindow;
 }
diff --git a/chart2/source/view/inc/AbstractShapeFactory.hxx 
b/chart2/source/view/inc/AbstractShapeFactory.hxx
index 9cb3e47..3e55165 100644
--- a/chart2/source/view/inc/AbstractShapeFactory.hxx
+++ b/chart2/source/view/inc/AbstractShapeFactory.hxx
@@ -238,7 +238,7 @@ public:
 /**
  * Only necessary for stateless implementations
  */
-virtual void render(com::sun::star::uno::Reference 
com::sun::star::drawing::XShapes  xRootShape) = 0;
+virtual void render(com::sun::star::uno::Reference 
com::sun::star::drawing::XShapes  xRootShape, bool bInitOpenGL = true) = 0;
 
 virtual bool preRender(OpenGLWindow* pWindow) = 0;
 virtual void postRender(OpenGLWindow* pWindow) = 0;
diff --git a/chart2/source/view/inc/OpenglShapeFactory.hxx 
b/chart2/source/view/inc/OpenglShapeFactory.hxx
index 896249e..7907d0d 100644
--- a/chart2/source/view/inc/OpenglShapeFactory.hxx
+++ b/chart2/source/view/inc/OpenglShapeFactory.hxx
@@ -184,7 +184,7 @@ public:
 
 virtual void setPageSize( com::sun::star::uno::Reference  
com::sun::star::drawing::XShapes  xChartShapes, const 
com::sun::star::awt::Size rSize ) SAL_OVERRIDE;
 
-virtual void render(com::sun::star::uno::Reference 
com::sun::star::drawing::XShapes  xDrawPage) SAL_OVERRIDE;
+virtual void render(com::sun::star::uno::Reference 
com::sun::star::drawing::XShapes  xDrawPage, bool bInitOpenGL = true) 
SAL_OVERRIDE;
 
 virtual bool preRender(OpenGLWindow* pWindow) SAL_OVERRIDE;
 virtual void postRender(OpenGLWindow* pWindow) SAL_OVERRIDE;
diff --git a/chart2/source/view/inc/ShapeFactory.hxx 
b/chart2/source/view/inc/ShapeFactory.hxx
index 171daad..480c1b1 100644
--- a/chart2/source/view/inc/ShapeFactory.hxx
+++ b/chart2/source/view/inc/ShapeFactory.hxx
@@ -197,7 +197,7 @@ public:
 /**
  * not necessary right now
  */
-virtual void render(com::sun::star::uno::Reference 
com::sun::star::drawing::XShapes  ) SAL_OVERRIDE {}
+virtual void render(com::sun::star::uno::Reference 
com::sun::star::drawing::XShapes , bool ) SAL_OVERRIDE {}
 
 virtual bool preRender(OpenGLWindow*) SAL_OVERRIDE { return true; }
 virtual void postRender(OpenGLWindow*) SAL_OVERRIDE {}
diff --git a/chart2/source/view/main/ChartView.cxx 
b/chart2/source/view/main/ChartView.cxx
index 8dc8046..d6f0430 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -166,6 +166,7 @@ public:
 virtual void scroll(long nDelta) SAL_OVERRIDE;

[Libreoffice-commits] core.git: 3 commits - avmedia/source slideshow/source

2014-05-29 Thread Jan Holesovsky
 avmedia/source/opengl/oglplayer.cxx   |7 +--
 avmedia/source/opengl/oglplayer.hxx   |2 +-
 slideshow/source/engine/shapes/viewmediashape.cxx |6 +++---
 3 files changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 3453273086ef4c546c2a7dca41654627fd720cfa
Author: Jan Holesovsky ke...@collabora.com
Date:   Wed May 28 16:43:08 2014 +0200

First stop the timer, then the animation.

Change-Id: Icd5f9f4b8e1c48176fdb73c954e1c4b7d0811516

diff --git a/avmedia/source/opengl/oglplayer.cxx 
b/avmedia/source/opengl/oglplayer.cxx
index fefbb31..88c93a6 100644
--- a/avmedia/source/opengl/oglplayer.cxx
+++ b/avmedia/source/opengl/oglplayer.cxx
@@ -145,8 +145,8 @@ void SAL_CALL OGLPlayer::start() throw ( 
uno::RuntimeException, std::exception )
 void SAL_CALL OGLPlayer::stop() throw ( uno::RuntimeException, std::exception )
 {
 osl::MutexGuard aGuard(m_aMutex);
-gltf_animation_stop(m_pHandle);
 m_aTimer.Stop();
+gltf_animation_stop(m_pHandle);
 }
 
 sal_Bool SAL_CALL OGLPlayer::isPlaying() throw ( uno::RuntimeException, 
std::exception )
commit 8d40fd2e0d7c264ce38c361fe7c9a20de9a81f0a
Author: Jan Holesovsky ke...@collabora.com
Date:   Wed May 28 16:40:12 2014 +0200

slideshow: Don't assume anything about the duration.

Let the player decide what to do when the duration is zero, and 
start()/stop() was called.

Change-Id: I17027349e8d61f7b114e193a769402c04a64f3f3

diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx 
b/slideshow/source/engine/shapes/viewmediashape.cxx
index d598237..ce50717 100644
--- a/slideshow/source/engine/shapes/viewmediashape.cxx
+++ b/slideshow/source/engine/shapes/viewmediashape.cxx
@@ -128,7 +128,7 @@ namespace slideshow
 if( !mxPlayer.is() )
 implInitialize( maBounds );
 
-if( mxPlayer.is()  ( mxPlayer-getDuration()  0.0 ) )
+if (mxPlayer.is())
 mxPlayer-start();
 
 return true;
@@ -170,7 +170,7 @@ namespace slideshow
 
 void ViewMediaShape::pauseMedia()
 {
-if( mxPlayer.is()  ( mxPlayer-getDuration()  0.0 ) )
+if (mxPlayer.is())
 mxPlayer-stop();
 }
 
@@ -178,7 +178,7 @@ namespace slideshow
 
 void ViewMediaShape::setMediaTime(double fTime)
 {
-if( mxPlayer.is()  ( mxPlayer-getDuration()  0.0 ) )
+if (mxPlayer.is())
 mxPlayer-setMediaTime(fTime);
 }
 
commit 91fb0866cad2518e5f2cbc48af0e952282fee19d
Author: Jan Holesovsky ke...@collabora.com
Date:   Wed May 28 15:38:22 2014 +0200

Use AutoTimer instead of Timer, and add some more locking.

Change-Id: I83a99e333a6c62bf7779e3fbbcc3e5af38bb2ca5

diff --git a/avmedia/source/opengl/oglplayer.cxx 
b/avmedia/source/opengl/oglplayer.cxx
index 22ff457..fefbb31 100644
--- a/avmedia/source/opengl/oglplayer.cxx
+++ b/avmedia/source/opengl/oglplayer.cxx
@@ -31,6 +31,7 @@ OGLPlayer::OGLPlayer()
 
 OGLPlayer::~OGLPlayer()
 {
+osl::MutexGuard aGuard(m_aMutex);
 if( m_pHandle )
 {
 for (size_t i = 0; i  m_pHandle-size; ++i)
@@ -63,6 +64,8 @@ static bool lcl_LoadFile( glTFFile* io_pFile, const OUString 
rURL)
 
 bool OGLPlayer::create( const OUString rURL )
 {
+osl::MutexGuard aGuard(m_aMutex);
+
 m_sURL = rURL;
 
 // Load *.json file and init renderer
@@ -297,8 +300,8 @@ IMPL_LINK(OGLPlayer,TimerHandler,Timer*,pTimer)
 {
 if (pTimer == m_aTimer)
 {
+osl::MutexGuard aGuard(m_aMutex);
 m_pOGLWindow-update();
-m_aTimer.Start();
 }
 
 return 0;
diff --git a/avmedia/source/opengl/oglplayer.hxx 
b/avmedia/source/opengl/oglplayer.hxx
index b41df21..42476fc 100644
--- a/avmedia/source/opengl/oglplayer.hxx
+++ b/avmedia/source/opengl/oglplayer.hxx
@@ -62,7 +62,7 @@ private:
 OUString m_sURL;
 glTFHandle* m_pHandle;
 OpenGLContext m_aContext;
-Timer m_aTimer;
+AutoTimer m_aTimer;
 OGLWindow* m_pOGLWindow;
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - avmedia/source external/collada2gltf

2014-05-16 Thread Zolnai Tamás
 avmedia/source/opengl/oglplayer.cxx |   24 +---
 avmedia/source/opengl/oglplayer.hxx |7 +
 external/collada2gltf/StaticLibrary_collada2gltf.mk |6 +
 3 files changed, 34 insertions(+), 3 deletions(-)

New commits:
commit 73212108571d2ef4a7073193ea37b2f6cba4537b
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Fri May 16 22:08:23 2014 +0200

OGLPlayer: fix playing of animation in edit mode

gltf_animation_set_time doesn't work but stops the animation.

Change-Id: Ia17724c36e2007451e24f97e04a09240359ad969

diff --git a/avmedia/source/opengl/oglplayer.cxx 
b/avmedia/source/opengl/oglplayer.cxx
index 5c3ede6..ff056e3 100644
--- a/avmedia/source/opengl/oglplayer.cxx
+++ b/avmedia/source/opengl/oglplayer.cxx
@@ -138,8 +138,9 @@ double SAL_CALL OGLPlayer::getDuration() throw ( 
uno::RuntimeException, std::exc
 
 void SAL_CALL OGLPlayer::setMediaTime( double fTime ) throw ( 
uno::RuntimeException, std::exception )
 {
+// TODO: doesn't work, but cause problem in playing
 osl::MutexGuard aGuard(m_aMutex);
-gltf_animation_set_time(m_pHandle, fTime);
+//gltf_animation_set_time(m_pHandle, fTime);
 }
 
 double SAL_CALL OGLPlayer::getMediaTime() throw ( 
::com::sun::star::uno::RuntimeException, std::exception )
commit 4c19fd176d964c4ff0b3998b52e268e899350254
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Fri May 16 21:45:39 2014 +0200

Collada2gltf: add -lrt to fix compilation problems

Change-Id: I1c0c9459cb716512dc726ee96fb811d03084aa62

diff --git a/external/collada2gltf/StaticLibrary_collada2gltf.mk 
b/external/collada2gltf/StaticLibrary_collada2gltf.mk
index 0097f3f..dac8caf 100644
--- a/external/collada2gltf/StaticLibrary_collada2gltf.mk
+++ b/external/collada2gltf/StaticLibrary_collada2gltf.mk
@@ -30,6 +30,12 @@ $(eval $(call gb_StaticLibrary_add_defs,collada2gltf,\
 
 endif
 
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Library_add_libs,collada2gltf,\
+   -lrt \
+))
+endif
+
 $(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,collada2gltf,cpp))
 
 $(eval $(call gb_StaticLibrary_set_include,collada2gltf,\
commit ba9357b82ec5551d562f572074b064ccd6c808f0
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Fri May 16 22:07:16 2014 +0200

OGLPlayer: set a timer which call redrawing to show animation

Change-Id: I7c98ba61be0510e9f86cb80fda73d18f7f7957cf

diff --git a/avmedia/source/opengl/oglplayer.cxx 
b/avmedia/source/opengl/oglplayer.cxx
index 217fd88..5c3ede6 100644
--- a/avmedia/source/opengl/oglplayer.cxx
+++ b/avmedia/source/opengl/oglplayer.cxx
@@ -103,6 +103,10 @@ bool OGLPlayer::create( const OUString rURL )
 }
 }
 }
+
+// Set timer
+m_aTimer.SetTimeout(10);
+m_aTimer.SetTimeoutHdl(LINK(this,OGLPlayer,TimerHandler));
 return true;
 }
 
@@ -110,12 +114,14 @@ void SAL_CALL OGLPlayer::start() throw ( 
uno::RuntimeException, std::exception )
 {
 osl::MutexGuard aGuard(m_aMutex);
 gltf_animation_start(m_pHandle);
+m_aTimer.Start();
 }
 
 void SAL_CALL OGLPlayer::stop() throw ( uno::RuntimeException, std::exception )
 {
 osl::MutexGuard aGuard(m_aMutex);
 gltf_animation_stop(m_pHandle);
+m_aTimer.Stop();
 }
 
 sal_Bool SAL_CALL OGLPlayer::isPlaying() throw ( uno::RuntimeException, 
std::exception )
@@ -212,8 +218,8 @@ uno::Reference media::XPlayerWindow  SAL_CALL 
OGLPlayer::createPlayerWindow( c
 m_pHandle-viewport.width = aSize.Width();
 m_pHandle-viewport.height = aSize.Height();
 gltf_renderer_set_content(m_pHandle);
-OGLWindow* pWindow = new OGLWindow(m_pHandle, m_aContext, pChildWindow);
-return uno::Reference media::XPlayerWindow ( pWindow );
+m_pOGLWindow = new OGLWindow(m_pHandle, m_aContext, pChildWindow);
+return uno::Reference media::XPlayerWindow ( m_pOGLWindow );
 }
 
 uno::Reference media::XFrameGrabber  SAL_CALL OGLPlayer::createFrameGrabber()
@@ -256,6 +262,17 @@ uno::Sequence OUString  SAL_CALL 
OGLPlayer::getSupportedServiceNames()
 return aRet;
 }
 
+IMPL_LINK(OGLPlayer,TimerHandler,Timer*,pTimer)
+{
+if (pTimer == m_aTimer)
+{
+m_pOGLWindow-update();
+m_aTimer.Start();
+}
+
+return 0;
+}
+
 } // namespace ogl
 } // namespace avmedia
 
diff --git a/avmedia/source/opengl/oglplayer.hxx 
b/avmedia/source/opengl/oglplayer.hxx
index 86e8a6e..69f010b 100644
--- a/avmedia/source/opengl/oglplayer.hxx
+++ b/avmedia/source/opengl/oglplayer.hxx
@@ -16,9 +16,12 @@
 #include com/sun/star/media/XPlayer.hpp
 #include libgltf.h
 #include vcl/opengl/OpenGLContext.hxx
+#include vcl/timer.hxx
 
 namespace avmedia { namespace ogl {
 
+class OGLWindow;
+
 typedef ::cppu::WeakComponentImplHelper2 com::sun::star::media::XPlayer,
   com::sun::star::lang::XServiceInfo  
Player_BASE;
 
@@ -55,9 +58,13 @@ public:
 virtual com::sun::star::uno::Sequence OUString  SAL_CALL 
getSupportedServiceNames() throw 

[Libreoffice-commits] core.git: 3 commits - avmedia/source sal/osl vcl/source

2014-05-05 Thread Jan Holesovsky
 avmedia/source/viewer/mediawindow_impl.cxx |2 +-
 sal/osl/all/log.cxx|1 +
 vcl/source/opengl/OpenGLContext.cxx|4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 18d4f6c9ee24dc080bc3b6fed7403f5d0c18f965
Author: Jan Holesovsky ke...@collabora.com
Date:   Tue May 6 02:31:42 2014 +0200

Use WB_CLIPCHILDREN consistently.

Change-Id: Ifd53e37d23c29efb2f084a39b48c88ea4bc0d70a

diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index e52e524..58c2d49 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -84,7 +84,7 @@ MediaChildWindow::MediaChildWindow( Window* pParent ) :
 }
 
 MediaChildWindow::MediaChildWindow( Window* pParent, SystemWindowData* pData ) 
:
-SystemChildWindow( pParent, 0, pData )
+SystemChildWindow( pParent, WB_CLIPCHILDREN, pData )
 {
 }
 
commit d9fb35083dd34a4a3b486e4b1c8969448c522103
Author: Jan Holesovsky ke...@collabora.com
Date:   Tue May 6 02:22:57 2014 +0200

OpenGLContext: Use the right window handle on Windows.

Change-Id: I77eaf1dad9ce4c855b5f88bd8568944fd4128227

diff --git a/vcl/source/opengl/OpenGLContext.cxx 
b/vcl/source/opengl/OpenGLContext.cxx
index 5271214..3e838ea 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -566,8 +566,6 @@ void OpenGLContext::renderToFile()
 
 bool OpenGLContext::initWindow()
 {
-const SystemEnvData* sysData(mpWindow-GetSystemData());
-m_aGLWin.hWnd = sysData-hWnd;
 if( !m_pChildWindow )
 {
 SystemWindowData winData = generateWinData(mpWindow);
@@ -583,6 +581,8 @@ bool OpenGLContext::initWindow()
 m_pChildWindow-SetControlForeground();
 m_pChildWindow-SetControlBackground();
 m_pChildWindow-EnablePaint(sal_False);
+
+const SystemEnvData* sysData(m_pChildWindow-GetSystemData());
 m_aGLWin.hWnd = sysData-hWnd;
 }
 
commit 68e5207306dad9ce4cdf95283f4b2c5e32f131e2
Author: Jan Holesovsky ke...@collabora.com
Date:   Mon May 5 18:32:49 2014 +0200

sal logging: Flush after having written the output.

Makes it possible to see the messages immediately on Windows; otherwise the
SAL_DEBUG() etc. is useless as it shows on screen too late.

Change-Id: I701922aa4fcacf66d6b044e0badca7ef1f9cac94

diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 056d2a4..aa3105d 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -240,6 +240,7 @@ void log(
 #endif
 } else {
 std::fputs(s.str().c_str(), stderr);
+std::fflush(stderr);
 }
 #endif
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - avmedia/source configure.ac external/freetype RepositoryExternal.mk

2014-04-21 Thread Jan Holesovsky
 RepositoryExternal.mk |1 +
 avmedia/source/framework/modeltools.cxx   |2 +-
 configure.ac  |5 -
 external/freetype/ExternalPackage_freetype.mk |   20 
 external/freetype/Module_freetype.mk  |1 -
 5 files changed, 6 insertions(+), 23 deletions(-)

New commits:
commit 870ce1188ef7bfb6e57eed2894a20b2ea30b2225
Author: Jan Holesovsky ke...@suse.cz
Date:   Tue Apr 22 00:58:10 2014 +0200

gltf: Trying to re-create the temp path fails on Windows.

Change-Id: I30a5e1f5d09458beeb06479337b83f8479d861b5

diff --git a/avmedia/source/framework/modeltools.cxx 
b/avmedia/source/framework/modeltools.cxx
index 10da986..506a36c 100644
--- a/avmedia/source/framework/modeltools.cxx
+++ b/avmedia/source/framework/modeltools.cxx
@@ -100,7 +100,7 @@ static void lcl_EmbedExternals(const OUString rSourceURL, 
uno::Referenceembed:
 }
 
 // Reload json with modified path to external resources
-rContent = ::ucbhelper::Content(file:// + 
OUString::createFromAscii(sUrl.c_str()),
+rContent = ::ucbhelper::Content(sTempFileURL,
 uno::Referenceucb::XCommandEnvironment(),
 comphelper::getProcessComponentContext());
 
commit fe5dbe3847838aae3dff246451969eba4c3decda
Author: Jan Holesovsky ke...@suse.cz
Date:   Tue Apr 22 00:41:57 2014 +0200

libgltf: Make it link with freetype on Windows.

Change-Id: I57dcde58bb017ab087908154bc4a1af6d5d152b9

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index e0a7fef..a8b9516 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1267,6 +1267,7 @@ endef
 
 define gb_LinkTarget__use_freetype
 $(call gb_LinkTarget_use_external,$(1),freetype_headers)
+$(call gb_LinkTarget_add_libs,$(1),$(FREETYPE_LIBS))
 
 endef
 
diff --git a/configure.ac b/configure.ac
index bc5cfd7..bfc00bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10378,6 +10378,9 @@ if test $_os != iOS -a $_os != Android -a $_os != 
Darwin -a x$enable_gltf != 
 BUILD_TYPE=$BUILD_TYPE LIBGLTF
 if test $test_freetype = no; then
 BUILD_TYPE=$BUILD_TYPE FREETYPE
+if test $COM = MSC; then
+
FREETYPE_LIBS=${WORKDIR}/UnpackedTarball/freetype/objs/win32/vc2010/freetype248.lib
+fi
 fi
 else
 AC_MSG_RESULT([no])
diff --git a/external/freetype/ExternalPackage_freetype.mk 
b/external/freetype/ExternalPackage_freetype.mk
deleted file mode 100644
index 5e2f381..000
--- a/external/freetype/ExternalPackage_freetype.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_ExternalPackage_ExternalPackage,freetype,freetype))
-
-$(eval $(call gb_ExternalPackage_use_external_project,freetype,freetype))
-
-ifeq ($(COM),MSC)
-$(eval $(call gb_ExternalPackage_add_files,freetype,$(call 
gb_UnpackedTarball_get_dir,freetype/instdir), \
-   objs/win32/vc2010/freetype248.lib \
-))
-endif
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/freetype/Module_freetype.mk 
b/external/freetype/Module_freetype.mk
index cb9bbc9..f6e316d 100644
--- a/external/freetype/Module_freetype.mk
+++ b/external/freetype/Module_freetype.mk
@@ -14,7 +14,6 @@ ifneq (,$(or $(findstring ANDROID,$(OS)),$(ENABLE_GLTF)))
 $(eval $(call gb_Module_add_targets,freetype,\
ExternalProject_freetype \
UnpackedTarball_freetype \
-   ExternalPackage_freetype \
 ))
 
 endif
commit 0f72d53c05b823b8baaa29c452d09243e52afb5a
Author: Markus Mohrhard markus.mohrh...@googlemail.com
Date:   Mon Apr 21 19:00:59 2014 +0200

Enable libgltf on windows as well

Change-Id: Id878bacc86facba34f77bde2fbbfd78b0a426c39

diff --git a/configure.ac b/configure.ac
index 209975c..bc5cfd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10372,7 +10372,7 @@ dnl 
===
 
 ENABLE_GLTF=
 AC_MSG_CHECKING([whether to enable glTF support])
-if test $_os != iOS -a $_os != Android -a $_os != WINNT -a $_os != Darwin -a 
x$enable_gltf != xno; then
+if test $_os != iOS -a $_os != Android -a $_os != Darwin -a x$enable_gltf != 
xno; then
 ENABLE_GLTF=TRUE
 AC_MSG_RESULT([yes])
 BUILD_TYPE=$BUILD_TYPE LIBGLTF
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - avmedia/source chart2/source external/libgltf include/vcl vcl/source

2014-04-18 Thread Zolnai Tamás
 avmedia/source/opengl/oglmanager.cxx  |9 ++--
 avmedia/source/opengl/oglplayer.cxx   |   11 -
 avmedia/source/opengl/oglplayer.hxx   |6 ++-
 chart2/source/view/main/OpenGLRender.cxx  |   21 --
 external/libgltf/UnpackedTarball_libgltf.mk   |1 
 external/libgltf/patches/charbuffer_used_as_cstring.patch |   12 ++
 include/vcl/opengl/OpenGLHelper.hxx   |2 +
 vcl/source/opengl/OpenGLHelper.cxx|   28 ++
 8 files changed, 61 insertions(+), 29 deletions(-)

New commits:
commit 8afabd394214bb7c772c88b08ec3cadb56771cce
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Fri Apr 18 15:24:25 2014 +0200

Extract code of BitmapEx - RGBA buffer conversion to OpenGLHelper

Needed by gltf rendering.

Change-Id: I1aa974f3c515c5fb19a07b54ff655331138553cb

diff --git a/chart2/source/view/main/OpenGLRender.cxx 
b/chart2/source/view/main/OpenGLRender.cxx
index 8ab05b7..79e408c 100644
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -900,26 +900,7 @@ int OpenGLRender::CreateTextTexture(const BitmapEx 
rBitmapEx, const awt::Point
 
 long bmpWidth = rBitmapEx.GetSizePixel().Width();
 long bmpHeight = rBitmapEx.GetSizePixel().Height();
-
-Bitmap aBitmap (rBitmapEx.GetBitmap());
-AlphaMask aAlpha (rBitmapEx.GetAlpha());
-boost::scoped_arraysal_uInt8 bitmapBuf(new sal_uInt8[4* bmpWidth * 
bmpHeight ]);
-Bitmap::ScopedReadAccess pReadAccces( aBitmap );
-AlphaMask::ScopedReadAccess pAlphaReadAccess( aAlpha );
-
-size_t i = 0;
-for (long ny = 0; ny  bmpHeight; ny++)
-{
-Scanline pAScan = pAlphaReadAccess-GetScanline(ny);
-for(long nx = 0; nx  bmpWidth; nx++)
-{
-BitmapColor aCol = pReadAccces-GetColor( ny, nx );
-bitmapBuf[i++] = aCol.GetRed();
-bitmapBuf[i++] = aCol.GetGreen();
-bitmapBuf[i++] = aCol.GetBlue();
-bitmapBuf[i++] = 255 - *pAScan++;
-}
-}
+boost::scoped_arraysal_uInt8 
bitmapBuf(OpenGLHelper::ConvertBitmapExToRGBABuffer(rBitmapEx));
 
 TextInfo aTextInfo;
 aTextInfo.rotation = -(double)rotation / 360.0 * 2* GL_PI;
diff --git a/include/vcl/opengl/OpenGLHelper.hxx 
b/include/vcl/opengl/OpenGLHelper.hxx
index 77d1b28..5cb1078 100644
--- a/include/vcl/opengl/OpenGLHelper.hxx
+++ b/include/vcl/opengl/OpenGLHelper.hxx
@@ -12,6 +12,7 @@
 
 #include GL/glew.h
 #include vcl/vclopengl_dllapi.hxx
+#include vcl/bitmapex.hxx
 
 #include rtl/ustring.hxx
 
@@ -20,6 +21,7 @@ class VCLOPENGL_DLLPUBLIC OpenGLHelper
 public:
 static GLint LoadShaders(const OUString rVertexShaderName, const 
OUString rFragmentShaderName);
 
+static sal_uInt8* ConvertBitmapExToRGBABuffer(const BitmapEx rBitmapEx);
 };
 
 #endif
diff --git a/vcl/source/opengl/OpenGLHelper.cxx 
b/vcl/source/opengl/OpenGLHelper.cxx
index 0042231..35760f2 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -12,6 +12,8 @@
 #include osl/file.hxx
 #include rtl/bootstrap.hxx
 #include config_folders.h
+#include vcl/salbtype.hxx
+#include vcl/bmpacc.hxx
 
 #include vector
 
@@ -140,4 +142,30 @@ GLint OpenGLHelper::LoadShaders(const OUString 
rVertexShaderName,const OUString
 return ProgramID;
 }
 
+sal_uInt8* OpenGLHelper::ConvertBitmapExToRGBABuffer(const BitmapEx rBitmapEx)
+{
+long nBmpWidth = rBitmapEx.GetSizePixel().Width();
+long nBmpHeight = rBitmapEx.GetSizePixel().Height();
+
+Bitmap aBitmap (rBitmapEx.GetBitmap());
+AlphaMask aAlpha (rBitmapEx.GetAlpha());
+sal_uInt8* pBitmapBuf(new sal_uInt8[4* nBmpWidth * nBmpHeight ]);
+Bitmap::ScopedReadAccess pReadAccces( aBitmap );
+AlphaMask::ScopedReadAccess pAlphaReadAccess( aAlpha );
+size_t i = 0;
+for (long ny = 0; ny  nBmpHeight; ny++)
+{
+Scanline pAScan = pAlphaReadAccess ? pAlphaReadAccess-GetScanline(ny) 
: 0;
+for(long nx = 0; nx  nBmpWidth; nx++)
+{
+BitmapColor aCol = pReadAccces-GetColor( ny, nx );
+pBitmapBuf[i++] = aCol.GetRed();
+pBitmapBuf[i++] = aCol.GetGreen();
+pBitmapBuf[i++] = aCol.GetBlue();
+pBitmapBuf[i++] = pAScan ? 255 - *pAScan++ : 255;
+}
+}
+return pBitmapBuf;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 9cf12d7544d501e6794cfbb6eabf508603d59966
Author: Zolnai Tamás tamas.zol...@collabora.com
Date:   Fri Apr 18 15:12:09 2014 +0200

Patching libgltf: character buffer is used as cstring

Change-Id: If0213fc5406ec9cbdc72be36ffc693fcbbf8ffcc

diff --git a/external/libgltf/UnpackedTarball_libgltf.mk 
b/external/libgltf/UnpackedTarball_libgltf.mk
index 1fbe09d..e83486d 100644
--- a/external/libgltf/UnpackedTarball_libgltf.mk
+++ b/external/libgltf/UnpackedTarball_libgltf.mk
@@ -24,6 +24,7 @@ $(eval 

[Libreoffice-commits] core.git: 3 commits - avmedia/source connectivity/source embeddedobj/source embedserv/source extensions/source framework/inc framework/source include/cppuhelper include/toolkit i

2014-01-29 Thread Stephan Bergmann
 UnoControls/source/base/basecontrol.cxx|2 -
 avmedia/source/framework/soundhandler.cxx  |2 -
 connectivity/source/drivers/odbc/OTools.cxx|2 -
 connectivity/source/drivers/postgresql/pq_baseresultset.cxx|2 -
 connectivity/source/drivers/postgresql/pq_fakedupdateableresultset.cxx |2 -
 connectivity/source/drivers/postgresql/pq_preparedstatement.cxx|2 -
 connectivity/source/drivers/postgresql/pq_statement.cxx|2 -
 connectivity/source/drivers/postgresql/pq_updateableresultset.cxx  |2 -
 connectivity/source/drivers/postgresql/pq_xbase.cxx|2 -
 connectivity/source/inc/odbc/OResultSet.hxx|8 
++---
 embeddedobj/source/commonembedding/miscobj.cxx |2 -
 embedserv/source/embed/servprov.cxx|2 -
 extensions/source/ole/servprov.cxx |2 -
 framework/inc/macros/xtypeprovider.hxx |2 -
 framework/source/fwe/classes/actiontriggercontainer.cxx|2 -
 framework/source/fwe/classes/actiontriggerpropertyset.cxx  |2 -
 framework/source/fwe/classes/actiontriggerseparatorpropertyset.cxx |2 -
 framework/source/fwe/classes/rootactiontriggercontainer.cxx|2 -
 framework/source/services/frame.cxx|2 -
 include/cppuhelper/interfacecontainer.h|6 
+--
 include/cppuhelper/typeprovider.hxx|2 -
 include/cppuhelper/weakref.hxx |2 -
 include/toolkit/helper/macros.hxx  |2 -
 include/ucbhelper/macros.hxx   |2 -
 pyuno/source/module/pyuno_adapter.cxx  |2 -
 sfx2/source/dialog/backingcomp.cxx |2 -
 sfx2/source/doc/sfxbasemodel.cxx   |2 -
 stoc/source/invocation/invocation.cxx  |2 -
 svl/source/fsstor/fsstorage.cxx|2 -
 svl/source/fsstor/ostreamcontainer.cxx |2 -
 svtools/source/hatchwindow/hatchwindow.cxx |2 -
 svx/source/unodraw/unoshape.cxx|4 
+-
 toolkit/source/awt/vclxmenu.cxx|4 
+-
 toolkit/source/awt/vclxtopwindow.cxx   |4 
+-
 ucb/source/ucp/file/filid.cxx  |2 -
 ucb/source/ucp/ftp/ftpcontentidentifier.cxx|2 -
 ucb/source/ucp/tdoc/tdoc_passwordrequest.cxx   |2 -
 ucbhelper/source/provider/contentidentifier.cxx|2 -
 ucbhelper/source/provider/interactionrequest.cxx   |   16 
+-
 39 files changed, 54 insertions(+), 54 deletions(-)

New commits:
commit 9038a3ef7c10aff868636715924cb9f97d648d80
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Jan 29 11:05:15 2014 +0100

cppuhelper: Let C++ inline functions return bool instead of sal_Bool

...to improve diagnosing misuses of boolean expressions in client code (cf.
compilerplugins/clang/implicitboolconversion.cxx).  This change should be
transparent to client code.

Change-Id: Ibed63566266328f84432ad2019e58265d9d30fc3

diff --git a/include/cppuhelper/interfacecontainer.h 
b/include/cppuhelper/interfacecontainer.h
index 860529d..dd3f6a9 100644
--- a/include/cppuhelper/interfacecontainer.h
+++ b/include/cppuhelper/interfacecontainer.h
@@ -79,11 +79,11 @@ public:
  */
 ~OInterfaceIteratorHelper() SAL_THROW(());
 
-/** Return sal_True, if there are more elements in the iterator. */
-sal_Bool SAL_CALL hasMoreElements() const SAL_THROW(())
+/** Return true, if there are more elements in the iterator. */
+bool SAL_CALL hasMoreElements() const SAL_THROW(())
 { return nRemain != 0; }
 /** Return the next element of the iterator. Calling this method if
-hasMoreElements() has returned sal_False, is an error. Cast the
+hasMoreElements() has returned false, is an error. Cast the
 returned pointer to the
  */
 ::com::sun::star::uno::XInterface * SAL_CALL next() SAL_THROW(());
diff --git a/include/cppuhelper/typeprovider.hxx 
b/include/cppuhelper/typeprovider.hxx
index c9f864d..b617483 100644
--- a/include/cppuhelper/typeprovider.hxx
+++ b/include/cppuhelper/typeprovider.hxx
@@ -204,7 +204,7 @@ public:
 
 @param bUseEthernetAddress whether an ethernet mac address should be 
taken into account
 */
-inline 

[Libreoffice-commits] core.git: 3 commits - avmedia/source basctl/source

2013-10-12 Thread Tor Lillqvist
 avmedia/source/vlc/wrapper/SymbolLoader.hxx |4 ++--
 basctl/source/basicide/baside2.cxx  |5 +
 basctl/source/basicide/baside3.cxx  |6 +++---
 3 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 81f94edc6341b4c898d8109ed50260de9ed06504
Author: Tor Lillqvist t...@collabora.com
Date:   Sat Oct 12 09:34:51 2013 +0300

What (who?) are OW and MTF?

Change-Id: I47b9b91d72e423c0ef37eaa9f081e755adfc36d6

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 667bae5..7080371 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -72,6 +72,11 @@ namespace Print
 
 short const ValidWindow = 0x1234;
 
+// What (who) are OW and MTF? Compare to baside3.cxx where an
+// identically named variable, used in the same way, has the value
+// *.* on Windows, * otherwise. Is that what should be done here,
+// too?
+
 #if defined(OW) || defined(MTF)
 char const FilterMask_All[] = *;
 #else
commit 5705102c02fefa715426424f0536d675c3faee68
Author: Tor Lillqvist t...@collabora.com
Date:   Sat Oct 12 09:30:34 2013 +0300

Test WNT instead of the vague UNX

Change-Id: I99aa82d29d056afde92d258fd5cdf13359f9b74c

diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index a6c73d1..b22db95 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -64,10 +64,10 @@ using namespace ::com::sun::star::io;
 using namespace ::com::sun::star::resource;
 using namespace ::com::sun::star::ui::dialogs;
 
-#if defined(UNX)
-char const FilterMask_All[] = *;
-#else
+#ifdef WNT
 char const FilterMask_All[] = *.*;
+#else
+char const FilterMask_All[] = *;
 #endif
 
 DBG_NAME( DialogWindow )
commit f1b956f5aaa83b53b1217d85be24d71d6379e97e
Author: Tor Lillqvist t...@collabora.com
Date:   Sat Oct 12 09:26:17 2013 +0300

s/UNX/LINUX/, as that is what is meant here

Change-Id: I6b58f6f62bc304b29c336fc46f87bce8d2ce22fe

diff --git a/avmedia/source/vlc/wrapper/SymbolLoader.hxx 
b/avmedia/source/vlc/wrapper/SymbolLoader.hxx
index 7061faf..e7db7a7 100644
--- a/avmedia/source/vlc/wrapper/SymbolLoader.hxx
+++ b/avmedia/source/vlc/wrapper/SymbolLoader.hxx
@@ -34,7 +34,7 @@ struct ApiMap
 
 namespace
 {
-#if defined( UNX )
+#if defined( LINUX )
 const char LibName[] = libvlc.so.5;
 #elif defined( MACOSX )
 const char LibName[] = 
/Applications/VLC.app/Contents/MacOS/lib/libvlc.dylib;
@@ -92,7 +92,7 @@ namespace
 templatesize_t N
 bool InitApiMap( const ApiMap ( pMap )[N]  )
 {
-#if defined( UNX ) || defined( MACOSX )
+#if defined( LINUX ) || defined( MACOSX )
 const OUString fullPath = OUString::createFromAscii(LibName);
 #elif defined( WNT )
 const OUString fullPath = GetVLCPath() + 
OUString::createFromAscii(LibName);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - avmedia/source

2013-09-19 Thread Minh Ngo
 avmedia/source/vlc/vlcplayer.cxx  |6 ++
 avmedia/source/vlc/vlcplayer.hxx  |1 +
 avmedia/source/vlc/vlcwindow.cxx  |   23 ++-
 avmedia/source/vlc/vlcwindow.hxx  |1 +
 avmedia/source/vlc/wrapper/Player.cxx |   11 +--
 avmedia/source/vlc/wrapper/Player.hxx |1 +
 6 files changed, 28 insertions(+), 15 deletions(-)

New commits:
commit f22464dfb133936668173befb157394eaff2d142
Author: Minh Ngo nlmin...@gmail.com
Date:   Fri Sep 20 00:54:21 2013 +0300

Avmedia/VLC: Fixing zooming.

Will resize depended on the frame size now.

Change-Id: I3dbd0982f4442e9c643121af3cdfc2b0cdfe33a2

diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index 4a454d8..be86333 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -194,6 +194,12 @@ void SAL_CALL VLCPlayer::setWindowID( const intptr_t 
windowID )
 mPlayer.setWindow( windowID );
 }
 
+void VLCPlayer::setVideoSize( unsigned width, unsigned height )
+{
+::osl::MutexGuard aGuard( m_aMutex );
+mPlayer.setVideoSize( width, height );
+}
+
 uno::Reference css::media::XPlayerWindow  SAL_CALL 
VLCPlayer::createPlayerWindow( const uno::Sequence uno::Any  aArguments )
  throw ( ::com::sun::star::uno::RuntimeException )
 {
diff --git a/avmedia/source/vlc/vlcplayer.hxx b/avmedia/source/vlc/vlcplayer.hxx
index cbc009c..94c9751 100644
--- a/avmedia/source/vlc/vlcplayer.hxx
+++ b/avmedia/source/vlc/vlcplayer.hxx
@@ -57,6 +57,7 @@ public:
wrapper::Instance instance,
wrapper::EventHandler eh );
 
+void setVideoSize( unsigned width, unsigned height );
 unsigned getWidth() const;
 unsigned getHeight() const;
 
diff --git a/avmedia/source/vlc/vlcwindow.cxx b/avmedia/source/vlc/vlcwindow.cxx
index d00db28..cded4db 100644
--- a/avmedia/source/vlc/vlcwindow.cxx
+++ b/avmedia/source/vlc/vlcwindow.cxx
@@ -44,15 +44,14 @@ void SAL_CALL VLCWindow::update() throw 
(css::uno::RuntimeException)
 switch ( static_castint( eZoomLevel ) )
 {
 case media::ZoomLevel_ORIGINAL:
-mPlayer.setScale( 1.0 );
-break;
-case media::ZoomLevel_FIT_TO_WINDOW:
+case media::ZoomLevel_FIT_TO_WINDOW_FIXED_ASPECT:
+mPlayer.setVideoSize( mSize.Width, mSize.Height );
 break;
 case media::ZoomLevel_ZOOM_1_TO_2:
-mPlayer.setScale( 0.5 );
+mPlayer.setVideoSize( mSize.Width / 2, mSize.Height / 2 );
 break;
 case media::ZoomLevel_ZOOM_2_TO_1:
-mPlayer.setScale( 2.0 );
+mPlayer.setVideoSize( mSize.Width * 2, mSize.Height * 2 );
 break;
 }
 
diff --git a/avmedia/source/vlc/wrapper/Player.cxx 
b/avmedia/source/vlc/wrapper/Player.cxx
index 08e37d5..92348e2 100644
--- a/avmedia/source/vlc/wrapper/Player.cxx
+++ b/avmedia/source/vlc/wrapper/Player.cxx
@@ -197,6 +197,13 @@ namespace wrapper
 return libvlc_audio_get_mute( mPlayer );
 }
 
+void Player::setVideoSize( unsigned width, unsigned )
+{
+unsigned currentWidth, currentHeight;
+libvlc_video_get_size( mPlayer, 0, currentWidth, currentHeight );
+if ( currentWidth != 0 )
+setScale( static_castfloat( width ) / currentWidth );
+}
 
 void Player::setWindow( intptr_t id )
 {
diff --git a/avmedia/source/vlc/wrapper/Player.hxx 
b/avmedia/source/vlc/wrapper/Player.hxx
index 7aa8147..0510197 100644
--- a/avmedia/source/vlc/wrapper/Player.hxx
+++ b/avmedia/source/vlc/wrapper/Player.hxx
@@ -58,6 +58,7 @@ namespace wrapper
 bool hasVout() const;
 
 void setScale( float factor );
+void setVideoSize( unsigned width, unsigned height );
 
 unsigned getWidth() const;
 unsigned getHeight() const;
commit 15924193558ae7f0e04d5bb1ea8ab94517c5a9ce
Author: Minh Ngo nlmin...@gmail.com
Date:   Fri Sep 20 00:03:36 2013 +0300

Avmedia/VLC: Storing a frame size in the window class

Change-Id: I28f5c74313fcd6dae368c5fa9e7d299ad0ad1d0b

diff --git a/avmedia/source/vlc/vlcwindow.cxx b/avmedia/source/vlc/vlcwindow.cxx
index 8ef99b3..d00db28 100644
--- a/avmedia/source/vlc/vlcwindow.cxx
+++ b/avmedia/source/vlc/vlcwindow.cxx
@@ -102,21 +102,19 @@ void SAL_CALL VLCWindow::removeEventListener( const 
uno::Reference lang::XEvent
 {
 }
 
-void SAL_CALL VLCWindow::setPosSize( sal_Int32 /* X */, sal_Int32 /* Y */, 
sal_Int32 /* Width */, sal_Int32 /* Height */, sal_Int16 /* Flags */ )
+void SAL_CALL VLCWindow::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 
Width, sal_Int32 Height, sal_Int16 /* Flags */ )
 throw (uno::RuntimeException)
 {
+mSize.X = X;
+mSize.Y = Y;
+mSize.Width = Width;
+mSize.Height = Height;
 }
 
 awt::Rectangle SAL_CALL VLCWindow::getPosSize()
 throw (uno::RuntimeException)
 {
-awt::Rectangle aRet;
-
-aRet.X = aRet.Y = 0;
-aRet.Width = mPlayer.getWidth();
-

[Libreoffice-commits] core.git: 3 commits - avmedia/source

2013-09-14 Thread Minh Ngo
 avmedia/source/vlc/vlcplayer.cxx|4 +---
 avmedia/source/vlc/vlcwindow.cxx|   27 +++
 avmedia/source/vlc/vlcwindow.hxx|1 +
 avmedia/source/vlc/wrapper/Instance.cxx |4 +---
 avmedia/source/vlc/wrapper/Media.cxx|   17 ++---
 avmedia/source/vlc/wrapper/Media.hxx|2 ++
 avmedia/source/vlc/wrapper/Player.cxx   |   22 +-
 avmedia/source/vlc/wrapper/Player.hxx   |2 --
 avmedia/source/vlc/wrapper/Types.hxx|6 ++
 9 files changed, 53 insertions(+), 32 deletions(-)

New commits:
commit ce0ce2413d206908d60fa38c905f9da06f50be59
Author: Minh Ngo nlmin...@gmail.com
Date:   Sat Sep 14 18:21:41 2013 +0300

Fixing copying processes for wrapper components.

Change-Id: Iae3f30d5754c3efac01d66f9d0d567874e44602d

diff --git a/avmedia/source/vlc/wrapper/Instance.cxx 
b/avmedia/source/vlc/wrapper/Instance.cxx
index b9b6ff9..8ec4732 100644
--- a/avmedia/source/vlc/wrapper/Instance.cxx
+++ b/avmedia/source/vlc/wrapper/Instance.cxx
@@ -38,9 +38,7 @@ namespace VLC
 
 Instance::Instance( const Instance other )
 {
-libvlc_release( mInstance );
-mInstance = other.mInstance;
-libvlc_retain( mInstance );
+operator=(other);
 }
 
 const Instance Instance::operator=( const Instance other )
diff --git a/avmedia/source/vlc/wrapper/Media.cxx 
b/avmedia/source/vlc/wrapper/Media.cxx
index 5bf5bf0..0df5cbf 100644
--- a/avmedia/source/vlc/wrapper/Media.cxx
+++ b/avmedia/source/vlc/wrapper/Media.cxx
@@ -51,9 +51,8 @@ Media::Media( const rtl::OUString url, Instance instance )
 }
 
 Media::Media( const Media other )
-: mMedia( other.mMedia )
 {
-libvlc_media_retain( mMedia );
+operator=(other);
 }
 
 const Media Media::operator=( const Media other )
diff --git a/avmedia/source/vlc/wrapper/Player.cxx 
b/avmedia/source/vlc/wrapper/Player.cxx
index 2e4c356..657dd23 100644
--- a/avmedia/source/vlc/wrapper/Player.cxx
+++ b/avmedia/source/vlc/wrapper/Player.cxx
@@ -87,9 +87,8 @@ namespace VLC
 }
 
 Player::Player( const Player other )
-: mPlayer( other.mPlayer )
 {
-libvlc_media_player_retain( mPlayer );
+operator=( other );
 }
 
 const Player Player::operator=( const Player other )
commit 1bb7981525c671ebe78263114fe4a454b7e0ae42
Author: Minh Ngo nlmin...@gmail.com
Date:   Sat Sep 14 18:19:32 2013 +0300

Media zoom for Avmedia/vlc

Change-Id: I2870b3fbeaa6fbb623f21dfde9a33a6048c60b85

diff --git a/avmedia/source/vlc/vlcwindow.cxx b/avmedia/source/vlc/vlcwindow.cxx
index b004875..6bdaa67 100644
--- a/avmedia/source/vlc/vlcwindow.cxx
+++ b/avmedia/source/vlc/vlcwindow.cxx
@@ -17,14 +17,27 @@ void SAL_CALL VLCWindow::update() throw 
(css::uno::RuntimeException)
 {
 }
 
-::sal_Bool SAL_CALL VLCWindow::setZoomLevel( css::media::ZoomLevel ) throw 
(css::uno::RuntimeException)
+::sal_Bool SAL_CALL VLCWindow::setZoomLevel( css::media::ZoomLevel eZoomLevel 
) throw (css::uno::RuntimeException)
 {
-return false;
+sal_Bool bRet = false;
+
+if( media::ZoomLevel_NOT_AVAILABLE != meZoomLevel 
+media::ZoomLevel_NOT_AVAILABLE != eZoomLevel )
+{
+if( eZoomLevel != meZoomLevel )
+{
+meZoomLevel = eZoomLevel;
+}
+
+bRet = true;
+}
+
+return bRet;
 }
 
 css::media::ZoomLevel SAL_CALL VLCWindow::getZoomLevel() throw 
(css::uno::RuntimeException)
 {
-return css::media::ZoomLevel_NOT_AVAILABLE;
+return meZoomLevel;
 }
 
 void SAL_CALL VLCWindow::setPointerType( ::sal_Int32 ) throw 
(css::uno::RuntimeException)
@@ -70,7 +83,13 @@ void SAL_CALL VLCWindow::setPosSize( sal_Int32, sal_Int32, 
sal_Int32, sal_Int32,
 awt::Rectangle SAL_CALL VLCWindow::getPosSize()
 throw (uno::RuntimeException)
 {
-return awt::Rectangle();
+awt::Rectangle aRet;
+
+aRet.X = aRet.Y = 0;
+aRet.Width = 320;
+aRet.Height = 240;
+
+return aRet;
 }
 
 void SAL_CALL VLCWindow::setVisible( sal_Bool )
diff --git a/avmedia/source/vlc/vlcwindow.hxx b/avmedia/source/vlc/vlcwindow.hxx
index 2aa3e47..ef06576 100644
--- a/avmedia/source/vlc/vlcwindow.hxx
+++ b/avmedia/source/vlc/vlcwindow.hxx
@@ -27,6 +27,7 @@ namespace vlc {
 class VLCWindow : public ::cppu::WeakImplHelper2  
::com::sun::star::media::XPlayerWindow,

::com::sun::star::lang::XServiceInfo 
 {
+::com::sun::star::media::ZoomLevel meZoomLevel;
 public:
 VLCWindow();
 
commit 6fe1efc01d6f9dc333a74a4e76e554b182651f60
Author: Minh Ngo nlmin...@gmail.com
Date:   Sat Sep 14 18:18:38 2013 +0300

Getting correct media file duration and time.

Change-Id: I435175ad7b1f6576e501794ee87f334498000b4f

diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index a43c412..37be348 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -57,13 +57,12 @@ void SAL_CALL VLCPlayer::stop() throw (