kit: makeRenderParams now static
Change-Id: I1c79991a73044a91ed9f8389e23ccffd8b2bcbce Reviewed-on: https://gerrit.libreoffice.org/49572 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
parent
88619a323f
commit
b834545e79
1 changed files with 6 additions and 7 deletions
13
kit/Kit.cpp
13
kit/Kit.cpp
|
@ -1615,7 +1615,7 @@ private:
|
|||
LOG_TRC("View to url [" << uri << "] created.");
|
||||
}
|
||||
|
||||
const std::string renderParams = makeRenderParams(userName);
|
||||
const std::string renderParams = makeRenderParams(_renderOpts, userName);
|
||||
LOG_INF("Initializing for rendering session [" << sessionId << "] on document url [" <<
|
||||
_url << "] with: [" << renderParams << "].");
|
||||
|
||||
|
@ -1714,15 +1714,15 @@ private:
|
|||
return false;
|
||||
}
|
||||
|
||||
std::string makeRenderParams(const std::string& userName)
|
||||
static std::string makeRenderParams(const std::string& renderOpts, const std::string& userName)
|
||||
{
|
||||
Object::Ptr renderOptsObj;
|
||||
|
||||
// Fill the object with renderoptions, if any
|
||||
if (!_renderOpts.empty())
|
||||
if (!renderOpts.empty())
|
||||
{
|
||||
Parser parser;
|
||||
Poco::Dynamic::Var var = parser.parse(_renderOpts);
|
||||
Poco::Dynamic::Var var = parser.parse(renderOpts);
|
||||
renderOptsObj = var.extract<Object::Ptr>();
|
||||
}
|
||||
else if (!userName.empty())
|
||||
|
@ -1741,15 +1741,14 @@ private:
|
|||
renderOptsObj->set(".uno:Author", authorObj);
|
||||
}
|
||||
|
||||
std::string renderParams;
|
||||
if (renderOptsObj)
|
||||
{
|
||||
std::ostringstream ossRenderOpts;
|
||||
renderOptsObj->stringify(ossRenderOpts);
|
||||
renderParams = ossRenderOpts.str();
|
||||
return ossRenderOpts.str();
|
||||
}
|
||||
|
||||
return renderParams;
|
||||
return std::string();
|
||||
}
|
||||
|
||||
void run() override
|
||||
|
|
Loading…
Reference in a new issue