toolbarlayoutmanager.cxx (26169348) toolbarlayoutmanager.cxx (bb0b5665)
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

--- 991 unchanged lines hidden (view full) ---

1000 uno::Reference< awt::XWindow > xWindow( xDockWindow, uno::UNO_QUERY );
1001 if ( xWindow.is() )
1002 xWindow->addWindowListener( uno::Reference< awt::XWindowListener >( static_cast< OWeakObject * >( this ), uno::UNO_QUERY ));
1003 }
1004 catch ( uno::Exception& ) {}
1005 }
1006
1007 ::rtl::OUString aAddonUIName = m_pAddonOptions->GetAddonsToolbarUIName( i );
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

--- 991 unchanged lines hidden (view full) ---

1000 uno::Reference< awt::XWindow > xWindow( xDockWindow, uno::UNO_QUERY );
1001 if ( xWindow.is() )
1002 xWindow->addWindowListener( uno::Reference< awt::XWindowListener >( static_cast< OWeakObject * >( this ), uno::UNO_QUERY ));
1003 }
1004 catch ( uno::Exception& ) {}
1005 }
1006
1007 ::rtl::OUString aAddonUIName = m_pAddonOptions->GetAddonsToolbarUIName( i );
1008 ::rtl::OUString aAddonTitle = aAddonUIName.getLength() ?
1008 const bool bAddonUIName = aAddonUIName.getLength();
1009 ::rtl::OUString aAddonTitle = bAddonUIName ?
1009 aAddonUIName : implts_generateGenericAddonToolbarTitle( i+1 );
1010
1011 if ( aElement.m_aName.getLength() > 0 )
1012 {
1013 // Reuse a local entry so we are able to use the latest
1014 // UI changes for this document.
1015 implts_setElementData( aElement, xDockWindow );
1016 aElement.m_xUIElement = xUIElement;
1010 aAddonUIName : implts_generateGenericAddonToolbarTitle( i+1 );
1011
1012 if ( aElement.m_aName.getLength() > 0 )
1013 {
1014 // Reuse a local entry so we are able to use the latest
1015 // UI changes for this document.
1016 implts_setElementData( aElement, xDockWindow );
1017 aElement.m_xUIElement = xUIElement;
1017 if ( aElement.m_aUIName.getLength() == 0 )
1018 if ( aElement.m_aUIName.getLength() == 0 && !bAddonUIName)
1018 {
1019 aElement.m_aUIName = aAddonTitle;
1020 implts_writeWindowStateData( aElement );
1021 }
1022 }
1023 else
1024 {
1025 // Create new UI element and try to read its state data
1026 UIElement aNewToolbar( aAddonToolBarName, aElementType, xUIElement );
1027 aNewToolbar.m_bFloating = true;
1028 implts_readWindowStateData( aAddonToolBarName, aNewToolbar );
1029 implts_setElementData( aNewToolbar, xDockWindow );
1019 {
1020 aElement.m_aUIName = aAddonTitle;
1021 implts_writeWindowStateData( aElement );
1022 }
1023 }
1024 else
1025 {
1026 // Create new UI element and try to read its state data
1027 UIElement aNewToolbar( aAddonToolBarName, aElementType, xUIElement );
1028 aNewToolbar.m_bFloating = true;
1029 implts_readWindowStateData( aAddonToolBarName, aNewToolbar );
1030 implts_setElementData( aNewToolbar, xDockWindow );
1030 if ( aNewToolbar.m_aUIName.getLength() == 0 )
1031 if ( aNewToolbar.m_aUIName.getLength() == 0 && !bAddonUIName)
1031 {
1032 aNewToolbar.m_aUIName = aAddonTitle;
1033 implts_writeWindowStateData( aNewToolbar );
1034 }
1035 implts_insertToolbar( aNewToolbar );
1036 }
1037
1038 uno::Reference< awt::XWindow > xWindow( xDockWindow, uno::UNO_QUERY );

--- 3272 unchanged lines hidden ---
1032 {
1033 aNewToolbar.m_aUIName = aAddonTitle;
1034 implts_writeWindowStateData( aNewToolbar );
1035 }
1036 implts_insertToolbar( aNewToolbar );
1037 }
1038
1039 uno::Reference< awt::XWindow > xWindow( xDockWindow, uno::UNO_QUERY );

--- 3272 unchanged lines hidden ---