summaryrefslogtreecommitdiff
path: root/vcl/source/app
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-04-08 08:39:36 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-04-08 08:39:36 +0200
commit213bc71f84c8f8494f5b5009b730b5a7af2c7cee (patch)
tree4e26514b812625615d45d317a3987d9b66ba4ac7 /vcl/source/app
parent35a7310e7fc16f609f895c043ceb8e99a251b3ee (diff)
Clean up function declarations and some unused functions
Change-Id: I382289c7188dfdc9839ff9e6362b6e039ffc5f9e
Diffstat (limited to 'vcl/source/app')
-rw-r--r--vcl/source/app/dbggui.cxx157
-rw-r--r--vcl/source/app/session.cxx1
-rw-r--r--vcl/source/app/svapp.cxx2
-rw-r--r--vcl/source/app/svdata.cxx31
4 files changed, 3 insertions, 188 deletions
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index ae084a7b0cf4..68daec683d89 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -205,26 +205,6 @@ static const sal_Char* pDbgHelpText[] =
NULL
};
-#define DBGWIN_MAXLINES 100
-
-class DbgWindow : public WorkWindow
-{
-private:
- ListBox maLstBox;
-
-public:
- DbgWindow();
-
- virtual bool Close() SAL_OVERRIDE;
- virtual void Resize() SAL_OVERRIDE;
- virtual bool PreNotify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
- void InsertLine( const OUString& rLine );
- void Update() { WorkWindow::Update(); maLstBox.Update(); }
-
-private:
- void GetAssertionEntryRange( sal_uInt16 nInbetweenEntry, sal_uInt16& nFirst, sal_uInt16& nLast );
-};
-
class DbgInfoDialog : public ModalDialog
{
private:
@@ -257,143 +237,6 @@ public:
void RequestHelp( const HelpEvent& rHEvt ) SAL_OVERRIDE;
};
-DbgWindow::DbgWindow() :
- WorkWindow( NULL, WB_STDWORK ),
- maLstBox( this, WB_AUTOHSCROLL )
-{
- DbgData* pData = DbgGetData();
-
- maLstBox.Show();
- maLstBox.SetPosPixel( Point( 0, 0 ) );
-
- SetOutputSizePixel( Size( 600, 480 ) );
- if ( pData->aDbgWinState[0] )
- {
- OString aState( pData->aDbgWinState );
- SetWindowState( aState );
- }
-
- SetText("StarView Debug Window");
- Show();
- Update();
-}
-
-bool DbgWindow::Close()
-{
- // remember window position
- OString aState( GetWindowState() );
- DbgData* pData = DbgGetData();
- size_t nCopy = (sizeof( pData->aDbgWinState ) < size_t(aState.getLength() + 1U ))
- ? sizeof( pData->aDbgWinState ) : size_t(aState.getLength() + 1U );
- strncpy( pData->aDbgWinState, aState.getStr(), nCopy );
- pData->aDbgWinState[ sizeof( pData->aDbgWinState ) - 1 ] = 0;
- // and save for next session
- DbgSaveData( *pData );
-
- delete this;
- return true;
-}
-
-void DbgWindow::Resize()
-{
- maLstBox.SetSizePixel( GetOutputSizePixel() );
-}
-
-void DbgWindow::GetAssertionEntryRange( sal_uInt16 nInbetweenEntry, sal_uInt16& nFirst, sal_uInt16& nLast )
-{
- nFirst = nInbetweenEntry;
- while ( nFirst > 0 )
- {
- if ( maLstBox.GetEntryData( nFirst ) != NULL )
- break;
- --nFirst;
- }
- sal_uInt16 nEntryCount = maLstBox.GetEntryCount();
- nLast = nInbetweenEntry + 1;
- while ( nLast < nEntryCount )
- {
- if ( maLstBox.GetEntryData( nLast ) != NULL )
- break;
- ++nLast;
- }
-}
-
-bool DbgWindow::PreNotify( NotifyEvent& rNEvt )
-{
- if ( rNEvt.GetType() == EVENT_COMMAND )
- {
- if ( maLstBox.IsWindowOrChild( rNEvt.GetWindow() ) )
- {
- const CommandEvent& rCommand = *rNEvt.GetCommandEvent();
- if ( rCommand.GetCommand() == COMMAND_CONTEXTMENU )
- {
- PopupMenu aMenu;
- aMenu.InsertItem( 1, OUString("copy to clipboard") );
-
- Point aPos;
- if ( rCommand.IsMouseEvent() )
- aPos = rCommand.GetMousePosPixel();
- else
- {
- Rectangle aEntryRect( maLstBox.GetBoundingRectangle( maLstBox.GetSelectEntryPos() ) );
- aPos = aEntryRect.Center();
- }
- sal_uInt16 nSelected = aMenu.Execute( rNEvt.GetWindow(), aPos );
- if ( nSelected == 1 )
- {
- // search all entries which belong to this assertion
- sal_uInt16 nAssertionFirst = 0;
- sal_uInt16 nAssertionLast = 0;
- GetAssertionEntryRange( maLstBox.GetSelectEntryPos(), nAssertionFirst, nAssertionLast );
-
- // build the string to copy to the clipboard
- OUStringBuffer sAssertion;
- OUString sLineFeed = convertLineEnd(
- OUString("\n"),
- GetSystemLineEnd());
- while ( nAssertionFirst < nAssertionLast )
- {
- sAssertion.append(maLstBox.GetEntry( nAssertionFirst++ ));
- sAssertion.append(sLineFeed);
- }
-
- ::vcl::unohelper::TextDataObject::CopyStringTo(
- sAssertion.makeStringAndClear(), GetClipboard());
- }
- }
- return true; // handled
- }
- }
- return WorkWindow::PreNotify( rNEvt );
-}
-
-void DbgWindow::InsertLine( const OUString& rLine )
-{
- OUString aStr = convertLineEnd(rLine, LINEEND_LF);
- sal_Int32 nPos = aStr.indexOf( '\n' );
- bool bFirstEntry = true;
- while ( nPos != -1 )
- {
- if ( maLstBox.GetEntryCount() >= DBGWIN_MAXLINES )
- maLstBox.RemoveEntry( 0 );
-
- sal_uInt16 nInsertionPos = maLstBox.InsertEntry( aStr.copy( 0, nPos ) );
- if ( bFirstEntry )
- maLstBox.SetEntryData( nInsertionPos, reinterpret_cast< void* >( 1 ) );
- bFirstEntry = false;
-
- aStr = aStr.replaceAt( 0, nPos+1, "" );
- nPos = aStr.indexOf( '\n' );
- }
- if ( maLstBox.GetEntryCount() >= DBGWIN_MAXLINES )
- maLstBox.RemoveEntry( 0 );
- sal_uInt16 nInsertionPos = maLstBox.InsertEntry( aStr );
- if ( bFirstEntry )
- maLstBox.SetEntryData( nInsertionPos, reinterpret_cast< void* >( 1 ) );
- maLstBox.SetTopEntry( DBGWIN_MAXLINES-1 );
- maLstBox.Update();
-}
-
DbgDialog::DbgDialog() :
ModalDialog( NULL, WB_STDMODAL | WB_SYSTEMWINDOW ),
maRes( this ),
diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx
index ac6e6c4bb810..145eafb66e83 100644
--- a/vcl/source/app/session.cxx
+++ b/vcl/source/app/session.cxx
@@ -27,6 +27,7 @@
#include <vcl/svapp.hxx>
+#include <factory.hxx>
#include <svdata.hxx>
#include <salinst.hxx>
#include <salsession.hxx>
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 4a724e5447ee..dd213197d482 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -166,10 +166,12 @@ struct ImplPostEventData
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maKeyEvent( rKeyEvent ) {}
ImplPostEventData( sal_uLong nEvent, const Window* pWin, const MouseEvent& rMouseEvent ) :
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maMouseEvent( rMouseEvent ) {}
+#if !HAVE_FEATURE_DESKTOP
ImplPostEventData( sal_uLong nEvent, const Window* pWin, const ZoomEvent& rZoomEvent ) :
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maZoomEvent( rZoomEvent ) {}
ImplPostEventData( sal_uLong nEvent, const Window* pWin, const ScrollEvent& rScrollEvent ) :
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maScrollEvent( rScrollEvent ) {}
+#endif
~ImplPostEventData() {}
};
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index b899ec73816d..6ff25c5b726a 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -235,37 +235,6 @@ BlendFrameCache* ImplGetBlendFrameCache()
return pSVData->mpBlendFrameCache;
}
-class AccessBridgeCurrentContext: public cppu::WeakImplHelper1< com::sun::star::uno::XCurrentContext >
-{
-public:
- AccessBridgeCurrentContext(
- const com::sun::star::uno::Reference< com::sun::star::uno::XCurrentContext > &context ) :
- m_prevContext( context ) {}
-
- // XCurrentContext
- virtual com::sun::star::uno::Any SAL_CALL getValueByName( const OUString& Name )
- throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-private:
- com::sun::star::uno::Reference< com::sun::star::uno::XCurrentContext > m_prevContext;
-};
-
-com::sun::star::uno::Any AccessBridgeCurrentContext::getValueByName( const OUString & Name )
- throw (com::sun::star::uno::RuntimeException, std::exception)
-{
- com::sun::star::uno::Any ret;
- if ( Name == "java-vm.interaction-handler" )
- {
- // Currently, for accessbility no interaction handler shall be offered.
- // There may be introduced later on a handler using native toolkits
- // jbu->obr: Instantiate here your interaction handler
- }
- else if( m_prevContext.is() )
- {
- ret = m_prevContext->getValueByName( Name );
- }
- return ret;
-}
-
#ifdef _WIN32
bool HasAtHook();
#endif