403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.168
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/editors/pdfedit/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/editors/pdfedit/files/patch-src-tools-replace_text.cc
--- src/tools/replace_text.cc.orig	2010-02-23 18:28:09 UTC
+++ src/tools/replace_text.cc
@@ -22,6 +22,7 @@
  * Project is hosted on http://sourceforge.net/projects/pdfedit
  */
 #include <sstream>
+#include <algorithm>
 #include <kernel/pdfedit-core-dev.h>
 #include <kernel/cpdf.h>
 #include <kernel/cpage.h>
@@ -59,7 +60,7 @@ namespace {
 
 	struct _replace {
 		static const string name;
-		void operator () (shared_ptr<CPage> page, const string& what, const string& with)
+		void operator () (boost::shared_ptr<CPage> page, const string& what, const string& with)
 		{
 			page->replaceText (what, with);
 		}
@@ -121,14 +122,14 @@ main(int argc, char ** argv)
 				return 1;
 
 		// open pdf
-		shared_ptr<CPdf> pdf = CPdf::getInstance (file.c_str(), CPdf::ReadWrite);
+		boost::shared_ptr<CPdf> pdf = CPdf::getInstance (file.c_str(), CPdf::ReadWrite);
 
 		if (pdf->isLinearized())
 		{
 			pdf.reset ();
 			string out (file+"-delinearised.pdf");
 			{
-				shared_ptr<Delinearizator> del (Delinearizator::getInstance(file.c_str(), new OldStylePdfWriter));
+				boost::shared_ptr<Delinearizator> del (Delinearizator::getInstance(file.c_str(), new OldStylePdfWriter));
 					if (!del) return -1;
 				del->delinearize(out.c_str());
 			}
@@ -137,7 +138,7 @@ main(int argc, char ** argv)
 
 
 		// sane values
-		to = std::min(to, pdf->getPageCount()+1);
+		to = std::min(to, (size_t)(pdf->getPageCount()+1));
 
 		// now the hard stuff comes - do this crazy loops intentionally
 		for (size_t things_to_replace = 0; things_to_replace < withs.size(); ++things_to_replace)
@@ -150,7 +151,7 @@ main(int argc, char ** argv)
 			string with = withs[things_to_replace];
 			for (size_t i = from; i < to; ++i)
 			{
-				shared_ptr<CPage> page = pdf->getPage(i);
+				boost::shared_ptr<CPage> page = pdf->getPage(i);
 				_replace()(page, what, with);
 			}
 			#ifdef WIN32

Youez - 2016 - github.com/yon3zu
LinuXploit