1*d119d52dSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*d119d52dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*d119d52dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*d119d52dSAndrew Rist * distributed with this work for additional information 6*d119d52dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*d119d52dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*d119d52dSAndrew Rist * "License"); you may not use this file except in compliance 9*d119d52dSAndrew Rist * with the License. You may obtain a copy of the License at 10*d119d52dSAndrew Rist * 11*d119d52dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*d119d52dSAndrew Rist * 13*d119d52dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*d119d52dSAndrew Rist * software distributed under the License is distributed on an 15*d119d52dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d119d52dSAndrew Rist * KIND, either express or implied. See the License for the 17*d119d52dSAndrew Rist * specific language governing permissions and limitations 18*d119d52dSAndrew Rist * under the License. 19*d119d52dSAndrew Rist * 20*d119d52dSAndrew Rist *************************************************************/ 21*d119d52dSAndrew Rist 22*d119d52dSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_sfx2.hxx" 26cdf0e10cSrcweir #include <com/sun/star/uno/Reference.hxx> 27cdf0e10cSrcweir #include <com/sun/star/frame/XFrame.hpp> 28cdf0e10cSrcweir #include "sal/config.h" 29cdf0e10cSrcweir 30cdf0e10cSrcweir #include <vos/mutex.hxx> 31cdf0e10cSrcweir #include <vcl/svapp.hxx> 32cdf0e10cSrcweir 33cdf0e10cSrcweir #include "workwin.hxx" 34cdf0e10cSrcweir #include <sfx2/frame.hxx> 35cdf0e10cSrcweir RefreshToolbars(::com::sun::star::uno::Reference<::com::sun::star::frame::XFrame> & xFrame)36cdf0e10cSrcweirvoid SAL_CALL RefreshToolbars( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& xFrame ) 37cdf0e10cSrcweir { 38cdf0e10cSrcweir ::vos::OGuard aGuard( Application::GetSolarMutex() ); 39cdf0e10cSrcweir if ( xFrame.is() ) 40cdf0e10cSrcweir { 41cdf0e10cSrcweir SfxFrame* pFrame=0; 42cdf0e10cSrcweir for ( pFrame = SfxFrame::GetFirst(); pFrame; pFrame = SfxFrame::GetNext( *pFrame ) ) 43cdf0e10cSrcweir { 44cdf0e10cSrcweir if ( pFrame->GetFrameInterface() == xFrame ) 45cdf0e10cSrcweir break; 46cdf0e10cSrcweir } 47cdf0e10cSrcweir 48cdf0e10cSrcweir if ( pFrame ) 49cdf0e10cSrcweir { 50cdf0e10cSrcweir SfxWorkWindow* pWrkWin = pFrame->GetWorkWindow_Impl(); 51cdf0e10cSrcweir if ( pWrkWin ) 52cdf0e10cSrcweir pWrkWin->UpdateObjectBars_Impl(); 53cdf0e10cSrcweir } 54cdf0e10cSrcweir } 55cdf0e10cSrcweir } 56