LCOV - code coverage report
Current view: top level - libreoffice/xmlscript/source/xmldlg_imexp - xmldlg_expmodels.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 828 0.0 %
Date: 2012-12-27 Functions: 0 29 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : 
      20             : #include "exp_share.hxx"
      21             : 
      22             : #include <com/sun/star/form/binding/XListEntrySink.hpp>
      23             : #include <com/sun/star/form/binding/XBindableValue.hpp>
      24             : #include <com/sun/star/form/binding/XValueBinding.hpp>
      25             : #include <com/sun/star/table/CellAddress.hpp>
      26             : #include <com/sun/star/table/CellRangeAddress.hpp>
      27             : #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
      28             : #include <com/sun/star/document/XStorageBasedDocument.hpp>
      29             : #include <com/sun/star/document/XGraphicObjectResolver.hpp>
      30             : #include <comphelper/componentcontext.hxx>
      31             : #include <com/sun/star/lang/XServiceInfo.hpp>
      32             : 
      33             : using namespace ::com::sun::star;
      34             : using namespace ::com::sun::star::uno;
      35             : using ::rtl::OUString;
      36             : 
      37             : namespace xmlscript
      38             : {
      39             : 
      40           0 : static inline bool readBorderProps(
      41             :     ElementDescriptor * element, Style & style )
      42             : {
      43           0 :     if (element->readProp( &style._border, "Border" )) {
      44           0 :         if (style._border == BORDER_SIMPLE /* simple */)
      45             :         {
      46           0 :             if (element->readProp( &style._borderColor, "BorderColor" ))
      47           0 :                 style._border = BORDER_SIMPLE_COLOR;
      48             :         }
      49           0 :         return true;
      50             :     }
      51           0 :     return false;
      52             : }
      53             : 
      54           0 : static inline bool readFontProps( ElementDescriptor * element, Style & style )
      55             : {
      56             :     bool ret = element->readProp(
      57           0 :         &style._descr, "FontDescriptor" );
      58             :     ret |= element->readProp(
      59           0 :         &style._fontEmphasisMark, "FontEmphasisMark" );
      60             :     ret |= element->readProp(
      61           0 :         &style._fontRelief, "FontRelief" );
      62           0 :     return ret;
      63             : }
      64             : 
      65             : //__________________________________________________________________________________________________
      66           0 : void ElementDescriptor::readMultiPageModel( StyleBag * all_styles )
      67             : {
      68             :     // collect styles
      69           0 :     Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 );
      70           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
      71           0 :         aStyle._set |= 0x1;
      72           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
      73           0 :         aStyle._set |= 0x2;
      74           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
      75           0 :         aStyle._set |= 0x20;
      76           0 :     if (readFontProps( this, aStyle ))
      77           0 :         aStyle._set |= 0x8;
      78           0 :     if (aStyle._set)
      79             :     {
      80           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id" ,  all_styles->getStyleId( aStyle ) );
      81             :     }
      82             : 
      83             :     // collect elements
      84           0 :     readDefaults();
      85           0 :     readLongAttr( "MultiPageValue", XMLNS_DIALOGS_PREFIX ":value" );
      86           0 :     Any aDecorationAny( _xProps->getPropertyValue( "Decoration" ) );
      87           0 :     bool bDecoration = sal_True;
      88           0 :     if ( (aDecorationAny >>= bDecoration) && !bDecoration )
      89           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":withtabs", "false" );
      90             : 
      91           0 :     readEvents();
      92           0 :     uno::Reference< container::XNameContainer > xPagesContainer( _xProps, uno::UNO_QUERY );
      93           0 :     if ( xPagesContainer.is() && xPagesContainer->getElementNames().getLength() )
      94             :     {
      95           0 :         ElementDescriptor * pElem = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", _xDocument );
      96           0 :         pElem->readBullitinBoard( all_styles );
      97           0 :         addSubElement( pElem );
      98           0 :     }
      99           0 : }
     100             : //__________________________________________________________________________________________________
     101           0 : void ElementDescriptor::readFrameModel( StyleBag * all_styles )
     102             : {
     103             :     // collect styles
     104           0 :     Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 );
     105             : 
     106           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     107           0 :         aStyle._set |= 0x2;
     108           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     109           0 :         aStyle._set |= 0x20;
     110           0 :     if (readFontProps( this, aStyle ))
     111           0 :         aStyle._set |= 0x8;
     112           0 :     if (aStyle._set)
     113             :     {
     114           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id",  all_styles->getStyleId( aStyle ) );
     115             :     }
     116             : 
     117             :     // collect elements
     118           0 :     readDefaults();
     119           0 :     OUString aTitle;
     120             : 
     121           0 :     if ( readProp( "Label" ) >>= aTitle)
     122             :     {
     123           0 :         ElementDescriptor * title = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":title", _xDocument );
     124           0 :         title->addAttribute( XMLNS_DIALOGS_PREFIX ":value", aTitle );
     125           0 :         addSubElement( title );
     126             :     }
     127             : #if SCROLLABLEFRAME
     128             :     readScrollableSettings();
     129             : #endif
     130           0 :     uno::Reference< container::XNameContainer > xControlContainer( _xProps, uno::UNO_QUERY );
     131           0 :     if ( xControlContainer.is() && xControlContainer->getElementNames().getLength() )
     132             :     {
     133           0 :         ElementDescriptor * pElem = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", _xDocument );
     134           0 :         pElem->readBullitinBoard( all_styles );
     135           0 :         addSubElement( pElem );
     136             :     }
     137           0 :     readEvents();
     138           0 : }
     139             : //__________________________________________________________________________________________________
     140           0 : void ElementDescriptor::readPageModel( StyleBag * all_styles )
     141             : {
     142             :     // collect styles
     143           0 :     Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 );
     144           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     145           0 :         aStyle._set |= 0x1;
     146           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     147           0 :         aStyle._set |= 0x2;
     148           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     149           0 :         aStyle._set |= 0x20;
     150           0 :     if (readFontProps( this, aStyle ))
     151           0 :         aStyle._set |= 0x8;
     152           0 :     if (aStyle._set)
     153             :     {
     154           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     155             :     }
     156             : 
     157             :     // collect elements
     158           0 :     readDefaults();
     159           0 :     OUString aTitle;
     160           0 :     readStringAttr( "Title", XMLNS_DIALOGS_PREFIX ":title" );
     161           0 :     uno::Reference< container::XNameContainer > xControlContainer( _xProps, uno::UNO_QUERY );
     162           0 :     if ( xControlContainer.is() && xControlContainer->getElementNames().getLength() )
     163             :     {
     164           0 :         ElementDescriptor * pElem = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":bulletinboard", _xDocument );
     165           0 :         pElem->readBullitinBoard( all_styles );
     166           0 :         addSubElement( pElem );
     167             :     }
     168           0 :     readEvents();
     169           0 : }
     170             : 
     171           0 : void ElementDescriptor::readButtonModel( StyleBag * all_styles )
     172             :     SAL_THROW( (Exception) )
     173             : {
     174             :     // collect styles
     175           0 :     Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 );
     176           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     177           0 :         aStyle._set |= 0x1;
     178           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     179           0 :         aStyle._set |= 0x2;
     180           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     181           0 :         aStyle._set |= 0x20;
     182           0 :     if (readFontProps( this, aStyle ))
     183           0 :         aStyle._set |= 0x8;
     184           0 :     if (aStyle._set)
     185             :     {
     186           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     187             :     }
     188             : 
     189             :     // collect elements
     190           0 :     readDefaults();
     191           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     192           0 :     readBoolAttr( "DefaultButton", XMLNS_DIALOGS_PREFIX ":default" );
     193           0 :     readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" );
     194           0 :     readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
     195           0 :     readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" );
     196           0 :     readButtonTypeAttr( "PushButtonType", XMLNS_DIALOGS_PREFIX ":button-type" );
     197           0 :     readImageURLAttr( "ImageURL", XMLNS_DIALOGS_PREFIX ":image-src" );
     198             : 
     199             : 
     200           0 :     readImagePositionAttr( "ImagePosition", XMLNS_DIALOGS_PREFIX ":image-position" );
     201           0 :     readImageAlignAttr( "ImageAlign", XMLNS_DIALOGS_PREFIX ":image-align" );
     202             : 
     203           0 :     if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) ))
     204           0 :         readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ );
     205             : 
     206           0 :     if (extract_throw<bool>( _xProps->getPropertyValue( "Toggle" ) ))
     207           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":toggled", "1" );
     208             : 
     209           0 :     readBoolAttr( "FocusOnClick", XMLNS_DIALOGS_PREFIX ":grab-focus" );
     210           0 :     readBoolAttr( "MultiLine",XMLNS_DIALOGS_PREFIX ":multiline" );
     211             : 
     212             : 
     213             :     // State
     214           0 :     sal_Int16 nState = 0;
     215           0 :     if (readProp( "State" ) >>= nState)
     216             :     {
     217           0 :         switch (nState)
     218             :         {
     219             :         case 0:
     220           0 :             addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "false" );
     221           0 :             break;
     222             :         case 1:
     223           0 :             addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "true" );
     224           0 :             break;
     225             :         default:
     226             :             OSL_FAIL( "### unexpected radio state!" );
     227           0 :             break;
     228             :         }
     229             :     }
     230             : 
     231           0 :     readEvents();
     232           0 : }
     233             : //__________________________________________________________________________________________________
     234           0 : void ElementDescriptor::readCheckBoxModel( StyleBag * all_styles )
     235             :     SAL_THROW( (Exception) )
     236             : {
     237             :     // collect styles
     238           0 :     Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 | 0x40 );
     239           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     240           0 :         aStyle._set |= 0x1;
     241           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     242           0 :         aStyle._set |= 0x2;
     243           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     244           0 :         aStyle._set |= 0x20;
     245           0 :     if (readFontProps( this, aStyle ))
     246           0 :         aStyle._set |= 0x8;
     247           0 :     if (readProp( "VisualEffect" ) >>= aStyle._visualEffect)
     248           0 :         aStyle._set |= 0x40;
     249           0 :     if (aStyle._set)
     250             :     {
     251           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     252             :     }
     253             : 
     254             :     // collect elements
     255           0 :     readDefaults();
     256           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     257           0 :     readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" );
     258           0 :     readAlignAttr( "Align",  XMLNS_DIALOGS_PREFIX ":align" );
     259           0 :     readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" );
     260           0 :     readImageURLAttr( "ImageURL", XMLNS_DIALOGS_PREFIX ":image-src" );
     261           0 :     readImagePositionAttr( "ImagePosition", XMLNS_DIALOGS_PREFIX ":image-position" );
     262           0 :     readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" );
     263             : 
     264           0 :     sal_Bool bTriState = sal_False;
     265           0 :     if ((readProp( "TriState" ) >>= bTriState) && bTriState)
     266             :     {
     267           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":tristate", "true" );
     268             :     }
     269           0 :     sal_Int16 nState = 0;
     270           0 :     if (_xProps->getPropertyValue( "State" ) >>= nState)
     271             :     {
     272           0 :         switch (nState)
     273             :         {
     274             :         case 0:
     275           0 :             addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "false" );
     276           0 :             break;
     277             :         case 1:
     278           0 :             addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "true" );
     279           0 :             break;
     280             :         case 2: // tristate=true exported, checked omitted => dont know!
     281             :             OSL_ENSURE( bTriState, "### detected tristate value, but TriState is not set!" );
     282           0 :             break;
     283             :         default:
     284             :             OSL_FAIL( "### unexpected checkbox state!" );
     285           0 :             break;
     286             :         }
     287             :     }
     288           0 :     readEvents();
     289           0 : }
     290             : //__________________________________________________________________________________________________
     291           0 : void ElementDescriptor::readComboBoxModel( StyleBag * all_styles )
     292             :     SAL_THROW( (Exception) )
     293             : {
     294             :     // collect styles
     295           0 :     Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
     296           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     297           0 :         aStyle._set |= 0x1;
     298           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     299           0 :         aStyle._set |= 0x2;
     300           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     301           0 :         aStyle._set |= 0x20;
     302           0 :     if (readBorderProps( this, aStyle ))
     303           0 :         aStyle._set |= 0x4;
     304           0 :     if (readFontProps( this, aStyle ))
     305           0 :         aStyle._set |= 0x8;
     306           0 :     if (aStyle._set)
     307             :     {
     308           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     309             :     }
     310             : 
     311             :     // collect elements
     312           0 :     readDefaults();
     313           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     314           0 :     readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":value" );
     315           0 :     readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
     316           0 :     readBoolAttr( "Autocomplete", XMLNS_DIALOGS_PREFIX ":autocomplete" );
     317           0 :     readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
     318           0 :     readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
     319           0 :     readBoolAttr( "Dropdown", XMLNS_DIALOGS_PREFIX ":spin" );
     320           0 :     readShortAttr( "MaxTextLen", XMLNS_DIALOGS_PREFIX ":maxlength" );
     321           0 :     readShortAttr( "LineCount", XMLNS_DIALOGS_PREFIX ":linecount" );
     322             :     // Cell Range, Ref Cell etc.
     323           0 :     readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" );
     324           0 :     readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":source-cell-range" );
     325             : 
     326             :     // string item list
     327           0 :     Sequence< OUString > itemValues;
     328           0 :     if ((readProp( "StringItemList" ) >>= itemValues) &&  itemValues.getLength() > 0)
     329             :     {
     330           0 :         ElementDescriptor * popup = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menupopup", _xDocument );
     331             : 
     332           0 :         OUString const * pItemValues = itemValues.getConstArray();
     333           0 :         for ( sal_Int32 nPos = 0; nPos < itemValues.getLength(); ++nPos )
     334             :         {
     335           0 :             ElementDescriptor * item = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menuitem", _xDocument );
     336           0 :             item->addAttribute( XMLNS_DIALOGS_PREFIX ":value", pItemValues[ nPos ] );
     337           0 :             popup->addSubElement( item );
     338             :         }
     339             : 
     340           0 :         addSubElement( popup );
     341             :     }
     342           0 :     readEvents();
     343           0 : }
     344             : //__________________________________________________________________________________________________
     345           0 : void ElementDescriptor::readListBoxModel( StyleBag * all_styles )
     346             :     SAL_THROW( (Exception) )
     347             : {
     348             :     // collect styles
     349           0 :     Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
     350           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     351           0 :         aStyle._set |= 0x1;
     352           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     353           0 :         aStyle._set |= 0x2;
     354           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     355           0 :         aStyle._set |= 0x20;
     356           0 :     if (readBorderProps( this, aStyle ))
     357           0 :         aStyle._set |= 0x4;
     358           0 :     if (readFontProps( this, aStyle ))
     359           0 :         aStyle._set |= 0x8;
     360           0 :     if (aStyle._set)
     361             :     {
     362           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     363             :     }
     364             : 
     365             :     // collect elements
     366           0 :     readDefaults();
     367           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     368           0 :     readBoolAttr( "MultiSelection", XMLNS_DIALOGS_PREFIX ":multiselection" );
     369           0 :     readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
     370           0 :     readBoolAttr( "Dropdown", XMLNS_DIALOGS_PREFIX ":spin" );
     371           0 :     readShortAttr( "LineCount", XMLNS_DIALOGS_PREFIX ":linecount" );
     372           0 :     readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
     373           0 :     readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" );
     374           0 :     readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":source-cell-range" );
     375             :     // string item list
     376           0 :     Sequence< OUString > itemValues;
     377           0 :     if ((readProp( "StringItemList" ) >>= itemValues) && itemValues.getLength() > 0)
     378             :     {
     379           0 :         ElementDescriptor * popup = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menupopup", _xDocument );
     380             : 
     381           0 :         OUString const * pItemValues = itemValues.getConstArray();
     382             :         sal_Int32 nPos;
     383           0 :         for ( nPos = 0; nPos < itemValues.getLength(); ++nPos )
     384             :         {
     385           0 :             ElementDescriptor * item = new ElementDescriptor(_xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":menuitem", _xDocument );
     386           0 :             item->addAttribute( XMLNS_DIALOGS_PREFIX ":value", pItemValues[ nPos ] );
     387           0 :             popup->addSubElement( item );
     388             :         }
     389             : 
     390           0 :         Sequence< sal_Int16 > selected;
     391           0 :         if (readProp( "SelectedItems" ) >>= selected)
     392             :         {
     393           0 :             sal_Int16 const * pSelected = selected.getConstArray();
     394           0 :             for ( nPos = selected.getLength(); nPos--; )
     395             :             {
     396             :                 ElementDescriptor * item = static_cast< ElementDescriptor * >(
     397           0 :                     popup->getSubElement( pSelected[ nPos ] ).get() );
     398           0 :                 item->addAttribute( XMLNS_DIALOGS_PREFIX ":selected", "true" );
     399             :             }
     400             :         }
     401             : 
     402           0 :         addSubElement( popup );
     403             :     }
     404           0 :     readEvents();
     405           0 : }
     406             : //__________________________________________________________________________________________________
     407           0 : void ElementDescriptor::readRadioButtonModel( StyleBag * all_styles  )
     408             :     SAL_THROW( (Exception) )
     409             : {
     410             :     // collect styles
     411           0 :     Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 | 0x40 );
     412           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     413           0 :         aStyle._set |= 0x1;
     414           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     415           0 :         aStyle._set |= 0x2;
     416           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     417           0 :         aStyle._set |= 0x20;
     418           0 :     if (readFontProps( this, aStyle ))
     419           0 :         aStyle._set |= 0x8;
     420           0 :     if (readProp( "VisualEffect" ) >>= aStyle._visualEffect)
     421           0 :         aStyle._set |= 0x40;
     422           0 :     if (aStyle._set)
     423             :     {
     424           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id" , all_styles->getStyleId( aStyle ) );
     425             :     }
     426             : 
     427             :     // collect elements
     428           0 :     readDefaults();
     429           0 :     readBoolAttr("Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     430           0 :     readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" );
     431           0 :     readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
     432           0 :     readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" );
     433           0 :     readImageURLAttr( "ImageURL", XMLNS_DIALOGS_PREFIX ":image-src" );
     434           0 :     readImagePositionAttr( "ImagePosition", XMLNS_DIALOGS_PREFIX ":image-position" );
     435           0 :     readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" );
     436           0 :     readStringAttr( "GroupName", XMLNS_DIALOGS_PREFIX ":group-name" );
     437             : 
     438           0 :     sal_Int16 nState = 0;
     439           0 :     if (readProp( "State" ) >>= nState)
     440             :     {
     441           0 :         switch (nState)
     442             :         {
     443             :         case 0:
     444           0 :             addAttribute(XMLNS_DIALOGS_PREFIX ":checked", "false" );
     445           0 :             break;
     446             :         case 1:
     447           0 :             addAttribute( XMLNS_DIALOGS_PREFIX ":checked", "true" );
     448           0 :             break;
     449             :         default:
     450             :             OSL_FAIL( "### unexpected radio state!" );
     451           0 :             break;
     452             :         }
     453             :     }
     454           0 :     readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" );
     455           0 :     readEvents();
     456           0 : }
     457             : //__________________________________________________________________________________________________
     458           0 : void ElementDescriptor::readGroupBoxModel( StyleBag * all_styles )
     459             :     SAL_THROW( (Exception) )
     460             : {
     461             :     // collect styles
     462           0 :     Style aStyle( 0x2 | 0x8 | 0x20 );
     463           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     464           0 :         aStyle._set |= 0x2;
     465           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     466           0 :         aStyle._set |= 0x20;
     467           0 :     if (readFontProps( this, aStyle ))
     468           0 :         aStyle._set |= 0x8;
     469           0 :     if (aStyle._set)
     470             :     {
     471           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     472             :     }
     473             : 
     474             :     // collect elements
     475           0 :     readDefaults();
     476             : 
     477           0 :     OUString aTitle;
     478           0 :     if (readProp( "Label" ) >>= aTitle)
     479             :     {
     480           0 :         ElementDescriptor * title = new ElementDescriptor( _xProps, _xPropState, XMLNS_DIALOGS_PREFIX ":title", _xDocument );
     481           0 :         title->addAttribute( XMLNS_DIALOGS_PREFIX ":value", aTitle );
     482           0 :         addSubElement( title );
     483             :     }
     484             : 
     485           0 :     readEvents();
     486           0 : }
     487             : //__________________________________________________________________________________________________
     488           0 : void ElementDescriptor::readFixedTextModel( StyleBag * all_styles )
     489             :     SAL_THROW( (Exception) )
     490             : {
     491             :     // collect styles
     492           0 :     Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
     493           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     494           0 :         aStyle._set |= 0x1;
     495           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     496           0 :         aStyle._set |= 0x2;
     497           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     498           0 :         aStyle._set |= 0x20;
     499           0 :     if (readBorderProps( this, aStyle ))
     500           0 :         aStyle._set |= 0x4;
     501           0 :     if (readFontProps( this, aStyle ))
     502           0 :         aStyle._set |= 0x8;
     503           0 :     if (aStyle._set)
     504             :     {
     505           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     506             :     }
     507             : 
     508             :     // collect elements
     509           0 :     readDefaults();
     510           0 :     readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" );
     511           0 :     readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
     512           0 :     readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" );
     513           0 :     readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" );
     514           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     515           0 :     readBoolAttr( "NoLabel", XMLNS_DIALOGS_PREFIX ":nolabel" );
     516           0 :     readEvents();
     517           0 : }
     518             : //__________________________________________________________________________________________________
     519           0 : void ElementDescriptor::readFixedHyperLinkModel( StyleBag * all_styles )
     520             :     SAL_THROW( (Exception) )
     521             : {
     522             :     // collect styles
     523           0 :     Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
     524           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     525           0 :         aStyle._set |= 0x1;
     526           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     527           0 :         aStyle._set |= 0x2;
     528           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     529           0 :         aStyle._set |= 0x20;
     530           0 :     if (readBorderProps( this, aStyle ))
     531           0 :         aStyle._set |= 0x4;
     532           0 :     if (readFontProps( this, aStyle ))
     533           0 :         aStyle._set |= 0x8;
     534           0 :     if (aStyle._set)
     535             :     {
     536           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     537             :     }
     538             : 
     539             :     // collect elements
     540           0 :     readDefaults();
     541           0 :     readStringAttr( "Label",XMLNS_DIALOGS_PREFIX ":value" );
     542           0 :     readStringAttr( "URL", XMLNS_DIALOGS_PREFIX ":url" );
     543           0 :     readStringAttr( "Description", XMLNS_DIALOGS_PREFIX ":description" );
     544           0 :     readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
     545           0 :     readVerticalAlignAttr( "VerticalAlign", XMLNS_DIALOGS_PREFIX ":valign" );
     546           0 :     readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" );
     547           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     548           0 :     readBoolAttr( "NoLabel", XMLNS_DIALOGS_PREFIX ":nolabel" );
     549           0 :     readEvents();
     550           0 : }
     551             : //__________________________________________________________________________________________________
     552           0 : void ElementDescriptor::readEditModel( StyleBag * all_styles )
     553             :     SAL_THROW( (Exception) )
     554             : {
     555             :     // collect styles
     556           0 :     Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
     557           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     558           0 :         aStyle._set |= 0x1;
     559           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     560           0 :         aStyle._set |= 0x2;
     561           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     562           0 :         aStyle._set |= 0x20;
     563           0 :     if (readBorderProps( this, aStyle ))
     564           0 :         aStyle._set |= 0x4;
     565           0 :     if (readFontProps( this, aStyle ))
     566           0 :         aStyle._set |= 0x8;
     567           0 :     if (aStyle._set)
     568             :     {
     569           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     570             :     }
     571             : 
     572             :     // collect elements
     573           0 :     readDefaults();
     574           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     575           0 :     readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
     576           0 :     readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
     577           0 :     readBoolAttr( "HardLineBreaks", XMLNS_DIALOGS_PREFIX ":hard-linebreaks" );
     578           0 :     readBoolAttr( "HScroll", XMLNS_DIALOGS_PREFIX ":hscroll" );
     579           0 :     readBoolAttr( "VScroll", XMLNS_DIALOGS_PREFIX ":vscroll" );
     580           0 :     readShortAttr( "MaxTextLen", XMLNS_DIALOGS_PREFIX ":maxlength" );
     581           0 :     readBoolAttr( "MultiLine", XMLNS_DIALOGS_PREFIX ":multiline" );
     582           0 :     readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
     583           0 :     readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":value" );
     584           0 :     readLineEndFormatAttr( "LineEndFormat", XMLNS_DIALOGS_PREFIX ":lineend-format" );
     585           0 :     sal_Int16 nEcho = 0;
     586           0 :     if (readProp( "EchoChar" ) >>= nEcho)
     587             :     {
     588           0 :         sal_Unicode cEcho = (sal_Unicode)nEcho;
     589           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":echochar", OUString( &cEcho, 1 ) );
     590             :     }
     591           0 :     readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" );
     592           0 :     readEvents();
     593           0 : }
     594             : //__________________________________________________________________________________________________
     595           0 : void ElementDescriptor::readImageControlModel( StyleBag * all_styles )
     596             :     SAL_THROW( (Exception) )
     597             : {
     598             :     // collect styles
     599           0 :     Style aStyle( 0x1 | 0x4 );
     600           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     601           0 :         aStyle._set |= 0x1;
     602           0 :     if (readBorderProps( this, aStyle ))
     603           0 :         aStyle._set |= 0x4;
     604           0 :     if (aStyle._set)
     605             :     {
     606           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     607             :     }
     608             : 
     609             :     // collect elements
     610           0 :     readDefaults();
     611           0 :     readBoolAttr( "ScaleImage", XMLNS_DIALOGS_PREFIX ":scale-image" );
     612           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     613           0 :     readImageURLAttr( "ImageURL", XMLNS_DIALOGS_PREFIX ":src" );
     614           0 :     readEvents();
     615           0 : }
     616             : //__________________________________________________________________________________________________
     617           0 : void ElementDescriptor::readFileControlModel( StyleBag * all_styles )
     618             :     SAL_THROW( (Exception) )
     619             : {
     620             :     // collect styles
     621           0 :     Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
     622           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     623           0 :         aStyle._set |= 0x1;
     624           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     625           0 :         aStyle._set |= 0x2;
     626           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     627           0 :         aStyle._set |= 0x20;
     628           0 :     if (readBorderProps( this, aStyle ))
     629           0 :         aStyle._set |= 0x4;
     630           0 :     if (readFontProps( this, aStyle ))
     631           0 :         aStyle._set |= 0x8;
     632           0 :     if (aStyle._set)
     633             :     {
     634           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     635             :     }
     636             : 
     637             :     // collect elements
     638           0 :     readDefaults();
     639           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     640           0 :     readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
     641           0 :     readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":value" );
     642           0 :     readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
     643           0 :     readEvents();
     644           0 : }
     645             : //__________________________________________________________________________________________________
     646           0 : void ElementDescriptor::readTreeControlModel( StyleBag * all_styles )
     647             :     SAL_THROW( (Exception) )
     648             : {
     649             :     // collect styles
     650           0 :     Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
     651           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     652           0 :         aStyle._set |= 0x1;
     653           0 :     if (readBorderProps( this, aStyle ))
     654           0 :         aStyle._set |= 0x4;
     655           0 :     if (aStyle._set)
     656             :     {
     657           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     658             :     }
     659             : 
     660             :     // collect elements
     661           0 :     readDefaults();
     662           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     663           0 :     readSelectionTypeAttr( "SelectionType", XMLNS_DIALOGS_PREFIX ":selectiontype" );
     664             : 
     665           0 :     readBoolAttr( "RootDisplayed", XMLNS_DIALOGS_PREFIX ":rootdisplayed" );
     666           0 :     readBoolAttr( "ShowsHandles", XMLNS_DIALOGS_PREFIX ":showshandles" );
     667           0 :     readBoolAttr( "ShowsRootHandles", XMLNS_DIALOGS_PREFIX ":showsroothandles" );
     668           0 :     readBoolAttr( "Editable", XMLNS_DIALOGS_PREFIX ":editable" );
     669           0 :     readBoolAttr( "InvokesStopNodeEditing", XMLNS_DIALOGS_PREFIX ":invokesstopnodeediting" );
     670           0 :     readLongAttr( "RowHeight", XMLNS_DIALOGS_PREFIX ":rowheight" );
     671           0 :     readEvents();
     672           0 : }
     673             : //__________________________________________________________________________________________________
     674           0 : void ElementDescriptor::readCurrencyFieldModel( StyleBag * all_styles )
     675             :     SAL_THROW( (Exception) )
     676             : {
     677             :     // collect styles
     678           0 :     Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
     679           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     680           0 :         aStyle._set |= 0x1;
     681           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     682           0 :         aStyle._set |= 0x2;
     683           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     684           0 :         aStyle._set |= 0x20;
     685           0 :     if (readBorderProps( this, aStyle ))
     686           0 :         aStyle._set |= 0x4;
     687           0 :     if (readFontProps( this, aStyle ))
     688           0 :         aStyle._set |= 0x8;
     689           0 :     if (aStyle._set)
     690             :     {
     691           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     692             :     }
     693             : 
     694             :     // collect elements
     695           0 :     readDefaults();
     696           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     697           0 :     readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
     698           0 :     readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
     699           0 :     readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" );
     700           0 :     readStringAttr( "CurrencySymbol", XMLNS_DIALOGS_PREFIX ":currency-symbol" );
     701           0 :     readShortAttr( "DecimalAccuracy", XMLNS_DIALOGS_PREFIX ":decimal-accuracy" );
     702           0 :     readBoolAttr( "ShowThousandsSeparator", XMLNS_DIALOGS_PREFIX ":thousands-separator" );
     703           0 :     readDoubleAttr( "Value", XMLNS_DIALOGS_PREFIX ":value" );
     704           0 :     readDoubleAttr( "ValueMin", XMLNS_DIALOGS_PREFIX ":value-min" );
     705           0 :     readDoubleAttr(  "ValueMax", XMLNS_DIALOGS_PREFIX ":value-max" );
     706           0 :     readDoubleAttr( "ValueStep", XMLNS_DIALOGS_PREFIX ":value-step" );
     707           0 :     readBoolAttr(  "Spin", XMLNS_DIALOGS_PREFIX ":spin" );
     708           0 :     if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) ))
     709           0 :         readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ );
     710           0 :     readBoolAttr("PrependCurrencySymbol", XMLNS_DIALOGS_PREFIX ":prepend-symbol" );
     711           0 :     readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" );
     712           0 :     readEvents();
     713           0 : }
     714             : //__________________________________________________________________________________________________
     715           0 : void ElementDescriptor::readDateFieldModel( StyleBag * all_styles )
     716             :     SAL_THROW( (Exception) )
     717             : {
     718             :     // collect styles
     719           0 :     Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
     720           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     721           0 :         aStyle._set |= 0x1;
     722           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     723           0 :         aStyle._set |= 0x2;
     724           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     725           0 :         aStyle._set |= 0x20;
     726           0 :     if (readBorderProps( this, aStyle ))
     727           0 :         aStyle._set |= 0x4;
     728           0 :     if (readFontProps( this, aStyle ))
     729           0 :         aStyle._set |= 0x8;
     730           0 :     if (aStyle._set)
     731             :     {
     732           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     733             :     }
     734             : 
     735             :     // collect elements
     736           0 :     readDefaults();
     737           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     738           0 :     readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
     739           0 :     readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
     740           0 :     readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" );
     741           0 :     readDateFormatAttr( "DateFormat", XMLNS_DIALOGS_PREFIX ":date-format" );
     742           0 :     readBoolAttr( "DateShowCentury", XMLNS_DIALOGS_PREFIX ":show-century" );
     743           0 :     readLongAttr( "Date", XMLNS_DIALOGS_PREFIX ":value" );
     744           0 :     readLongAttr( "DateMin", XMLNS_DIALOGS_PREFIX ":value-min" );
     745           0 :     readLongAttr( "DateMax", XMLNS_DIALOGS_PREFIX ":value-max" );
     746           0 :     readBoolAttr( "Spin", XMLNS_DIALOGS_PREFIX ":spin" );
     747           0 :     if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) ))
     748           0 :         readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ );
     749           0 :     readBoolAttr( "Dropdown", XMLNS_DIALOGS_PREFIX ":dropdown" );
     750           0 :     readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":text" );
     751           0 :     readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" );
     752           0 :     readEvents();
     753           0 : }
     754             : //__________________________________________________________________________________________________
     755           0 : void ElementDescriptor::readNumericFieldModel( StyleBag * all_styles )
     756             :     SAL_THROW( (Exception) )
     757             : {
     758             :     // collect styles
     759           0 :     Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
     760           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     761           0 :         aStyle._set |= 0x1;
     762           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     763           0 :         aStyle._set |= 0x2;
     764           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     765           0 :         aStyle._set |= 0x20;
     766           0 :     if (readBorderProps( this, aStyle ))
     767           0 :         aStyle._set |= 0x4;
     768           0 :     if (readFontProps( this, aStyle ))
     769           0 :         aStyle._set |= 0x8;
     770           0 :     if (aStyle._set)
     771             :     {
     772           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     773             :     }
     774             : 
     775             :     // collect elements
     776           0 :     readDefaults();
     777           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     778           0 :     readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
     779           0 :     readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
     780           0 :     readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" );
     781           0 :     readShortAttr( "DecimalAccuracy", XMLNS_DIALOGS_PREFIX ":decimal-accuracy" );
     782           0 :     readBoolAttr( "ShowThousandsSeparator", XMLNS_DIALOGS_PREFIX ":thousands-separator" );
     783           0 :     readDoubleAttr( "Value", XMLNS_DIALOGS_PREFIX ":value" );
     784           0 :     readDoubleAttr( "ValueMin", XMLNS_DIALOGS_PREFIX ":value-min" );
     785           0 :     readDoubleAttr( "ValueMax", XMLNS_DIALOGS_PREFIX ":value-max" );
     786           0 :     readDoubleAttr( "ValueStep", XMLNS_DIALOGS_PREFIX ":value-step" );
     787           0 :     readBoolAttr( "Spin", XMLNS_DIALOGS_PREFIX ":spin" );
     788           0 :     if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) ))
     789           0 :         readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ );
     790           0 :     readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" );
     791           0 :     readEvents();
     792           0 : }
     793             : //__________________________________________________________________________________________________
     794           0 : void ElementDescriptor::readTimeFieldModel( StyleBag * all_styles )
     795             :     SAL_THROW( (Exception) )
     796             : {
     797             :     // collect styles
     798           0 :     Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
     799           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     800           0 :         aStyle._set |= 0x1;
     801           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     802           0 :         aStyle._set |= 0x2;
     803           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     804           0 :         aStyle._set |= 0x20;
     805           0 :     if (readBorderProps( this, aStyle ))
     806           0 :         aStyle._set |= 0x4;
     807           0 :     if (readFontProps( this, aStyle ))
     808           0 :         aStyle._set |= 0x8;
     809           0 :     if (aStyle._set)
     810             :     {
     811           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     812             :     }
     813             : 
     814             :     // collect elements
     815           0 :     readDefaults();
     816           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop");
     817           0 :     readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
     818           0 :     readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
     819           0 :     readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" );
     820           0 :     readTimeFormatAttr( "TimeFormat", XMLNS_DIALOGS_PREFIX ":time-format" );
     821           0 :     readLongAttr( "Time", XMLNS_DIALOGS_PREFIX ":value" );
     822           0 :     readLongAttr( "TimeMin", XMLNS_DIALOGS_PREFIX ":value-min" );
     823           0 :     readLongAttr( "TimeMax", XMLNS_DIALOGS_PREFIX ":value-max" );
     824           0 :     readBoolAttr( "Spin", XMLNS_DIALOGS_PREFIX ":spin" );
     825           0 :     if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) ))
     826           0 :         readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ );
     827           0 :     readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":text" );
     828           0 :     readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" );
     829           0 :     readEvents();
     830           0 : }
     831             : //__________________________________________________________________________________________________
     832           0 : void ElementDescriptor::readPatternFieldModel( StyleBag * all_styles )
     833             :     SAL_THROW( (Exception) )
     834             : {
     835             :     // collect styles
     836           0 :     Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
     837           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     838           0 :         aStyle._set |= 0x1;
     839           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     840           0 :         aStyle._set |= 0x2;
     841           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     842           0 :         aStyle._set |= 0x20;
     843           0 :     if (readBorderProps( this, aStyle ))
     844           0 :         aStyle._set |= 0x4;
     845           0 :     if (readFontProps( this, aStyle ))
     846           0 :         aStyle._set |= 0x8;
     847           0 :     if (aStyle._set)
     848             :     {
     849           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     850             :     }
     851             : 
     852             :     // collect elements
     853           0 :     readDefaults();
     854           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     855           0 :     readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
     856           0 :     readBoolAttr( "HideInactiveSelection", XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
     857           0 :     readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" );
     858           0 :     readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":value" );
     859           0 :     readShortAttr( "MaxTextLen", XMLNS_DIALOGS_PREFIX ":maxlength" );
     860           0 :     readStringAttr( "EditMask", XMLNS_DIALOGS_PREFIX ":edit-mask" );
     861           0 :     readStringAttr( "LiteralMask", XMLNS_DIALOGS_PREFIX ":literal-mask" );
     862           0 :     readEvents();
     863           0 : }
     864             : //__________________________________________________________________________________________________
     865           0 : void ElementDescriptor::readFormattedFieldModel( StyleBag * all_styles )
     866             :     SAL_THROW( (Exception) )
     867             : {
     868             :     // collect styles
     869           0 :     Style aStyle( 0x1 | 0x2 | 0x4 | 0x8 | 0x20 );
     870           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     871           0 :         aStyle._set |= 0x1;
     872           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     873           0 :         aStyle._set |= 0x2;
     874           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     875           0 :         aStyle._set |= 0x20;
     876           0 :     if (readBorderProps( this, aStyle ))
     877           0 :         aStyle._set |= 0x4;
     878           0 :     if (readFontProps( this, aStyle ))
     879           0 :         aStyle._set |= 0x8;
     880           0 :     if (aStyle._set)
     881             :     {
     882           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     883             :     }
     884             : 
     885             :     // collect elements
     886           0 :     readDefaults();
     887           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     888           0 :     readBoolAttr( "ReadOnly", XMLNS_DIALOGS_PREFIX ":readonly" );
     889           0 :     readBoolAttr( "HideInactiveSelection",XMLNS_DIALOGS_PREFIX ":hide-inactive-selection" );
     890           0 :     readBoolAttr( "StrictFormat", XMLNS_DIALOGS_PREFIX ":strict-format" );
     891           0 :     readStringAttr( "Text", XMLNS_DIALOGS_PREFIX ":text" );
     892           0 :     readAlignAttr( "Align", XMLNS_DIALOGS_PREFIX ":align" );
     893           0 :     readShortAttr( "MaxTextLen", XMLNS_DIALOGS_PREFIX ":maxlength" );
     894           0 :     readBoolAttr( "Spin", XMLNS_DIALOGS_PREFIX ":spin" );
     895           0 :     if (extract_throw<bool>( _xProps->getPropertyValue( "Repeat" ) ))
     896           0 :         readLongAttr( "RepeatDelay",XMLNS_DIALOGS_PREFIX ":repeat", true /* force */ );
     897             : 
     898           0 :     Any a( readProp( "EffectiveDefault" ) );
     899           0 :     switch (a.getValueTypeClass())
     900             :     {
     901             :     case TypeClass_DOUBLE:
     902           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":value-default", OUString::valueOf( *(double const *)a.getValue() ) );
     903           0 :         break;
     904             :     case TypeClass_STRING:
     905           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":value-default", *(OUString const *)a.getValue() );
     906           0 :         break;
     907             :     default:
     908           0 :         break;
     909             :     }
     910           0 :     readDoubleAttr( "EffectiveMin", XMLNS_DIALOGS_PREFIX ":value-min" );
     911           0 :     readDoubleAttr( "EffectiveMax", XMLNS_DIALOGS_PREFIX ":value-max" );
     912           0 :     readDoubleAttr( "EffectiveValue", XMLNS_DIALOGS_PREFIX ":value" );
     913             : 
     914             :     // format spec
     915           0 :     sal_Int32 nKey = 0;
     916           0 :     if (readProp( "FormatKey" ) >>= nKey)
     917             :     {
     918           0 :         Reference< util::XNumberFormatsSupplier > xSupplier;
     919           0 :         if (readProp( "FormatsSupplier" ) >>= xSupplier)
     920             :         {
     921             :             addNumberFormatAttr(
     922           0 :                 xSupplier->getNumberFormats()->getByKey( nKey ) );
     923           0 :         }
     924             :     }
     925           0 :     readBoolAttr( "TreatAsNumber", XMLNS_DIALOGS_PREFIX ":treat-as-number" );
     926           0 :     readBoolAttr( "EnforceFormat", XMLNS_DIALOGS_PREFIX ":enforce-format" );
     927             : 
     928           0 :     readEvents();
     929           0 : }
     930             : 
     931           0 : void ElementDescriptor::readSpinButtonModel( StyleBag * all_styles )
     932             :     SAL_THROW( (Exception) )
     933             : {
     934             :     // collect styles
     935           0 :     Style aStyle( 0x1 | 0x4 );
     936           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     937           0 :         aStyle._set |= 0x1;
     938           0 :     if (readBorderProps( this, aStyle ))
     939           0 :         aStyle._set |= 0x4;
     940           0 :     if (aStyle._set)
     941             :     {
     942           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     943             :     }
     944             : 
     945             :     // collect elements
     946           0 :     readDefaults();
     947           0 :     readOrientationAttr( "Orientation", XMLNS_DIALOGS_PREFIX ":align" );
     948           0 :     readLongAttr( "SpinIncrement", XMLNS_DIALOGS_PREFIX ":increment" );
     949           0 :     readLongAttr( "SpinValue", XMLNS_DIALOGS_PREFIX ":curval" );
     950           0 :     readLongAttr( "SpinValueMax", XMLNS_DIALOGS_PREFIX ":maxval" );
     951           0 :     readLongAttr( "SpinValueMin", XMLNS_DIALOGS_PREFIX ":minval" );
     952           0 :     readLongAttr( "Repeat", XMLNS_DIALOGS_PREFIX ":repeat" );
     953           0 :     readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat-delay" );
     954           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
     955           0 :     readHexLongAttr( "SymbolColor", XMLNS_DIALOGS_PREFIX ":symbol-color" );
     956           0 :     readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" );
     957           0 :     readEvents();
     958           0 : }
     959             : 
     960             : //__________________________________________________________________________________________________
     961           0 : void ElementDescriptor::readFixedLineModel( StyleBag * all_styles )
     962             :     SAL_THROW( (Exception) )
     963             : {
     964             :     // collect styles
     965           0 :     Style aStyle( 0x2 | 0x8 | 0x20 );
     966           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
     967           0 :         aStyle._set |= 0x2;
     968           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
     969           0 :         aStyle._set |= 0x20;
     970           0 :     if (readFontProps( this, aStyle ))
     971           0 :         aStyle._set |= 0x8;
     972           0 :     if (aStyle._set)
     973             :     {
     974           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     975             :     }
     976             : 
     977             :     // collect elements
     978           0 :     readDefaults();
     979           0 :     readStringAttr( "Label", XMLNS_DIALOGS_PREFIX ":value" );
     980           0 :     readOrientationAttr( "Orientation", XMLNS_DIALOGS_PREFIX ":align" );
     981           0 :     readEvents();
     982           0 : }
     983             : //__________________________________________________________________________________________________
     984           0 : void ElementDescriptor::readProgressBarModel( StyleBag * all_styles )
     985             :     SAL_THROW( (Exception) )
     986             : {
     987             :     // collect styles
     988           0 :     Style aStyle( 0x1 | 0x4 | 0x10 );
     989           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
     990           0 :         aStyle._set |= 0x1;
     991           0 :     if (readBorderProps( this, aStyle ))
     992           0 :         aStyle._set |= 0x4;
     993           0 :     if (readProp( "FillColor" ) >>= aStyle._descr)
     994           0 :         aStyle._set |= 0x10;
     995           0 :     if (aStyle._set)
     996             :     {
     997           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
     998             :     }
     999             : 
    1000             :     // collect elements
    1001           0 :     readDefaults();
    1002           0 :     readLongAttr( "ProgressValue", XMLNS_DIALOGS_PREFIX ":value" );
    1003           0 :     readLongAttr( "ProgressValueMin", XMLNS_DIALOGS_PREFIX ":value-min" );
    1004           0 :     readLongAttr( "ProgressValueMax", XMLNS_DIALOGS_PREFIX ":value-max" );
    1005           0 :     readEvents();
    1006           0 : }
    1007             : //__________________________________________________________________________________________________
    1008           0 : void ElementDescriptor::readScrollBarModel( StyleBag * all_styles )
    1009             :     SAL_THROW( (Exception) )
    1010             : {
    1011             :     // collect styles
    1012           0 :     Style aStyle( 0x1 | 0x4 );
    1013           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
    1014           0 :         aStyle._set |= 0x1;
    1015           0 :     if (readBorderProps( this, aStyle ))
    1016           0 :         aStyle._set |= 0x4;
    1017           0 :     if (aStyle._set)
    1018             :     {
    1019           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
    1020             :     }
    1021             : 
    1022             :     // collect elements
    1023           0 :     readDefaults();
    1024           0 :     readOrientationAttr( "Orientation", XMLNS_DIALOGS_PREFIX ":align" );
    1025           0 :     readLongAttr( "BlockIncrement", XMLNS_DIALOGS_PREFIX ":pageincrement" );
    1026           0 :     readLongAttr( "LineIncrement", XMLNS_DIALOGS_PREFIX ":increment" );
    1027           0 :     readLongAttr( "ScrollValue", XMLNS_DIALOGS_PREFIX ":curpos" );
    1028           0 :     readLongAttr( "ScrollValueMax", XMLNS_DIALOGS_PREFIX ":maxpos" );
    1029           0 :     readLongAttr( "ScrollValueMin", XMLNS_DIALOGS_PREFIX ":minpos" );
    1030           0 :     readLongAttr( "VisibleSize", XMLNS_DIALOGS_PREFIX ":visible-size" );
    1031           0 :     readLongAttr( "RepeatDelay", XMLNS_DIALOGS_PREFIX ":repeat" );
    1032           0 :     readBoolAttr( "Tabstop", XMLNS_DIALOGS_PREFIX ":tabstop" );
    1033           0 :     readBoolAttr( "LiveScroll", XMLNS_DIALOGS_PREFIX ":live-scroll" );
    1034           0 :     readHexLongAttr( "SymbolColor", XMLNS_DIALOGS_PREFIX ":symbol-color" );
    1035           0 :     readDataAwareAttr( XMLNS_DIALOGS_PREFIX ":linked-cell" );
    1036           0 :     readEvents();
    1037           0 : }
    1038             : //__________________________________________________________________________________________________
    1039           0 : void ElementDescriptor::readDialogModel( StyleBag * all_styles )
    1040             :     SAL_THROW( (Exception) )
    1041             : {
    1042             :     // collect elements
    1043           0 :     addAttribute( "xmlns:" XMLNS_DIALOGS_PREFIX, XMLNS_DIALOGS_URI );
    1044           0 :     addAttribute( "xmlns:" XMLNS_SCRIPT_PREFIX, XMLNS_SCRIPT_URI );
    1045             : 
    1046             :     // collect styles
    1047           0 :     Style aStyle( 0x1 | 0x2 | 0x8 | 0x20 );
    1048           0 :     if (readProp( "BackgroundColor" ) >>= aStyle._backgroundColor)
    1049           0 :         aStyle._set |= 0x1;
    1050           0 :     if (readProp( "TextColor" ) >>= aStyle._textColor)
    1051           0 :         aStyle._set |= 0x2;
    1052           0 :     if (readProp( "TextLineColor" ) >>= aStyle._textLineColor)
    1053           0 :         aStyle._set |= 0x20;
    1054           0 :     if (readFontProps( this, aStyle ))
    1055           0 :         aStyle._set |= 0x8;
    1056           0 :     if (aStyle._set)
    1057             :     {
    1058           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":style-id", all_styles->getStyleId( aStyle ) );
    1059             :     }
    1060             : 
    1061             :     // collect elements
    1062           0 :     readDefaults( false, false );
    1063           0 :     readBoolAttr("Closeable", XMLNS_DIALOGS_PREFIX ":closeable" );
    1064           0 :     readBoolAttr( "Moveable", XMLNS_DIALOGS_PREFIX ":moveable" );
    1065           0 :     readBoolAttr( "Sizeable", XMLNS_DIALOGS_PREFIX ":resizeable" );
    1066           0 :     readStringAttr( "Title", XMLNS_DIALOGS_PREFIX ":title" );
    1067             : 
    1068           0 :     readScrollableSettings();
    1069           0 :     Any aDecorationAny( _xProps->getPropertyValue( "Decoration" ) );
    1070           0 :     bool bDecoration = sal_False;
    1071           0 :     if ( (aDecorationAny >>= bDecoration) && !bDecoration )
    1072           0 :         addAttribute( XMLNS_DIALOGS_PREFIX ":withtitlebar", "false" );
    1073           0 :     readImageURLAttr( "ImageURL", XMLNS_DIALOGS_PREFIX ":image-src" );
    1074           0 :     readEvents();
    1075           0 : }
    1076             : 
    1077           0 : void ElementDescriptor::readBullitinBoard( StyleBag * all_styles )
    1078             :     SAL_THROW( (Exception) )
    1079             : {
    1080             :     // collect elements
    1081           0 :     ::std::vector< ElementDescriptor* > all_elements;
    1082             :     // read out all props
    1083           0 :     Reference<  container::XNameContainer > xDialogModel( _xProps, UNO_QUERY );
    1084           0 :     if ( !xDialogModel.is() )
    1085           0 :         return; // #TODO throw???
    1086           0 :     Sequence< OUString > aElements( xDialogModel->getElementNames() );
    1087           0 :     OUString const * pElements = aElements.getConstArray();
    1088             : 
    1089           0 :     ElementDescriptor * pRadioGroup = 0;
    1090             : 
    1091             :     sal_Int32 nPos;
    1092           0 :     for ( nPos = 0; nPos < aElements.getLength(); ++nPos )
    1093             :     {
    1094           0 :         Any aControlModel( xDialogModel->getByName( pElements[ nPos ] ) );
    1095           0 :         Reference< beans::XPropertySet > xProps;
    1096           0 :         OSL_VERIFY( aControlModel >>= xProps );
    1097           0 :         if (! xProps.is())
    1098           0 :             continue;
    1099           0 :         Reference< beans::XPropertyState > xPropState( xProps, UNO_QUERY );
    1100             :         OSL_ENSURE( xPropState.is(), "no XPropertyState!" );
    1101           0 :         if (! xPropState.is())
    1102           0 :             continue;
    1103           0 :         Reference< lang::XServiceInfo > xServiceInfo( xProps, UNO_QUERY );
    1104             :         OSL_ENSURE( xServiceInfo.is(), "no XServiceInfo!" );
    1105           0 :         if (! xServiceInfo.is())
    1106           0 :             continue;
    1107             : 
    1108           0 :         ElementDescriptor * pElem = 0;
    1109             : 
    1110             :         // group up radio buttons
    1111           0 :         if ( xServiceInfo->supportsService( "com.sun.star.awt.UnoControlRadioButtonModel" ) )
    1112             :         {
    1113           0 :             if (! pRadioGroup) // open radiogroup
    1114             :             {
    1115           0 :                 pRadioGroup = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":radiogroup", _xDocument );
    1116           0 :                 all_elements.push_back( pRadioGroup );
    1117             :             }
    1118             : 
    1119           0 :             pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":radio", _xDocument );
    1120           0 :             pElem->readRadioButtonModel( all_styles );
    1121           0 :             pRadioGroup->addSubElement( pElem );
    1122             :         }
    1123             :         else // no radio
    1124             :         {
    1125           0 :             pRadioGroup = 0; // close radiogroup
    1126             : 
    1127           0 :             if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlButtonModel" ) )
    1128             :             {
    1129           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":button", _xDocument );
    1130           0 :                 pElem->readButtonModel( all_styles );
    1131             :             }
    1132           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlCheckBoxModel" ) )
    1133             :             {
    1134           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":checkbox", _xDocument );
    1135           0 :                 pElem->readCheckBoxModel( all_styles );
    1136             :             }
    1137           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlComboBoxModel" ) )
    1138             :             {
    1139           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":combobox", _xDocument );
    1140           0 :                 pElem->readComboBoxModel( all_styles );
    1141             :             }
    1142           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlListBoxModel" ) )
    1143             :             {
    1144           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":menulist", _xDocument );
    1145           0 :                 pElem->readListBoxModel( all_styles );
    1146             :             }
    1147           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlGroupBoxModel" ) )
    1148             :             {
    1149           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":titledbox", _xDocument );
    1150           0 :                 pElem->readGroupBoxModel( all_styles );
    1151             :             }
    1152           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoMultiPageModel" ) )
    1153             :             {
    1154           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":multipage", _xDocument );
    1155           0 :                 pElem->readMultiPageModel( all_styles );
    1156             :             }
    1157           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoFrameModel" ) )
    1158             :             {
    1159           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":frame", _xDocument );
    1160           0 :                 pElem->readFrameModel( all_styles );
    1161             :             }
    1162           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoPageModel" ) )
    1163             :             {
    1164           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":page", _xDocument );
    1165           0 :                 pElem->readPageModel( all_styles );
    1166             :             }
    1167           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedTextModel" ) )
    1168             :             {
    1169           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":text", _xDocument );
    1170           0 :                 pElem->readFixedTextModel( all_styles );
    1171             :             }
    1172           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlEditModel" ) )
    1173             :             {
    1174           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":textfield", _xDocument );
    1175           0 :                 pElem->readEditModel( all_styles );
    1176             :             }
    1177             :             // FixedHyperLink
    1178           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedHyperlinkModel" ) )
    1179             :             {
    1180           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":linklabel", _xDocument );
    1181           0 :                 pElem->readFixedHyperLinkModel( all_styles );
    1182             :             }
    1183           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlImageControlModel" ) )
    1184             :             {
    1185           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":img", _xDocument );
    1186           0 :                 pElem->readImageControlModel( all_styles );
    1187             :             }
    1188           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFileControlModel" ) )
    1189             :             {
    1190           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":filecontrol", _xDocument );
    1191           0 :                 pElem->readFileControlModel( all_styles );
    1192             :             }
    1193           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.tree.TreeControlModel" ) )
    1194             :             {
    1195           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":treecontrol", _xDocument );
    1196           0 :                 pElem->readTreeControlModel( all_styles );
    1197             :             }
    1198           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlCurrencyFieldModel" ) )
    1199             :             {
    1200           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":currencyfield", _xDocument );
    1201           0 :                 pElem->readCurrencyFieldModel( all_styles );
    1202             :             }
    1203           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlDateFieldModel" ) )
    1204             :             {
    1205           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":datefield", _xDocument );
    1206           0 :                 pElem->readDateFieldModel( all_styles );
    1207             :             }
    1208           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlNumericFieldModel" ) )
    1209             :             {
    1210           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":numericfield", _xDocument );
    1211           0 :                 pElem->readNumericFieldModel( all_styles );
    1212             :             }
    1213           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlTimeFieldModel" ) )
    1214             :             {
    1215           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":timefield", _xDocument);
    1216           0 :                 pElem->readTimeFieldModel( all_styles );
    1217             :             }
    1218           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlPatternFieldModel" ) )
    1219             :             {
    1220           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":patternfield", _xDocument );
    1221           0 :                 pElem->readPatternFieldModel( all_styles );
    1222             :             }
    1223           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFormattedFieldModel" ) )
    1224             :             {
    1225           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":formattedfield", _xDocument );
    1226           0 :                 pElem->readFormattedFieldModel( all_styles );
    1227             :             }
    1228           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlFixedLineModel" ) )
    1229             :             {
    1230           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":fixedline", _xDocument );
    1231           0 :                 pElem->readFixedLineModel( all_styles );
    1232             :             }
    1233           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlScrollBarModel" ) )
    1234             :             {
    1235           0 :                 pElem = new ElementDescriptor(xProps, xPropState, XMLNS_DIALOGS_PREFIX ":scrollbar", _xDocument );
    1236           0 :                 pElem->readScrollBarModel( all_styles );
    1237             :             }
    1238           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlSpinButtonModel" ) )
    1239             :             {
    1240           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":spinbutton", _xDocument );
    1241           0 :                 pElem->readSpinButtonModel( all_styles );
    1242             :              }
    1243           0 :             else if (xServiceInfo->supportsService( "com.sun.star.awt.UnoControlProgressBarModel" ) )
    1244             :             {
    1245           0 :                 pElem = new ElementDescriptor( xProps, xPropState, XMLNS_DIALOGS_PREFIX ":progressmeter", _xDocument );
    1246           0 :                 pElem->readProgressBarModel( all_styles );
    1247             :             }
    1248             : 
    1249           0 :             if (pElem)
    1250             :             {
    1251           0 :                 all_elements.push_back( pElem );
    1252             :             }
    1253             :             else
    1254             :             {
    1255             :                 OSL_FAIL( "unknown control type!" );
    1256           0 :                 continue;
    1257             :             }
    1258             :         }
    1259           0 :     }
    1260           0 :     if (! all_elements.empty())
    1261             :     {
    1262           0 :         for ( std::size_t n = 0; n < all_elements.size(); ++n )
    1263             :         {
    1264           0 :             addSubElement( all_elements[ n ] );
    1265             :         }
    1266           0 :     }
    1267             : }
    1268             : 
    1269             : }
    1270             : 
    1271             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10