toolbarmanager.cxx (dccf82be) | toolbarmanager.cxx (d21a9fb0) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 971 unchanged lines hidden (view full) --- 980 aPropValue.Value <<= m_xFrame; 981 aPropertyVector.push_back( makeAny( aPropValue )); 982 aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ServiceManager" )); 983 aPropValue.Value <<= m_xServiceManager; 984 aPropertyVector.push_back( makeAny( aPropValue )); 985 aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" )); 986 aPropValue.Value <<= xToolbarWindow; 987 aPropertyVector.push_back( makeAny( aPropValue )); | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 971 unchanged lines hidden (view full) --- 980 aPropValue.Value <<= m_xFrame; 981 aPropertyVector.push_back( makeAny( aPropValue )); 982 aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ServiceManager" )); 983 aPropValue.Value <<= m_xServiceManager; 984 aPropertyVector.push_back( makeAny( aPropValue )); 985 aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" )); 986 aPropValue.Value <<= xToolbarWindow; 987 aPropertyVector.push_back( makeAny( aPropValue )); |
988 aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Identifier" )); 989 aPropValue.Value = uno::makeAny( nId ); 990 aPropertyVector.push_back( uno::makeAny( aPropValue ) ); |
|
988 989 if ( nWidth > 0 ) 990 { 991 aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" )); 992 aPropValue.Value <<= nWidth; 993 aPropertyVector.push_back( makeAny( aPropValue )); 994 } 995 --- 96 unchanged lines hidden (view full) --- 1092 aPropValue.Value <<= m_xServiceManager; 1093 aPropertyVector.push_back( makeAny( aPropValue )); 1094 aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" )); 1095 aPropValue.Value <<= xToolbarWindow; 1096 aPropertyVector.push_back( makeAny( aPropValue )); 1097 aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleIdentifier" )); 1098 aPropValue.Value <<= m_aModuleIdentifier; 1099 aPropertyVector.push_back( makeAny( aPropValue )); | 991 992 if ( nWidth > 0 ) 993 { 994 aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" )); 995 aPropValue.Value <<= nWidth; 996 aPropertyVector.push_back( makeAny( aPropValue )); 997 } 998 --- 96 unchanged lines hidden (view full) --- 1095 aPropValue.Value <<= m_xServiceManager; 1096 aPropertyVector.push_back( makeAny( aPropValue )); 1097 aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" )); 1098 aPropValue.Value <<= xToolbarWindow; 1099 aPropertyVector.push_back( makeAny( aPropValue )); 1100 aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleIdentifier" )); 1101 aPropValue.Value <<= m_aModuleIdentifier; 1102 aPropertyVector.push_back( makeAny( aPropValue )); |
1103 aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Identifier" )); 1104 aPropValue.Value = uno::makeAny( nId ); 1105 aPropertyVector.push_back( uno::makeAny( aPropValue ) ); |
|
1100 1101 if ( nWidth > 0 ) 1102 { 1103 aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" )); 1104 aPropValue.Value <<= nWidth; 1105 aPropertyVector.push_back( makeAny( aPropValue )); 1106 } 1107 --- 199 unchanged lines hidden (view full) --- 1307 if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_COMMANDURL, ITEM_DESCRIPTOR_COMMANDURL_LEN )) 1308 { 1309 aProp[i].Value >>= aCommandURL; 1310 if ( aCommandURL.compareToAscii(MENUPREFIX, RTL_CONSTASCII_LENGTH(MENUPREFIX) ) == 0 ) 1311 { 1312 try 1313 { 1314 Reference< XIndexAccess > xMenuContainer; | 1106 1107 if ( nWidth > 0 ) 1108 { 1109 aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" )); 1110 aPropValue.Value <<= nWidth; 1111 aPropertyVector.push_back( makeAny( aPropValue )); 1112 } 1113 --- 199 unchanged lines hidden (view full) --- 1313 if ( aProp[i].Name.equalsAsciiL( ITEM_DESCRIPTOR_COMMANDURL, ITEM_DESCRIPTOR_COMMANDURL_LEN )) 1314 { 1315 aProp[i].Value >>= aCommandURL; 1316 if ( aCommandURL.compareToAscii(MENUPREFIX, RTL_CONSTASCII_LENGTH(MENUPREFIX) ) == 0 ) 1317 { 1318 try 1319 { 1320 Reference< XIndexAccess > xMenuContainer; |
1315 if ( m_xDocUICfgMgr.is() ) | 1321 if ( m_xDocUICfgMgr.is() && 1322 m_xDocUICfgMgr->hasSettings( aCommandURL ) ) |
1316 xMenuContainer = m_xDocUICfgMgr->getSettings( aCommandURL, sal_False ); | 1323 xMenuContainer = m_xDocUICfgMgr->getSettings( aCommandURL, sal_False ); |
1317 if ( !xMenuContainer.is() && m_xUICfgMgr.is() ) | 1324 if ( !xMenuContainer.is() && 1325 m_xUICfgMgr.is() && 1326 m_xUICfgMgr->hasSettings( aCommandURL ) ) |
1318 xMenuContainer = m_xUICfgMgr->getSettings( aCommandURL, sal_False ); 1319 if ( xMenuContainer.is() && xMenuContainer->getCount() ) 1320 { 1321 Sequence< PropertyValue > aProps; 1322 // drop down menu info is currently 1323 // the first ( and only ) menu 1324 // in the menusettings container 1325 xMenuContainer->getByIndex(0) >>= aProps; --- 30 unchanged lines hidden (view full) --- 1356 } 1357 1358 if (( nType == ::com::sun::star::ui::ItemType::DEFAULT ) && ( aCommandURL.getLength() > 0 )) 1359 { 1360 ::rtl::OUString aString( RetrieveLabelFromCommand( aCommandURL )); 1361 1362 sal_uInt16 nItemBits = ConvertStyleToToolboxItemBits( nStyle ); 1363 if ( aMenuDesc.is() ) | 1327 xMenuContainer = m_xUICfgMgr->getSettings( aCommandURL, sal_False ); 1328 if ( xMenuContainer.is() && xMenuContainer->getCount() ) 1329 { 1330 Sequence< PropertyValue > aProps; 1331 // drop down menu info is currently 1332 // the first ( and only ) menu 1333 // in the menusettings container 1334 xMenuContainer->getByIndex(0) >>= aProps; --- 30 unchanged lines hidden (view full) --- 1365 } 1366 1367 if (( nType == ::com::sun::star::ui::ItemType::DEFAULT ) && ( aCommandURL.getLength() > 0 )) 1368 { 1369 ::rtl::OUString aString( RetrieveLabelFromCommand( aCommandURL )); 1370 1371 sal_uInt16 nItemBits = ConvertStyleToToolboxItemBits( nStyle ); 1372 if ( aMenuDesc.is() ) |
1373 { |
|
1364 m_aMenuMap[ nId ] = aMenuDesc; | 1374 m_aMenuMap[ nId ] = aMenuDesc; |
1375 nItemBits |= TIB_DROPDOWNONLY; 1376 } |
|
1365 m_pToolBar->InsertItem( nId, aString, nItemBits ); 1366 m_pToolBar->SetItemCommand( nId, aCommandURL ); 1367 if ( aTooltip.getLength() ) 1368 { 1369 m_pToolBar->SetQuickHelpText( nId, aTooltip ); 1370 } 1371 else 1372 { --- 979 unchanged lines hidden --- | 1377 m_pToolBar->InsertItem( nId, aString, nItemBits ); 1378 m_pToolBar->SetItemCommand( nId, aCommandURL ); 1379 if ( aTooltip.getLength() ) 1380 { 1381 m_pToolBar->SetQuickHelpText( nId, aTooltip ); 1382 } 1383 else 1384 { --- 979 unchanged lines hidden --- |