[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gambas-bugtracker] Bug #3139: gb.pdf fails to build with poppler 26.02.0


http://gambaswiki.org/bugtracker/edit?object=BUG.3139&from=L21haW4-

Comment #2 by Benoît MINISINI:

Of course, I can't merge the patches directly, as they do not use the poppler version constants defined by the component configuration.

The changes in your 25.11 patch was already present in the source code, except after 25.12 version. So I just updated the version constant.

There is still one change in that patch I don't understand, so I don't take it. This one:

@@ -286,7 +286,7 @@ static uint32_t aux_get_page_from_action
 			name = ((LinkGoTo*)act)->getNamedDest();
 			if (name) {
 			#if POPPLER_VERSION_0_86
-				dest = THIS->doc->findDest(name).get();
+				dest = std::move(THIS->doc->findDest(name).get());
 			#elif POPPLER_VERSION_0_64
 				dest = THIS->doc->findDest(name);
 			#else

In your 26.02 patch, I don't understand that patch:

@@ -520,7 +520,7 @@ int32_t open_document (void *_object, ch
 	obj.initNull();
 	stream = new MemStream(buf,0,(uint)len,&obj);
 	#endif
-	test = new PDFDoc(stream);
+	test = new PDFDoc(std::unique_ptr<BaseStream>(stream));
 
 	if (!test->isOk())
 	{

This patch is false to me:

@@ -539,7 +539,7 @@ int32_t open_document (void *_object, ch
 	THIS->len=len;
 
 	white[0] = 0xFF; white[1] = 0xFF; white[2] = 0xFF;
-	THIS->dev=new SplashOutputDev(splashModeRGB8, 3, false, white);
+	THIS->dev=new SplashOutputDev(splashModeRGB8, 3, white, false);
 	THIS->dev->startDoc(THIS->doc);
 	outline=THIS->doc->getOutline();
 	if (outline) THIS->index=outline->getItems();

The color is the fourth argument of SplashOutputDev, not the third one.

The rest of the patch has already been implemented in master.

I wonder if you used some AI slop to create these patches... :-)



----[ Gambas bugtracker-list is hosted by https://www.hostsharing.net ]----