diff options
-rw-r--r-- | avmedia/source/quicktime/player.cxx | 18 | ||||
-rw-r--r-- | avmedia/source/quicktime/player.hxx | 3 | ||||
-rw-r--r-- | avmedia/source/quicktime/window.cxx | 49 | ||||
-rw-r--r-- | avmedia/source/quicktime/window.hxx | 9 | ||||
-rw-r--r-- | fpicker/source/office/iodlgimp.cxx | 38 | ||||
-rw-r--r-- | fpicker/source/office/iodlgimp.hxx | 4 | ||||
-rw-r--r-- | fpicker/source/win32/filepicker/WinFileOpenImpl.cxx | 2 | ||||
-rw-r--r-- | svx/source/editeng/impedit3.cxx | 14 | ||||
-rw-r--r-- | sysui/desktop/menus/calc.desktop | 2 |
9 files changed, 69 insertions, 70 deletions
diff --git a/avmedia/source/quicktime/player.cxx b/avmedia/source/quicktime/player.cxx index e99c51f9217f..e8289570b5ae 100644 --- a/avmedia/source/quicktime/player.cxx +++ b/avmedia/source/quicktime/player.cxx @@ -75,7 +75,6 @@ namespace avmedia { namespace quicktime { Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) : mxMgr( rxMgr ), - mpMovieView( nil ), mpMovie( nil ), /* GST mbFakeVideo (sal_False ), @@ -114,12 +113,6 @@ Player::~Player() { if( mbInitialized ) { - if( mpMovieView ) - { - [mpMovieView setMovie:nil]; - mpMovieView = nil; - } - if( mpMovie ) { [mpMovie release]; @@ -439,15 +432,12 @@ uno::Reference< ::media::XPlayerWindow > SAL_CALL Player::createPlayerWindow( co if( aSize.Width > 0 && aSize.Height > 0 ) { - ::avmedia::quicktime::Window* pWindow = new ::avmedia::quicktime::Window( mxMgr, *this ); - xRet = pWindow; - sal_IntPtr nPtr = NULL; aArguments[0] >>= nPtr; - mpMovieView = reinterpret_cast< QTMovieView * >(nPtr); - [mpMovieView setMovie: mpMovie]; - [mpMovieView setControllerVisible: NO]; - [mpMovieView setFrameSize: nsSize ]; + NSView* pParentView = reinterpret_cast< NSView * >(nPtr); + + ::avmedia::quicktime::Window* pWindow = new ::avmedia::quicktime::Window( mxMgr, *this, pParentView ); + xRet = pWindow; } return xRet; diff --git a/avmedia/source/quicktime/player.hxx b/avmedia/source/quicktime/player.hxx index 5a2741f034b7..b7cab51005f4 100644 --- a/avmedia/source/quicktime/player.hxx +++ b/avmedia/source/quicktime/player.hxx @@ -83,12 +83,13 @@ public: virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); + QTMovie* getMovie() { return mpMovie; } + private: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMgr; ::rtl::OUString maURL; - QTMovieView *mpMovieView; // the view containing the movie object, output target and controller QTMovie *mpMovie; // the Movie object /* GST sal_Bool mbFakeVideo; diff --git a/avmedia/source/quicktime/window.cxx b/avmedia/source/quicktime/window.cxx index 367d11b0599d..6c8121d75950 100644 --- a/avmedia/source/quicktime/window.cxx +++ b/avmedia/source/quicktime/window.cxx @@ -28,7 +28,8 @@ * ************************************************************************/ -#include <com/sun/star/awt/SystemPointer.hdl> +#include <com/sun/star/awt/SystemPointer.hpp> +#include <com/sun/star/awt/PosSize.hpp> #include "window.hxx" #include "player.hxx" @@ -65,16 +66,33 @@ static ::osl::Mutex& ImplGetOwnStaticMutex() // ------------------------------------------------------------------------------ -Window::Window( const uno::Reference< lang::XMultiServiceFactory >& rxMgr, Player& rPlayer ) : - mxMgr( rxMgr ), +Window::Window( const uno::Reference< lang::XMultiServiceFactory >& i_rxMgr, Player& i_rPlayer, NSView* i_pParentView ) : + mxMgr( i_rxMgr ), maListeners( maMutex ), meZoomLevel( media::ZoomLevel_NOT_AVAILABLE ), - mrPlayer( rPlayer ), - mnPointerType( awt::SystemPointer::ARROW ) + mrPlayer( i_rPlayer ), + mnPointerType( awt::SystemPointer::ARROW ), + mpParentView( i_pParentView ), + mpMovieView( nil ) { ::osl::MutexGuard aGuard( ImplGetOwnStaticMutex() ); + + if( mpParentView ) // sanity check + { + + NSRect aViewRect = [mpParentView frame]; + aViewRect.origin.x = aViewRect.origin.y = 0; + mpMovieView = [[QTMovieView alloc] initWithFrame: aViewRect]; + [mpMovieView setMovie: mrPlayer.getMovie() ]; + [mpMovieView setControllerVisible: NO]; + [mpMovieView setPreservesAspectRatio: YES]; + [mpMovieView setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable]; + [mpParentView addSubview: mpMovieView]; + [mpParentView setAutoresizesSubviews: YES]; + } + OSL_TRACE ("Window::Window"); } @@ -82,6 +100,13 @@ Window::Window( const uno::Reference< lang::XMultiServiceFactory >& rxMgr, Playe Window::~Window() { + if( mpMovieView ) + { + [mpMovieView removeFromSuperview]; + [mpMovieView setMovie:nil]; + [mpMovieView release]; + mpMovieView = nil; + } } bool Window::create( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) @@ -128,7 +153,14 @@ void SAL_CALL Window::setPointerType( sal_Int32 nPointerType ) void SAL_CALL Window::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags ) throw (uno::RuntimeException) { - ; + if( mpParentView && mpMovieView ) + { + NSRect aRect = [mpMovieView frame]; + if( (Flags & awt::PosSize::WIDTH) ) + aRect.size.width = Width; + if( (Flags & awt::PosSize::HEIGHT) ) + aRect.size.height = Height; + } } // ------------------------------------------------------------------------------ @@ -138,9 +170,10 @@ awt::Rectangle SAL_CALL Window::getPosSize() { awt::Rectangle aRet; + NSRect aRect = [mpMovieView frame]; aRet.X = aRet.Y = 0; - aRet.Width = 200; - aRet.Height = 100; + aRet.Width = aRect.size.width; + aRet.Height = aRect.size.height; return aRet; } diff --git a/avmedia/source/quicktime/window.hxx b/avmedia/source/quicktime/window.hxx index cb0699ee15f7..1c23a88754bb 100644 --- a/avmedia/source/quicktime/window.hxx +++ b/avmedia/source/quicktime/window.hxx @@ -51,8 +51,10 @@ class Window : public ::cppu::WeakImplHelper2 < ::com::sun::star::media::XPlayer { public: - Window( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rxMgr, - Player& rPlayer ); + Window( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_rxMgr, + Player& i_rPlayer, + NSView* i_pParentView + ); ~Window(); bool create( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ); @@ -104,6 +106,9 @@ private: Player& mrPlayer; int mnPointerType; + NSView* mpParentView; // parent view for our own private movie view + QTMovieView* mpMovieView; // the view containing the movie object, output target and controller + void ImplLayoutVideoWindow(); }; diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx index 4f53008eda3d..3a34c1da7be6 100644 --- a/fpicker/source/office/iodlgimp.cxx +++ b/fpicker/source/office/iodlgimp.cxx @@ -131,44 +131,6 @@ namespace } //***************************************************************************** - -String GetRegularExpression_Impl( const String& rFilter ) -{ - String aFilter = rFilter; - aFilter.EraseLeadingChars().EraseTrailingChars(); - String aRegExp = '^'; - - for ( const sal_Unicode *pc = aFilter.GetBuffer(); *pc; ++pc ) - { - if ( '*' == *pc ) - aRegExp += String(RTL_CONSTASCII_USTRINGPARAM(".*")); - else if ( '?' == *pc ) - aRegExp += '.'; - else - { - aRegExp += '\''; - - while ( *pc && *pc != '*' && *pc != '?' ) - { - if ( '\'' == *pc ) - aRegExp += String(RTL_CONSTASCII_USTRINGPARAM("\\\'")); - else - aRegExp += *pc; - pc++; - } - aRegExp += '\''; - - if ( !*pc ) - break; - else - pc--; - } - } - aRegExp += '$'; - return aRegExp; -} - -//***************************************************************************** // SvtFileDialogFilter_Impl //***************************************************************************** diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx index 35fcc7f95df9..5b97455b628a 100644 --- a/fpicker/source/office/iodlgimp.hxx +++ b/fpicker/source/office/iodlgimp.hxx @@ -57,10 +57,6 @@ class SvUShorts; #define FILEDIALOG_DEF_TIMEOUT 250 //***************************************************************************** - -String GetRegularExpression_Impl( const String& rFilter ); - -//***************************************************************************** // SvtFileDialogFilter_Impl //***************************************************************************** diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx index dc53e6318030..a84a54499bc3 100644 --- a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx +++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx @@ -713,7 +713,7 @@ void CWinFileOpenImpl::EnlargeStdControlLabels() const RECT rcFilterBox; GetWindowRect(hFilterBox, &rcFilterBox); w = rcFilterBox.right - rcFilterBox.left; - h = rcFilterBox.bottom, - rcFilterBox.top; + h = rcFilterBox.bottom - rcFilterBox.top; ScreenToClient(m_hwndFileOpenDlg, (LPPOINT)&rcFilterBox); MoveWindow(hFilterBox, rcFilterBox.left + gap + OFFSET, rcFilterBox.top, w - OFFSET, h, true); diff --git a/svx/source/editeng/impedit3.cxx b/svx/source/editeng/impedit3.cxx index 93bbf1915ab0..d272991953c5 100644 --- a/svx/source/editeng/impedit3.cxx +++ b/svx/source/editeng/impedit3.cxx @@ -344,7 +344,19 @@ IMPL_LINK( ImpEditEngine, OnlineSpellHdl, Timer *, EMPTYARG ) IMPL_LINK_INLINE_START( ImpEditEngine, IdleFormatHdl, Timer *, EMPTYARG ) { aIdleFormatter.ResetRestarts(); - FormatAndUpdate( aIdleFormatter.GetView() ); + + // #i97146# check if that view is still available + // else probably the idle format timer fired while we're already + // downing + EditView* pView = aIdleFormatter.GetView(); + for( sal_uInt16 nView = 0; nView < aEditViews.Count(); nView++ ) + { + if( aEditViews[nView] == pView ) + { + FormatAndUpdate( pView ); + break; + } + } return 0; } IMPL_LINK_INLINE_END( ImpEditEngine, IdleFormatHdl, Timer *, EMPTYARG ) diff --git a/sysui/desktop/menus/calc.desktop b/sysui/desktop/menus/calc.desktop index f8e08e33ce3b..e49b114b0954 100644 --- a/sysui/desktop/menus/calc.desktop +++ b/sysui/desktop/menus/calc.desktop @@ -5,7 +5,7 @@ Icon=calc Type=Application Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Spreadsheets; Exec=openoffice -calc %U -MimeType=application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv; +MimeType=application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;application/x-dbf; Name=%PRODUCTNAME Calc GenericName=Spreadsheet Comment=Perform calculation, analyze information and manage lists in spreadsheets by using Calc. |