From 71fbd7b1fc7fd9c9dd3a78f091cfea523eb44068 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 30 Jul 2010 11:38:32 +0200 Subject: cws tlmath01: #i972# applied first community patch --- sfx2/source/view/ipclient.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sfx2/source/view') diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 328d88d8b2b9..997cb584f83d 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -220,6 +220,7 @@ void SAL_CALL SfxInPlaceClient_Impl::notifyEvent( const document::EventObject& a if ( m_pClient && aEvent.EventName.equalsAscii("OnVisAreaChanged") && m_nAspect != embed::Aspects::MSOLE_ICON ) { + m_pClient->FormatChanged(); // for Writer when format of the object is changed with the area m_pClient->ViewChanged(); m_pClient->Invalidate(); } @@ -1082,6 +1083,11 @@ void SfxInPlaceClient::MakeVisible() // dummy implementation } +void SfxInPlaceClient::FormatChanged() +{ + // dummy implementation +} + void SfxInPlaceClient::DeactivateObject() { if ( GetObject().is() ) -- cgit From 8051a0ab7bd9557aaf076650f48731befce32a1a Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 24 Sep 2010 11:31:52 +0200 Subject: dba34a: #i114719#: it's allowed for a model to provide an empty view data container --- sfx2/source/view/sfxbasecontroller.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sfx2/source/view') diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index cda5fd0bdd7d..3dd6b1707d60 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -1438,11 +1438,11 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect ) try { Reference< XViewDataSupplier > xViewDataSupplier( getModel(), UNO_QUERY_THROW ); - Reference< XIndexAccess > xViewData( xViewDataSupplier->getViewData(), UNO_SET_THROW ); + Reference< XIndexAccess > xViewData( xViewDataSupplier->getViewData() ); // find the view data item whose ViewId matches the ID of the view we're just connecting to const SfxObjectFactory& rDocFactory( rDoc.GetFactory() ); - const sal_Int32 nCount = xViewData->getCount(); + const sal_Int32 nCount = xViewData.is() ? xViewData->getCount() : 0; sal_Int32 nViewDataIndex = 0; for ( sal_Int32 i=0; i Date: Thu, 30 Sep 2010 16:12:43 +0200 Subject: sw34refactor1: rework SfxViewShell_Impl a bit: replace pointer members with smart pointers. move initialization to SfxViewShell_Impl constructor. remove unused bOwnsMenu member. --- sfx2/source/view/sfxbasecontroller.cxx | 2 +- sfx2/source/view/viewimp.hxx | 33 ++++---- sfx2/source/view/viewprn.cxx | 12 ++- sfx2/source/view/viewsh.cxx | 135 ++++++++++++++++++--------------- 4 files changed, 99 insertions(+), 83 deletions(-) (limited to 'sfx2/source/view') diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index cda5fd0bdd7d..93c4eeb33cee 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -1052,7 +1052,7 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime if ( pFrame && pFrame->GetViewShell() == m_pData->m_pViewShell ) pFrame->GetFrame().SetIsClosing_Impl(); m_pData->m_pViewShell->DiscardClients_Impl(); - m_pData->m_pViewShell->pImp->bControllerSet = sal_False ; + m_pData->m_pViewShell->pImp->m_bControllerSet = false; if ( pFrame ) { diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx index be20cd2f2a47..0826e78870bb 100644 --- a/sfx2/source/view/viewimp.hxx +++ b/sfx2/source/view/viewimp.hxx @@ -25,8 +25,8 @@ * ************************************************************************/ -#ifndef _VIEWIMP_HXX -#define _VIEWIMP_HXX +#ifndef SFX_VIEWIMP_HXX +#define SFX_VIEWIMP_HXX // include --------------------------------------------------------------- @@ -56,28 +56,29 @@ struct SfxViewShell_Impl { ::osl::Mutex aMutex; ::cppu::OInterfaceContainerHelper aInterceptorContainer; - BOOL bControllerSet; + bool m_bControllerSet; SfxShellArr_Impl aArr; SvBorder aBorder; Size aOptimalSize; Size aMargin; - USHORT nPrinterLocks; - BOOL bCanPrint; - BOOL bHasPrintOptions; - BOOL bPlugInsActive; - BOOL bIsShowView; - BOOL bOwnsMenu; - BOOL bGotOwnerShip; - BOOL bGotFrameOwnerShip; - SfxScrollingMode eScroll; - USHORT nFamily; - SfxBaseController* pController; - ::svt::AcceleratorExecute* pAccExec; + USHORT m_nPrinterLocks; + bool m_bCanPrint; + bool m_bHasPrintOptions; + bool m_bPlugInsActive; + bool m_bIsShowView; + // FIXME UNUSED ??? + //bool m_bOwnsMenu; + bool m_bGotOwnership; + bool m_bGotFrameOwnership; + SfxScrollingMode m_eScroll; + USHORT m_nFamily; + ::rtl::Reference m_pController; + ::std::auto_ptr< ::svt::AcceleratorExecute > m_pAccExec; com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aPrintOpts; ::rtl::Reference< SfxClipboardChangeListener > xClipboardListener; ::boost::shared_ptr< vcl::PrinterController > m_pPrinterController; - SfxViewShell_Impl(); + SfxViewShell_Impl(USHORT const nFlags); }; #endif diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 4ed0173be8e1..18d711b0c281 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -836,7 +836,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) // execute PrinterSetupDialog PrinterSetupDialog* pPrintSetupDlg = new PrinterSetupDialog( GetWindow() ); - if ( pImp->bHasPrintOptions ) + if (pImp->m_bHasPrintOptions) { // additional controls for dialog pExecutor = new SfxDialogExecutor_Impl( this, pPrintSetupDlg ); @@ -985,7 +985,7 @@ ErrCode SfxViewShell::DoPrint( SfxPrinter* /*pPrinter*/, BOOL SfxViewShell::IsPrinterLocked() const { - return pImp->nPrinterLocks > 0; + return pImp->m_nPrinterLocks > 0; } //-------------------------------------------------------------------- @@ -994,9 +994,13 @@ void SfxViewShell::LockPrinter( BOOL bLock) { BOOL bChanged = FALSE; if ( bLock ) - bChanged = 1 == ++pImp->nPrinterLocks; + { + bChanged = 1 == ++pImp->m_nPrinterLocks; + } else - bChanged = 0 == --pImp->nPrinterLocks; + { + bChanged = 0 == --pImp->m_nPrinterLocks; + } if ( bChanged ) { diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 5c65c967434f..5c41ba167c55 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -240,9 +240,21 @@ static ::rtl::OUString RetrieveLabelFromCommand( } //========================================================================= -SfxViewShell_Impl::SfxViewShell_Impl() +SfxViewShell_Impl::SfxViewShell_Impl(USHORT const nFlags) : aInterceptorContainer( aMutex ) -, pAccExec(0) +, m_bControllerSet(false) +, m_nPrinterLocks(0) +, m_bCanPrint(SFX_VIEW_CAN_PRINT == (nFlags & SFX_VIEW_CAN_PRINT)) +, m_bHasPrintOptions( + SFX_VIEW_HAS_PRINTOPTIONS == (nFlags & SFX_VIEW_HAS_PRINTOPTIONS)) +, m_bPlugInsActive(true) +, m_bIsShowView(SFX_VIEW_NO_SHOW != (nFlags & SFX_VIEW_NO_SHOW)) +, m_bGotOwnership(false) +, m_bGotFrameOwnership(false) +, m_eScroll(SCROLLING_DEFAULT) +, m_nFamily(-1) // undefined, default set by TemplateDialog +, m_pController(0) +, m_pAccExec(0) {} //========================================================================= @@ -374,7 +386,9 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) { SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nId, FALSE); if (pItem) - pImp->nFamily = pItem->GetValue(); + { + pImp->m_nFamily = pItem->GetValue(); + } break; } @@ -674,7 +688,9 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) case SID_PLUGINS_ACTIVE: { SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nId, FALSE); - BOOL bActive = pShowItem ? pShowItem->GetValue() : !pImp->bPlugInsActive; + bool const bActive = (pShowItem) + ? pShowItem->GetValue() + : !pImp->m_bPlugInsActive; // ggf. recorden if ( !rReq.IsAPI() ) rReq.AppendItem( SfxBoolItem( nId, bActive ) ); @@ -684,7 +700,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) rReq.Done(TRUE); // ausfuehren - if ( !pShowItem || bActive != pImp->bPlugInsActive ) + if (!pShowItem || (bActive != pImp->m_bPlugInsActive)) { SfxFrame* pTopFrame = &GetFrame()->GetTopFrame(); if ( pTopFrame != &GetFrame()->GetFrame() ) @@ -704,7 +720,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) SfxViewShell *pView = pTopFrame->GetCurrentViewFrame()->GetViewShell(); if ( pView ) { - pView->pImp->bPlugInsActive = bActive; + pView->pImp->m_bPlugInsActive = bActive; Rectangle aVisArea = GetObjectShell()->GetVisArea(); VisAreaChanged(aVisArea); @@ -758,7 +774,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) case SID_SETUPPRINTER: case SID_PRINTER_NAME: { - BOOL bEnabled = pImp->bCanPrint && !pImp->nPrinterLocks; + bool bEnabled = pImp->m_bCanPrint && !pImp->m_nPrinterLocks; bEnabled = bEnabled && !Application::GetSettings().GetMiscSettings().GetDisablePrinting(); if ( bEnabled ) { @@ -812,7 +828,8 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) // PlugIns running case SID_PLUGINS_ACTIVE: { - rSet.Put( SfxBoolItem( SID_PLUGINS_ACTIVE, !pImp->bPlugInsActive) ); + rSet.Put( SfxBoolItem( SID_PLUGINS_ACTIVE, + !pImp->m_bPlugInsActive) ); break; } /* @@ -832,7 +849,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) */ case SID_STYLE_FAMILY : { - rSet.Put( SfxUInt16Item( SID_STYLE_FAMILY, pImp->nFamily ) ); + rSet.Put( SfxUInt16Item( SID_STYLE_FAMILY, pImp->m_nFamily ) ); break; } } @@ -1155,8 +1172,10 @@ void SfxViewShell::InvalidateBorder() DBG_ASSERT( GetViewFrame(), "SfxViewShell without SfxViewFrame" ); GetViewFrame()->InvalidateBorderImpl( this ); - if ( pImp->pController ) - pImp->pController->BorderWidthsChanged_Impl(); + if (pImp->m_pController.is()) + { + pImp->m_pController->BorderWidthsChanged_Impl(); + } } //-------------------------------------------------------------------- @@ -1171,8 +1190,10 @@ void SfxViewShell::SetBorderPixel( const SvBorder &rBorder ) GetViewFrame()->SetBorderPixelImpl( this, rBorder ); // notify related controller that border size is changed - if ( pImp->pController ) - pImp->pController->BorderWidthsChanged_Impl(); + if (pImp->m_pController.is()) + { + pImp->m_pController->BorderWidthsChanged_Impl(); + } } } @@ -1247,7 +1268,7 @@ SfxViewShell::SfxViewShell ) : SfxShell(this) - ,pImp( new SfxViewShell_Impl ) +, pImp( new SfxViewShell_Impl(nFlags) ) ,pIPClientList( 0 ) ,pFrame(pViewFrame) ,pSubShell(0) @@ -1257,22 +1278,12 @@ SfxViewShell::SfxViewShell DBG_CTOR(SfxViewShell, 0); //pImp->pPrinterCommandQueue = new SfxAsyncPrintExec_Impl( this ); - pImp->pController = 0; - pImp->bIsShowView = - !(SFX_VIEW_NO_SHOW == (nFlags & SFX_VIEW_NO_SHOW)); - - pImp->bCanPrint = SFX_VIEW_CAN_PRINT == (nFlags & SFX_VIEW_CAN_PRINT); - pImp->bHasPrintOptions = - SFX_VIEW_HAS_PRINTOPTIONS == (nFlags & SFX_VIEW_HAS_PRINTOPTIONS); - pImp->bPlugInsActive = TRUE; - pImp->bGotOwnerShip = FALSE; - pImp->bGotFrameOwnerShip = FALSE; + if ( pViewFrame->GetParentViewFrame() ) - pImp->bPlugInsActive = pViewFrame->GetParentViewFrame()->GetViewShell()->pImp->bPlugInsActive; - pImp->eScroll = SCROLLING_DEFAULT; - pImp->nPrinterLocks = 0; - pImp->bControllerSet = FALSE; - pImp->nFamily = 0xFFFF; // undefined, default set by TemplateDialog + { + pImp->m_bPlugInsActive = pViewFrame->GetParentViewFrame() + ->GetViewShell()->pImp->m_bPlugInsActive; + } SetMargin( pViewFrame->GetMargin_Impl() ); SetPool( &pViewFrame->GetObjectShell()->GetPool() ); @@ -1301,16 +1312,10 @@ SfxViewShell::~SfxViewShell() pImp->xClipboardListener = NULL; } - if ( pImp->pController ) + if (pImp->m_pController.is()) { - pImp->pController->ReleaseShell_Impl(); - pImp->pController->release(); - pImp->pController = NULL; - } - - if (pImp->pAccExec) - { - DELETEZ( pImp->pAccExec ); + pImp->m_pController->ReleaseShell_Impl(); + pImp->m_pController.clear(); } //DELETEZ( pImp->pPrinterCommandQueue ); @@ -1660,7 +1665,8 @@ void SfxViewShell::Notify( SfxBroadcaster& rBC, SFX_ITEMSET_ARG( pSet, pItem, SfxUnoAnyItem, SID_VIEW_DATA, sal_False ); if ( pItem ) { - pImp->pController->restoreViewData( pItem->GetValue() ); + pImp->m_pController->restoreViewData( + pItem->GetValue() ); pSet->ClearItem( SID_VIEW_DATA ); } @@ -1679,13 +1685,15 @@ void SfxViewShell::Notify( SfxBroadcaster& rBC, BOOL SfxViewShell::ExecKey_Impl(const KeyEvent& aKey) { - if (!pImp->pAccExec) + if (!pImp->m_pAccExec.get()) { - pImp->pAccExec = ::svt::AcceleratorExecute::createAcceleratorHelper(); - pImp->pAccExec->init(::comphelper::getProcessServiceFactory(), pFrame->GetFrame().GetFrameInterface()); + pImp->m_pAccExec.reset( + ::svt::AcceleratorExecute::createAcceleratorHelper() ); + pImp->m_pAccExec->init(::comphelper::getProcessServiceFactory(), + pFrame->GetFrame().GetFrameInterface()); } - return pImp->pAccExec->execute(aKey.GetKeyCode()); + return pImp->m_pAccExec->execute(aKey.GetKeyCode()); } //-------------------------------------------------------------------- @@ -1828,7 +1836,7 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan ( ( pIPClient->GetObjectMiscStatus() & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE ) != 0 ); // this method is called when either a client is created or the "Edit/Plugins" checkbox is checked - if ( !pIPClient->IsObjectInPlaceActive() && pImp->bPlugInsActive ) + if ( !pIPClient->IsObjectInPlaceActive() && pImp->m_bPlugInsActive ) { // object in client is currently not active // check if the object wants to be activated always or when it becomes at least partially visible @@ -1844,7 +1852,7 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan } } } - else if ( !pImp->bPlugInsActive ) + else if (!pImp->m_bPlugInsActive) { // object in client is currently active and "Edit/Plugins" checkbox is selected // check if the object wants to be activated always or when it becomes at least partially visible @@ -1858,7 +1866,7 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan BOOL SfxViewShell::PlugInsActive() const { - return pImp->bPlugInsActive; + return pImp->m_bPlugInsActive; } //-------------------------------------------------------------------- @@ -1884,14 +1892,14 @@ void SfxViewShell::DiscardClients_Impl() SfxScrollingMode SfxViewShell::GetScrollingMode() const { - return pImp->eScroll; + return pImp->m_eScroll; } //-------------------------------------------------------------------- void SfxViewShell::SetScrollingMode( SfxScrollingMode eMode ) { - pImp->eScroll = eMode; + pImp->m_eScroll = eMode; } //-------------------------------------------------------------------- @@ -1958,7 +1966,7 @@ void SfxViewShell::MarginChanged() BOOL SfxViewShell::IsShowView_Impl() const { - return pImp->bIsShowView; + return pImp->m_bIsShowView; } //-------------------------------------------------------------------- @@ -1990,9 +1998,8 @@ SfxInPlaceClientList* SfxViewShell::GetIPClientList_Impl( BOOL bCreate ) const void SfxViewShell::SetController( SfxBaseController* pController ) { - pImp->pController = pController; - pImp->pController->acquire(); - pImp->bControllerSet = TRUE; + pImp->m_pController = pController; + pImp->m_bControllerSet = true; // there should be no old listener, but if there is one, it should be disconnected if ( pImp->xClipboardListener.is() ) @@ -2004,12 +2011,12 @@ void SfxViewShell::SetController( SfxBaseController* pController ) Reference < XController > SfxViewShell::GetController() { - return pImp->pController; + return pImp->m_pController.get(); } SfxBaseController* SfxViewShell::GetBaseController_Impl() const { - return pImp->pController; + return pImp->m_pController.get(); } void SfxViewShell::AddContextMenuInterceptor_Impl( const REFERENCE< XCONTEXTMENUINTERCEPTOR >& xInterceptor ) @@ -2131,20 +2138,20 @@ void SfxViewShell::TakeOwnerShip_Impl() { // currently there is only one reason to take OwnerShip: a hidden frame is printed // so the ViewShell will check this on EndPrint (->prnmon.cxx) - pImp->bGotOwnerShip = TRUE; + pImp->m_bGotOwnership = true; } void SfxViewShell::TakeFrameOwnerShip_Impl() { // currently there is only one reason to take OwnerShip: a hidden frame is printed // so the ViewShell will check this on EndPrint (->prnmon.cxx) - pImp->bGotFrameOwnerShip = TRUE; + pImp->m_bGotFrameOwnership = true; } void SfxViewShell::CheckOwnerShip_Impl() { BOOL bSuccess = FALSE; - if( pImp->bGotOwnerShip ) + if (pImp->m_bGotOwnership) { com::sun::star::uno::Reference < com::sun::star::util::XCloseable > xModel( GetObjectShell()->GetModel(), com::sun::star::uno::UNO_QUERY ); @@ -2162,7 +2169,7 @@ void SfxViewShell::CheckOwnerShip_Impl() } } - if( !bSuccess && pImp->bGotFrameOwnerShip ) + if (!bSuccess && pImp->m_bGotFrameOwnership) { // document couldn't be closed or it shouldn't, now try at least to close the frame com::sun::star::uno::Reference < com::sun::star::util::XCloseable > xFrame( @@ -2182,19 +2189,23 @@ void SfxViewShell::CheckOwnerShip_Impl() long SfxViewShell::HandleNotifyEvent_Impl( NotifyEvent& rEvent ) { - if ( pImp->pController ) - return pImp->pController->HandleEvent_Impl( rEvent ); + if (pImp->m_pController.is()) + { + return pImp->m_pController->HandleEvent_Impl( rEvent ); + } return 0; } BOOL SfxViewShell::HasKeyListeners_Impl() { - return pImp->pController ? pImp->pController->HasKeyListeners_Impl() : FALSE; + return (pImp->m_pController.is()) + ? pImp->m_pController->HasKeyListeners_Impl() : FALSE; } BOOL SfxViewShell::HasMouseClickListeners_Impl() { - return pImp->pController ? pImp->pController->HasMouseClickListeners_Impl() : FALSE; + return (pImp->m_pController.is()) + ? pImp->m_pController->HasMouseClickListeners_Impl() : FALSE; } void SfxViewShell::SetAdditionalPrintOptions( const com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue >& rOpts ) -- cgit From 133d2bcf60167b5807fb5b6cf6a53ac0c96e98df Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 6 Oct 2010 13:15:05 +0200 Subject: Backed out changeset ce84668a7646 --- sfx2/source/view/ipclient.cxx | 6 ------ 1 file changed, 6 deletions(-) (limited to 'sfx2/source/view') diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 997cb584f83d..328d88d8b2b9 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -220,7 +220,6 @@ void SAL_CALL SfxInPlaceClient_Impl::notifyEvent( const document::EventObject& a if ( m_pClient && aEvent.EventName.equalsAscii("OnVisAreaChanged") && m_nAspect != embed::Aspects::MSOLE_ICON ) { - m_pClient->FormatChanged(); // for Writer when format of the object is changed with the area m_pClient->ViewChanged(); m_pClient->Invalidate(); } @@ -1083,11 +1082,6 @@ void SfxInPlaceClient::MakeVisible() // dummy implementation } -void SfxInPlaceClient::FormatChanged() -{ - // dummy implementation -} - void SfxInPlaceClient::DeactivateObject() { if ( GetObject().is() ) -- cgit From 6b6d1a70cb424af2857dc01f278b42d672713f0b Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 20 Oct 2010 10:32:29 +0200 Subject: cws tlmath01: #i972# baseline to baseline alignment for Math --- sfx2/source/view/ipclient.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sfx2/source/view') diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 328d88d8b2b9..997cb584f83d 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -220,6 +220,7 @@ void SAL_CALL SfxInPlaceClient_Impl::notifyEvent( const document::EventObject& a if ( m_pClient && aEvent.EventName.equalsAscii("OnVisAreaChanged") && m_nAspect != embed::Aspects::MSOLE_ICON ) { + m_pClient->FormatChanged(); // for Writer when format of the object is changed with the area m_pClient->ViewChanged(); m_pClient->Invalidate(); } @@ -1082,6 +1083,11 @@ void SfxInPlaceClient::MakeVisible() // dummy implementation } +void SfxInPlaceClient::FormatChanged() +{ + // dummy implementation +} + void SfxInPlaceClient::DeactivateObject() { if ( GetObject().is() ) -- cgit From 82bfeb3e88121190b6ffc777b360af6d7ff87e48 Mon Sep 17 00:00:00 2001 From: os Date: Fri, 22 Oct 2010 07:43:02 +0200 Subject: #i115132# ItemCommand added to replaced menu items --- sfx2/source/view/viewsh.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'sfx2/source/view') diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 5c65c967434f..c3a3eeb49f4e 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -2054,6 +2054,7 @@ void Change( Menu* pMenu, SfxViewShell* pView ) if ( pSlot ) { pMenu->InsertItem( pSlot->GetSlotId(), pMenu->GetItemText( nId ), pMenu->GetItemBits( nId ), nPos ); + pMenu->SetItemCommand( pSlot->GetSlotId(), aCmd ); pMenu->RemoveItem( nPos+1 ); break; } -- cgit From beb032bc52ad5fe35db63493ec3a553f45951443 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 27 Oct 2010 17:08:35 +0200 Subject: calc61: #i115266# handle multiple selection for printing, return valid settings for invalid selection, catch exception from getRenderer --- sfx2/source/view/viewprn.cxx | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'sfx2/source/view') diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 4ed0173be8e1..72a85258e9c3 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -143,18 +143,26 @@ SfxPrinterController::SfxPrinterController( const Any& i_rComplete, aRenderOptions[1].Value = i_rViewProp; aRenderOptions[2].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsPrinter" ) ); aRenderOptions[2].Value <<= sal_True; - Sequence< beans::PropertyValue > aRenderParms( mxRenderable->getRenderer( 0 , getSelectionObject(), aRenderOptions ) ); - int nProps = aRenderParms.getLength(); - for( int i = 0; i < nProps; i++ ) + try { - if( aRenderParms[i].Name.equalsAscii( "ExtraPrintUIOptions" ) ) + Sequence< beans::PropertyValue > aRenderParms( mxRenderable->getRenderer( 0 , getSelectionObject(), aRenderOptions ) ); + int nProps = aRenderParms.getLength(); + for( int i = 0; i < nProps; i++ ) { - Sequence< beans::PropertyValue > aUIProps; - aRenderParms[i].Value >>= aUIProps; - setUIOptions( aUIProps ); - break; + if( aRenderParms[i].Name.equalsAscii( "ExtraPrintUIOptions" ) ) + { + Sequence< beans::PropertyValue > aUIProps; + aRenderParms[i].Value >>= aUIProps; + setUIOptions( aUIProps ); + break; + } } } + catch( lang::IllegalArgumentException& ) + { + // the first renderer should always be available for the UI options, + // but catch the exception to be safe + } } // set some job parameters @@ -234,7 +242,13 @@ Sequence< beans::PropertyValue > SfxPrinterController::getPageParameters( int i_ if( mxRenderable.is() && pPrinter ) { Sequence< beans::PropertyValue > aJobOptions( getMergedOptions() ); - aResult = mxRenderable->getRenderer( i_nPage, getSelectionObject(), aJobOptions ); + try + { + aResult = mxRenderable->getRenderer( i_nPage, getSelectionObject(), aJobOptions ); + } + catch( lang::IllegalArgumentException& ) + { + } } return aResult; } -- cgit From da8aa1f2aa04522f098474fa93898ab8716841d0 Mon Sep 17 00:00:00 2001 From: obo Date: Mon, 8 Nov 2010 10:36:41 +0100 Subject: masterfix DEV300: #i10000# WaE converting negative value '-0x000000001' to 'USHORT' --- sfx2/source/view/viewsh.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sfx2/source/view') diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 5c41ba167c55..ea92507ba13f 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -252,7 +252,7 @@ SfxViewShell_Impl::SfxViewShell_Impl(USHORT const nFlags) , m_bGotOwnership(false) , m_bGotFrameOwnership(false) , m_eScroll(SCROLLING_DEFAULT) -, m_nFamily(-1) // undefined, default set by TemplateDialog +, m_nFamily(0xFFFF) // undefined, default set by TemplateDialog , m_pController(0) , m_pAccExec(0) {} -- cgit