summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-11-01 20:14:12 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-11-04 13:59:18 -0500
commit8c6dd2cbcdf72b249051321dd7f7d3375e52f7b3 (patch)
tree56bb0f1ed5f747e6158a0508a695cf938082d3e9 /sc
parent20a359ea3669b0f33edf7b9d66e56343e0624a0d (diff)
No point using the pimpl pattern here.
The whole class is already hidden in the source file. Change-Id: Ib6157ae275217a95586735f74beee1700041a679
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/documentimport.cxx26
1 files changed, 10 insertions, 16 deletions
diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx
index c2b951ab16ad..f52eb38b3b05 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -397,23 +397,17 @@ namespace {
class CellStoreInitializer
{
- struct Impl
- {
- sc::CellTextAttrStoreType maAttrs;
- sc::CellTextAttrStoreType::iterator miPos;
- sal_uInt16 mnScriptNumeric;
-
- Impl(const sal_uInt32 nMaxRowCount, const sal_uInt16 nScriptNumeric)
- : maAttrs(nMaxRowCount), miPos(maAttrs.begin()), mnScriptNumeric(nScriptNumeric)
- {}
- };
-
ScDocument& mrDoc;
- boost::shared_ptr<Impl> mpImpl;
+ sc::CellTextAttrStoreType maAttrs;
+ sc::CellTextAttrStoreType::iterator miPos;
+ sal_uInt16 mnScriptNumeric;
public:
CellStoreInitializer(ScDocument& rDoc, sal_uInt16 nScriptNumeric) :
- mrDoc(rDoc), mpImpl(new Impl(MAXROWCOUNT, nScriptNumeric)) {}
+ mrDoc(rDoc),
+ maAttrs(MAXROWCOUNT),
+ miPos(maAttrs.begin()),
+ mnScriptNumeric(nScriptNumeric) {}
void operator() (const sc::CellStoreType::value_type& node)
{
@@ -423,9 +417,9 @@ public:
// Fill with default values for non-empty cell segments.
sc::CellTextAttr aDefault;
if (node.type == sc::element_type_numeric)
- aDefault.mnScriptType = mpImpl->mnScriptNumeric;
+ aDefault.mnScriptType = mnScriptNumeric;
std::vector<sc::CellTextAttr> aDefaults(node.size, aDefault);
- mpImpl->miPos = mpImpl->maAttrs.set(mpImpl->miPos, node.position, aDefaults.begin(), aDefaults.end());
+ miPos = maAttrs.set(miPos, node.position, aDefaults.begin(), aDefaults.end());
if (node.type == sc::element_type_formula)
{
@@ -442,7 +436,7 @@ public:
void swap(sc::CellTextAttrStoreType& rAttrs)
{
- mpImpl->maAttrs.swap(rAttrs);
+ maAttrs.swap(rAttrs);
}
};