Kaydet (Commit) ed45c878 authored tarafından Michael Stahl's avatar Michael Stahl

sc: fix temp file leak in ScTableSheetsObj

Change-Id: Iff838c97c1cf633f99e75a169eeb8bb324d4a32a
üst d7806edc
......@@ -30,6 +30,7 @@
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/table/CellVertJustify.hpp>
#include <com/sun/star/util/XCloseable.hpp>
#include <rtl/ustring.hxx>
#include "cppunit/extensions/HelperMacros.h"
......@@ -48,6 +49,11 @@ XSpreadsheets2::XSpreadsheets2():
XSpreadsheets2::~XSpreadsheets2()
{
if (xDestDoc.is())
{
uno::Reference<util::XCloseable> xCloseable(xDestDoc, UNO_QUERY_THROW);
xCloseable->close(true);
}
}
void XSpreadsheets2::testImportedSheetNameAndIndex()
......@@ -302,7 +308,7 @@ void XSpreadsheets2::importSheetToCopy()
uno::Reference< container::XNameAccess> xSrcNameAccess(init(),UNO_QUERY_THROW);
xSrcSheet = uno::Reference< sheet::XSpreadsheet >( xSrcNameAccess->getByName(aSrcSheetName), UNO_QUERY_THROW);
static uno::Reference< lang::XComponent > xDestComponent;
uno::Reference< lang::XComponent > xDestComponent;
if (!xDestComponent.is())
{
xDestDoc = getDoc(aDestFileBase, xDestComponent);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment