1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_xmloff.hxx"
30*cdf0e10cSrcweir #include "gridcolumnproptranslator.hxx"
31*cdf0e10cSrcweir 
32*cdf0e10cSrcweir /** === begin UNO includes === **/
33*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySetInfo.hpp>
34*cdf0e10cSrcweir #include <com/sun/star/awt/TextAlign.hpp>
35*cdf0e10cSrcweir #include <com/sun/star/style/ParagraphAdjust.hpp>
36*cdf0e10cSrcweir /** === end UNO includes === **/
37*cdf0e10cSrcweir #include <osl/diagnose.h>
38*cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir #include <algorithm>
41*cdf0e10cSrcweir 
42*cdf0e10cSrcweir //........................................................................
43*cdf0e10cSrcweir namespace xmloff
44*cdf0e10cSrcweir {
45*cdf0e10cSrcweir //........................................................................
46*cdf0e10cSrcweir 
47*cdf0e10cSrcweir     using namespace ::com::sun::star::uno;
48*cdf0e10cSrcweir     using namespace ::com::sun::star::awt;
49*cdf0e10cSrcweir     using namespace ::com::sun::star::lang;
50*cdf0e10cSrcweir     using namespace ::com::sun::star::beans;
51*cdf0e10cSrcweir     using namespace ::com::sun::star::style;
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir     namespace
54*cdf0e10cSrcweir     {
55*cdf0e10cSrcweir 	    //----------------------------------------------------------------
56*cdf0e10cSrcweir         ::rtl::OUString getParaAlignProperty()
57*cdf0e10cSrcweir         {
58*cdf0e10cSrcweir             return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParaAdjust" ) );
59*cdf0e10cSrcweir         }
60*cdf0e10cSrcweir 
61*cdf0e10cSrcweir 	    //----------------------------------------------------------------
62*cdf0e10cSrcweir         ::rtl::OUString getAlignProperty()
63*cdf0e10cSrcweir         {
64*cdf0e10cSrcweir             return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Align" ) );
65*cdf0e10cSrcweir         }
66*cdf0e10cSrcweir 
67*cdf0e10cSrcweir 	    //----------------------------------------------------------------
68*cdf0e10cSrcweir         sal_Int32 findStringElement( const Sequence< ::rtl::OUString >& _rNames, const ::rtl::OUString& _rName )
69*cdf0e10cSrcweir         {
70*cdf0e10cSrcweir             const ::rtl::OUString* pStart = _rNames.getConstArray();
71*cdf0e10cSrcweir             const ::rtl::OUString* pEnd = _rNames.getConstArray() + _rNames.getLength();
72*cdf0e10cSrcweir             const ::rtl::OUString* pPos = ::std::find( pStart, pEnd, _rName );
73*cdf0e10cSrcweir             if ( pPos != pEnd )
74*cdf0e10cSrcweir                 return pPos - pStart;
75*cdf0e10cSrcweir             return -1;
76*cdf0e10cSrcweir         }
77*cdf0e10cSrcweir 
78*cdf0e10cSrcweir 	    //----------------------------------------------------------------
79*cdf0e10cSrcweir         struct AlignmentTranslationEntry
80*cdf0e10cSrcweir         {
81*cdf0e10cSrcweir             ParagraphAdjust nParagraphValue;
82*cdf0e10cSrcweir             sal_Int16       nControlValue;
83*cdf0e10cSrcweir         }
84*cdf0e10cSrcweir         AlignmentTranslations[] =
85*cdf0e10cSrcweir         {
86*cdf0e10cSrcweir             // note that order matters:
87*cdf0e10cSrcweir             // valueAlignToParaAdjust and valueParaAdjustToAlign search this map from the _beginning_
88*cdf0e10cSrcweir             // and use the first matching entry
89*cdf0e10cSrcweir             { ParagraphAdjust_LEFT,             TextAlign::LEFT     },
90*cdf0e10cSrcweir             { ParagraphAdjust_CENTER,           TextAlign::CENTER   },
91*cdf0e10cSrcweir             { ParagraphAdjust_RIGHT,            TextAlign::RIGHT    },
92*cdf0e10cSrcweir             { ParagraphAdjust_BLOCK,            TextAlign::RIGHT    },
93*cdf0e10cSrcweir             { ParagraphAdjust_STRETCH,          TextAlign::LEFT     },
94*cdf0e10cSrcweir             { ParagraphAdjust_MAKE_FIXED_SIZE,  TextAlign::LEFT     },
95*cdf0e10cSrcweir             { ParagraphAdjust_MAKE_FIXED_SIZE,  -1 }
96*cdf0e10cSrcweir         };
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir 	    //----------------------------------------------------------------
99*cdf0e10cSrcweir         void valueAlignToParaAdjust(Any& rValue)
100*cdf0e10cSrcweir         {
101*cdf0e10cSrcweir             sal_Int16 nValue = 0;
102*cdf0e10cSrcweir             rValue >>= nValue;
103*cdf0e10cSrcweir             const AlignmentTranslationEntry* pTranslation = AlignmentTranslations;
104*cdf0e10cSrcweir             while (-1 != pTranslation->nControlValue)
105*cdf0e10cSrcweir             {
106*cdf0e10cSrcweir                 if ( nValue == pTranslation->nControlValue )
107*cdf0e10cSrcweir                 {
108*cdf0e10cSrcweir                     rValue <<= pTranslation->nParagraphValue;
109*cdf0e10cSrcweir                     return;
110*cdf0e10cSrcweir                 }
111*cdf0e10cSrcweir                 ++pTranslation;
112*cdf0e10cSrcweir             }
113*cdf0e10cSrcweir             OSL_ENSURE( sal_False, "valueAlignToParaAdjust: unreachable!" );
114*cdf0e10cSrcweir         }
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir 	    //----------------------------------------------------------------
117*cdf0e10cSrcweir         void valueParaAdjustToAlign(Any& rValue)
118*cdf0e10cSrcweir         {
119*cdf0e10cSrcweir             sal_Int32 nValue = 0;
120*cdf0e10cSrcweir             rValue >>= nValue;
121*cdf0e10cSrcweir             const AlignmentTranslationEntry* pTranslation = AlignmentTranslations;
122*cdf0e10cSrcweir             while ( ParagraphAdjust_MAKE_FIXED_SIZE != pTranslation->nParagraphValue)
123*cdf0e10cSrcweir             {
124*cdf0e10cSrcweir                 if ( nValue == pTranslation->nParagraphValue)
125*cdf0e10cSrcweir                 {
126*cdf0e10cSrcweir                     rValue <<= pTranslation->nControlValue;
127*cdf0e10cSrcweir                     return;
128*cdf0e10cSrcweir                 }
129*cdf0e10cSrcweir                 ++pTranslation;
130*cdf0e10cSrcweir             }
131*cdf0e10cSrcweir             OSL_ENSURE( sal_False, "valueParaAdjustToAlign: unreachable!" );
132*cdf0e10cSrcweir         }
133*cdf0e10cSrcweir 
134*cdf0e10cSrcweir         //====================================================================
135*cdf0e10cSrcweir 	    //= OMergedPropertySetInfo
136*cdf0e10cSrcweir 	    //====================================================================
137*cdf0e10cSrcweir         typedef ::cppu::WeakAggImplHelper1  <   XPropertySetInfo
138*cdf0e10cSrcweir                                             >   OMergedPropertySetInfo_Base;
139*cdf0e10cSrcweir         class OMergedPropertySetInfo : public OMergedPropertySetInfo_Base
140*cdf0e10cSrcweir         {
141*cdf0e10cSrcweir         private:
142*cdf0e10cSrcweir             Reference< XPropertySetInfo >   m_xMasterInfo;
143*cdf0e10cSrcweir 
144*cdf0e10cSrcweir         public:
145*cdf0e10cSrcweir             OMergedPropertySetInfo( const Reference< XPropertySetInfo >& _rxMasterInfo );
146*cdf0e10cSrcweir 
147*cdf0e10cSrcweir         protected:
148*cdf0e10cSrcweir             virtual ~OMergedPropertySetInfo();
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir             // XPropertySetInfo
151*cdf0e10cSrcweir             virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties(  ) throw (::com::sun::star::uno::RuntimeException);
152*cdf0e10cSrcweir             virtual ::com::sun::star::beans::Property SAL_CALL getPropertyByName( const ::rtl::OUString& aName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
153*cdf0e10cSrcweir             virtual ::sal_Bool SAL_CALL hasPropertyByName( const ::rtl::OUString& Name ) throw (::com::sun::star::uno::RuntimeException);
154*cdf0e10cSrcweir         };
155*cdf0e10cSrcweir 
156*cdf0e10cSrcweir         //----------------------------------------------------------------
157*cdf0e10cSrcweir         OMergedPropertySetInfo::OMergedPropertySetInfo( const Reference< XPropertySetInfo >& _rxMasterInfo )
158*cdf0e10cSrcweir             :m_xMasterInfo( _rxMasterInfo )
159*cdf0e10cSrcweir         {
160*cdf0e10cSrcweir             OSL_ENSURE( m_xMasterInfo.is(), "OMergedPropertySetInfo::OMergedPropertySetInfo: hmm?" );
161*cdf0e10cSrcweir         }
162*cdf0e10cSrcweir 
163*cdf0e10cSrcweir         //----------------------------------------------------------------
164*cdf0e10cSrcweir         OMergedPropertySetInfo::~OMergedPropertySetInfo()
165*cdf0e10cSrcweir         {
166*cdf0e10cSrcweir         }
167*cdf0e10cSrcweir 
168*cdf0e10cSrcweir         //----------------------------------------------------------------
169*cdf0e10cSrcweir         Sequence< Property > SAL_CALL OMergedPropertySetInfo::getProperties(  ) throw (RuntimeException)
170*cdf0e10cSrcweir         {
171*cdf0e10cSrcweir             // add a "ParaAdjust" property to the master properties
172*cdf0e10cSrcweir             Sequence< Property > aProperties;
173*cdf0e10cSrcweir             if ( m_xMasterInfo.is() )
174*cdf0e10cSrcweir                 aProperties = m_xMasterInfo->getProperties();
175*cdf0e10cSrcweir 
176*cdf0e10cSrcweir             sal_Int32 nOldLength = aProperties.getLength();
177*cdf0e10cSrcweir             aProperties.realloc( nOldLength + 1 );
178*cdf0e10cSrcweir             aProperties[ nOldLength ] = getPropertyByName( getParaAlignProperty() );
179*cdf0e10cSrcweir 
180*cdf0e10cSrcweir             return aProperties;
181*cdf0e10cSrcweir         }
182*cdf0e10cSrcweir 
183*cdf0e10cSrcweir         //----------------------------------------------------------------
184*cdf0e10cSrcweir         Property SAL_CALL OMergedPropertySetInfo::getPropertyByName( const ::rtl::OUString& aName ) throw (UnknownPropertyException, RuntimeException)
185*cdf0e10cSrcweir         {
186*cdf0e10cSrcweir             if ( aName == getParaAlignProperty() )
187*cdf0e10cSrcweir                 return Property( getParaAlignProperty(), -1,
188*cdf0e10cSrcweir                     ::getCppuType( static_cast< const ParagraphAdjust* >( NULL ) ), 0 );
189*cdf0e10cSrcweir 
190*cdf0e10cSrcweir             if ( !m_xMasterInfo.is() )
191*cdf0e10cSrcweir                 return Property();
192*cdf0e10cSrcweir 
193*cdf0e10cSrcweir             return m_xMasterInfo->getPropertyByName( aName );
194*cdf0e10cSrcweir         }
195*cdf0e10cSrcweir 
196*cdf0e10cSrcweir         //----------------------------------------------------------------
197*cdf0e10cSrcweir         ::sal_Bool SAL_CALL OMergedPropertySetInfo::hasPropertyByName( const ::rtl::OUString& Name ) throw (RuntimeException)
198*cdf0e10cSrcweir         {
199*cdf0e10cSrcweir             if ( Name == getParaAlignProperty() )
200*cdf0e10cSrcweir                 return sal_True;
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir             if ( !m_xMasterInfo.is() )
203*cdf0e10cSrcweir                 return sal_False;
204*cdf0e10cSrcweir 
205*cdf0e10cSrcweir             return m_xMasterInfo->hasPropertyByName( Name );
206*cdf0e10cSrcweir         }
207*cdf0e10cSrcweir     }
208*cdf0e10cSrcweir 
209*cdf0e10cSrcweir 
210*cdf0e10cSrcweir 	//====================================================================
211*cdf0e10cSrcweir 	//= OGridColumnPropertyTranslator
212*cdf0e10cSrcweir 	//====================================================================
213*cdf0e10cSrcweir 	//--------------------------------------------------------------------
214*cdf0e10cSrcweir     OGridColumnPropertyTranslator::OGridColumnPropertyTranslator( const Reference< XMultiPropertySet >& _rxGridColumn )
215*cdf0e10cSrcweir         :m_xGridColumn( _rxGridColumn )
216*cdf0e10cSrcweir     {
217*cdf0e10cSrcweir         OSL_ENSURE( m_xGridColumn.is(), "OGridColumnPropertyTranslator: invalid grid column!" );
218*cdf0e10cSrcweir     }
219*cdf0e10cSrcweir 
220*cdf0e10cSrcweir 	//--------------------------------------------------------------------
221*cdf0e10cSrcweir     OGridColumnPropertyTranslator::~OGridColumnPropertyTranslator()
222*cdf0e10cSrcweir     {
223*cdf0e10cSrcweir     }
224*cdf0e10cSrcweir 
225*cdf0e10cSrcweir     //--------------------------------------------------------------------
226*cdf0e10cSrcweir     Reference< XPropertySetInfo > SAL_CALL OGridColumnPropertyTranslator::getPropertySetInfo(  ) throw (RuntimeException)
227*cdf0e10cSrcweir     {
228*cdf0e10cSrcweir         Reference< XPropertySetInfo > xColumnPropInfo;
229*cdf0e10cSrcweir         if ( m_xGridColumn.is() )
230*cdf0e10cSrcweir             xColumnPropInfo = m_xGridColumn->getPropertySetInfo();
231*cdf0e10cSrcweir         return new OMergedPropertySetInfo( xColumnPropInfo );
232*cdf0e10cSrcweir     }
233*cdf0e10cSrcweir 
234*cdf0e10cSrcweir     //--------------------------------------------------------------------
235*cdf0e10cSrcweir     void SAL_CALL OGridColumnPropertyTranslator::setPropertyValue( const ::rtl::OUString& _rPropertyName, const Any& aValue ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
236*cdf0e10cSrcweir     {
237*cdf0e10cSrcweir         // we implement this by delegating it to setPropertyValues, which is to ignore unknown properties. On the other hand, our
238*cdf0e10cSrcweir         // contract requires us to throw a UnknownPropertyException for unknown properties, so check this first.
239*cdf0e10cSrcweir 
240*cdf0e10cSrcweir         if ( !getPropertySetInfo()->hasPropertyByName( _rPropertyName ) )
241*cdf0e10cSrcweir             throw UnknownPropertyException( _rPropertyName, *this );
242*cdf0e10cSrcweir 
243*cdf0e10cSrcweir         Sequence< ::rtl::OUString > aNames( &_rPropertyName, 1 );
244*cdf0e10cSrcweir         Sequence< Any >             aValues( &aValue, 1 );
245*cdf0e10cSrcweir         setPropertyValues( aNames, aValues );
246*cdf0e10cSrcweir     }
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir     //--------------------------------------------------------------------
249*cdf0e10cSrcweir     Any SAL_CALL OGridColumnPropertyTranslator::getPropertyValue( const ::rtl::OUString& PropertyName ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
250*cdf0e10cSrcweir     {
251*cdf0e10cSrcweir         Sequence< ::rtl::OUString > aNames( &PropertyName, 1 );
252*cdf0e10cSrcweir         Sequence< Any > aValues = getPropertyValues( aNames );
253*cdf0e10cSrcweir         OSL_ENSURE( aValues.getLength() == 1, "OGridColumnPropertyTranslator::getPropertyValue: nonsense!" );
254*cdf0e10cSrcweir         if ( aValues.getLength() == 1 )
255*cdf0e10cSrcweir             return aValues[0];
256*cdf0e10cSrcweir         return Any();
257*cdf0e10cSrcweir     }
258*cdf0e10cSrcweir 
259*cdf0e10cSrcweir     //--------------------------------------------------------------------
260*cdf0e10cSrcweir     void SAL_CALL OGridColumnPropertyTranslator::addPropertyChangeListener( const ::rtl::OUString&, const Reference< XPropertyChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
261*cdf0e10cSrcweir     {
262*cdf0e10cSrcweir         OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::addPropertyChangeListener: not implemented - this should not be needed!" );
263*cdf0e10cSrcweir     }
264*cdf0e10cSrcweir 
265*cdf0e10cSrcweir     //--------------------------------------------------------------------
266*cdf0e10cSrcweir     void SAL_CALL OGridColumnPropertyTranslator::removePropertyChangeListener( const ::rtl::OUString&, const Reference< XPropertyChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
267*cdf0e10cSrcweir     {
268*cdf0e10cSrcweir         OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::removePropertyChangeListener: not implemented - this should not be needed!" );
269*cdf0e10cSrcweir     }
270*cdf0e10cSrcweir 
271*cdf0e10cSrcweir     //--------------------------------------------------------------------
272*cdf0e10cSrcweir     void SAL_CALL OGridColumnPropertyTranslator::addVetoableChangeListener( const ::rtl::OUString&, const Reference< XVetoableChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
273*cdf0e10cSrcweir     {
274*cdf0e10cSrcweir         OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::addVetoableChangeListener: not implemented - this should not be needed!" );
275*cdf0e10cSrcweir     }
276*cdf0e10cSrcweir 
277*cdf0e10cSrcweir     //--------------------------------------------------------------------
278*cdf0e10cSrcweir     void SAL_CALL OGridColumnPropertyTranslator::removeVetoableChangeListener( const ::rtl::OUString&, const Reference< XVetoableChangeListener >& ) throw (UnknownPropertyException, WrappedTargetException, RuntimeException)
279*cdf0e10cSrcweir     {
280*cdf0e10cSrcweir         OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::removeVetoableChangeListener: not implemented - this should not be needed!" );
281*cdf0e10cSrcweir     }
282*cdf0e10cSrcweir 
283*cdf0e10cSrcweir     //--------------------------------------------------------------------
284*cdf0e10cSrcweir     void SAL_CALL OGridColumnPropertyTranslator::setPropertyValues( const Sequence< ::rtl::OUString >& aPropertyNames, const Sequence< Any >& aValues ) throw (PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
285*cdf0e10cSrcweir     {
286*cdf0e10cSrcweir         if ( !m_xGridColumn.is() )
287*cdf0e10cSrcweir             return;
288*cdf0e10cSrcweir 
289*cdf0e10cSrcweir         // if there's ever the need for more than one property being translated, then we should
290*cdf0e10cSrcweir         // certainly have a more clever implementation than this ...
291*cdf0e10cSrcweir 
292*cdf0e10cSrcweir         Sequence< ::rtl::OUString > aTranslatedNames( aPropertyNames );
293*cdf0e10cSrcweir         Sequence< Any >             aTranslatedValues( aValues );
294*cdf0e10cSrcweir 
295*cdf0e10cSrcweir         sal_Int32 nParaAlignPos = findStringElement( aTranslatedNames, getParaAlignProperty() );
296*cdf0e10cSrcweir         if ( nParaAlignPos != -1 )
297*cdf0e10cSrcweir         {
298*cdf0e10cSrcweir             aTranslatedNames[ nParaAlignPos ] = getAlignProperty();
299*cdf0e10cSrcweir             valueParaAdjustToAlign( aTranslatedValues[ nParaAlignPos ] );
300*cdf0e10cSrcweir         }
301*cdf0e10cSrcweir 
302*cdf0e10cSrcweir         m_xGridColumn->setPropertyValues( aTranslatedNames, aTranslatedValues );
303*cdf0e10cSrcweir     }
304*cdf0e10cSrcweir 
305*cdf0e10cSrcweir     //--------------------------------------------------------------------
306*cdf0e10cSrcweir     Sequence< Any > SAL_CALL OGridColumnPropertyTranslator::getPropertyValues( const Sequence< ::rtl::OUString >& aPropertyNames ) throw (RuntimeException)
307*cdf0e10cSrcweir     {
308*cdf0e10cSrcweir         Sequence< Any > aValues( aPropertyNames.getLength() );
309*cdf0e10cSrcweir         if ( !m_xGridColumn.is() )
310*cdf0e10cSrcweir             return aValues;
311*cdf0e10cSrcweir 
312*cdf0e10cSrcweir         Sequence< ::rtl::OUString > aTranslatedNames( aPropertyNames );
313*cdf0e10cSrcweir         sal_Int32 nAlignPos = findStringElement( aTranslatedNames, getParaAlignProperty() );
314*cdf0e10cSrcweir         if ( nAlignPos != -1 )
315*cdf0e10cSrcweir             aTranslatedNames[ nAlignPos ] = getAlignProperty();
316*cdf0e10cSrcweir 
317*cdf0e10cSrcweir         aValues = m_xGridColumn->getPropertyValues( aPropertyNames );
318*cdf0e10cSrcweir         if ( nAlignPos != -1 )
319*cdf0e10cSrcweir             valueAlignToParaAdjust( aValues[ nAlignPos ] );
320*cdf0e10cSrcweir 
321*cdf0e10cSrcweir         return aValues;
322*cdf0e10cSrcweir     }
323*cdf0e10cSrcweir 
324*cdf0e10cSrcweir     //--------------------------------------------------------------------
325*cdf0e10cSrcweir     void SAL_CALL OGridColumnPropertyTranslator::addPropertiesChangeListener( const Sequence< ::rtl::OUString >&, const Reference< XPropertiesChangeListener >& ) throw (RuntimeException)
326*cdf0e10cSrcweir     {
327*cdf0e10cSrcweir         OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::addPropertiesChangeListener: not implemented - this should not be needed!" );
328*cdf0e10cSrcweir     }
329*cdf0e10cSrcweir 
330*cdf0e10cSrcweir     //--------------------------------------------------------------------
331*cdf0e10cSrcweir     void SAL_CALL OGridColumnPropertyTranslator::removePropertiesChangeListener( const Reference< XPropertiesChangeListener >& ) throw (RuntimeException)
332*cdf0e10cSrcweir     {
333*cdf0e10cSrcweir         OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::removePropertiesChangeListener: not implemented - this should not be needed!" );
334*cdf0e10cSrcweir     }
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir     //--------------------------------------------------------------------
337*cdf0e10cSrcweir     void SAL_CALL OGridColumnPropertyTranslator::firePropertiesChangeEvent( const Sequence< ::rtl::OUString >&, const Reference< XPropertiesChangeListener >& ) throw (RuntimeException)
338*cdf0e10cSrcweir     {
339*cdf0e10cSrcweir         OSL_ENSURE( sal_False, "OGridColumnPropertyTranslator::firePropertiesChangeEvent: not implemented - this should not be needed!" );
340*cdf0e10cSrcweir     }
341*cdf0e10cSrcweir 
342*cdf0e10cSrcweir //........................................................................
343*cdf0e10cSrcweir } // namespace xmloff
344*cdf0e10cSrcweir //........................................................................
345*cdf0e10cSrcweir 
346