Skip to content

Commit 06f8099

Browse files
committed
Merge pull request 'Fix pdf properties exists' (#244) from fix/pdf-properties into hotfix/v8.3.2
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/core/pulls/244
2 parents 3d7638c + ba9d3bc commit 06f8099

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

PdfFile/PdfEditor.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -963,10 +963,7 @@ bool CPdfEditor::EditPage(int nPageIndex, bool bSet, bool bActualPos)
963963
{
964964
Object oRes;
965965
char* chKey2 = oTemp.dictGetKey(nIndex);
966-
if (strcmp("Font", chKey2) == 0 || strcmp("ExtGState", chKey2) == 0 || strcmp("XObject", chKey2) == 0 || strcmp("Shading", chKey2) == 0 || strcmp("Pattern", chKey2) == 0)
967-
oTemp.dictGetVal(nIndex, &oRes);
968-
else
969-
oTemp.dictGetValNF(nIndex, &oRes);
966+
oTemp.dictGetVal(nIndex, &oRes);
970967
DictToCDictObject(&oRes, pDict, false, chKey2);
971968
oRes.free();
972969
}

PdfFile/test/test.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ TEST_F(CPdfFileTest, EditPdf)
372372

373373
TEST_F(CPdfFileTest, EditPdfFromBase64)
374374
{
375-
//GTEST_SKIP();
375+
GTEST_SKIP();
376376

377377
NSFonts::NSApplicationFontStream::SetGlobalMemoryStorage(NSFonts::NSApplicationFontStream::CreateDefaultGlobalMemoryStorage());
378378

@@ -417,14 +417,14 @@ TEST_F(CPdfFileTest, EditPdfFromBase64)
417417

418418
TEST_F(CPdfFileTest, EditPdfFromBin)
419419
{
420-
GTEST_SKIP();
420+
// GTEST_SKIP();
421421

422422
LoadFromFile();
423423
ASSERT_TRUE(pdfFile->EditPdf(wsDstFile));
424424

425425
// чтение бинарника
426426
NSFile::CFileBinary oFile;
427-
ASSERT_TRUE(oFile.OpenFile(NSFile::GetProcessDirectory() + L"/changes0.json"));
427+
ASSERT_TRUE(oFile.OpenFile(NSFile::GetProcessDirectory() + L"/changes.bin"));
428428

429429
DWORD dwFileSize = oFile.GetFileSize();
430430
BYTE* pFileContent = new BYTE[dwFileSize];
@@ -440,7 +440,7 @@ TEST_F(CPdfFileTest, EditPdfFromBin)
440440

441441
CConvertFromBinParams* pParams = new CConvertFromBinParams();
442442
pParams->m_sMediaDirectory = NSFile::GetProcessDirectory();
443-
pdfFile->AddToPdfFromBinary(pFileContent, dwReaded, pParams);
443+
pdfFile->AddToPdfFromBinary(pFileContent + 4, dwReaded - 4, pParams);
444444

445445
RELEASEOBJECT(pParams);
446446
RELEASEARRAYOBJECTS(pFileContent);

0 commit comments

Comments
 (0)