LibreOffice Module framework (master) 1
toolboxdocumenthandler.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
22
23#include <com/sun/star/xml/sax/SAXException.hpp>
24#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
25#include <com/sun/star/ui/ItemType.hpp>
26#include <com/sun/star/ui/ItemStyle.hpp>
27#include <com/sun/star/beans/XPropertySet.hpp>
28#include <com/sun/star/container/XIndexAccess.hpp>
29#include <com/sun/star/container/XIndexContainer.hpp>
30
31#include <sal/config.h>
32#include <sal/macros.h>
33#include <vcl/settings.hxx>
34#include <rtl/ref.hxx>
35#include <rtl/ustrbuf.hxx>
36
40
41using namespace ::com::sun::star::uno;
42using namespace ::com::sun::star::beans;
43using namespace ::com::sun::star::container;
44using namespace ::com::sun::star::xml::sax;
45
46constexpr OUStringLiteral TOOLBAR_DOCTYPE = u"<!DOCTYPE toolbar:toolbar PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\" \"toolbar.dtd\">";
47
48namespace framework
49{
50
51// Property names of a menu/menu item ItemDescriptor
52constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL = u"CommandURL";
53constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL = u"Label";
54constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE = u"Type";
55constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE = u"Style";
56constexpr OUStringLiteral ITEM_DESCRIPTOR_VISIBLE = u"IsVisible";
57
58static void ExtractToolbarParameters( const Sequence< PropertyValue >& rProp,
59 OUString& rCommandURL,
60 OUString& rLabel,
61 sal_Int16& rStyle,
62 bool& rVisible,
63 sal_Int16& rType )
64{
65 for ( const PropertyValue& rEntry : rProp )
66 {
67 if ( rEntry.Name == ITEM_DESCRIPTOR_COMMANDURL )
68 rEntry.Value >>= rCommandURL;
69 else if ( rEntry.Name == ITEM_DESCRIPTOR_LABEL )
70 rEntry.Value >>= rLabel;
71 else if ( rEntry.Name == ITEM_DESCRIPTOR_TYPE )
72 rEntry.Value >>= rType;
73 else if ( rEntry.Name == ITEM_DESCRIPTOR_VISIBLE )
74 rEntry.Value >>= rVisible;
75 else if ( rEntry.Name == ITEM_DESCRIPTOR_STYLE )
76 rEntry.Value >>= rStyle;
77 }
78}
79
80namespace {
81
82struct ToolboxStyleItem
83{
84 sal_Int16 nBit;
85 rtl::OUStringConstExpr attrName;
86};
87
88}
89
90constexpr ToolboxStyleItem Styles[ ] = {
91 { css::ui::ItemStyle::RADIO_CHECK, ATTRIBUTE_ITEMSTYLE_RADIO },
92 { css::ui::ItemStyle::ALIGN_LEFT, ATTRIBUTE_ITEMSTYLE_LEFT },
93 { css::ui::ItemStyle::AUTO_SIZE, ATTRIBUTE_ITEMSTYLE_AUTO },
94 { css::ui::ItemStyle::REPEAT, ATTRIBUTE_ITEMSTYLE_REPEAT },
95 { css::ui::ItemStyle::DROPDOWN_ONLY, ATTRIBUTE_ITEMSTYLE_DROPDOWNONLY },
96 { css::ui::ItemStyle::DROP_DOWN, ATTRIBUTE_ITEMSTYLE_DROPDOWN },
97 { css::ui::ItemStyle::ICON, ATTRIBUTE_ITEMSTYLE_IMAGE },
98 { css::ui::ItemStyle::TEXT, ATTRIBUTE_ITEMSTYLE_TEXT },
99};
100
102
103namespace {
104
105struct ToolBarEntryProperty
106{
108 char aEntryName[20];
109};
110
111}
112
114{
125};
126
127OReadToolBoxDocumentHandler::OReadToolBoxDocumentHandler( const Reference< XIndexContainer >& rItemContainer ) :
128 m_rItemContainer( rItemContainer ),
130 m_aLabel( ITEM_DESCRIPTOR_LABEL ),
131 m_aStyle( ITEM_DESCRIPTOR_STYLE ),
132 m_aIsVisible( ITEM_DESCRIPTOR_VISIBLE ),
133 m_aCommandURL( ITEM_DESCRIPTOR_COMMANDURL )
134 {
135 // create hash map
136 for ( int i = 0; i < TB_XML_ENTRY_COUNT; i++ )
137 {
139 {
140 OUString temp = XMLNS_TOOLBAR XMLNS_FILTER_SEPARATOR +
141 OUString::createFromAscii( ToolBoxEntries[i].aEntryName );
142 m_aToolBoxMap.emplace( temp, static_cast<ToolBox_XML_Entry>(i) );
143 }
144 else
145 {
146 OUString temp = XMLNS_XLINK XMLNS_FILTER_SEPARATOR +
147 OUString::createFromAscii( ToolBoxEntries[i].aEntryName );
148 m_aToolBoxMap.emplace( temp, static_cast<ToolBox_XML_Entry>(i) );
149 }
150 }
151
152 m_bToolBarStartFound = false;
157}
158
160{
161}
162
163// XDocumentHandler
165{
166}
167
169{
171 {
172 OUString aErrorMessage = getErrorLineString() + "No matching start or end element 'toolbar' found!";
173 throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
174 }
175}
176
178 const OUString& aName, const Reference< XAttributeList > &xAttribs )
179{
180 ToolBoxHashMap::const_iterator pToolBoxEntry = m_aToolBoxMap.find( aName );
181 if ( pToolBoxEntry == m_aToolBoxMap.end() )
182 return;
183
184 switch ( pToolBoxEntry->second )
185 {
187 {
189 {
190 OUString aErrorMessage = getErrorLineString() + "Element 'toolbar:toolbar' cannot be embedded into 'toolbar:toolbar'!";
191 throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
192 }
193 else
194 {
195 // Check if we have a UI name set in our XML file
196 OUString aUIName;
197 for ( sal_Int16 n = 0; n < xAttribs->getLength(); n++ )
198 {
199 pToolBoxEntry = m_aToolBoxMap.find( xAttribs->getNameByIndex( n ) );
200 if ( pToolBoxEntry != m_aToolBoxMap.end() )
201 {
202 switch ( pToolBoxEntry->second )
203 {
205 aUIName = xAttribs->getValueByIndex( n );
206 break;
207 default:
208 break;
209 }
210 }
211 }
212 if ( !aUIName.isEmpty() )
213 {
214 // Try to set UI name as a container property
215 Reference< XPropertySet > xPropSet( m_rItemContainer, UNO_QUERY );
216 if ( xPropSet.is() )
217 {
218 try
219 {
220 xPropSet->setPropertyValue("UIName", Any( aUIName ) );
221 }
222 catch ( const UnknownPropertyException& )
223 {
224 }
225 }
226
227 }
228 }
230 }
231 break;
232
234 {
236 {
237 OUString aErrorMessage = getErrorLineString() + "Element 'toolbar:toolbaritem' must be embedded into element 'toolbar:toolbar'!";
238 throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
239 }
240
245 {
246 OUString aErrorMessage = getErrorLineString() + "Element toolbar:toolbaritem is not a container!";
247 throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
248 }
249
250 bool bAttributeURL = false;
251
253 OUString aLabel;
254 OUString aCommandURL;
255 sal_uInt16 nItemBits( 0 );
256 bool bVisible( true );
257
258 for ( sal_Int16 n = 0; n < xAttribs->getLength(); n++ )
259 {
260 pToolBoxEntry = m_aToolBoxMap.find( xAttribs->getNameByIndex( n ) );
261 if ( pToolBoxEntry != m_aToolBoxMap.end() )
262 {
263 switch ( pToolBoxEntry->second )
264 {
266 {
267 aLabel = xAttribs->getValueByIndex( n );
268 }
269 break;
270
271 case TB_ATTRIBUTE_URL:
272 {
273 bAttributeURL = true;
274 aCommandURL = xAttribs->getValueByIndex( n );
275 }
276 break;
277
279 {
280 if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_BOOLEAN_TRUE )
281 bVisible = true;
282 else if ( xAttribs->getValueByIndex( n ) == ATTRIBUTE_BOOLEAN_FALSE )
283 bVisible = false;
284 else
285 {
286 OUString aErrorMessage = getErrorLineString() + "Attribute toolbar:visible must have value 'true' or 'false'!";
287 throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
288 }
289 }
290 break;
291
293 {
294 // read space separated item style list
295 OUString aTemp = xAttribs->getValueByIndex( n );
296 sal_Int32 nIndex = 0;
297
298 do
299 {
300 OUString aToken = aTemp.getToken( 0, ' ', nIndex );
301 if ( !aToken.isEmpty() )
302 {
303 if ( aToken == ATTRIBUTE_ITEMSTYLE_RADIO )
304 nItemBits |= css::ui::ItemStyle::RADIO_CHECK;
305 else if ( aToken == ATTRIBUTE_ITEMSTYLE_LEFT )
306 nItemBits |= css::ui::ItemStyle::ALIGN_LEFT;
307 else if ( aToken == ATTRIBUTE_ITEMSTYLE_AUTOSIZE )
308 nItemBits |= css::ui::ItemStyle::AUTO_SIZE;
309 else if ( aToken == ATTRIBUTE_ITEMSTYLE_REPEAT )
310 nItemBits |= css::ui::ItemStyle::REPEAT;
311 else if ( aToken == ATTRIBUTE_ITEMSTYLE_DROPDOWNONLY )
312 nItemBits |= css::ui::ItemStyle::DROPDOWN_ONLY;
313 else if ( aToken == ATTRIBUTE_ITEMSTYLE_DROPDOWN )
314 nItemBits |= css::ui::ItemStyle::DROP_DOWN;
315 else if ( aToken == ATTRIBUTE_ITEMSTYLE_TEXT )
316 nItemBits |= css::ui::ItemStyle::TEXT;
317 else if ( aToken == ATTRIBUTE_ITEMSTYLE_IMAGE )
318 nItemBits |= css::ui::ItemStyle::ICON;
319 }
320 }
321 while ( nIndex >= 0 );
322 }
323 break;
324
325 default:
326 break;
327 }
328 }
329 } // for
330
331 if ( !bAttributeURL )
332 {
333 OUString aErrorMessage = getErrorLineString() + "Required attribute toolbar:url must have a value!";
334 throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
335 }
336
337 if ( !aCommandURL.isEmpty() )
338 {
339 //fix for fdo#39370
342 if (aCommandURL == ".uno:ParaLeftToRight")
343 aCommandURL = ".uno:ParaRightToLeft";
344 else if (aCommandURL == ".uno:ParaRightToLeft")
345 aCommandURL = ".uno:ParaLeftToRight";
346 else if (aCommandURL == ".uno:LeftPara")
347 aCommandURL = ".uno:RightPara";
348 else if (aCommandURL == ".uno:RightPara")
349 aCommandURL = ".uno:LeftPara";
350 else if (aCommandURL == ".uno:AlignLeft")
351 aCommandURL = ".uno:AlignRight";
352 else if (aCommandURL == ".uno:AlignRight")
353 aCommandURL = ".uno:AlignLeft";
354 else if (aCommandURL == ".uno:WrapLeft")
355 aCommandURL = ".uno:WrapRight";
356 else if (aCommandURL == ".uno:WrapRight")
357 aCommandURL = ".uno:WrapLeft";
358 }
359
360 auto aToolbarItemProp( comphelper::InitPropertySequence( {
361 { m_aCommandURL, css::uno::Any( aCommandURL ) },
362 { m_aLabel, css::uno::Any( aLabel ) },
363 { m_aType, css::uno::Any( css::ui::ItemType::DEFAULT ) },
364 { m_aStyle, css::uno::Any( nItemBits ) },
365 { m_aIsVisible, css::uno::Any( bVisible ) },
366 } ) );
367
368 m_rItemContainer->insertByIndex( m_rItemContainer->getCount(), Any( aToolbarItemProp ) );
369 }
370 }
371 break;
372
374 {
379 {
380 OUString aErrorMessage = getErrorLineString() + "Element toolbar:toolbarspace is not a container!";
381 throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
382 }
383
385
386 Sequence< PropertyValue > aToolbarItemProp{
388 comphelper::makePropertyValue(m_aType, css::ui::ItemType::SEPARATOR_SPACE)
389 };
390
391 m_rItemContainer->insertByIndex( m_rItemContainer->getCount(), Any( aToolbarItemProp ) );
392 }
393 break;
394
396 {
401 {
402 OUString aErrorMessage = getErrorLineString() + "Element toolbar:toolbarbreak is not a container!";
403 throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
404 }
405
407
408 Sequence< PropertyValue > aToolbarItemProp{
410 comphelper::makePropertyValue(m_aType, css::ui::ItemType::SEPARATOR_LINEBREAK)
411 };
412
413 m_rItemContainer->insertByIndex( m_rItemContainer->getCount(), Any( aToolbarItemProp ) );
414 }
415 break;
416
418 {
423 {
424 OUString aErrorMessage = getErrorLineString() + "Element toolbar:toolbarseparator is not a container!";
425 throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
426 }
427
429
430 Sequence< PropertyValue > aToolbarItemProp{
432 comphelper::makePropertyValue(m_aType, css::ui::ItemType::SEPARATOR_LINE)
433 };
434
435 m_rItemContainer->insertByIndex( m_rItemContainer->getCount(), Any( aToolbarItemProp ) );
436 }
437 break;
438
439 default:
440 break;
441 }
442}
443
444void SAL_CALL OReadToolBoxDocumentHandler::endElement(const OUString& aName)
445{
446 ToolBoxHashMap::const_iterator pToolBoxEntry = m_aToolBoxMap.find( aName );
447 if ( pToolBoxEntry == m_aToolBoxMap.end() )
448 return;
449
450 switch ( pToolBoxEntry->second )
451 {
453 {
455 {
456 OUString aErrorMessage = getErrorLineString() + "End element 'toolbar' found, but no start element 'toolbar'";
457 throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
458 }
459
460 m_bToolBarStartFound = false;
461 }
462 break;
463
465 {
467 {
468 OUString aErrorMessage = getErrorLineString() + "End element 'toolbar:toolbaritem' found, but no start element 'toolbar:toolbaritem'";
469 throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
470 }
471
473 }
474 break;
475
477 {
479 {
480 OUString aErrorMessage = getErrorLineString() + "End element 'toolbar:toolbarbreak' found, but no start element 'toolbar:toolbarbreak'";
481 throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
482 }
483
485 }
486 break;
487
489 {
491 {
492 OUString aErrorMessage = getErrorLineString() + "End element 'toolbar:toolbarspace' found, but no start element 'toolbar:toolbarspace'";
493 throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
494 }
495
497 }
498 break;
499
501 {
503 {
504 OUString aErrorMessage = getErrorLineString() + "End element 'toolbar:toolbarseparator' found, but no start element 'toolbar:toolbarseparator'";
505 throw SAXException( aErrorMessage, Reference< XInterface >(), Any() );
506 }
507
509 }
510 break;
511
512 default: break;
513 }
514}
515
516void SAL_CALL OReadToolBoxDocumentHandler::characters(const OUString&)
517{
518}
519
521{
522}
523
525 const OUString& /*aTarget*/, const OUString& /*aData*/ )
526{
527}
528
530 const Reference< XLocator > &xLocator)
531{
532 m_xLocator = xLocator;
533}
534
536{
537 if ( m_xLocator.is() )
538 return "Line: " + OUString::number( m_xLocator->getLineNumber() ) + " - ";
539 else
540 return OUString();
541}
542
543// OWriteToolBoxDocumentHandler
544
546 const Reference< XIndexAccess >& rItemAccess,
547 Reference< XDocumentHandler > const & rWriteDocumentHandler ) :
548 m_xWriteDocumentHandler( rWriteDocumentHandler ),
549 m_rItemAccess( rItemAccess )
550{
551 m_xEmptyList = new ::comphelper::AttributeList;
554}
555
557{
558}
559
561{
562 m_xWriteDocumentHandler->startDocument();
563
564 // write DOCTYPE line!
565 Reference< XExtendedDocumentHandler > xExtendedDocHandler( m_xWriteDocumentHandler, UNO_QUERY );
566 if ( xExtendedDocHandler.is() )
567 {
568 xExtendedDocHandler->unknown( TOOLBAR_DOCTYPE );
569 m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
570 }
571
572 OUString aUIName;
573 Reference< XPropertySet > xPropSet( m_rItemAccess, UNO_QUERY );
574 if ( xPropSet.is() )
575 {
576 try
577 {
578 xPropSet->getPropertyValue("UIName") >>= aUIName;
579 }
580 catch ( const UnknownPropertyException& )
581 {
582 }
583 }
584
585 rtl::Reference<::comphelper::AttributeList> pList = new ::comphelper::AttributeList;
586
587 pList->AddAttribute( ATTRIBUTE_XMLNS_TOOLBAR,
589
590 pList->AddAttribute( ATTRIBUTE_XMLNS_XLINK,
591 XMLNS_XLINK );
592
593 if ( !aUIName.isEmpty() )
594 pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_UINAME,
595 aUIName );
596
597 m_xWriteDocumentHandler->startElement( ELEMENT_NS_TOOLBAR, pList );
598 m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
599
600 sal_Int32 nItemCount = m_rItemAccess->getCount();
601 Any aAny;
602
603 for ( sal_Int32 nItemPos = 0; nItemPos < nItemCount; nItemPos++ )
604 {
605 Sequence< PropertyValue > aProps;
606 aAny = m_rItemAccess->getByIndex( nItemPos );
607 if ( aAny >>= aProps )
608 {
609 OUString aCommandURL;
610 OUString aLabel;
611 bool bVisible( true );
612 sal_Int16 nType( css::ui::ItemType::DEFAULT );
613 sal_Int16 nStyle( 0 );
614
615 ExtractToolbarParameters( aProps, aCommandURL, aLabel, nStyle, bVisible, nType );
616 if ( nType == css::ui::ItemType::DEFAULT )
617 WriteToolBoxItem( aCommandURL, aLabel, nStyle, bVisible );
618 else if ( nType == css::ui::ItemType::SEPARATOR_SPACE )
620 else if ( nType == css::ui::ItemType::SEPARATOR_LINE )
622 else if ( nType == css::ui::ItemType::SEPARATOR_LINEBREAK )
624 }
625 }
626
627 m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
629 m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
630 m_xWriteDocumentHandler->endDocument();
631}
632
633// protected member functions
634
636 const OUString& rCommandURL,
637 const OUString& rLabel,
638 sal_Int16 nStyle,
639 bool bVisible )
640{
641 rtl::Reference<::comphelper::AttributeList> pList = new ::comphelper::AttributeList;
642
643 if ( m_aAttributeURL.isEmpty() )
644 {
646 }
647
648 // save required attribute (URL)
649 pList->AddAttribute( m_aAttributeURL, rCommandURL );
650
651 if ( !rLabel.isEmpty() )
652 {
653 pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_TEXT,
654 rLabel );
655 }
656
657 if ( !bVisible )
658 {
659 pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_VISIBLE,
661 }
662
663 if ( nStyle > 0 )
664 {
665 OUStringBuffer aValue;
666 const ToolboxStyleItem* pStyle = Styles;
667
668 for ( sal_Int32 nIndex = 0; nIndex < nStyleItemEntries; ++nIndex, ++pStyle )
669 {
670 if ( nStyle & pStyle->nBit )
671 {
672 if ( !aValue.isEmpty() )
673 aValue.append(" ");
674 aValue.append( OUString(pStyle->attrName) );
675 }
676 }
677 pList->AddAttribute( m_aXMLToolbarNS + ATTRIBUTE_ITEMSTYLE,
678 aValue.makeStringAndClear() );
679 }
680
681 m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
682 m_xWriteDocumentHandler->startElement( ELEMENT_NS_TOOLBARITEM, pList );
683 m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
685}
686
688{
689 m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
691 m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
693}
694
696{
697 m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
699 m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
701}
702
704{
705 m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
707 m_xWriteDocumentHandler->ignorableWhitespace( OUString() );
709}
710
711} // namespace framework
712
713/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
uno::Type m_aType
static bool GetLayoutRTL()
virtual void SAL_CALL characters(const OUString &aChars) override
virtual void SAL_CALL setDocumentLocator(const css::uno::Reference< css::xml::sax::XLocator > &xLocator) override
virtual void SAL_CALL ignorableWhitespace(const OUString &aWhitespaces) override
virtual void SAL_CALL startDocument() override
virtual void SAL_CALL endDocument() override
virtual void SAL_CALL endElement(const OUString &aName) override
OReadToolBoxDocumentHandler(const css::uno::Reference< css::container::XIndexContainer > &rItemContainer)
virtual void SAL_CALL startElement(const OUString &aName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttribs) override
virtual void SAL_CALL processingInstruction(const OUString &aTarget, const OUString &aData) override
css::uno::Reference< css::container::XIndexContainer > m_rItemContainer
css::uno::Reference< css::xml::sax::XLocator > m_xLocator
css::uno::Reference< css::xml::sax::XDocumentHandler > m_xWriteDocumentHandler
css::uno::Reference< css::xml::sax::XAttributeList > m_xEmptyList
OWriteToolBoxDocumentHandler(const css::uno::Reference< css::container::XIndexAccess > &rItemAccess, css::uno::Reference< css::xml::sax::XDocumentHandler > const &rDocumentHandler)
void WriteToolBoxItem(const OUString &aCommandURL, const OUString &aLabel, sal_Int16 nStyle, bool bVisible)
css::uno::Reference< css::container::XIndexAccess > m_rItemAccess
float u
sal_Int32 nIndex
OUString aName
sal_Int64 n
#define SAL_N_ELEMENTS(arr)
css::uno::Sequence< css::beans::PropertyValue > InitPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
constexpr OUStringLiteral ITEM_DESCRIPTOR_STYLE
constexpr OUStringLiteral ITEM_DESCRIPTOR_COMMANDURL
sal_Int32 const nStyleItemEntries
static void ExtractToolbarParameters(const Sequence< PropertyValue > &rProp, OUString &rCommandURL, OUString &rLabel, sal_Int16 &rStyle, bool &rVisible, sal_Int16 &rType)
constexpr ToolboxStyleItem Styles[]
constexpr OUStringLiteral ITEM_DESCRIPTOR_LABEL
constexpr OUStringLiteral ITEM_DESCRIPTOR_TYPE
ToolBarEntryProperty const ToolBoxEntries[OReadToolBoxDocumentHandler::TB_XML_ENTRY_COUNT]
constexpr OUStringLiteral ITEM_DESCRIPTOR_VISIBLE
int i
QPRO_FUNC_TYPE nType
constexpr OUStringLiteral ATTRIBUTE_BOOLEAN_TRUE
constexpr OUStringLiteral ATTRIBUTE_BOOLEAN_FALSE
#define ATTRIBUTE_URL
constexpr OUStringLiteral ATTRIBUTE_XMLNS_XLINK
constexpr OUStringLiteral XMLNS_XLINK_PREFIX
OUString aUIName
bool bVisible
#define ELEMENT_TOOLBARSPACE
#define ELEMENT_TOOLBARITEM
constexpr OUStringLiteral ATTRIBUTE_XMLNS_TOOLBAR
constexpr OUStringLiteral ELEMENT_NS_TOOLBAR
constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_REPEAT
#define XMLNS_TOOLBAR
#define ATTRIBUTE_UINAME
constexpr OUStringLiteral ELEMENT_NS_TOOLBARBREAK
#define XMLNS_XLINK
constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_AUTOSIZE
constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_DROPDOWNONLY
constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_LEFT
#define ATTRIBUTE_VISIBLE
constexpr OUStringLiteral ELEMENT_NS_TOOLBARSPACE
constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_RADIO
constexpr OUStringLiteral XMLNS_TOOLBAR_PREFIX
#define ATTRIBUTE_ITEMSTYLE
#define XMLNS_FILTER_SEPARATOR
#define ELEMENT_TOOLBARBREAK
#define ELEMENT_TOOLBAR
constexpr OUStringLiteral ELEMENT_NS_TOOLBARSEPARATOR
constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_DROPDOWN
constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_AUTO
constexpr OUStringLiteral ELEMENT_NS_TOOLBARITEM
#define ELEMENT_TOOLBARSEPARATOR
constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_IMAGE
constexpr OUStringLiteral ATTRIBUTE_ITEMSTYLE_TEXT
#define ATTRIBUTE_TEXT
sal_Int16 nBit
rtl::OUStringConstExpr attrName
constexpr OUStringLiteral TOOLBAR_DOCTYPE
OReadToolBoxDocumentHandler::ToolBox_XML_Namespace nNamespace
char aEntryName[20]
OUString aLabel