12503e1a5SAriel Constenla-Haile /**************************************************************
22503e1a5SAriel Constenla-Haile *
32503e1a5SAriel Constenla-Haile * Licensed to the Apache Software Foundation (ASF) under one
42503e1a5SAriel Constenla-Haile * or more contributor license agreements. See the NOTICE file
52503e1a5SAriel Constenla-Haile * distributed with this work for additional information
62503e1a5SAriel Constenla-Haile * regarding copyright ownership. The ASF licenses this file
72503e1a5SAriel Constenla-Haile * to you under the Apache License, Version 2.0 (the
82503e1a5SAriel Constenla-Haile * "License"); you may not use this file except in compliance
92503e1a5SAriel Constenla-Haile * with the License. You may obtain a copy of the License at
102503e1a5SAriel Constenla-Haile *
112503e1a5SAriel Constenla-Haile * http://www.apache.org/licenses/LICENSE-2.0
122503e1a5SAriel Constenla-Haile *
132503e1a5SAriel Constenla-Haile * Unless required by applicable law or agreed to in writing,
142503e1a5SAriel Constenla-Haile * software distributed under the License is distributed on an
152503e1a5SAriel Constenla-Haile * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
162503e1a5SAriel Constenla-Haile * KIND, either express or implied. See the License for the
172503e1a5SAriel Constenla-Haile * specific language governing permissions and limitations
182503e1a5SAriel Constenla-Haile * under the License.
192503e1a5SAriel Constenla-Haile *
202503e1a5SAriel Constenla-Haile *************************************************************/
212503e1a5SAriel Constenla-Haile
22*bfea5108SArmin Le Grand // MARKER(update_precomp.py): autogen include statement, do not remove
23*bfea5108SArmin Le Grand #include "precompiled_framework.hxx"
24*bfea5108SArmin Le Grand
252503e1a5SAriel Constenla-Haile #include <uielement/statusbarmerger.hxx>
262503e1a5SAriel Constenla-Haile
272503e1a5SAriel Constenla-Haile using rtl::OUString;
282503e1a5SAriel Constenla-Haile using com::sun::star::frame::XFrame;
292503e1a5SAriel Constenla-Haile using com::sun::star::uno::Reference;
302503e1a5SAriel Constenla-Haile using com::sun::star::beans::PropertyValue;
312503e1a5SAriel Constenla-Haile using com::sun::star::uno::Sequence;
322503e1a5SAriel Constenla-Haile
332503e1a5SAriel Constenla-Haile namespace framework
342503e1a5SAriel Constenla-Haile {
352503e1a5SAriel Constenla-Haile namespace {
362503e1a5SAriel Constenla-Haile
372503e1a5SAriel Constenla-Haile static const char MERGE_STATUSBAR_URL[] = "URL";
382503e1a5SAriel Constenla-Haile static const char MERGE_STATUSBAR_TITLE[] = "Title";
392503e1a5SAriel Constenla-Haile static const char MERGE_STATUSBAR_CONTEXT[] = "Context";
402503e1a5SAriel Constenla-Haile static const char MERGE_STATUSBAR_ALIGN[] = "Alignment";
412503e1a5SAriel Constenla-Haile static const char MERGE_STATUSBAR_AUTOSIZE[] = "AutoSize";
422503e1a5SAriel Constenla-Haile static const char MERGE_STATUSBAR_OWNERDRAW[] = "OwnerDraw";
432503e1a5SAriel Constenla-Haile static const char MERGE_STATUSBAR_WIDTH[] = "Width";
442503e1a5SAriel Constenla-Haile
452503e1a5SAriel Constenla-Haile static const char STATUSBAR_ALIGN_LEFT[] = "left";
462503e1a5SAriel Constenla-Haile static const char STATUSBAR_ALIGN_CENTER[] = "center";
472503e1a5SAriel Constenla-Haile static const char STATUSBAR_ALIGN_RIGHT[] = "right";
482503e1a5SAriel Constenla-Haile
492503e1a5SAriel Constenla-Haile static const char MERGECOMMAND_ADDAFTER[] = "AddAfter";
502503e1a5SAriel Constenla-Haile static const char MERGECOMMAND_ADDBEFORE[] = "AddBefore";
512503e1a5SAriel Constenla-Haile static const char MERGECOMMAND_REPLACE[] = "Replace";
522503e1a5SAriel Constenla-Haile static const char MERGECOMMAND_REMOVE[] = "Remove";
532503e1a5SAriel Constenla-Haile
542503e1a5SAriel Constenla-Haile static const char MERGEFALLBACK_ADDLAST[] = "AddLast";
552503e1a5SAriel Constenla-Haile static const char MERGEFALLBACK_ADDFIRST[] = "AddFirst";
562503e1a5SAriel Constenla-Haile static const char MERGEFALLBACK_IGNORE[] = "Ignore";
572503e1a5SAriel Constenla-Haile
582503e1a5SAriel Constenla-Haile
lcl_ConvertSequenceToValues(const Sequence<PropertyValue> & rSequence,AddonStatusbarItem & rItem)592503e1a5SAriel Constenla-Haile static void lcl_ConvertSequenceToValues(
602503e1a5SAriel Constenla-Haile const Sequence< PropertyValue > &rSequence,
612503e1a5SAriel Constenla-Haile AddonStatusbarItem &rItem )
622503e1a5SAriel Constenla-Haile {
632503e1a5SAriel Constenla-Haile OUString sAlignment;
642503e1a5SAriel Constenla-Haile sal_Bool bAutoSize = sal_False;
652503e1a5SAriel Constenla-Haile sal_Bool bOwnerDraw = sal_False;
662503e1a5SAriel Constenla-Haile
672503e1a5SAriel Constenla-Haile PropertyValue aPropVal;
682503e1a5SAriel Constenla-Haile for ( sal_Int32 i = 0; i < rSequence.getLength(); i++ )
692503e1a5SAriel Constenla-Haile {
702503e1a5SAriel Constenla-Haile aPropVal = rSequence[i];
712503e1a5SAriel Constenla-Haile if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_URL ) ) )
722503e1a5SAriel Constenla-Haile aPropVal.Value >>= rItem.aCommandURL;
732503e1a5SAriel Constenla-Haile else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_TITLE ) ) )
742503e1a5SAriel Constenla-Haile aPropVal.Value >>= rItem.aLabel;
752503e1a5SAriel Constenla-Haile else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_CONTEXT ) ) )
762503e1a5SAriel Constenla-Haile aPropVal.Value >>= rItem.aContext;
772503e1a5SAriel Constenla-Haile else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_ALIGN ) ) )
782503e1a5SAriel Constenla-Haile aPropVal.Value >>= sAlignment;
792503e1a5SAriel Constenla-Haile else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_AUTOSIZE ) ) )
802503e1a5SAriel Constenla-Haile aPropVal.Value >>= bAutoSize;
812503e1a5SAriel Constenla-Haile else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_OWNERDRAW ) ) )
822503e1a5SAriel Constenla-Haile aPropVal.Value >>= bOwnerDraw;
832503e1a5SAriel Constenla-Haile else if ( aPropVal.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGE_STATUSBAR_WIDTH ) ) )
842503e1a5SAriel Constenla-Haile {
852503e1a5SAriel Constenla-Haile sal_Int32 aWidth = 0;
862503e1a5SAriel Constenla-Haile aPropVal.Value >>= aWidth;
872503e1a5SAriel Constenla-Haile rItem.nWidth = sal_uInt16( aWidth );
882503e1a5SAriel Constenla-Haile }
892503e1a5SAriel Constenla-Haile }
902503e1a5SAriel Constenla-Haile
912503e1a5SAriel Constenla-Haile sal_uInt16 nItemBits(0);
922503e1a5SAriel Constenla-Haile if ( bAutoSize )
932503e1a5SAriel Constenla-Haile nItemBits |= SIB_AUTOSIZE;
942503e1a5SAriel Constenla-Haile if ( bOwnerDraw )
952503e1a5SAriel Constenla-Haile nItemBits |= SIB_USERDRAW;
962503e1a5SAriel Constenla-Haile if ( sAlignment.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( STATUSBAR_ALIGN_CENTER )))
972503e1a5SAriel Constenla-Haile nItemBits |= SIB_CENTER;
982503e1a5SAriel Constenla-Haile else if ( sAlignment.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( STATUSBAR_ALIGN_RIGHT )))
992503e1a5SAriel Constenla-Haile nItemBits |= SIB_RIGHT;
1002503e1a5SAriel Constenla-Haile else
1012503e1a5SAriel Constenla-Haile // if unset, defaults to left alignment
1022503e1a5SAriel Constenla-Haile nItemBits |= SIB_LEFT;
1032503e1a5SAriel Constenla-Haile rItem.nItemBits = nItemBits;
1042503e1a5SAriel Constenla-Haile }
1052503e1a5SAriel Constenla-Haile
lcl_CreateStatusbarItem(StatusBar * pStatusbar,sal_uInt16 nPos,sal_uInt16 nItemId,const AddonStatusbarItem & rAddonItem)1062503e1a5SAriel Constenla-Haile static void lcl_CreateStatusbarItem( StatusBar* pStatusbar,
1072503e1a5SAriel Constenla-Haile sal_uInt16 nPos,
1082503e1a5SAriel Constenla-Haile sal_uInt16 nItemId,
1092503e1a5SAriel Constenla-Haile const AddonStatusbarItem& rAddonItem )
1102503e1a5SAriel Constenla-Haile {
1112503e1a5SAriel Constenla-Haile pStatusbar->InsertItem( nItemId,
1122503e1a5SAriel Constenla-Haile rAddonItem.nWidth,
1132503e1a5SAriel Constenla-Haile rAddonItem.nItemBits,
1142503e1a5SAriel Constenla-Haile STATUSBAR_OFFSET,
1152503e1a5SAriel Constenla-Haile nPos );
1162503e1a5SAriel Constenla-Haile pStatusbar->SetItemCommand( nItemId, rAddonItem.aCommandURL );
1172503e1a5SAriel Constenla-Haile pStatusbar->SetQuickHelpText( nItemId, rAddonItem.aLabel );
1182503e1a5SAriel Constenla-Haile pStatusbar->SetAccessibleName( nItemId, rAddonItem.aLabel );
1192503e1a5SAriel Constenla-Haile
1202503e1a5SAriel Constenla-Haile // add-on specific data
1212503e1a5SAriel Constenla-Haile AddonStatusbarItemData *pUserData = new AddonStatusbarItemData;
1222503e1a5SAriel Constenla-Haile pUserData->aLabel = rAddonItem.aLabel;
1232503e1a5SAriel Constenla-Haile pUserData->nItemBits = rAddonItem.nItemBits;
1242503e1a5SAriel Constenla-Haile pStatusbar->SetItemData( nItemId, pUserData );
1252503e1a5SAriel Constenla-Haile }
1262503e1a5SAriel Constenla-Haile
lcl_MergeItems(StatusBar * pStatusbar,sal_uInt16 nPos,sal_uInt16 nModIndex,sal_uInt16 & rItemId,const::rtl::OUString & rModuleIdentifier,const AddonStatusbarItemContainer & rAddonItems)1272503e1a5SAriel Constenla-Haile static bool lcl_MergeItems( StatusBar* pStatusbar,
1282503e1a5SAriel Constenla-Haile sal_uInt16 nPos,
1292503e1a5SAriel Constenla-Haile sal_uInt16 nModIndex,
1302503e1a5SAriel Constenla-Haile sal_uInt16& rItemId,
1312503e1a5SAriel Constenla-Haile const ::rtl::OUString& rModuleIdentifier,
1322503e1a5SAriel Constenla-Haile const AddonStatusbarItemContainer& rAddonItems )
1332503e1a5SAriel Constenla-Haile {
134*bfea5108SArmin Le Grand OSL_ENSURE(rAddonItems.size() <= 0xffff, "Caution: Not all items get handled (!)");
135*bfea5108SArmin Le Grand const sal_uInt16 nSize( static_cast< sal_uInt16 >(rAddonItems.size()) );
1362503e1a5SAriel Constenla-Haile for ( sal_Int32 i = 0; i < nSize; i++ )
1372503e1a5SAriel Constenla-Haile {
1382503e1a5SAriel Constenla-Haile const AddonStatusbarItem& rItem = rAddonItems[i];
1392503e1a5SAriel Constenla-Haile if ( !StatusbarMerger::IsCorrectContext( rItem.aContext, rModuleIdentifier ) )
1402503e1a5SAriel Constenla-Haile continue;
1412503e1a5SAriel Constenla-Haile
1422503e1a5SAriel Constenla-Haile sal_uInt16 nInsPos = nPos + nModIndex + i;
1432503e1a5SAriel Constenla-Haile if ( nInsPos > pStatusbar->GetItemCount() )
1442503e1a5SAriel Constenla-Haile nInsPos = STATUSBAR_APPEND;
1452503e1a5SAriel Constenla-Haile
1462503e1a5SAriel Constenla-Haile lcl_CreateStatusbarItem( pStatusbar, nInsPos, rItemId, rItem );
1472503e1a5SAriel Constenla-Haile ++rItemId;
1482503e1a5SAriel Constenla-Haile }
1492503e1a5SAriel Constenla-Haile
1502503e1a5SAriel Constenla-Haile return true;
1512503e1a5SAriel Constenla-Haile }
1522503e1a5SAriel Constenla-Haile
lcl_ReplaceItem(StatusBar * pStatusbar,sal_uInt16 nPos,sal_uInt16 & rItemId,const::rtl::OUString & rModuleIdentifier,const AddonStatusbarItemContainer & rAddonToolbarItems)1532503e1a5SAriel Constenla-Haile static bool lcl_ReplaceItem( StatusBar* pStatusbar,
1542503e1a5SAriel Constenla-Haile sal_uInt16 nPos,
1552503e1a5SAriel Constenla-Haile sal_uInt16& rItemId,
1562503e1a5SAriel Constenla-Haile const ::rtl::OUString& rModuleIdentifier,
1572503e1a5SAriel Constenla-Haile const AddonStatusbarItemContainer& rAddonToolbarItems )
1582503e1a5SAriel Constenla-Haile {
1592503e1a5SAriel Constenla-Haile pStatusbar->RemoveItem( pStatusbar->GetItemId( nPos ) );
1602503e1a5SAriel Constenla-Haile return lcl_MergeItems( pStatusbar, nPos, 0, rItemId, rModuleIdentifier, rAddonToolbarItems );
1612503e1a5SAriel Constenla-Haile }
1622503e1a5SAriel Constenla-Haile
lcl_RemoveItems(StatusBar * pStatusbar,sal_uInt16 nPos,const::rtl::OUString & rMergeCommandParameter)1632503e1a5SAriel Constenla-Haile static bool lcl_RemoveItems( StatusBar* pStatusbar,
1642503e1a5SAriel Constenla-Haile sal_uInt16 nPos,
1652503e1a5SAriel Constenla-Haile const ::rtl::OUString& rMergeCommandParameter )
1662503e1a5SAriel Constenla-Haile {
1672503e1a5SAriel Constenla-Haile sal_Int32 nCount = rMergeCommandParameter.toInt32();
1682503e1a5SAriel Constenla-Haile if ( nCount > 0 )
1692503e1a5SAriel Constenla-Haile {
1702503e1a5SAriel Constenla-Haile for ( sal_Int32 i = 0; i < nCount; i++ )
1712503e1a5SAriel Constenla-Haile {
1722503e1a5SAriel Constenla-Haile if ( nPos < pStatusbar->GetItemCount() )
1732503e1a5SAriel Constenla-Haile pStatusbar->RemoveItem( nPos );
1742503e1a5SAriel Constenla-Haile }
1752503e1a5SAriel Constenla-Haile }
1762503e1a5SAriel Constenla-Haile return true;
1772503e1a5SAriel Constenla-Haile }
1782503e1a5SAriel Constenla-Haile
1792503e1a5SAriel Constenla-Haile }
1802503e1a5SAriel Constenla-Haile
IsCorrectContext(const OUString & rContext,const OUString & rModuleIdentifier)1812503e1a5SAriel Constenla-Haile bool StatusbarMerger::IsCorrectContext(
1822503e1a5SAriel Constenla-Haile const OUString& rContext,
1832503e1a5SAriel Constenla-Haile const OUString& rModuleIdentifier )
1842503e1a5SAriel Constenla-Haile {
1852503e1a5SAriel Constenla-Haile return (( rContext.getLength() == 0 ) || ( rContext.indexOf( rModuleIdentifier ) >= 0 ));
1862503e1a5SAriel Constenla-Haile }
1872503e1a5SAriel Constenla-Haile
ConvertSeqSeqToVector(const Sequence<Sequence<PropertyValue>> & rSequence,AddonStatusbarItemContainer & rContainer)1882503e1a5SAriel Constenla-Haile bool StatusbarMerger::ConvertSeqSeqToVector(
1892503e1a5SAriel Constenla-Haile const Sequence< Sequence< PropertyValue > > &rSequence,
1902503e1a5SAriel Constenla-Haile AddonStatusbarItemContainer& rContainer )
1912503e1a5SAriel Constenla-Haile {
1922503e1a5SAriel Constenla-Haile for ( sal_Int32 i = 0; i < rSequence.getLength(); i++ )
1932503e1a5SAriel Constenla-Haile {
1942503e1a5SAriel Constenla-Haile AddonStatusbarItem aStatusBarItem;
1952503e1a5SAriel Constenla-Haile lcl_ConvertSequenceToValues( rSequence[i], aStatusBarItem );
1962503e1a5SAriel Constenla-Haile rContainer.push_back( aStatusBarItem );
1972503e1a5SAriel Constenla-Haile }
1982503e1a5SAriel Constenla-Haile
1992503e1a5SAriel Constenla-Haile return true;
2002503e1a5SAriel Constenla-Haile }
2012503e1a5SAriel Constenla-Haile
FindReferencePos(StatusBar * pStatusbar,const OUString & rReferencePoint)2022503e1a5SAriel Constenla-Haile sal_uInt16 StatusbarMerger::FindReferencePos(
2032503e1a5SAriel Constenla-Haile StatusBar* pStatusbar,
2042503e1a5SAriel Constenla-Haile const OUString& rReferencePoint )
2052503e1a5SAriel Constenla-Haile {
2062503e1a5SAriel Constenla-Haile for ( sal_uInt16 nPos = 0; nPos < pStatusbar->GetItemCount(); nPos++ )
2072503e1a5SAriel Constenla-Haile {
2082503e1a5SAriel Constenla-Haile const ::rtl::OUString rCmd = pStatusbar->GetItemCommand( pStatusbar->GetItemId( nPos ) );
2092503e1a5SAriel Constenla-Haile if ( rReferencePoint == rCmd )
2102503e1a5SAriel Constenla-Haile return nPos;
2112503e1a5SAriel Constenla-Haile }
2122503e1a5SAriel Constenla-Haile
2132503e1a5SAriel Constenla-Haile return STATUSBAR_ITEM_NOTFOUND;
2142503e1a5SAriel Constenla-Haile }
2152503e1a5SAriel Constenla-Haile
ProcessMergeOperation(StatusBar * pStatusbar,sal_uInt16 nPos,sal_uInt16 & rItemId,const::rtl::OUString & rModuleIdentifier,const::rtl::OUString & rMergeCommand,const::rtl::OUString & rMergeCommandParameter,const AddonStatusbarItemContainer & rItems)2162503e1a5SAriel Constenla-Haile bool StatusbarMerger::ProcessMergeOperation(
2172503e1a5SAriel Constenla-Haile StatusBar* pStatusbar,
2182503e1a5SAriel Constenla-Haile sal_uInt16 nPos,
2192503e1a5SAriel Constenla-Haile sal_uInt16& rItemId,
2202503e1a5SAriel Constenla-Haile const ::rtl::OUString& rModuleIdentifier,
2212503e1a5SAriel Constenla-Haile const ::rtl::OUString& rMergeCommand,
2222503e1a5SAriel Constenla-Haile const ::rtl::OUString& rMergeCommandParameter,
2232503e1a5SAriel Constenla-Haile const AddonStatusbarItemContainer& rItems )
2242503e1a5SAriel Constenla-Haile {
2252503e1a5SAriel Constenla-Haile if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDAFTER ) ) )
2262503e1a5SAriel Constenla-Haile return lcl_MergeItems( pStatusbar, nPos, 1, rItemId, rModuleIdentifier, rItems );
2272503e1a5SAriel Constenla-Haile else if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDBEFORE ) ) )
2282503e1a5SAriel Constenla-Haile return lcl_MergeItems( pStatusbar, nPos, 0, rItemId, rModuleIdentifier, rItems );
2292503e1a5SAriel Constenla-Haile else if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_REPLACE ) ) )
2302503e1a5SAriel Constenla-Haile return lcl_ReplaceItem( pStatusbar, nPos, rItemId, rModuleIdentifier, rItems );
2312503e1a5SAriel Constenla-Haile else if ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_REMOVE ) ) )
2322503e1a5SAriel Constenla-Haile return lcl_RemoveItems( pStatusbar, nPos, rMergeCommandParameter );
2332503e1a5SAriel Constenla-Haile
2342503e1a5SAriel Constenla-Haile return false;
2352503e1a5SAriel Constenla-Haile }
2362503e1a5SAriel Constenla-Haile
ProcessMergeFallback(StatusBar * pStatusbar,sal_uInt16,sal_uInt16 & rItemId,const::rtl::OUString & rModuleIdentifier,const::rtl::OUString & rMergeCommand,const::rtl::OUString & rMergeFallback,const AddonStatusbarItemContainer & rItems)2372503e1a5SAriel Constenla-Haile bool StatusbarMerger::ProcessMergeFallback(
2382503e1a5SAriel Constenla-Haile StatusBar* pStatusbar,
2392503e1a5SAriel Constenla-Haile sal_uInt16 /*nPos*/,
2402503e1a5SAriel Constenla-Haile sal_uInt16& rItemId,
2412503e1a5SAriel Constenla-Haile const ::rtl::OUString& rModuleIdentifier,
2422503e1a5SAriel Constenla-Haile const ::rtl::OUString& rMergeCommand,
2432503e1a5SAriel Constenla-Haile const ::rtl::OUString& rMergeFallback,
2442503e1a5SAriel Constenla-Haile const AddonStatusbarItemContainer& rItems )
2452503e1a5SAriel Constenla-Haile {
2462503e1a5SAriel Constenla-Haile // fallback IGNORE or REPLACE/REMOVE item not found
2472503e1a5SAriel Constenla-Haile if (( rMergeFallback.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGEFALLBACK_IGNORE ))) ||
2482503e1a5SAriel Constenla-Haile ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_REPLACE ))) ||
2492503e1a5SAriel Constenla-Haile ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_REMOVE ))) )
2502503e1a5SAriel Constenla-Haile {
2512503e1a5SAriel Constenla-Haile return true;
2522503e1a5SAriel Constenla-Haile }
2532503e1a5SAriel Constenla-Haile else if (( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDBEFORE ))) ||
2542503e1a5SAriel Constenla-Haile ( rMergeCommand.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGECOMMAND_ADDAFTER ))) )
2552503e1a5SAriel Constenla-Haile {
2562503e1a5SAriel Constenla-Haile if ( rMergeFallback.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGEFALLBACK_ADDFIRST )))
2572503e1a5SAriel Constenla-Haile return lcl_MergeItems( pStatusbar, 0, 0, rItemId, rModuleIdentifier, rItems );
2582503e1a5SAriel Constenla-Haile else if ( rMergeFallback.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( MERGEFALLBACK_ADDLAST )))
2592503e1a5SAriel Constenla-Haile return lcl_MergeItems( pStatusbar, STATUSBAR_APPEND, 0, rItemId, rModuleIdentifier, rItems );
2602503e1a5SAriel Constenla-Haile }
2612503e1a5SAriel Constenla-Haile
2622503e1a5SAriel Constenla-Haile return false;
2632503e1a5SAriel Constenla-Haile }
2642503e1a5SAriel Constenla-Haile
2652503e1a5SAriel Constenla-Haile
2662503e1a5SAriel Constenla-Haile }
267