diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2009-12-29 16:22:19 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2009-12-29 16:22:19 -0500 |
commit | 4908f76bb1c8467796dcb2084417bc8ebbef6350 (patch) | |
tree | 7b6dd123b72fbc090d44c1f50a6f383a6f9ecb98 | |
parent | 3c72e47a77d126b7960de9a1581ddd840c6e6eec (diff) |
A little cleanup.
-rw-r--r-- | source/main.cxx | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/source/main.cxx b/source/main.cxx index a526234..86142e3 100644 --- a/source/main.cxx +++ b/source/main.cxx @@ -84,18 +84,11 @@ struct TestParam vector<OUString> maInFiles; }; -struct PrintFilePath : public ::std::unary_function<void, OUString> -{ - void operator() (const OUString& r) const - { - cout << rtl::OUStringToOString(r, RTL_TEXTENCODING_UTF8).getStr() << endl; - } -}; -class ProcessFile : public ::std::unary_function<void, OUString> +class DuplicateXclFile : public ::std::unary_function<void, OUString> { public: - explicit ProcessFile(const Reference<XDesktop>& xDesktop, const OUString& rInPath, const OUString& rOutPath) : + explicit DuplicateXclFile(const Reference<XDesktop>& xDesktop, const OUString& rInPath, const OUString& rOutPath) : mxDesktop(xDesktop), maInPath(rInPath), maOutPath(rOutPath) {} void operator() (const OUString& rFile) const @@ -122,7 +115,7 @@ public: cout << "storing to " << rtl::OUStringToOString(aOutFile, RTL_TEXTENCODING_UTF8).getStr() << endl; Sequence<beans::PropertyValue> props(2); props[0].Name = ascii("FilterName"); - props[0].Value = toAny(ascii("MS Excel 97")); + props[0].Value <<= ascii("MS Excel 97"); props[1].Name = ascii("Overwrite"); props[1].Value <<= sal_True; xStorable->storeAsURL(aOutFile, props); @@ -158,7 +151,7 @@ int main() Reference<XDesktop> xDesktop = bootstrap(); for_each(aParam.maInFiles.begin(), aParam.maInFiles.end(), - ProcessFile(xDesktop, aParam.maInPath, aParam.maOutPath)); + DuplicateXclFile(xDesktop, aParam.maInPath, aParam.maOutPath)); xDesktop->terminate(); } |