LibreOffice Module sw (master)  1
vbafield.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #include "vbafield.hxx"
20 #include "vbarange.hxx"
21 #include <com/sun/star/frame/XModel.hpp>
22 #include <com/sun/star/text/XTextViewCursorSupplier.hpp>
23 #include <com/sun/star/view/XSelectionSupplier.hpp>
24 #include <com/sun/star/text/XTextFieldsSupplier.hpp>
25 #include <com/sun/star/text/FilenameDisplayFormat.hpp>
26 #include <com/sun/star/util/XRefreshable.hpp>
27 #include <com/sun/star/util/XUpdatable.hpp>
28 #include <ooo/vba/word/WdFieldType.hpp>
29 #include <swtypes.hxx>
30 #include <basic/sberrors.hxx>
31 #include <cppuhelper/implbase.hxx>
32 #include <sal/log.hxx>
33 
34 using namespace ::ooo::vba;
35 using namespace ::com::sun::star;
36 
37 SwVbaField::SwVbaField( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< css::text::XTextField >& xTextField) : SwVbaField_BASE( rParent, rContext )
38 {
39  mxTextField.set( xTextField, uno::UNO_SET_THROW );
40 }
41 
43 {
44  uno::Reference< util::XUpdatable > xUpdatable( mxTextField, uno::UNO_QUERY );
45  if( xUpdatable.is() )
46  {
47  xUpdatable->update();
48  return true;
49  }
50  return false;
51 }
52 
53 // XHelperInterface
54 OUString
56 {
57  return OUString("SwVbaField");
58 }
59 
60 uno::Sequence<OUString>
62 {
63  static uno::Sequence< OUString > const aServiceNames
64  {
65  "ooo.vba.word.Field"
66  };
67  return aServiceNames;
68 }
69 
70 // FIXME? copy and paste code
71 // the codes are copied from ww8par5.cxx
73 {
74 private:
75  OUString const aData;
76  sal_Int32 nLen, nFnd, nNext, nSavPtr;
77  OUString aFieldName;
78 public:
79  explicit SwVbaReadFieldParams( const OUString& rData );
80 
81  long SkipToNextToken();
82 
83  sal_Int32 FindNextStringPiece( sal_Int32 _nStart );
84 
85  OUString GetResult() const;
86  const OUString& GetFieldName()const { return aFieldName; }
87 };
88 
90  : aData( _rData ), nLen( _rData.getLength() ), nNext( 0 )
91 {
92  // First search for an opening parenthesis or a space or a quotation mark
93  // or a backslash, so that the field command
94  // (thus INCLUDEPICTURE or ...) is ignored.
95  while( (nLen > nNext) && (aData[ nNext ] == ' ') )
96  ++nNext;
97 
98  sal_Unicode c;
99  while( nLen > nNext
100  && (c = aData[ nNext ]) != ' '
101  && c != '"'
102  && c != '\\'
103  && c != 132
104  && c != 0x201c )
105  ++nNext;
106 
107  nFnd = nNext;
108  nSavPtr = nNext;
109  aFieldName = aData.copy( 0, nFnd );
110 }
111 
113 {
114  return (-1 == nFnd)
115  ? OUString()
116  : aData.copy( nFnd, (nSavPtr - nFnd) );
117 }
118 
119 // ret: -2: NOT a '\' parameter but normal Text
121 {
122  long nRet = -1; // end
123  if (
124  (-1 != nNext) && (nLen > nNext) &&
125  -1 != (nFnd = FindNextStringPiece(nNext))
126  )
127  {
128  nSavPtr = nNext;
129 
130  if ('\\' == aData[nFnd] && '\\' != aData[nFnd + 1])
131  {
132  nRet = aData[++nFnd];
133  nNext = ++nFnd; // and set behind
134  }
135  else
136  {
137  nRet = -2;
138  if (
139  (-1 != nSavPtr ) &&
140  (
141  ('"' == aData[nSavPtr - 1]) ||
142  (0x201d == aData[nSavPtr - 1])
143  )
144  )
145  {
146  --nSavPtr;
147  }
148  }
149  }
150  return nRet;
151 }
152 
153 // FindNextPara is searching for the next Backslash-Parameter or the next string
154 // until blank or the next "\" or until the closing quotation mark
155 // or until the string end of pStr.
156 
157 // Output ppNext (if ppNext != 0) beginning of the search for the next parameter or 0
158 
159 // Return value: 0 if String-End reached, otherwise begin of the parameter or the string
160 
161 sal_Int32 SwVbaReadFieldParams::FindNextStringPiece(const sal_Int32 nStart)
162 {
163  sal_Int32 n = ( -1 == nStart ) ? nFnd : nStart; // Start
164  sal_Int32 n2; // End
165 
166  nNext = -1; // Default for not found
167 
168  while( (nLen > n) && (aData[ n ] == ' ') )
169  ++n;
170 
171  if( nLen == n )
172  return -1; // String End reached!
173 
174  if( (aData[ n ] == '"') // quotation marks are in front of parenthesis?
175  || (aData[ n ] == 0x201c)
176  || (aData[ n ] == 132) )
177  {
178  n++; // ignore quotation marks
179  n2 = n; // From here search for the end
180  while( (nLen > n2)
181  && (aData[ n2 ] != '"')
182  && (aData[ n2 ] != 0x201d)
183  && (aData[ n2 ] != 147) )
184  n2++; // Search for the end of the parenthesis
185  }
186  else // no quotation marks
187  {
188  n2 = n; // from here search for the end
189  while( (nLen > n2) && (aData[ n2 ] != ' ') ) // Search for the end of the parenthesis
190  {
191  if( aData[ n2 ] == '\\' )
192  {
193  if( aData[ n2+1 ] == '\\' )
194  n2 += 2; // double-backslash -> OK
195  else
196  {
197  if( n2 > n )
198  n2--;
199  break; // single-backslash -> End
200  }
201  }
202  else
203  n2++; // no backslash -> OK
204  }
205  }
206  if( nLen > n2 )
207  {
208  if(aData[ n2 ] != ' ') n2++;
209  nNext = n2;
210  }
211  return n;
212 }
213 
214 // SwVbaFields
215 
216 static uno::Any lcl_createField( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel, const uno::Any& aSource )
217 {
218  uno::Reference< text::XTextField > xTextField( aSource, uno::UNO_QUERY_THROW );
219  uno::Reference< text::XTextDocument > xTextDocument( xModel, uno::UNO_QUERY_THROW );
220  uno::Reference< word::XField > xField( new SwVbaField( xParent, xContext, xTextField ) );
221  return uno::makeAny( xField );
222 }
223 
224 class FieldEnumeration : public ::cppu::WeakImplHelper< css::container::XEnumeration >
225 {
226  uno::Reference< XHelperInterface > mxParent;
227  uno::Reference< uno::XComponentContext > mxContext;
228  uno::Reference< frame::XModel > mxModel;
229  uno::Reference< container::XEnumeration > mxEnumeration;
230 public:
231  FieldEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< container::XEnumeration >& xEnumeration ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel ), mxEnumeration( xEnumeration )
232  {
233  }
234  virtual sal_Bool SAL_CALL hasMoreElements( ) override
235  {
236  return mxEnumeration->hasMoreElements();
237  }
238  virtual uno::Any SAL_CALL nextElement( ) override
239  {
240  if ( !hasMoreElements() )
241  throw container::NoSuchElementException();
242  return lcl_createField( mxParent, mxContext, mxModel, mxEnumeration->nextElement() );
243  }
244 };
245 
246 class FieldCollectionHelper : public ::cppu::WeakImplHelper< container::XIndexAccess,
247  container::XEnumerationAccess >
248 {
249  uno::Reference< XHelperInterface > mxParent;
250  uno::Reference< uno::XComponentContext > mxContext;
251  uno::Reference< frame::XModel > mxModel;
252  uno::Reference< container::XEnumerationAccess > mxEnumerationAccess;
253 public:
255  FieldCollectionHelper( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ) : mxParent( xParent ), mxContext( xContext ), mxModel( xModel )
256  {
257  uno::Reference< text::XTextFieldsSupplier > xSupp( xModel, uno::UNO_QUERY_THROW );
258  mxEnumerationAccess.set( xSupp->getTextFields(), uno::UNO_SET_THROW );
259  }
260  // XElementAccess
261  virtual uno::Type SAL_CALL getElementType( ) override { return mxEnumerationAccess->getElementType(); }
262  virtual sal_Bool SAL_CALL hasElements( ) override { return mxEnumerationAccess->hasElements(); }
263  // XIndexAccess
264  virtual ::sal_Int32 SAL_CALL getCount( ) override
265  {
266  uno::Reference< container::XEnumeration > xEnumeration = mxEnumerationAccess->createEnumeration();
267  sal_Int32 nCount = 0;
268  while( xEnumeration->hasMoreElements() )
269  {
270  ++nCount;
271  xEnumeration->nextElement();
272  }
273  return nCount;
274  }
275  virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) override
276  {
278  throw lang::IndexOutOfBoundsException();
279 
280  uno::Reference< container::XEnumeration > xEnumeration = mxEnumerationAccess->createEnumeration();
281  sal_Int32 nCount = 0;
282  while( xEnumeration->hasMoreElements() )
283  {
284  if( nCount == Index )
285  {
286  return xEnumeration->nextElement();
287  }
288  ++nCount;
289  }
290  throw lang::IndexOutOfBoundsException();
291  }
292  // XEnumerationAccess
293  virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) override
294  {
295  uno::Reference< container::XEnumeration > xEnumeration = mxEnumerationAccess->createEnumeration();
296  return uno::Reference< container::XEnumeration >( new FieldEnumeration( mxParent, mxContext, mxModel, xEnumeration ) );
297  }
298 };
299 
300 SwVbaFields::SwVbaFields( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< frame::XModel >& xModel ) : SwVbaFields_BASE( xParent, xContext , uno::Reference< container::XIndexAccess >( new FieldCollectionHelper( xParent, xContext, xModel ) ) ), mxModel( xModel )
301 {
302  mxMSF.set( mxModel, uno::UNO_QUERY_THROW );
303 }
304 
305 uno::Reference< word::XField > SAL_CALL
306 SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range, const css::uno::Any& Type, const css::uno::Any& Text, const css::uno::Any& /*PreserveFormatting*/ )
307 {
308  sal_Int32 nType = word::WdFieldType::wdFieldEmpty;
309  Type >>= nType;
310  OUString sText;
311  Text >>= sText;
312 
313  OUString sFieldName;
314  if( ( nType == word::WdFieldType::wdFieldEmpty ) && !sText.isEmpty() )
315  {
316  SwVbaReadFieldParams aReadParam(sText);
317  sFieldName = aReadParam.GetFieldName();
318  SAL_INFO("sw.vba", "the field name is " << sFieldName );
319  }
320 
321  uno::Reference< text::XTextContent > xTextField;
322  if( nType == word::WdFieldType::wdFieldFileName || sFieldName.equalsIgnoreAsciiCase("FILENAME") )
323  {
324  xTextField.set( Create_Field_FileName( sText ), uno::UNO_QUERY_THROW );
325  }
326  else if( nType == word::WdFieldType::wdFieldDocProperty || sFieldName.equalsIgnoreAsciiCase("DOCPROPERTY") )
327  {
328  xTextField.set( Create_Field_DocProperty( sText ), uno::UNO_QUERY_THROW );
329  }
330  else
331  {
332  throw uno::RuntimeException("Not implemented" );
333  }
334 
335  SwVbaRange& rVbaRange = dynamic_cast<SwVbaRange&>(*Range);
336  uno::Reference< text::XTextRange > xTextRange = rVbaRange.getXTextRange();
337  uno::Reference< text::XText > xText = xTextRange->getText();
338  xText->insertTextContent( xTextRange, xTextField, true );
339  return uno::Reference< word::XField >( new SwVbaField( mxParent, mxContext, uno::Reference< text::XTextField >( xTextField, uno::UNO_QUERY_THROW ) ) );
340 }
341 
342 uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const OUString& _text )
343 {
344  uno::Reference< text::XTextField > xTextField( mxMSF->createInstance("com.sun.star.text.TextField.FileName"), uno::UNO_QUERY_THROW );
345  sal_Int16 nFileFormat = text::FilenameDisplayFormat::NAME_AND_EXT;
346  if( !_text.isEmpty() )
347  {
348  long nRet;
349  SwVbaReadFieldParams aReadParam( _text );
350  while (-1 != (nRet = aReadParam.SkipToNextToken()))
351  {
352  switch (nRet)
353  {
354  case 'p':
355  nFileFormat = text::FilenameDisplayFormat::FULL;
356  break;
357  case '*':
358  //Skip over MERGEFORMAT
359  aReadParam.SkipToNextToken();
360  break;
361  default:
362  DebugHelper::basicexception(ERRCODE_BASIC_BAD_ARGUMENT, OUString());
363  break;
364  }
365  }
366  }
367 
368  uno::Reference< beans::XPropertySet > xProps( xTextField, uno::UNO_QUERY_THROW );
369  xProps->setPropertyValue("FileFormat", uno::makeAny( nFileFormat ) );
370 
371  return xTextField;
372 }
373 
375 {
376  const char* sDocPropertyName;
377  const char* sFieldService;
378 };
379 
381 {
382  { "Author", "com.sun.star.text.textfield.docinfo.CreateAuthor" },
383  { "Bytes", nullptr },
384  { "Category", nullptr },
385  { "Characters",nullptr },
386  { "CharactersWithSpaces", nullptr },
387  { "Comments", "com.sun.star.text.textfield.docinfo.Description" },
388  { "Company", nullptr },
389  { "CreateTime", "com.sun.star.text.textfield.docinfo.CreateDateTime" },
390  { "HyperlinkBase", nullptr },
391  { "Keywords", "com.sun.star.text.textfield.docinfo.Keywords" },
392  { "LastPrinted", "com.sun.star.text.textfield.docinfo.PrintDateTime" },
393  { "LastSavedBy", "com.sun.star.text.textfield.docinfo.ChangeAuthor" },
394  { "LastSavedTime", "com.sun.star.text.textfield.docinfo.ChangeDateTime" },
395  { "Lines", nullptr },
396  { "Manager", nullptr },
397  { "NameofApplication", nullptr },
398  { "ODMADocID", nullptr },
399  { "Pages", "com.sun.star.text.textfield.PageCount" },
400  { "Paragraphs", "com.sun.star.text.textfield.ParagraphCount" },
401  { "RevisionNumber", "com.sun.star.text.textfield.docinfo.Revision" },
402  { "Security", nullptr },
403  { "Subject", "com.sun.star.text.textfield.docinfo.Subject" },
404  { "Template", "com.sun.star.text.textfield.TemplateName" },
405  { "Title", "com.sun.star.text.textfield.docinfo.Title" },
406  { "TotalEditingTime", "com.sun.star.text.textfield.docinfo.EditTime" },
407  { "Words", "com.sun.star.text.textfield.WordCount" },
408  { nullptr, nullptr }
409 };
410 
411 uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const OUString& _text )
412 {
413  OUString aDocProperty;
414  SwVbaReadFieldParams aReadParam( _text );
415  long nRet;
416  while( -1 != ( nRet = aReadParam.SkipToNextToken() ))
417  {
418  switch( nRet )
419  {
420  case -2:
421  if( aDocProperty.isEmpty() )
422  aDocProperty = aReadParam.GetResult();
423  break;
424  case '*':
425  //Skip over MERGEFORMAT
426  aReadParam.SkipToNextToken();
427  break;
428  }
429  }
430  aDocProperty = aDocProperty.replaceAll("\"", "");
431  SAL_INFO("sw.vba", "SwVbaFields::Create_Field_DocProperty, the document property name is " << aDocProperty );
432  if( aDocProperty.isEmpty() )
433  {
434  throw uno::RuntimeException();
435  }
436 
437  bool bCustom = true;
438  OUString sFieldService;
439  // find the build in document properties
440  for( const DocPropertyTable* pTable = aDocPropertyTables; pTable->sDocPropertyName != nullptr; pTable++ )
441  {
442  if( aDocProperty.equalsIgnoreAsciiCaseAscii( pTable->sDocPropertyName ) )
443  {
444  if( pTable->sFieldService != nullptr )
445  sFieldService = OUString::createFromAscii(pTable->sFieldService);
446  bCustom = false;
447  break;
448  }
449  }
450 
451  if( bCustom )
452  {
453  sFieldService = "com.sun.star.text.textfield.docinfo.Custom";
454  }
455  else if( sFieldService.isEmpty() )
456  {
457  throw uno::RuntimeException("Not implemented" );
458  }
459 
460  uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( sFieldService ), uno::UNO_QUERY_THROW );
461 
462  if( bCustom )
463  {
464  uno::Reference< beans::XPropertySet > xProps( xTextField, uno::UNO_QUERY_THROW );
465  xProps->setPropertyValue("Name", uno::makeAny( aDocProperty ) );
466  }
467 
468  return xTextField;
469 }
470 
471 uno::Reference< container::XEnumeration > SAL_CALL
473 {
474  uno::Reference< container::XEnumerationAccess > xEnumerationAccess( m_xIndexAccess, uno::UNO_QUERY_THROW );
475  return xEnumerationAccess->createEnumeration();
476 }
477 
478 // ScVbaCollectionBaseImpl
479 uno::Any
481 {
482  return lcl_createField( mxParent, mxContext, mxModel, aSource );
483 }
484 
485 sal_Int32 SAL_CALL SwVbaFields::Update()
486 {
487  sal_Int32 nUpdate = 1;
488  try
489  {
490  uno::Reference< text::XTextFieldsSupplier > xSupp( mxModel, uno::UNO_QUERY_THROW );
491  uno::Reference< util::XRefreshable > xRef( xSupp->getTextFields(), uno::UNO_QUERY_THROW );
492  xRef->refresh();
493  nUpdate = 0;
494  }
495  catch(const uno::Exception&)
496  {
497  nUpdate = 1;
498  }
499  return nUpdate;
500 }
501 
502 // XHelperInterface
503 OUString
505 {
506  return OUString("SwVbaFields");
507 }
508 
509 // XEnumerationAccess
510 uno::Type SAL_CALL
512 {
514 }
515 
516 uno::Sequence<OUString>
518 {
519  static uno::Sequence< OUString > const aServiceNames
520  {
521  "ooo.vba.word.Fields"
522  };
523  return aServiceNames;
524 }
525 
526 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration() override
Definition: vbafield.cxx:293
Type
const char * sDocPropertyName
Definition: vbafield.cxx:376
uno::Reference< container::XEnumerationAccess > mxEnumerationAccess
Definition: vbafield.cxx:252
FieldEnumeration(const uno::Reference< XHelperInterface > &xParent, const uno::Reference< uno::XComponentContext > &xContext, const uno::Reference< frame::XModel > &xModel, const uno::Reference< container::XEnumeration > &xEnumeration)
Definition: vbafield.cxx:231
#define ERRCODE_BASIC_BAD_ARGUMENT
OUString GetResult() const
Definition: vbafield.cxx:112
uno::Reference< XHelperInterface > mxParent
Definition: vbafield.cxx:249
css::uno::Reference< css::container::XIndexAccess > m_xIndexAccess
virtual uno::Type SAL_CALL getElementType() override
Definition: vbafield.cxx:261
uno::Reference< uno::XComponentContext > mxContext
Definition: vbafield.cxx:227
Reference
css::uno::Reference< css::frame::XModel2 > mxModel
sal_Int32 FindNextStringPiece(sal_Int32 _nStart)
Definition: vbafield.cxx:161
virtual OUString getServiceImplName() override
Definition: vbafield.cxx:55
SwVbaFields(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel > &xModel)
Definition: vbafield.cxx:300
uno::Reference< frame::XModel > mxModel
Definition: vbafield.cxx:251
virtual uno::Any SAL_CALL getByIndex(::sal_Int32 Index) override
Definition: vbafield.cxx:275
static const DocPropertyTable aDocPropertyTables[]
Definition: vbafield.cxx:380
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
Definition: vbafield.cxx:472
sal_uInt16 sal_Unicode
FUNC_TYPE const nType
css::uno::Reference< css::text::XTextField > Create_Field_FileName(const OUString &rText)
Definition: vbafield.cxx:342
uno::Reference< container::XEnumeration > mxEnumeration
Definition: vbafield.cxx:229
virtual ::sal_Int32 SAL_CALL getCount() override
Definition: vbafield.cxx:264
virtual css::uno::Reference< css::text::XTextRange > SAL_CALL getXTextRange() override
Definition: vbarange.cxx:87
css::uno::Reference< css::text::XTextField > Create_Field_DocProperty(const OUString &_text)
Definition: vbafield.cxx:411
uno::Reference< frame::XModel > mxModel
Definition: vbafield.cxx:228
virtual css::uno::Type SAL_CALL getElementType() override
Definition: vbafield.cxx:511
css::uno::Reference< css::text::XTextField > mxTextField
Definition: vbafield.hxx:33
SwVbaField(const css::uno::Reference< ooo::vba::XHelperInterface > &rParent, const css::uno::Reference< css::uno::XComponentContext > &rContext, const css::uno::Reference< css::text::XTextField > &xTextField)
Definition: vbafield.cxx:37
virtual OUString getServiceImplName() override
Definition: vbafield.cxx:504
virtual sal_Bool SAL_CALL hasMoreElements() override
Definition: vbafield.cxx:234
uno::Reference< uno::XComponentContext > mxContext
Definition: vbafield.cxx:250
unsigned char sal_Bool
css::uno::Reference< css::lang::XMultiServiceFactory > mxMSF
Definition: vbafield.hxx:49
virtual sal_Int32 SAL_CALL Update() override
Definition: vbafield.cxx:485
css::uno::WeakReference< ov::XHelperInterface > mxParent
css::uno::Type const & get()
const char * sFieldService
Definition: vbafield.cxx:377
GUIDCNamePair const aData
uno::Reference< XHelperInterface > mxParent
Definition: vbafield.cxx:226
virtual sal_Bool SAL_CALL hasElements() override
Definition: vbafield.cxx:262
virtual css::uno::Reference< ::ooo::vba::word::XField > SAL_CALL Add(const css::uno::Reference< ::ooo::vba::word::XRange > &Range, const css::uno::Any &Type, const css::uno::Any &Text, const css::uno::Any &PreserveFormatting) override
Definition: vbafield.cxx:306
static uno::Any lcl_createField(const uno::Reference< XHelperInterface > &xParent, const uno::Reference< uno::XComponentContext > &xContext, const uno::Reference< frame::XModel > &xModel, const uno::Any &aSource)
Definition: vbafield.cxx:216
virtual css::uno::Sequence< OUString > getServiceNames() override
Definition: vbafield.cxx:61
SwVbaReadFieldParams(const OUString &rData)
Definition: vbafield.cxx:89
virtual uno::Any SAL_CALL nextElement() override
Definition: vbafield.cxx:238
css::uno::Reference< css::uno::XComponentContext > mxContext
#define SAL_INFO(area, stream)
double getLength(const B2DPolygon &rCandidate)
virtual sal_Bool SAL_CALL Update() override
Definition: vbafield.cxx:42
FieldCollectionHelper(const uno::Reference< XHelperInterface > &xParent, const uno::Reference< uno::XComponentContext > &xContext, const uno::Reference< frame::XModel > &xModel)
Definition: vbafield.cxx:255
const OUString & GetFieldName() const
Definition: vbafield.cxx:86
virtual css::uno::Any createCollectionObject(const css::uno::Any &aSource) override
Definition: vbafield.cxx:480
virtual css::uno::Sequence< OUString > getServiceNames() override
Definition: vbafield.cxx:517
OUString const aData
Definition: vbafield.cxx:75
css::uno::Reference< css::frame::XModel > mxModel
Definition: vbafield.hxx:48