summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/cppunit/tox/test_ToxTextGenerator.cxx1
-rw-r--r--sw/source/core/tox/ToxTextGenerator.cxx2
2 files changed, 2 insertions, 1 deletions
diff --git a/sw/qa/cppunit/tox/test_ToxTextGenerator.cxx b/sw/qa/cppunit/tox/test_ToxTextGenerator.cxx
index 41f4bd0db68d..12dea3d5bfb2 100644
--- a/sw/qa/cppunit/tox/test_ToxTextGenerator.cxx
+++ b/sw/qa/cppunit/tox/test_ToxTextGenerator.cxx
@@ -25,6 +25,7 @@ public:
void OneAtSignIsReturnedForPageNumberPlaceholderOfOneItem();
void TwoAtSignsAreReturnedForPageNumberPlaceholderOfOneItem();
void EmptyStringIsReturnedAsNumStringIfNoTextMarkIsSet();
+ void EmptyStringIsReturnedAsNumStringIfToxSourcesIsEmpty();
CPPUNIT_TEST_SUITE(ToxTextGeneratorTest);
CPPUNIT_TEST(EmptyStringIsReturnedForPageNumberPlaceholderOfZeroItems);
diff --git a/sw/source/core/tox/ToxTextGenerator.cxx b/sw/source/core/tox/ToxTextGenerator.cxx
index 10a3e2f99b85..1360f6db9256 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -311,7 +311,7 @@ void ToxTextGenerator::GenerateText(SwDoc* pDoc, const std::vector<SwTOXSortTabB
/*static*/ boost::shared_ptr<SfxItemSet>
ToxTextGenerator::CollectAttributesForTox(const SwTxtAttr& hint, SwAttrPool& pool)
{
- boost::shared_ptr<SfxItemSet> retval = boost::make_shared<SfxItemSet>(pool);
+ boost::shared_ptr<SfxItemSet> retval(new SfxItemSet(pool));
if (hint.Which() != RES_TXTATR_AUTOFMT) {
return retval;
}