diff options
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/svtools/txtattr.hxx | 4 | ||||
-rw-r--r-- | svtools/source/edit/textdoc.cxx | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/svtools/inc/svtools/txtattr.hxx b/svtools/inc/svtools/txtattr.hxx index 2b6028965475..bf4c8e38b007 100644 --- a/svtools/inc/svtools/txtattr.hxx +++ b/svtools/inc/svtools/txtattr.hxx @@ -59,7 +59,9 @@ public: virtual ~TextAttrib(); - sal_uInt16 Which() const { return mnWhich; } + sal_uInt16 Which() const { return mnWhich; } + virtual void SetFont( Font& rFont ) const = 0; + virtual TextAttrib* Clone() const = 0; virtual int operator==( const TextAttrib& rAttr ) const = 0; int operator!=( const TextAttrib& rAttr ) const diff --git a/svtools/source/edit/textdoc.cxx b/svtools/source/edit/textdoc.cxx index b31395dd43fa..95a26d2c1ebc 100644 --- a/svtools/source/edit/textdoc.cxx +++ b/svtools/source/edit/textdoc.cxx @@ -54,14 +54,14 @@ int SAL_CALL CompareStart( const void* pFirst, const void* pSecond ) // ------------------------------------------------------------------------- TextCharAttrib::TextCharAttrib( const TextAttrib& /* rAttr */, sal_uInt16 nStart, sal_uInt16 nEnd ) { - mpAttr = NULL; + mpAttr = rAttr.Clone(); mnStart = nStart, mnEnd = nEnd; } TextCharAttrib::TextCharAttrib( const TextCharAttrib& rTextCharAttrib ) { - mpAttr = NULL; + mpAttr = rTextCharAttrib.GetAttr().Clone(); mnStart = rTextCharAttrib.mnStart; mnEnd = rTextCharAttrib.mnEnd; } |