Commit 943f1483 authored by Moritz Lipp's avatar Moritz Lipp

Some minor changes to the document and test suite

parent c2c097f1
# See LICENSE file for license and copyright information
PROJECT = zathura-pdf-poppler
PLUGIN = pdf
......@@ -46,10 +45,10 @@ INCS = ${POPPLER_INC} ${LIBZATHURA_INC}
LIBS = ${POPPLER_LIB} ${LIBZATHURA_LIB}
# flags
CXXFLAGS += -std=c++11 -pedantic -Wall -Wextra -fPIC --coverage $(INCS)
CXXFLAGS += -std=c++11 -pedantic -Wall -Wextra -fPIC $(INCS)
# linker flags
LDFLAGS += -fPIC --coverage
LDFLAGS += -fPIC
# debug
DFLAGS ?= -g
......
......@@ -15,5 +15,7 @@ pdf_page_get_annotations(zathura_page_t* page, zathura_list_t** annotations)
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
return ZATHURA_ERROR_OK;
zathura_error_t error = ZATHURA_ERROR_PLUGIN_NOT_IMPLEMENTED;
return error;
}
......@@ -12,7 +12,7 @@ pdf_document_get_attachments(zathura_document_t* document, zathura_list_t** atta
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
zathura_error_t error = ZATHURA_ERROR_OK;
zathura_error_t error = ZATHURA_ERROR_PLUGIN_NOT_IMPLEMENTED;
return error;
}
......@@ -46,7 +46,6 @@ pdf_document_open(zathura_document_t* document)
}
delete password_goo;
delete path_goo;
if (poppler_document->isOk() == gFalse) {
error = ZATHURA_ERROR_UNKNOWN;
......@@ -87,7 +86,6 @@ pdf_document_open(zathura_document_t* document)
pdf_document->output_device->startDoc(poppler_document);
#endif
return error;
}
......@@ -102,6 +100,7 @@ pdf_document_free(zathura_document_t* document)
if (zathura_document_get_data(document, (void**) &pdf_document) == ZATHURA_ERROR_OK) {
if (pdf_document != NULL) {
delete pdf_document->poppler_document;
delete pdf_document;
zathura_document_set_data(document, NULL);
}
}
......
......@@ -13,7 +13,7 @@ pdf_page_get_form_fields(zathura_page_t* page, zathura_list_t** form_fields)
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
zathura_error_t error = ZATHURA_ERROR_OK;
zathura_error_t error = ZATHURA_ERROR_PLUGIN_NOT_IMPLEMENTED;
return error;
}
......@@ -25,7 +25,7 @@ pdf_form_field_save(zathura_form_field_t* form_field)
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
zathura_error_t error = ZATHURA_ERROR_OK;
zathura_error_t error = ZATHURA_ERROR_PLUGIN_NOT_IMPLEMENTED;
return error;
}
......@@ -25,7 +25,7 @@ pdf_page_get_images(zathura_page_t* page, zathura_list_t** images)
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
zathura_error_t error = ZATHURA_ERROR_OK;
zathura_error_t error = ZATHURA_ERROR_PLUGIN_NOT_IMPLEMENTED;
return error;
}
......@@ -6,9 +6,19 @@
#include "macros.h"
IGNORE_UNUSED_PARAMETER_BEGIN
#include <goo/GooList.h>
#include <splash/SplashBitmap.h>
#include <GlobalParams.h>
#include <PDFDoc.h>
#include <Outline.h>
#include <ErrorCodes.h>
#include <UnicodeMap.h>
#include <GfxState.h>
#include <SplashOutputDev.h>
#include <Stream.h>
#include <FontInfo.h>
#include <PDFDocEncoding.h>
#include <OptionalContent.h>
#ifdef HAVE_CAIRO
#include <CairoOutputDev.h>
#endif
......
......@@ -12,7 +12,7 @@ pdf_page_get_links(zathura_page_t* page, zathura_list_t** links)
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
zathura_error_t error = ZATHURA_ERROR_OK;
zathura_error_t error = ZATHURA_ERROR_PLUGIN_NOT_IMPLEMENTED;
return error;
}
......@@ -13,7 +13,7 @@ pdf_document_get_metadata(zathura_document_t* document,
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
zathura_error_t error = ZATHURA_ERROR_OK;
zathura_error_t error = ZATHURA_ERROR_PLUGIN_NOT_IMPLEMENTED;
return ZATHURA_ERROR_OK;
return error;
}
......@@ -11,7 +11,7 @@ pdf_document_get_outline(zathura_document_t* document, zathura_node_t** outline)
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
zathura_error_t error = ZATHURA_ERROR_OK;
zathura_error_t error = ZATHURA_ERROR_PLUGIN_NOT_IMPLEMENTED;
return error;
}
......@@ -80,11 +80,5 @@ pdf_page_clear(zathura_page_t* page)
return error;
}
if (pdf_page != NULL) {
if (pdf_page->poppler_page != NULL) {
delete pdf_page->poppler_page;
}
}
return ZATHURA_ERROR_OK;
}
......@@ -14,7 +14,7 @@ zathura_error_t pdf_page_search_text(zathura_page_t* page, const char* text,
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
zathura_error_t error = ZATHURA_ERROR_OK;
zathura_error_t error = ZATHURA_ERROR_PLUGIN_NOT_IMPLEMENTED;
return error;
}
......@@ -12,7 +12,7 @@ pdf_page_get_text(zathura_page_t* page, char** text)
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
zathura_error_t error = ZATHURA_ERROR_OK;
zathura_error_t error = ZATHURA_ERROR_PLUGIN_NOT_IMPLEMENTED;
return error;
}
......@@ -24,7 +24,7 @@ pdf_page_get_selected_text(zathura_page_t* page, char** text, zathura_rectangle_
return ZATHURA_ERROR_INVALID_ARGUMENTS;
}
zathura_error_t error = ZATHURA_ERROR_OK;
zathura_error_t error = ZATHURA_ERROR_PLUGIN_NOT_IMPLEMENTED;
return error;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment