diff options
Diffstat (limited to 'sfx2/source/view/viewsh.cxx')
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index a16439698e..6d92dffdc5 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,12 +30,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sfx2.hxx" -#include <svtools/stritem.hxx> -#include <svtools/eitem.hxx> -#include <svtools/whiter.hxx> +#include <svl/stritem.hxx> +#include <svl/eitem.hxx> +#include <svl/whiter.hxx> #include <vcl/msgbox.hxx> #include <vcl/toolbox.hxx> -#include <svtools/intitem.hxx> +#include <svl/intitem.hxx> #include <svtools/sfxecode.hxx> #include <svtools/ehdl.hxx> #include <com/sun/star/frame/XLayoutManager.hpp> @@ -55,12 +55,12 @@ #include <vos/mutex.hxx> #include <tools/urlobj.hxx> #include <unotools/tempfile.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #include <svtools/miscopt.hxx> #include <svtools/soerr.hxx> -#include <svtools/internaloptions.hxx> +#include <unotools/internaloptions.hxx> -#include <svtools/javaoptions.hxx> +#include <unotools/javaoptions.hxx> #include <basic/basmgr.hxx> #include <basic/sbuno.hxx> #include <framework/actiontriggerhelper.hxx> @@ -179,8 +179,8 @@ void SAL_CALL SfxClipboardChangeListener::changedContents( const datatransfer::c } -static ::rtl::OUString RetrieveLabelFromCommand( - const ::rtl::OUString& rCommandURL, +static ::rtl::OUString RetrieveLabelFromCommand( + const ::rtl::OUString& rCommandURL, const css::uno::Reference< css::frame::XFrame >& rFrame ) { static css::uno::WeakReference< frame::XModuleManager > s_xModuleManager; @@ -189,38 +189,38 @@ static ::rtl::OUString RetrieveLabelFromCommand( ::rtl::OUString aLabel; css::uno::Reference< css::frame::XModuleManager > xModuleManager( s_xModuleManager ); css::uno::Reference< css::container::XNameAccess > xNameAccess( s_xNameAccess ); - css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( + css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR( ::comphelper::getProcessServiceFactory(), css::uno::UNO_QUERY_THROW); - + try { if ( !xModuleManager.is() ) { - xModuleManager = css::uno::Reference< css::frame::XModuleManager >( - xSMGR->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ))), + xModuleManager = css::uno::Reference< css::frame::XModuleManager >( + xSMGR->createInstance( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ))), css::uno::UNO_QUERY_THROW ); s_xModuleManager = xModuleManager; } - + ::rtl::OUString aModuleIdentifier = xModuleManager->identify( rFrame ); - + if ( !xNameAccess.is() ) { - xNameAccess = css::uno::Reference< css::container::XNameAccess >( - xSMGR->createInstance( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.UICommandDescription" ))), + xNameAccess = css::uno::Reference< css::container::XNameAccess >( + xSMGR->createInstance( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.UICommandDescription" ))), css::uno::UNO_QUERY_THROW ); s_xNameAccess = xNameAccess; } - + css::uno::Any a = xNameAccess->getByName( aModuleIdentifier ); css::uno::Reference< css::container::XNameAccess > xUICommands; a >>= xUICommands; rtl::OUString aStr; css::uno::Sequence< css::beans::PropertyValue > aPropSeq; - + a = xUICommands->getByName( rCommandURL ); if ( a >>= aPropSeq ) { @@ -238,7 +238,7 @@ static ::rtl::OUString RetrieveLabelFromCommand( catch ( css::uno::Exception& ) { } - + return aLabel; } @@ -435,9 +435,9 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) if( pItemWin ) pItemWin->GrabFocus(); break; - } + } } - } + } } } } @@ -447,7 +447,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) } rReq.Done(); } - break; + break; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_MAIL_SENDDOCASMS: @@ -766,7 +766,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) if ( bEnabled ) { SfxPrinter *pPrinter = GetPrinter(FALSE); - + if ( SID_PRINTDOCDIRECT == nSID ) { rtl::OUString aPrinterName; @@ -777,15 +777,15 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) if ( aPrinterName.getLength() > 0 ) { uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame()->GetFrameInterface() ); - + ::rtl::OUStringBuffer aBuffer( 60 ); - aBuffer.append( RetrieveLabelFromCommand( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrintDefault" )), + aBuffer.append( RetrieveLabelFromCommand( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrintDefault" )), xFrame )); aBuffer.appendAscii( " (" ); aBuffer.append( aPrinterName ); aBuffer.appendAscii( ")" ); - + rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, aBuffer.makeStringAndClear() ) ); } } |