Skip to content

Commit 6aa68f1

Browse files
committed
Add GetPropertyInt method
1 parent e9852e8 commit 6aa68f1

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

DesktopEditor/doctrenderer/docbuilder.h

+7
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,13 @@ namespace NSDoctRenderer
475475
*/
476476
void SetPropertyW(const wchar_t* param, const wchar_t* value);
477477

478+
/**
479+
* GetProperty method.
480+
* @param param The parameter name in the Unicode format, the value is always --argument.
481+
* @return int value for property
482+
*/
483+
int GetPropertyInt(const wchar_t* param);
484+
478485
/**
479486
* Writes data to the log file. It is used for logs in JS code.
480487
* @param path The path to the file where all the logs will be written.

DesktopEditor/doctrenderer/docbuilder_p.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -1596,6 +1596,15 @@ namespace NSDoctRenderer
15961596
return this->SetProperty(sA.c_str(), value);
15971597
}
15981598

1599+
int CDocBuilder::GetPropertyInt(const wchar_t* param)
1600+
{
1601+
std::wstring sParam = std::wstring(param);
1602+
std::string sParamA = U_TO_UTF8(sParam);
1603+
if ("--save-use-only-names" == sParamA)
1604+
return m_pInternal->m_bIsServerSafeVersion ? 1 : 0;
1605+
return -1;
1606+
}
1607+
15991608
void CDocBuilder::Initialize(const wchar_t* directory)
16001609
{
16011610
std::wstring sDirectory = L"";

0 commit comments

Comments
 (0)