summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorAugust Sodora <augsod@gmail.com>2012-01-13 23:48:59 -0500
committerAugust Sodora <augsod@gmail.com>2012-01-13 23:48:59 -0500
commit169f3b47c0ad339c6983de2e19d94627c9e567d3 (patch)
tree46604d6dbf7588b420390ae720d67411d161680b /sw/inc
parentfdb6e4171c7ab9620b739e1a1c3cbba51ba81544 (diff)
SvStringsDtor->boost::ptr_vector
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/doc.hxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 47b55ec1fa37..edf59c301851 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -88,6 +88,7 @@ class SwList;
#include <memory>
#include <boost/scoped_ptr.hpp>
+#include <boost/ptr_container/ptr_vector.hpp>
namespace editeng { class SvxBorderLine; }
@@ -288,7 +289,7 @@ class SW_DLLPUBLIC SwDoc :
SwDBData aDBData; // database descriptor
::com::sun::star::uno::Sequence <sal_Int8 > aRedlinePasswd;
String sTOIAutoMarkURL; // ::com::sun::star::util::URL of table of index AutoMark file
- SvStringsDtor aPatternNms; // Array for names of document-templates
+ boost::ptr_vector< boost::nullable<String> > aPatternNms; // Array for names of document-templates
com::sun::star::uno::Reference<com::sun::star::container::XNameContainer>
xXForms; // container with XForms models
mutable com::sun::star::uno::Reference< com::sun::star::linguistic2::XProofreadingIterator > m_xGCIterator;
@@ -1300,7 +1301,14 @@ public:
sal_uInt16 SetDocPattern( const String& rPatternName );
// Return name of document template. Can be 0!
- String* GetDocPattern( sal_uInt16 nPos ) const { return aPatternNms[nPos]; }
+ const String* GetDocPattern( sal_uInt16 nPos ) const
+ {
+ if(nPos >= aPatternNms.size())
+ return NULL;
+ if(boost::is_null(aPatternNms.begin() + nPos))
+ return NULL;
+ return &(aPatternNms[nPos]);
+ }
// Delete all unreferenced field types.
void GCFieldTypes(); // impl. in docfld.cxx