1*6d739b60SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*6d739b60SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*6d739b60SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*6d739b60SAndrew Rist * distributed with this work for additional information 6*6d739b60SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*6d739b60SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*6d739b60SAndrew Rist * "License"); you may not use this file except in compliance 9*6d739b60SAndrew Rist * with the License. You may obtain a copy of the License at 10*6d739b60SAndrew Rist * 11*6d739b60SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*6d739b60SAndrew Rist * 13*6d739b60SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*6d739b60SAndrew Rist * software distributed under the License is distributed on an 15*6d739b60SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*6d739b60SAndrew Rist * KIND, either express or implied. See the License for the 17*6d739b60SAndrew Rist * specific language governing permissions and limitations 18*6d739b60SAndrew Rist * under the License. 19*6d739b60SAndrew Rist * 20*6d739b60SAndrew Rist *************************************************************/ 21*6d739b60SAndrew Rist 22*6d739b60SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_framework.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <framework/acceleratorinfo.hxx> 28cdf0e10cSrcweir 29cdf0e10cSrcweir namespace framework 30cdf0e10cSrcweir { 31cdf0e10cSrcweir 32cdf0e10cSrcweir static pfunc_getCommandURLFromKeyCode _pGetCommandURLFromKeyCode = NULL; 33cdf0e10cSrcweir static pfunc_getKeyCodeFromCommandURL _pGetKeyCodeFromCommandURL = NULL; 34cdf0e10cSrcweir SetCommandURLFromKeyCode(pfunc_getCommandURLFromKeyCode pNewFunc)35cdf0e10cSrcweirpfunc_getCommandURLFromKeyCode SAL_CALL SetCommandURLFromKeyCode( pfunc_getCommandURLFromKeyCode pNewFunc ) 36cdf0e10cSrcweir { 37cdf0e10cSrcweir pfunc_getCommandURLFromKeyCode pOldFunc = _pGetCommandURLFromKeyCode; 38cdf0e10cSrcweir _pGetCommandURLFromKeyCode = pNewFunc; 39cdf0e10cSrcweir 40cdf0e10cSrcweir return pOldFunc; 41cdf0e10cSrcweir } 42cdf0e10cSrcweir GetCommandURLFromKeyCode(const KeyCode & aKeyCode)43cdf0e10cSrcweir::rtl::OUString SAL_CALL GetCommandURLFromKeyCode( const KeyCode& aKeyCode ) 44cdf0e10cSrcweir { 45cdf0e10cSrcweir if ( _pGetCommandURLFromKeyCode ) 46cdf0e10cSrcweir return _pGetCommandURLFromKeyCode( aKeyCode ); 47cdf0e10cSrcweir else 48cdf0e10cSrcweir return rtl::OUString(); 49cdf0e10cSrcweir } 50cdf0e10cSrcweir SetKeyCodeFromCommandURL(pfunc_getKeyCodeFromCommandURL pNewFunc)51cdf0e10cSrcweirpfunc_getKeyCodeFromCommandURL SAL_CALL SetKeyCodeFromCommandURL( pfunc_getKeyCodeFromCommandURL pNewFunc ) 52cdf0e10cSrcweir { 53cdf0e10cSrcweir pfunc_getKeyCodeFromCommandURL pOldFunc = _pGetKeyCodeFromCommandURL; 54cdf0e10cSrcweir _pGetKeyCodeFromCommandURL = pNewFunc; 55cdf0e10cSrcweir 56cdf0e10cSrcweir return pOldFunc; 57cdf0e10cSrcweir } 58cdf0e10cSrcweir GetKeyCodeFromCommandURL(::com::sun::star::uno::Reference<::com::sun::star::frame::XFrame> & rFrame,const rtl::OUString & aCommandURL)59cdf0e10cSrcweirKeyCode SAL_CALL GetKeyCodeFromCommandURL( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const rtl::OUString& aCommandURL ) 60cdf0e10cSrcweir { 61cdf0e10cSrcweir if ( _pGetKeyCodeFromCommandURL ) 62cdf0e10cSrcweir return _pGetKeyCodeFromCommandURL( rFrame, aCommandURL ); 63cdf0e10cSrcweir else 64cdf0e10cSrcweir return KeyCode(); 65cdf0e10cSrcweir } 66cdf0e10cSrcweir 67cdf0e10cSrcweir } 68