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