fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / dbaccess / source / ui / tabledesign / FieldDescriptions.cxx
blob159f0fbb646f3682b705279dcb6cb8790cec3850
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include "FieldDescriptions.hxx"
21 #include <tools/debug.hxx>
22 #include <tools/diagnose_ex.h>
23 #include "dbu_tbl.hrc"
24 #include <com/sun/star/sdbc/ColumnValue.hpp>
25 #include "dbustrings.hrc"
26 #include <comphelper/types.hxx>
27 #include <comphelper/extract.hxx>
28 #include "UITools.hxx"
29 #include <com/sun/star/util/NumberFormat.hpp>
31 #define DEFAULT_VARCHAR_PRECISION 100
32 #define DEFAULT_OTHER_PRECISION 16
33 #define DEFAULT_NUMERIC_PRECISION 5
34 #define DEFAULT_NUMERIC_SCALE 0
36 using namespace dbaui;
37 using namespace ::com::sun::star::sdbc;
38 using namespace ::com::sun::star::uno;
39 using namespace ::com::sun::star::beans;
40 using namespace ::com::sun::star::util;
42 // class OFieldDescription
43 OFieldDescription::OFieldDescription()
44 :m_pType()
45 ,m_nType(DataType::VARCHAR)
46 ,m_nPrecision(0)
47 ,m_nScale(0)
48 ,m_nIsNullable(ColumnValue::NULLABLE)
49 ,m_nFormatKey(0)
50 ,m_eHorJustify(SVX_HOR_JUSTIFY_STANDARD)
51 ,m_bIsAutoIncrement(false)
52 ,m_bIsPrimaryKey(false)
53 ,m_bIsCurrency(false)
54 ,m_bHidden(false)
58 OFieldDescription::OFieldDescription( const OFieldDescription& rDescr )
59 :m_aDefaultValue(rDescr.m_aDefaultValue)
60 ,m_aControlDefault(rDescr.m_aControlDefault)
61 ,m_aWidth(rDescr.m_aWidth)
62 ,m_aRelativePosition(rDescr.m_aRelativePosition)
63 ,m_pType(rDescr.m_pType)
64 ,m_xDest(rDescr.m_xDest)
65 ,m_xDestInfo(rDescr.m_xDestInfo)
66 ,m_sName(rDescr.m_sName)
67 ,m_sTypeName(rDescr.m_sTypeName)
68 ,m_sDescription(rDescr.m_sDescription)
69 ,m_sAutoIncrementValue(rDescr.m_sAutoIncrementValue)
70 ,m_nType(rDescr.m_nType)
71 ,m_nPrecision(rDescr.m_nPrecision)
72 ,m_nScale(rDescr.m_nScale)
73 ,m_nIsNullable(rDescr.m_nIsNullable)
74 ,m_nFormatKey(rDescr.m_nFormatKey)
75 ,m_eHorJustify(rDescr.m_eHorJustify)
76 ,m_bIsAutoIncrement(rDescr.m_bIsAutoIncrement)
77 ,m_bIsPrimaryKey(rDescr.m_bIsPrimaryKey)
78 ,m_bIsCurrency(rDescr.m_bIsCurrency)
79 ,m_bHidden(rDescr.m_bHidden)
83 OFieldDescription::~OFieldDescription()
87 OFieldDescription::OFieldDescription(const Reference< XPropertySet >& xAffectedCol,bool _bUseAsDest)
88 :m_pType()
89 ,m_nType(DataType::VARCHAR)
90 ,m_nPrecision(0)
91 ,m_nScale(0)
92 ,m_nIsNullable(ColumnValue::NULLABLE)
93 ,m_nFormatKey(0)
94 ,m_eHorJustify(SVX_HOR_JUSTIFY_STANDARD)
95 ,m_bIsAutoIncrement(false)
96 ,m_bIsPrimaryKey(false)
97 ,m_bIsCurrency(false)
98 ,m_bHidden(false)
100 OSL_ENSURE(xAffectedCol.is(),"PropetySet can notbe null!");
101 if ( xAffectedCol.is() )
103 if ( _bUseAsDest )
105 m_xDest = xAffectedCol;
106 m_xDestInfo = xAffectedCol->getPropertySetInfo();
108 else
112 Reference<XPropertySetInfo> xPropSetInfo = xAffectedCol->getPropertySetInfo();
113 if(xPropSetInfo->hasPropertyByName(PROPERTY_NAME))
114 SetName(::comphelper::getString(xAffectedCol->getPropertyValue(PROPERTY_NAME)));
115 if(xPropSetInfo->hasPropertyByName(PROPERTY_DESCRIPTION))
116 SetDescription(::comphelper::getString(xAffectedCol->getPropertyValue(PROPERTY_DESCRIPTION)));
117 if(xPropSetInfo->hasPropertyByName(PROPERTY_HELPTEXT))
119 OUString sHelpText;
120 xAffectedCol->getPropertyValue(PROPERTY_HELPTEXT) >>= sHelpText;
121 SetHelpText(sHelpText);
123 if(xPropSetInfo->hasPropertyByName(PROPERTY_DEFAULTVALUE))
124 SetDefaultValue( xAffectedCol->getPropertyValue(PROPERTY_DEFAULTVALUE) );
126 if(xPropSetInfo->hasPropertyByName(PROPERTY_CONTROLDEFAULT))
127 SetControlDefault( xAffectedCol->getPropertyValue(PROPERTY_CONTROLDEFAULT) );
129 if(xPropSetInfo->hasPropertyByName(PROPERTY_AUTOINCREMENTCREATION))
130 SetAutoIncrementValue(::comphelper::getString(xAffectedCol->getPropertyValue(PROPERTY_AUTOINCREMENTCREATION)));
131 if(xPropSetInfo->hasPropertyByName(PROPERTY_TYPE))
132 SetTypeValue(::comphelper::getINT32(xAffectedCol->getPropertyValue(PROPERTY_TYPE)));
133 if (xPropSetInfo->hasPropertyByName(PROPERTY_TYPENAME))
134 SetTypeName(::comphelper::getString(xAffectedCol->getPropertyValue(PROPERTY_TYPENAME)));
135 if(xPropSetInfo->hasPropertyByName(PROPERTY_PRECISION))
136 SetPrecision(::comphelper::getINT32(xAffectedCol->getPropertyValue(PROPERTY_PRECISION)));
137 if(xPropSetInfo->hasPropertyByName(PROPERTY_SCALE))
138 SetScale(::comphelper::getINT32(xAffectedCol->getPropertyValue(PROPERTY_SCALE)));
139 if(xPropSetInfo->hasPropertyByName(PROPERTY_ISNULLABLE))
140 SetIsNullable(::comphelper::getINT32(xAffectedCol->getPropertyValue(PROPERTY_ISNULLABLE)));
141 if(xPropSetInfo->hasPropertyByName(PROPERTY_FORMATKEY))
143 const Any aValue = xAffectedCol->getPropertyValue(PROPERTY_FORMATKEY);
144 if ( aValue.hasValue() )
145 SetFormatKey(::comphelper::getINT32(aValue));
147 if(xPropSetInfo->hasPropertyByName(PROPERTY_RELATIVEPOSITION))
148 m_aRelativePosition = xAffectedCol->getPropertyValue(PROPERTY_RELATIVEPOSITION);
149 if(xPropSetInfo->hasPropertyByName(PROPERTY_WIDTH))
150 m_aWidth = xAffectedCol->getPropertyValue(PROPERTY_WIDTH);
151 if(xPropSetInfo->hasPropertyByName(PROPERTY_HIDDEN))
152 xAffectedCol->getPropertyValue(PROPERTY_HIDDEN) >>= m_bHidden;
153 if(xPropSetInfo->hasPropertyByName(PROPERTY_ALIGN))
155 const Any aValue = xAffectedCol->getPropertyValue(PROPERTY_ALIGN);
156 if ( aValue.hasValue() )
157 SetHorJustify( ::dbaui::mapTextJustify(::comphelper::getINT32(aValue)));
159 if(xPropSetInfo->hasPropertyByName(PROPERTY_ISAUTOINCREMENT))
160 SetAutoIncrement(::cppu::any2bool(xAffectedCol->getPropertyValue(PROPERTY_ISAUTOINCREMENT)));
162 catch(const Exception&)
164 DBG_UNHANDLED_EXCEPTION();
170 void OFieldDescription::FillFromTypeInfo(const TOTypeInfoSP& _pType,bool _bForce,bool _bReset)
172 TOTypeInfoSP pOldType = getTypeInfo();
173 if ( _pType != pOldType )
175 // reset type depending information
176 if ( _bReset )
178 SetFormatKey(0);
179 SetControlDefault(Any());
182 bool bForce = _bForce || pOldType.get() == NULL || pOldType->nType != _pType->nType;
183 switch ( _pType->nType )
185 case DataType::CHAR:
186 case DataType::VARCHAR:
187 if ( bForce )
189 sal_Int32 nPrec = DEFAULT_VARCHAR_PRECISION;
190 if ( GetPrecision() )
191 nPrec = GetPrecision();
192 SetPrecision(::std::min<sal_Int32>(nPrec,_pType->nPrecision));
194 break;
195 case DataType::TIMESTAMP:
196 if ( bForce && _pType->nMaximumScale)
198 SetScale(::std::min<sal_Int32>(GetScale() ? GetScale() : DEFAULT_NUMERIC_SCALE,_pType->nMaximumScale));
200 break;
201 default:
202 if ( bForce )
204 sal_Int32 nPrec = DEFAULT_OTHER_PRECISION;
205 switch ( _pType->nType )
207 case DataType::BIT:
208 case DataType::BLOB:
209 case DataType::CLOB:
210 nPrec = _pType->nPrecision;
211 break;
212 default:
213 if ( GetPrecision() )
214 nPrec = GetPrecision();
215 break;
218 if ( _pType->nPrecision )
219 SetPrecision(::std::min<sal_Int32>(nPrec ? nPrec : DEFAULT_NUMERIC_PRECISION,_pType->nPrecision));
220 if ( _pType->nMaximumScale )
221 SetScale(::std::min<sal_Int32>(GetScale() ? GetScale() : DEFAULT_NUMERIC_SCALE,_pType->nMaximumScale));
224 if ( _pType->aCreateParams.isEmpty() )
226 SetPrecision(_pType->nPrecision);
227 SetScale(_pType->nMinimumScale);
229 if ( !_pType->bNullable && IsNullable() )
230 SetIsNullable(ColumnValue::NO_NULLS);
231 if ( !_pType->bAutoIncrement && IsAutoIncrement() )
232 SetAutoIncrement(false);
233 SetCurrency( _pType->bCurrency );
234 SetType(_pType);
235 SetTypeName(_pType->aTypeName);
239 void OFieldDescription::SetName(const OUString& _rName)
243 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_NAME) )
244 m_xDest->setPropertyValue(PROPERTY_NAME,makeAny(_rName));
245 else
246 m_sName = _rName;
248 catch(const Exception& )
250 DBG_UNHANDLED_EXCEPTION();
254 void OFieldDescription::SetHelpText(const OUString& _sHelpText)
258 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_HELPTEXT) )
259 m_xDest->setPropertyValue(PROPERTY_HELPTEXT,makeAny(_sHelpText));
260 else
261 m_sHelpText = _sHelpText;
263 catch(const Exception& )
265 DBG_UNHANDLED_EXCEPTION();
269 void OFieldDescription::SetDescription(const OUString& _rDescription)
273 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_DESCRIPTION) )
274 m_xDest->setPropertyValue(PROPERTY_DESCRIPTION,makeAny(_rDescription));
275 else
276 m_sDescription = _rDescription;
278 catch(const Exception& )
280 DBG_UNHANDLED_EXCEPTION();
284 void OFieldDescription::SetDefaultValue(const Any& _rDefaultValue)
288 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_DEFAULTVALUE) )
289 m_xDest->setPropertyValue(PROPERTY_DEFAULTVALUE, _rDefaultValue);
290 else
291 m_aDefaultValue = _rDefaultValue;
293 catch( const Exception& )
295 DBG_UNHANDLED_EXCEPTION();
299 void OFieldDescription::SetControlDefault(const Any& _rControlDefault)
303 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_CONTROLDEFAULT) )
304 m_xDest->setPropertyValue(PROPERTY_CONTROLDEFAULT, _rControlDefault);
305 else
306 m_aControlDefault = _rControlDefault;
308 catch( const Exception& )
310 DBG_UNHANDLED_EXCEPTION();
314 void OFieldDescription::SetAutoIncrementValue(const OUString& _sAutoIncValue)
318 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_AUTOINCREMENTCREATION) )
319 m_xDest->setPropertyValue(PROPERTY_AUTOINCREMENTCREATION,makeAny(_sAutoIncValue));
320 else
321 m_sAutoIncrementValue = _sAutoIncValue;
323 catch( const Exception& )
325 DBG_UNHANDLED_EXCEPTION();
329 void OFieldDescription::SetType(TOTypeInfoSP _pType)
331 m_pType = _pType;
332 if ( m_pType.get() )
336 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_TYPE) )
337 m_xDest->setPropertyValue(PROPERTY_TYPE,makeAny(m_pType->nType));
338 else
339 m_nType = m_pType->nType;
341 catch( const Exception& )
343 DBG_UNHANDLED_EXCEPTION();
348 void OFieldDescription::SetTypeValue(sal_Int32 _nType)
352 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_TYPE) )
353 m_xDest->setPropertyValue(PROPERTY_TYPE,makeAny(_nType));
354 else
356 m_nType = _nType;
357 OSL_ENSURE(!m_pType.get(),"Invalid call here!");
360 catch( const Exception& )
362 DBG_UNHANDLED_EXCEPTION();
366 void OFieldDescription::SetPrecision(const sal_Int32& _rPrecision)
370 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_PRECISION) )
371 m_xDest->setPropertyValue(PROPERTY_PRECISION,makeAny(_rPrecision));
372 else
373 m_nPrecision = _rPrecision;
375 catch( const Exception& )
377 DBG_UNHANDLED_EXCEPTION();
381 void OFieldDescription::SetScale(const sal_Int32& _rScale)
385 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_SCALE) )
386 m_xDest->setPropertyValue(PROPERTY_SCALE,makeAny(_rScale));
387 else
388 m_nScale = _rScale;
390 catch( const Exception& )
392 DBG_UNHANDLED_EXCEPTION();
396 void OFieldDescription::SetIsNullable(const sal_Int32& _rIsNullable)
400 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISNULLABLE) )
401 m_xDest->setPropertyValue(PROPERTY_ISNULLABLE,makeAny(_rIsNullable));
402 else
403 m_nIsNullable = _rIsNullable;
405 catch( const Exception& )
407 DBG_UNHANDLED_EXCEPTION();
411 void OFieldDescription::SetFormatKey(const sal_Int32& _rFormatKey)
415 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_FORMATKEY) )
416 m_xDest->setPropertyValue(PROPERTY_FORMATKEY,makeAny(_rFormatKey));
417 else
418 m_nFormatKey = _rFormatKey;
420 catch( const Exception& )
422 DBG_UNHANDLED_EXCEPTION();
426 void OFieldDescription::SetHorJustify(const SvxCellHorJustify& _rHorJustify)
430 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ALIGN) )
431 m_xDest->setPropertyValue(PROPERTY_ALIGN,makeAny( dbaui::mapTextAllign(_rHorJustify)));
432 else
433 m_eHorJustify = _rHorJustify;
435 catch( const Exception& )
437 DBG_UNHANDLED_EXCEPTION();
441 void OFieldDescription::SetAutoIncrement(bool _bAuto)
445 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISAUTOINCREMENT) )
446 m_xDest->setPropertyValue(PROPERTY_ISAUTOINCREMENT,makeAny(_bAuto));
447 else
448 m_bIsAutoIncrement = _bAuto;
450 catch( const Exception& )
452 DBG_UNHANDLED_EXCEPTION();
456 void OFieldDescription::SetPrimaryKey(bool _bPKey)
458 m_bIsPrimaryKey = _bPKey;
459 if ( _bPKey )
460 SetIsNullable(::com::sun::star::sdbc::ColumnValue::NO_NULLS);
463 void OFieldDescription::SetCurrency(bool _bIsCurrency)
465 m_bIsCurrency = _bIsCurrency;
468 OUString OFieldDescription::GetName() const
470 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_NAME) )
471 return ::comphelper::getString(m_xDest->getPropertyValue(PROPERTY_NAME));
472 else
473 return m_sName;
476 OUString OFieldDescription::GetDescription() const
478 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_DESCRIPTION) )
479 return ::comphelper::getString(m_xDest->getPropertyValue(PROPERTY_DESCRIPTION));
480 else
481 return m_sDescription;
484 OUString OFieldDescription::GetHelpText() const
486 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_HELPTEXT) )
487 return ::comphelper::getString(m_xDest->getPropertyValue(PROPERTY_HELPTEXT));
488 else
489 return m_sHelpText;
492 ::com::sun::star::uno::Any OFieldDescription::GetControlDefault() const
494 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_CONTROLDEFAULT) )
495 return m_xDest->getPropertyValue(PROPERTY_CONTROLDEFAULT);
496 else
497 return m_aControlDefault;
500 OUString OFieldDescription::GetAutoIncrementValue() const
502 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_AUTOINCREMENTCREATION) )
503 return ::comphelper::getString(m_xDest->getPropertyValue(PROPERTY_AUTOINCREMENTCREATION));
504 else
505 return m_sAutoIncrementValue;
508 sal_Int32 OFieldDescription::GetType() const
510 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_TYPE) )
511 return ::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_TYPE));
512 else
513 return m_pType.get() ? m_pType->nType : m_nType;
516 OUString OFieldDescription::GetTypeName() const
518 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_TYPENAME) )
519 return ::comphelper::getString(m_xDest->getPropertyValue(PROPERTY_TYPENAME));
520 else
521 return m_pType.get() ? m_pType->aTypeName : m_sTypeName;
524 sal_Int32 OFieldDescription::GetPrecision() const
526 sal_Int32 nPrec = m_nPrecision;
527 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_PRECISION) )
528 nPrec = ::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_PRECISION));
530 TOTypeInfoSP pTypeInfo = getTypeInfo();
531 if ( pTypeInfo )
533 switch ( pTypeInfo->nType )
535 case DataType::TINYINT:
536 case DataType::SMALLINT:
537 case DataType::INTEGER:
538 case DataType::BIGINT:
539 if ( !nPrec )
540 nPrec = pTypeInfo->nPrecision;
541 break;
545 return nPrec;
548 sal_Int32 OFieldDescription::GetScale() const
550 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_SCALE) )
551 return ::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_SCALE));
552 else
553 return m_nScale;
556 sal_Int32 OFieldDescription::GetIsNullable() const
558 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISNULLABLE) )
559 return ::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_ISNULLABLE));
560 else
561 return m_nIsNullable;
564 sal_Int32 OFieldDescription::GetFormatKey() const
566 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_FORMATKEY) )
567 return ::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_FORMATKEY));
568 else
569 return m_nFormatKey;
572 SvxCellHorJustify OFieldDescription::GetHorJustify() const
574 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ALIGN) )
575 return ::dbaui::mapTextJustify(::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_ALIGN)));
576 else
577 return m_eHorJustify;
581 TOTypeInfoSP OFieldDescription::getSpecialTypeInfo() const
583 TOTypeInfoSP pSpecialType( new OTypeInfo() );
584 *pSpecialType = *m_pType;
585 pSpecialType->nPrecision = GetPrecision();
586 pSpecialType->nMaximumScale = static_cast<sal_Int16>(GetScale());
587 pSpecialType->bAutoIncrement = IsAutoIncrement(); // http://dba.openoffice.org/issues/show_bug.cgi?id=115398 fixed by ludob
588 return pSpecialType;
591 bool OFieldDescription::IsAutoIncrement() const
593 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISAUTOINCREMENT) )
594 return ::cppu::any2bool(m_xDest->getPropertyValue(PROPERTY_ISAUTOINCREMENT));
595 else
596 return m_bIsAutoIncrement;
601 bool OFieldDescription::IsNullable() const
603 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISNULLABLE) )
604 return ::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_ISNULLABLE)) == ::com::sun::star::sdbc::ColumnValue::NULLABLE;
605 else
606 return m_nIsNullable == ::com::sun::star::sdbc::ColumnValue::NULLABLE;
609 void OFieldDescription::SetTypeName(const OUString& _sTypeName)
613 if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_TYPENAME) )
614 m_xDest->setPropertyValue(PROPERTY_TYPENAME,makeAny(_sTypeName));
615 else
616 m_sTypeName = _sTypeName;
618 catch( const Exception& )
620 DBG_UNHANDLED_EXCEPTION();
624 void OFieldDescription::copyColumnSettingsTo(const Reference< XPropertySet >& _rxColumn)
626 if ( _rxColumn.is() )
628 Reference<XPropertySetInfo> xInfo = _rxColumn->getPropertySetInfo();
630 if ( GetFormatKey() != NumberFormat::ALL && xInfo->hasPropertyByName(PROPERTY_FORMATKEY) )
631 _rxColumn->setPropertyValue(PROPERTY_FORMATKEY,makeAny(GetFormatKey()));
632 if ( GetHorJustify() != SVX_HOR_JUSTIFY_STANDARD && xInfo->hasPropertyByName(PROPERTY_ALIGN) )
633 _rxColumn->setPropertyValue(PROPERTY_ALIGN,makeAny(dbaui::mapTextAllign(GetHorJustify())));
634 if ( !GetHelpText().isEmpty() && xInfo->hasPropertyByName(PROPERTY_HELPTEXT) )
635 _rxColumn->setPropertyValue(PROPERTY_HELPTEXT,makeAny(GetHelpText()));
636 if ( GetControlDefault().hasValue() && xInfo->hasPropertyByName(PROPERTY_CONTROLDEFAULT) )
637 _rxColumn->setPropertyValue(PROPERTY_CONTROLDEFAULT,GetControlDefault());
639 if(xInfo->hasPropertyByName(PROPERTY_RELATIVEPOSITION))
640 _rxColumn->setPropertyValue(PROPERTY_RELATIVEPOSITION,m_aRelativePosition);
641 if(xInfo->hasPropertyByName(PROPERTY_WIDTH))
642 _rxColumn->setPropertyValue(PROPERTY_WIDTH,m_aWidth);
643 if(xInfo->hasPropertyByName(PROPERTY_HIDDEN))
644 _rxColumn->setPropertyValue(PROPERTY_HIDDEN,makeAny(m_bHidden));
648 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */