1*2503e1a5SAriel Constenla-Haile /************************************************************** 2*2503e1a5SAriel Constenla-Haile * 3*2503e1a5SAriel Constenla-Haile * Licensed to the Apache Software Foundation (ASF) under one 4*2503e1a5SAriel Constenla-Haile * or more contributor license agreements. See the NOTICE file 5*2503e1a5SAriel Constenla-Haile * distributed with this work for additional information 6*2503e1a5SAriel Constenla-Haile * regarding copyright ownership. The ASF licenses this file 7*2503e1a5SAriel Constenla-Haile * to you under the Apache License, Version 2.0 (the 8*2503e1a5SAriel Constenla-Haile * "License"); you may not use this file except in compliance 9*2503e1a5SAriel Constenla-Haile * with the License. You may obtain a copy of the License at 10*2503e1a5SAriel Constenla-Haile * 11*2503e1a5SAriel Constenla-Haile * http://www.apache.org/licenses/LICENSE-2.0 12*2503e1a5SAriel Constenla-Haile * 13*2503e1a5SAriel Constenla-Haile * Unless required by applicable law or agreed to in writing, 14*2503e1a5SAriel Constenla-Haile * software distributed under the License is distributed on an 15*2503e1a5SAriel Constenla-Haile * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*2503e1a5SAriel Constenla-Haile * KIND, either express or implied. See the License for the 17*2503e1a5SAriel Constenla-Haile * specific language governing permissions and limitations 18*2503e1a5SAriel Constenla-Haile * under the License. 19*2503e1a5SAriel Constenla-Haile * 20*2503e1a5SAriel Constenla-Haile *************************************************************/ 21*2503e1a5SAriel Constenla-Haile 22*2503e1a5SAriel Constenla-Haile #include <uielement/statusbarmerger.hxx> 23*2503e1a5SAriel Constenla-Haile 24*2503e1a5SAriel Constenla-Haile using rtl::OUString; 25*2503e1a5SAriel Constenla-Haile using com::sun::star::frame::XFrame; 26*2503e1a5SAriel Constenla-Haile using com::sun::star::uno::Reference; 27*2503e1a5SAriel Constenla-Haile using com::sun::star::beans::PropertyValue; 28*2503e1a5SAriel Constenla-Haile using com::sun::star::uno::Sequence; 29*2503e1a5SAriel Constenla-Haile 30*2503e1a5SAriel Constenla-Haile namespace framework 31*2503e1a5SAriel Constenla-Haile { 32*2503e1a5SAriel Constenla-Haile namespace { 33*2503e1a5SAriel Constenla-Haile 34*2503e1a5SAriel Constenla-Haile static const char MERGE_STATUSBAR_URL[] = "URL"; 35*2503e1a5SAriel Constenla-Haile static const char MERGE_STATUSBAR_TITLE[] = "Title"; 36*2503e1a5SAriel Constenla-Haile static const char MERGE_STATUSBAR_CONTEXT[] = "Context"; 37*2503e1a5SAriel Constenla-Haile static const char MERGE_STATUSBAR_ALIGN[] = "Alignment"; 38*2503e1a5SAriel Constenla-Haile static const char MERGE_STATUSBAR_AUTOSIZE[] = "AutoSize"; 39*2503e1a5SAriel Constenla-Haile static const char MERGE_STATUSBAR_OWNERDRAW[] = "OwnerDraw"; 40*2503e1a5SAriel Constenla-Haile static const char MERGE_STATUSBAR_WIDTH[] = "Width"; 41*2503e1a5SAriel Constenla-Haile 42*2503e1a5SAriel Constenla-Haile static const char STATUSBAR_ALIGN_LEFT[] = "left"; 43*2503e1a5SAriel Constenla-Haile static const char STATUSBAR_ALIGN_CENTER[] = "center"; 44*2503e1a5SAriel Constenla-Haile static const char STATUSBAR_ALIGN_RIGHT[] = "right"; 45*2503e1a5SAriel Constenla-Haile 46*2503e1a5SAriel Constenla-Haile static const char MERGECOMMAND_ADDAFTER[] = "AddAfter"; 47*2503e1a5SAriel Constenla-Haile static const char MERGECOMMAND_ADDBEFORE[] = "AddBefore"; 48*2503e1a5SAriel Constenla-Haile static const char MERGECOMMAND_REPLACE[] = "Replace"; 49*2503e1a5SAriel Constenla-Haile static const char MERGECOMMAND_REMOVE[] = "Remove"; 50*2503e1a5SAriel Constenla-Haile 51*2503e1a5SAriel Constenla-Haile static const char MERGEFALLBACK_ADDLAST[] = "AddLast"; 52*2503e1a5SAriel Constenla-Haile static const char MERGEFALLBACK_ADDFIRST[] = "AddFirst"; 53*2503e1a5SAriel Constenla-Haile static const char MERGEFALLBACK_IGNORE[] = "Ignore"; 54*2503e1a5SAriel Constenla-Haile 55*2503e1a5SAriel Constenla-Haile 56*2503e1a5SAriel Constenla-Haile static void lcl_ConvertSequenceToValues( 57*2503e1a5SAriel Constenla-Haile const Sequence< PropertyValue > &rSequence, 58*2503e1a5SAriel Constenla-Haile AddonStatusbarItem &rItem ) 59*2503e1a5SAriel Constenla-Haile { 60*2503e1a5SAriel Constenla-Haile OUString sAlignment; 61*2503e1a5SAriel Constenla-Haile sal_Bool bAutoSize = sal_False; 62*2503e1a5SAriel Constenla-Haile sal_Bool bOwnerDraw = sal_False; 63*2503e1a5SAriel Constenla-Haile 64*2503e1a5SAriel Constenla-Haile PropertyValue aPropVal; 65*2503e1a5SAriel Constenla-Haile for ( sal_Int32 i = 0; i < rSequence.getLength(); i++ ) 66*2503e1a5SAriel Constenla-Haile { 67*2503e1a5SAriel Constenla-Haile aPropVal = rSequence[i]; 68*2503e1a5SAriel Constenla-Haile if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_URL ) ) ) 69*2503e1a5SAriel Constenla-Haile aPropVal.Value >>= rItem.aCommandURL; 70*2503e1a5SAriel Constenla-Haile else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_TITLE ) ) ) 71*2503e1a5SAriel Constenla-Haile aPropVal.Value >>= rItem.aLabel; 72*2503e1a5SAriel Constenla-Haile else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_CONTEXT ) ) ) 73*2503e1a5SAriel Constenla-Haile aPropVal.Value >>= rItem.aContext; 74*2503e1a5SAriel Constenla-Haile else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_ALIGN ) ) ) 75*2503e1a5SAriel Constenla-Haile aPropVal.Value >>= sAlignment; 76*2503e1a5SAriel Constenla-Haile else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_AUTOSIZE ) ) ) 77*2503e1a5SAriel Constenla-Haile aPropVal.Value >>= bAutoSize; 78*2503e1a5SAriel Constenla-Haile else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_OWNERDRAW ) ) ) 79*2503e1a5SAriel Constenla-Haile aPropVal.Value >>= bOwnerDraw; 80*2503e1a5SAriel Constenla-Haile else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_WIDTH ) ) ) 81*2503e1a5SAriel Constenla-Haile { 82*2503e1a5SAriel Constenla-Haile sal_Int32 aWidth = 0; 83*2503e1a5SAriel Constenla-Haile aPropVal.Value >>= aWidth; 84*2503e1a5SAriel Constenla-Haile rItem.nWidth = sal_uInt16( aWidth ); 85*2503e1a5SAriel Constenla-Haile } 86*2503e1a5SAriel Constenla-Haile } 87*2503e1a5SAriel Constenla-Haile 88*2503e1a5SAriel Constenla-Haile sal_uInt16 nItemBits(0); 89*2503e1a5SAriel Constenla-Haile if ( bAutoSize ) 90*2503e1a5SAriel Constenla-Haile nItemBits |= SIB_AUTOSIZE; 91*2503e1a5SAriel Constenla-Haile if ( bOwnerDraw ) 92*2503e1a5SAriel Constenla-Haile nItemBits |= SIB_USERDRAW; 93*2503e1a5SAriel Constenla-Haile if ( sAlignment.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( STATUSBAR_ALIGN_CENTER ))) 94*2503e1a5SAriel Constenla-Haile nItemBits |= SIB_CENTER; 95*2503e1a5SAriel Constenla-Haile else if ( sAlignment.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( STATUSBAR_ALIGN_RIGHT ))) 96*2503e1a5SAriel Constenla-Haile nItemBits |= SIB_RIGHT; 97*2503e1a5SAriel Constenla-Haile else 98*2503e1a5SAriel Constenla-Haile // if unset, defaults to left alignment 99*2503e1a5SAriel Constenla-Haile nItemBits |= SIB_LEFT; 100*2503e1a5SAriel Constenla-Haile rItem.nItemBits = nItemBits; 101*2503e1a5SAriel Constenla-Haile } 102*2503e1a5SAriel Constenla-Haile 103*2503e1a5SAriel Constenla-Haile static void lcl_CreateStatusbarItem( StatusBar* pStatusbar, 104*2503e1a5SAriel Constenla-Haile sal_uInt16 nPos, 105*2503e1a5SAriel Constenla-Haile sal_uInt16 nItemId, 106*2503e1a5SAriel Constenla-Haile const AddonStatusbarItem& rAddonItem ) 107*2503e1a5SAriel Constenla-Haile { 108*2503e1a5SAriel Constenla-Haile pStatusbar->InsertItem( nItemId, 109*2503e1a5SAriel Constenla-Haile rAddonItem.nWidth, 110*2503e1a5SAriel Constenla-Haile rAddonItem.nItemBits, 111*2503e1a5SAriel Constenla-Haile STATUSBAR_OFFSET, 112*2503e1a5SAriel Constenla-Haile nPos ); 113*2503e1a5SAriel Constenla-Haile pStatusbar->SetItemCommand( nItemId, rAddonItem.aCommandURL ); 114*2503e1a5SAriel Constenla-Haile pStatusbar->SetQuickHelpText( nItemId, rAddonItem.aLabel ); 115*2503e1a5SAriel Constenla-Haile pStatusbar->SetAccessibleName( nItemId, rAddonItem.aLabel ); 116*2503e1a5SAriel Constenla-Haile 117*2503e1a5SAriel Constenla-Haile // add-on specific data 118*2503e1a5SAriel Constenla-Haile AddonStatusbarItemData *pUserData = new AddonStatusbarItemData; 119*2503e1a5SAriel Constenla-Haile pUserData->aLabel = rAddonItem.aLabel; 120*2503e1a5SAriel Constenla-Haile pUserData->nItemBits = rAddonItem.nItemBits; 121*2503e1a5SAriel Constenla-Haile pStatusbar->SetItemData( nItemId, pUserData ); 122*2503e1a5SAriel Constenla-Haile } 123*2503e1a5SAriel Constenla-Haile 124*2503e1a5SAriel Constenla-Haile static bool lcl_MergeItems( StatusBar* pStatusbar, 125*2503e1a5SAriel Constenla-Haile sal_uInt16 nPos, 126*2503e1a5SAriel Constenla-Haile sal_uInt16 nModIndex, 127*2503e1a5SAriel Constenla-Haile sal_uInt16& rItemId, 128*2503e1a5SAriel Constenla-Haile const ::rtl::OUString& rModuleIdentifier, 129*2503e1a5SAriel Constenla-Haile const AddonStatusbarItemContainer& rAddonItems ) 130*2503e1a5SAriel Constenla-Haile { 131*2503e1a5SAriel Constenla-Haile const sal_uInt16 nSize( rAddonItems.size() ); 132*2503e1a5SAriel Constenla-Haile for ( sal_Int32 i = 0; i < nSize; i++ ) 133*2503e1a5SAriel Constenla-Haile { 134*2503e1a5SAriel Constenla-Haile const AddonStatusbarItem& rItem = rAddonItems[i]; 135*2503e1a5SAriel Constenla-Haile if ( !StatusbarMerger::IsCorrectContext( rItem.aContext, rModuleIdentifier ) ) 136*2503e1a5SAriel Constenla-Haile continue; 137*2503e1a5SAriel Constenla-Haile 138*2503e1a5SAriel Constenla-Haile sal_uInt16 nInsPos = nPos + nModIndex + i; 139*2503e1a5SAriel Constenla-Haile if ( nInsPos > pStatusbar->GetItemCount() ) 140*2503e1a5SAriel Constenla-Haile nInsPos = STATUSBAR_APPEND; 141*2503e1a5SAriel Constenla-Haile 142*2503e1a5SAriel Constenla-Haile lcl_CreateStatusbarItem( pStatusbar, nInsPos, rItemId, rItem ); 143*2503e1a5SAriel Constenla-Haile ++rItemId; 144*2503e1a5SAriel Constenla-Haile } 145*2503e1a5SAriel Constenla-Haile 146*2503e1a5SAriel Constenla-Haile return true; 147*2503e1a5SAriel Constenla-Haile } 148*2503e1a5SAriel Constenla-Haile 149*2503e1a5SAriel Constenla-Haile static bool lcl_ReplaceItem( StatusBar* pStatusbar, 150*2503e1a5SAriel Constenla-Haile sal_uInt16 nPos, 151*2503e1a5SAriel Constenla-Haile sal_uInt16& rItemId, 152*2503e1a5SAriel Constenla-Haile const ::rtl::OUString& rModuleIdentifier, 153*2503e1a5SAriel Constenla-Haile const AddonStatusbarItemContainer& rAddonToolbarItems ) 154*2503e1a5SAriel Constenla-Haile { 155*2503e1a5SAriel Constenla-Haile pStatusbar->RemoveItem( pStatusbar->GetItemId( nPos ) ); 156*2503e1a5SAriel Constenla-Haile return lcl_MergeItems( pStatusbar, nPos, 0, rItemId, rModuleIdentifier, rAddonToolbarItems ); 157*2503e1a5SAriel Constenla-Haile } 158*2503e1a5SAriel Constenla-Haile 159*2503e1a5SAriel Constenla-Haile static bool lcl_RemoveItems( StatusBar* pStatusbar, 160*2503e1a5SAriel Constenla-Haile sal_uInt16 nPos, 161*2503e1a5SAriel Constenla-Haile const ::rtl::OUString& rMergeCommandParameter ) 162*2503e1a5SAriel Constenla-Haile { 163*2503e1a5SAriel Constenla-Haile sal_Int32 nCount = rMergeCommandParameter.toInt32(); 164*2503e1a5SAriel Constenla-Haile if ( nCount > 0 ) 165*2503e1a5SAriel Constenla-Haile { 166*2503e1a5SAriel Constenla-Haile for ( sal_Int32 i = 0; i < nCount; i++ ) 167*2503e1a5SAriel Constenla-Haile { 168*2503e1a5SAriel Constenla-Haile if ( nPos < pStatusbar->GetItemCount() ) 169*2503e1a5SAriel Constenla-Haile pStatusbar->RemoveItem( nPos ); 170*2503e1a5SAriel Constenla-Haile } 171*2503e1a5SAriel Constenla-Haile } 172*2503e1a5SAriel Constenla-Haile return true; 173*2503e1a5SAriel Constenla-Haile } 174*2503e1a5SAriel Constenla-Haile 175*2503e1a5SAriel Constenla-Haile /* 176*2503e1a5SAriel Constenla-Haile static ::cppu::OWeakObject* CreateController( 177*2503e1a5SAriel Constenla-Haile ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMGR, 178*2503e1a5SAriel Constenla-Haile ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame, 179*2503e1a5SAriel Constenla-Haile StatusBar* pStatusbar, 180*2503e1a5SAriel Constenla-Haile const ::rtl::OUString& rCommandURL, 181*2503e1a5SAriel Constenla-Haile sal_uInt16 nId, 182*2503e1a5SAriel Constenla-Haile sal_uInt16 nWidth, 183*2503e1a5SAriel Constenla-Haile const ::rtl::OUString& rControlType ); 184*2503e1a5SAriel Constenla-Haile 185*2503e1a5SAriel Constenla-Haile */ 186*2503e1a5SAriel Constenla-Haile } 187*2503e1a5SAriel Constenla-Haile 188*2503e1a5SAriel Constenla-Haile bool StatusbarMerger::IsCorrectContext( 189*2503e1a5SAriel Constenla-Haile const OUString& rContext, 190*2503e1a5SAriel Constenla-Haile const OUString& rModuleIdentifier ) 191*2503e1a5SAriel Constenla-Haile { 192*2503e1a5SAriel Constenla-Haile return (( rContext.getLength() == 0 ) || ( rContext.indexOf( rModuleIdentifier ) >= 0 )); 193*2503e1a5SAriel Constenla-Haile } 194*2503e1a5SAriel Constenla-Haile 195*2503e1a5SAriel Constenla-Haile bool StatusbarMerger::ConvertSeqSeqToVector( 196*2503e1a5SAriel Constenla-Haile const Sequence< Sequence< PropertyValue > > &rSequence, 197*2503e1a5SAriel Constenla-Haile AddonStatusbarItemContainer& rContainer ) 198*2503e1a5SAriel Constenla-Haile { 199*2503e1a5SAriel Constenla-Haile for ( sal_Int32 i = 0; i < rSequence.getLength(); i++ ) 200*2503e1a5SAriel Constenla-Haile { 201*2503e1a5SAriel Constenla-Haile AddonStatusbarItem aStatusBarItem; 202*2503e1a5SAriel Constenla-Haile lcl_ConvertSequenceToValues( rSequence[i], aStatusBarItem ); 203*2503e1a5SAriel Constenla-Haile rContainer.push_back( aStatusBarItem ); 204*2503e1a5SAriel Constenla-Haile } 205*2503e1a5SAriel Constenla-Haile 206*2503e1a5SAriel Constenla-Haile return true; 207*2503e1a5SAriel Constenla-Haile } 208*2503e1a5SAriel Constenla-Haile 209*2503e1a5SAriel Constenla-Haile sal_uInt16 StatusbarMerger::FindReferencePos( 210*2503e1a5SAriel Constenla-Haile StatusBar* pStatusbar, 211*2503e1a5SAriel Constenla-Haile const OUString& rReferencePoint ) 212*2503e1a5SAriel Constenla-Haile { 213*2503e1a5SAriel Constenla-Haile for ( sal_uInt16 nPos = 0; nPos < pStatusbar->GetItemCount(); nPos++ ) 214*2503e1a5SAriel Constenla-Haile { 215*2503e1a5SAriel Constenla-Haile const ::rtl::OUString rCmd = pStatusbar->GetItemCommand( pStatusbar->GetItemId( nPos ) ); 216*2503e1a5SAriel Constenla-Haile if ( rReferencePoint == rCmd ) 217*2503e1a5SAriel Constenla-Haile return nPos; 218*2503e1a5SAriel Constenla-Haile } 219*2503e1a5SAriel Constenla-Haile 220*2503e1a5SAriel Constenla-Haile return STATUSBAR_ITEM_NOTFOUND; 221*2503e1a5SAriel Constenla-Haile } 222*2503e1a5SAriel Constenla-Haile 223*2503e1a5SAriel Constenla-Haile bool StatusbarMerger::ProcessMergeOperation( 224*2503e1a5SAriel Constenla-Haile StatusBar* pStatusbar, 225*2503e1a5SAriel Constenla-Haile sal_uInt16 nPos, 226*2503e1a5SAriel Constenla-Haile sal_uInt16& rItemId, 227*2503e1a5SAriel Constenla-Haile const ::rtl::OUString& rModuleIdentifier, 228*2503e1a5SAriel Constenla-Haile const ::rtl::OUString& rMergeCommand, 229*2503e1a5SAriel Constenla-Haile const ::rtl::OUString& rMergeCommandParameter, 230*2503e1a5SAriel Constenla-Haile const AddonStatusbarItemContainer& rItems ) 231*2503e1a5SAriel Constenla-Haile { 232*2503e1a5SAriel Constenla-Haile if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDAFTER ) ) ) 233*2503e1a5SAriel Constenla-Haile return lcl_MergeItems( pStatusbar, nPos, 1, rItemId, rModuleIdentifier, rItems ); 234*2503e1a5SAriel Constenla-Haile else if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDBEFORE ) ) ) 235*2503e1a5SAriel Constenla-Haile return lcl_MergeItems( pStatusbar, nPos, 0, rItemId, rModuleIdentifier, rItems ); 236*2503e1a5SAriel Constenla-Haile else if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_REPLACE ) ) ) 237*2503e1a5SAriel Constenla-Haile return lcl_ReplaceItem( pStatusbar, nPos, rItemId, rModuleIdentifier, rItems ); 238*2503e1a5SAriel Constenla-Haile else if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_REMOVE ) ) ) 239*2503e1a5SAriel Constenla-Haile return lcl_RemoveItems( pStatusbar, nPos, rMergeCommandParameter ); 240*2503e1a5SAriel Constenla-Haile 241*2503e1a5SAriel Constenla-Haile return false; 242*2503e1a5SAriel Constenla-Haile } 243*2503e1a5SAriel Constenla-Haile 244*2503e1a5SAriel Constenla-Haile bool StatusbarMerger::ProcessMergeFallback( 245*2503e1a5SAriel Constenla-Haile StatusBar* pStatusbar, 246*2503e1a5SAriel Constenla-Haile sal_uInt16 /*nPos*/, 247*2503e1a5SAriel Constenla-Haile sal_uInt16& rItemId, 248*2503e1a5SAriel Constenla-Haile const ::rtl::OUString& rModuleIdentifier, 249*2503e1a5SAriel Constenla-Haile const ::rtl::OUString& rMergeCommand, 250*2503e1a5SAriel Constenla-Haile const ::rtl::OUString& rMergeFallback, 251*2503e1a5SAriel Constenla-Haile const AddonStatusbarItemContainer& rItems ) 252*2503e1a5SAriel Constenla-Haile { 253*2503e1a5SAriel Constenla-Haile // fallback IGNORE or REPLACE/REMOVE item not found 254*2503e1a5SAriel Constenla-Haile if (( rMergeFallback.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGEFALLBACK_IGNORE ))) || 255*2503e1a5SAriel Constenla-Haile ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_REPLACE ))) || 256*2503e1a5SAriel Constenla-Haile ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_REMOVE ))) ) 257*2503e1a5SAriel Constenla-Haile { 258*2503e1a5SAriel Constenla-Haile return true; 259*2503e1a5SAriel Constenla-Haile } 260*2503e1a5SAriel Constenla-Haile else if (( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDBEFORE ))) || 261*2503e1a5SAriel Constenla-Haile ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDAFTER ))) ) 262*2503e1a5SAriel Constenla-Haile { 263*2503e1a5SAriel Constenla-Haile if ( rMergeFallback.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGEFALLBACK_ADDFIRST ))) 264*2503e1a5SAriel Constenla-Haile return lcl_MergeItems( pStatusbar, 0, 0, rItemId, rModuleIdentifier, rItems ); 265*2503e1a5SAriel Constenla-Haile else if ( rMergeFallback.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGEFALLBACK_ADDLAST ))) 266*2503e1a5SAriel Constenla-Haile return lcl_MergeItems( pStatusbar, STATUSBAR_APPEND, 0, rItemId, rModuleIdentifier, rItems ); 267*2503e1a5SAriel Constenla-Haile } 268*2503e1a5SAriel Constenla-Haile 269*2503e1a5SAriel Constenla-Haile return false; 270*2503e1a5SAriel Constenla-Haile } 271*2503e1a5SAriel Constenla-Haile 272*2503e1a5SAriel Constenla-Haile 273*2503e1a5SAriel Constenla-Haile } 274