[Libreoffice-commits] .: svtools/inc svtools/source
Nigel Hawkins
nhawkins at kemper.freedesktop.org
Thu Jul 14 01:52:31 PDT 2011
svtools/inc/svtools/txtattr.hxx | 4 +++-
svtools/source/edit/textdoc.cxx | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
New commits:
commit bba0d1283a20ab9e576f342442ff411ec5ac9e0b
Author: Nigel Hawkins <n.hawkins at gmx.com>
Date: Thu Jul 14 09:49:14 2011 +0100
Fix "unused attribute" build error.
This reverts parts of
82ea128f190dbe8d707cb140a5a2bb2b48bef58d
e1309004099d1a1c0a9bc1ba6de9e5054629da3c
which were a bit over-zealous at removing "unused" stuff. LGPLv3+/MPL
diff --git a/svtools/inc/svtools/txtattr.hxx b/svtools/inc/svtools/txtattr.hxx
index ead53b4..96ee3a4 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 7933114..1c7dbe0 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;
}
More information about the Libreoffice-commits
mailing list