summaryrefslogtreecommitdiff
path: root/framework/source/fwi
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2015-11-17 12:08:30 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2015-11-17 12:12:11 +0100
commit81ff7cfddb8e6786529f0a878007e9d399d4908a (patch)
tree3d944085db21ebcfa18c38631d2aaa3556e6c7a1 /framework/source/fwi
parent2e88fbd747ef2fc7e2d266f7f15db37ecab7662d (diff)
tdf#95845 Add methods for menu labels to CommandInfoProvider
Change-Id: Ibf6a26940ec194f540255584776f8ebcefbb94ae
Diffstat (limited to 'framework/source/fwi')
-rw-r--r--framework/source/fwi/helper/mischelper.cxx71
1 files changed, 0 insertions, 71 deletions
diff --git a/framework/source/fwi/helper/mischelper.cxx b/framework/source/fwi/helper/mischelper.cxx
index 7201de053ba9..f8a1f753aafc 100644
--- a/framework/source/fwi/helper/mischelper.cxx
+++ b/framework/source/fwi/helper/mischelper.cxx
@@ -59,77 +59,6 @@ uno::Reference< linguistic2::XLanguageGuessing > LanguageGuessingHelper::GetGues
return m_xLanguageGuesser;
}
-OUString RetrieveLabelFromCommand(
- const OUString& aCmdURL,
- const uno::Reference< uno::XComponentContext >& _xContext,
- uno::Reference< container::XNameAccess >& _xUICommandLabels,
- const uno::Reference< frame::XFrame >& _xFrame,
- OUString& _rModuleIdentifier,
- bool& _rIni,
- const sal_Char* _pName)
-{
- OUString aLabel;
-
- // Retrieve popup menu labels
- if ( !_xUICommandLabels.is() )
- {
- try
- {
- if ( !_rIni )
- {
- _rIni = true;
- Reference< XModuleManager2 > xModuleManager = ModuleManager::create( _xContext );
-
- try
- {
- _rModuleIdentifier = xModuleManager->identify( _xFrame );
- }
- catch( const Exception& )
- {
- }
- }
-
- Reference< XNameAccess > xNameAccess = frame::theUICommandDescription::get( _xContext );
- xNameAccess->getByName( _rModuleIdentifier ) >>= _xUICommandLabels;
- }
- catch ( const Exception& )
- {
- }
- }
-
- if ( _xUICommandLabels.is() )
- {
- try
- {
- if ( !aCmdURL.isEmpty() )
- {
- OUString aStr;
- Sequence< PropertyValue > aPropSeq;
- if( _xUICommandLabels->hasByName( aCmdURL ) )
- {
- if ( _xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq )
- {
- for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
- {
- if ( aPropSeq[i].Name.equalsAscii( _pName/*"Label"*/ ))
- {
- aPropSeq[i].Value >>= aStr;
- break;
- }
- }
- }
- }
- aLabel = aStr;
- }
- }
- catch ( const css::uno::Exception& )
- {
- }
- }
-
- return aLabel;
-}
-
void FillLangItems( std::set< OUString > &rLangItems,
const uno::Reference< frame::XFrame > & rxFrame,
const LanguageGuessingHelper & rLangGuessHelper,