Fix minor EBN issues

remotes/origin/Applications/18.12
Yuri Chornoivan 8 years ago
parent 2d138da190
commit c7722c4078
  1. 2
      conf/editannottooldialog.cpp
  2. 2
      core/documentcommands.cpp
  3. 20
      core/synctex/synctex_parser.c
  4. 6
      core/synctex/synctex_parser_advanced.h
  5. 2
      core/synctex/synctex_parser_utils.c
  6. 2
      doc/CMakeLists.txt
  7. 2
      generators/poppler/generator_pdf.cpp
  8. 2
      kdocumentviewer.h
  9. 8
      ui/annotationpopup.h
  10. 2
      ui/annotationpropertiesdialog.cpp
  11. 4
      ui/annotationproxymodels.cpp
  12. 4
      ui/annotationproxymodels.h
  13. 2
      ui/annotwindow.cpp
  14. 2
      ui/bookmarklist.cpp
  15. 2
      ui/debug_ui.h
  16. 2
      ui/fileprinterpreview.cpp
  17. 2
      ui/magnifierview.cpp
  18. 2
      ui/minibar.cpp
  19. 2
      ui/pagepainter.cpp
  20. 6
      ui/pagepainter.h
  21. 4
      ui/pageviewannotator.cpp
  22. 2
      ui/presentationwidget.cpp
  23. 18
      ui/side_reviews.cpp
  24. 6
      ui/side_reviews.h
  25. 2
      ui/snapshottaker.cpp

@ -19,8 +19,6 @@
#include <QtXml/QDomElement> #include <QtXml/QDomElement>
#include <KConfigGroup> #include <KConfigGroup>
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include <QPushButton>
#include <QVBoxLayout>
#include "core/annotations.h" #include "core/annotations.h"
#include "ui/annotationwidgets.h" #include "ui/annotationwidgets.h"

@ -143,7 +143,7 @@ bool RemoveAnnotationCommand::refreshInternalPageReferences( const QVector< Okul
if ( !m_done ) if ( !m_done )
{ {
// We don't always update m_annotation because it can happen that the annotation remove has been undo // We don't always update m_annotation because it can happen that the annotation remove has been undo
// and that annotation addition has also been undone so the the annotation pointer is stored inside // and that annotation addition has also been undone so the annotation pointer is stored inside
// a previous AddAnnotationCommand and thus doesn't need updating because it didn't change // a previous AddAnnotationCommand and thus doesn't need updating because it didn't change
// because of the document reload // because of the document reload
auto a = newPagesVector[m_pageNumber]->annotation( m_annotation->uniqueName() ); auto a = newPagesVector[m_pageNumber]->annotation( m_annotation->uniqueName() );

@ -660,12 +660,12 @@ static synctex_open_s __synctex_open_v2(const char * output, synctex_io_mode_t i
quoteless_synctex_name = NULL; quoteless_synctex_name = NULL;
} }
} }
/* The operation is successfull, return the arguments by value. */ /* The operation is successful, return the arguments by value. */
open.status = SYNCTEX_STATUS_OK; open.status = SYNCTEX_STATUS_OK;
return open; return open;
} }
/* Opens the ouput file, taking into account the eventual build_directory. /* Opens the output file, taking into account the eventual build_directory.
* - returns: an open structure which status is * - returns: an open structure which status is
* SYNCTEX_STATUS_OK on success, * SYNCTEX_STATUS_OK on success,
* SYNCTEX_STATUS_ERROR on failure. * SYNCTEX_STATUS_ERROR on failure.
@ -5881,7 +5881,7 @@ synctex_scanner_p synctex_scanner_parse(synctex_scanner_p scanner) {
scanner->pre_unit = 8192; scanner->pre_unit = 8192;
scanner->pre_x_offset = scanner->pre_y_offset = 578; scanner->pre_x_offset = scanner->pre_y_offset = 578;
/* initialize the offset with a fake unprobable value, /* initialize the offset with a fake unprobable value,
* If there is a post scriptum section, this value will be overriden by the real life value */ * If there is a post scriptum section, this value will be overridden by the real life value */
scanner->x_offset = scanner->y_offset = 6.027e23f; scanner->x_offset = scanner->y_offset = 6.027e23f;
scanner->reader->line_number = 1; scanner->reader->line_number = 1;
@ -7368,7 +7368,7 @@ static synctex_nd_s _synctex_point_h_ordered_distance_v2
width = _synctex_data_width(node); width = _synctex_data_width(node);
min = _synctex_data_h(node); min = _synctex_data_h(node);
max = min + (width>0?width:-width); max = min + (width>0?width:-width);
/* We allways have min <= max */ /* We always have min <= max */
if (hit->h<min) { if (hit->h<min) {
nd.distance = min - hit->h; /* regions 1+4+7, result is > 0 */ nd.distance = min - hit->h; /* regions 1+4+7, result is > 0 */
} else if (hit->h>max) { } else if (hit->h>max) {
@ -7382,7 +7382,7 @@ static synctex_nd_s _synctex_point_h_ordered_distance_v2
width = synctex_node_width(node); width = synctex_node_width(node);
min = synctex_node_h(node); min = synctex_node_h(node);
max = min + (width>0?width:-width); max = min + (width>0?width:-width);
/* We allways have min <= max */ /* We always have min <= max */
if (hit->h<min) { if (hit->h<min) {
nd.distance = min - hit->h; /* regions 1+4+7, result is > 0 */ nd.distance = min - hit->h; /* regions 1+4+7, result is > 0 */
} else if (hit->h>max) { } else if (hit->h>max) {
@ -7397,7 +7397,7 @@ static synctex_nd_s _synctex_point_h_ordered_distance_v2
width = synctex_node_hbox_width(node); width = synctex_node_hbox_width(node);
min = synctex_node_hbox_h(node); min = synctex_node_hbox_h(node);
max = min + (width>0?width:-width); max = min + (width>0?width:-width);
/* We allways have min <= max */ /* We always have min <= max */
if (hit->h<min) { if (hit->h<min) {
nd.distance = min - hit->h; /* regions 1+4+7, result is > 0 */ nd.distance = min - hit->h; /* regions 1+4+7, result is > 0 */
} else if (hit->h>max) { } else if (hit->h>max) {
@ -7509,7 +7509,7 @@ static synctex_nd_s _synctex_point_v_ordered_distance_v2
min = synctex_node_v(node); min = synctex_node_v(node);
max = min + _synctex_abs(_synctex_data_depth(node)); max = min + _synctex_abs(_synctex_data_depth(node));
min -= _synctex_abs(_synctex_data_height(node)); min -= _synctex_abs(_synctex_data_height(node));
/* We allways have min <= max */ /* We always have min <= max */
if (hit->v<min) { if (hit->v<min) {
nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */ nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */
} else if (hit->v>max) { } else if (hit->v>max) {
@ -7523,7 +7523,7 @@ static synctex_nd_s _synctex_point_v_ordered_distance_v2
min = synctex_node_v(node); min = synctex_node_v(node);
max = min + _synctex_abs(synctex_node_depth(node)); max = min + _synctex_abs(synctex_node_depth(node));
min -= _synctex_abs(synctex_node_height(node)); min -= _synctex_abs(synctex_node_height(node));
/* We allways have min <= max */ /* We always have min <= max */
if (hit->v<min) { if (hit->v<min) {
nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */ nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */
} else if (hit->v>max) { } else if (hit->v>max) {
@ -7540,7 +7540,7 @@ static synctex_nd_s _synctex_point_v_ordered_distance_v2
max = min + (depth>0?depth:-depth); max = min + (depth>0?depth:-depth);
height = synctex_node_hbox_height(node); height = synctex_node_hbox_height(node);
min -= (height>0?height:-height); min -= (height>0?height:-height);
/* We allways have min <= max */ /* We always have min <= max */
if (hit->v<min) { if (hit->v<min) {
nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */ nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */
} else if (hit->v>max) { } else if (hit->v>max) {
@ -7556,7 +7556,7 @@ static synctex_nd_s _synctex_point_v_ordered_distance_v2
min = _synctex_data_v(node); min = _synctex_data_v(node);
max = min + _synctex_abs(_synctex_data_depth(_synctex_tree_parent(node))); max = min + _synctex_abs(_synctex_data_depth(_synctex_tree_parent(node)));
min -= _synctex_abs(_synctex_data_height(_synctex_tree_parent(node))); min -= _synctex_abs(_synctex_data_height(_synctex_tree_parent(node)));
/* We allways have min <= max */ /* We always have min <= max */
if (hit->v<min) { if (hit->v<min) {
nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */ nd.distance = min - hit->v; /* regions 1+2+3, result is > 0 */
} else if (hit->v>max) { } else if (hit->v>max) {

@ -65,7 +65,7 @@ extern "C" {
/** /**
* These are the masks for the synctex node types. * These are the masks for the synctex node types.
* int's are 32 bits at leats. * int's are 32 bits at least.
*/ */
enum { enum {
synctex_shift_root, synctex_shift_root,
@ -322,7 +322,7 @@ extern "C" {
* Proxies are used to support pdf forms. * Proxies are used to support pdf forms.
* The ref primary nodes are replaced by a tree * The ref primary nodes are replaced by a tree
* of proxy nodes which duplicate the tree of primary * of proxy nodes which duplicate the tree of primary
* nodes available in the refered form. * nodes available in the referred form.
* Roughly speaking, the primary nodes of the form * Roughly speaking, the primary nodes of the form
* know what to display, the proxy nodes know where. * know what to display, the proxy nodes know where.
* Handles are used in queries. They point to either * Handles are used in queries. They point to either
@ -447,7 +447,7 @@ extern "C" {
*/ */
void synctex_iterator_free(synctex_iterator_p iterator); void synctex_iterator_free(synctex_iterator_p iterator);
/** /**
* Wether the iterator actually points to an object. * Whether the iterator actually points to an object.
* - argument iterator: the object to iterate on... * - argument iterator: the object to iterate on...
*/ */
synctex_bool_t synctex_iterator_has_next(synctex_iterator_p iterator); synctex_bool_t synctex_iterator_has_next(synctex_iterator_p iterator);

@ -323,7 +323,7 @@ int _synctex_copy_with_quoting_last_path_component(const char * src, char ** des
if(src && dest_ref) { if(src && dest_ref) {
const char * lpc; const char * lpc;
# define dest (*dest_ref) # define dest (*dest_ref)
dest = NULL; /* Default behavior: no change and sucess. */ dest = NULL; /* Default behavior: no change and success. */
lpc = _synctex_last_path_component(src); lpc = _synctex_last_path_component(src);
if(strlen(lpc)) { if(strlen(lpc)) {
if(strchr(lpc,' ') && lpc[0]!='"' && lpc[strlen(lpc)-1]!='"') { if(strchr(lpc,' ') && lpc[0]!='"' && lpc[strlen(lpc)-1]!='"') {

@ -2,4 +2,4 @@
# #
# #
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR okular) kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR okular)
kdoctools_create_manpage(man-okular.1.docbook 1 INSTALL_DESTINATION ${KDE_INSTALL_MANDIR}) kdoctools_create_manpage(man-okular.1.docbook 1 INSTALL_DESTINATION ${KDE_INSTALL_MANDIR})

@ -387,7 +387,7 @@ Okular::Action* createLinkFromPopplerLink(const Poppler::Link *popplerLink, bool
// If links should not be deleted it probably means that they // If links should not be deleted it probably means that they
// are part of a nextActions chain. There is no support // are part of a nextActions chain. There is no support
// to resolveMediaLinkReferences on nextActions. It would also // to resolveMediaLinkReferences on nextActions. It would also
// be neccessary to ensure that resolveMediaLinkReferences does // be necessary to ensure that resolveMediaLinkReferences does
// not delete the Links which are part of a nextActions list // not delete the Links which are part of a nextActions list
// to avoid a double deletion. // to avoid a double deletion.
qCDebug(OkularPdfDebug) << "parsing rendition link without deletion is not supported. Action chain might be broken."; qCDebug(OkularPdfDebug) << "parsing rendition link without deletion is not supported. Action chain might be broken.";

@ -12,7 +12,7 @@
#include "okularpart_export.h" #include "okularpart_export.h"
#include <QtCore/QStringList> #include <QStringList>
class QUrl; class QUrl;

@ -10,10 +10,10 @@
#ifndef ANNOTATIONPOPUP_H #ifndef ANNOTATIONPOPUP_H
#define ANNOTATIONPOPUP_H #define ANNOTATIONPOPUP_H
#include <QtCore/QObject> #include <QObject>
#include <QtCore/QList> #include <QList>
#include <QtCore/QPair> #include <QPair>
#include <QtCore/QPoint> #include <QPoint>
namespace Okular { namespace Okular {
class Annotation; class Annotation;

@ -14,7 +14,7 @@
#include <qlayout.h> #include <qlayout.h>
#include <qlabel.h> #include <qlabel.h>
#include <qheaderview.h> #include <qheaderview.h>
#include <QtWidgets/qpushbutton.h> #include <qpushbutton.h>
#include <qtextedit.h> #include <qtextedit.h>
#include <QIcon> #include <QIcon>
#include <klineedit.h> #include <klineedit.h>

@ -9,8 +9,8 @@
#include "annotationproxymodels.h" #include "annotationproxymodels.h"
#include <QtCore/QList> #include <QList>
#include <QtCore/QItemSelection> #include <QItemSelection>
#include <QIcon> #include <QIcon>

@ -10,8 +10,8 @@
#ifndef ANNOTATIONPROXYMODEL_H #ifndef ANNOTATIONPROXYMODEL_H
#define ANNOTATIONPROXYMODEL_H #define ANNOTATIONPROXYMODEL_H
#include <QtCore/QSortFilterProxyModel> #include <QSortFilterProxyModel>
#include <QtCore/QPair> #include <QPair>
/** /**
* A proxy model, which filters out all pages except the * A proxy model, which filters out all pages except the

@ -28,7 +28,7 @@
#include <qtoolbutton.h> #include <qtoolbutton.h>
#include <KLocalizedString> #include <KLocalizedString>
#include <ktextedit.h> #include <ktextedit.h>
#include <QtCore/QDebug> #include <QDebug>
#include <qaction.h> #include <qaction.h>
#include <kstandardaction.h> #include <kstandardaction.h>
#include <qmenu.h> #include <qmenu.h>

@ -17,7 +17,7 @@
#include <qtoolbar.h> #include <qtoolbar.h>
#include <qtreewidget.h> #include <qtreewidget.h>
#include <QMenu> #include <QMenu>
#include <QtCore/QDebug> #include <QDebug>
#include <QIcon> #include <QIcon>
#include <KLocalizedString> #include <KLocalizedString>

@ -11,7 +11,7 @@
#ifndef OKULAR_DEBUG_UI_P_H #ifndef OKULAR_DEBUG_UI_P_H
#define OKULAR_DEBUG_UI_P_H #define OKULAR_DEBUG_UI_P_H
#include <QtCore/qloggingcategory.h> #include <qloggingcategory.h>
Q_DECLARE_LOGGING_CATEGORY(OkularUiDebug) Q_DECLARE_LOGGING_CATEGORY(OkularUiDebug)

@ -27,7 +27,7 @@
#include <kpluginfactory.h> #include <kpluginfactory.h>
#include <kpluginloader.h> #include <kpluginloader.h>
#include <ksharedconfig.h> #include <ksharedconfig.h>
#include <QtCore/qloggingcategory.h> #include <qloggingcategory.h>
#include "debug_ui.h" #include "debug_ui.h"

@ -175,7 +175,7 @@ void MagnifierView::drawTicks( QPainter *p )
p->drawLine(0, height() - 1, 0, 0); p->drawLine(0, height() - 1, 0, 0);
// ticks // ticks
// TODO posibility to switch units (pt, mm, cc, in, printing dots) // TODO possibility to switch units (pt, mm, cc, in, printing dots)
float ps = (float)SCALE * 5;// how much pixels in widget is one pixel in document * how often float ps = (float)SCALE * 5;// how much pixels in widget is one pixel in document * how often
int tw = 10; // tick size in pixels int tw = 10; // tick size in pixels

@ -17,7 +17,7 @@
#include <qpushbutton.h> #include <qpushbutton.h>
#include <qlabel.h> #include <qlabel.h>
#include <qlayout.h> #include <qlayout.h>
#include <QtWidgets/QToolButton> #include <QToolButton>
#include <qvalidator.h> #include <qvalidator.h>
#include <qpainter.h> #include <qpainter.h>
#include <QIcon> #include <QIcon>

@ -16,7 +16,7 @@
#include <qpixmap.h> #include <qpixmap.h>
#include <qvarlengtharray.h> #include <qvarlengtharray.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <QtCore/QDebug> #include <QDebug>
#include <QApplication> #include <QApplication>
#include <QIcon> #include <QIcon>

@ -10,9 +10,9 @@
#ifndef _OKULAR_PAGEPAINTER_H_ #ifndef _OKULAR_PAGEPAINTER_H_
#define _OKULAR_PAGEPAINTER_H_ #define _OKULAR_PAGEPAINTER_H_
#include <QtGui/QBrush> #include <QBrush>
#include <QtGui/QImage> #include <QImage>
#include <QtGui/QPen> #include <QPen>
#include "core/area.h" // for NormalizedPoint #include "core/area.h" // for NormalizedPoint

@ -10,7 +10,7 @@
#include "pageviewannotator.h" #include "pageviewannotator.h"
// qt / kde includes // qt / kde includes
#include <QtCore/qloggingcategory.h> #include <qloggingcategory.h>
#include <qapplication.h> #include <qapplication.h>
#include <qfile.h> #include <qfile.h>
#include <qcolor.h> #include <qcolor.h>
@ -24,7 +24,7 @@
#include <KLocalizedString> #include <KLocalizedString>
#include <kuser.h> #include <kuser.h>
#include <QtCore/QDebug> #include <QDebug>
#include <qmenu.h> #include <qmenu.h>
// system includes // system includes

@ -10,7 +10,7 @@
#include "presentationwidget.h" #include "presentationwidget.h"
// qt/kde includes // qt/kde includes
#include <QtCore/qloggingcategory.h> #include <qloggingcategory.h>
#include <QtDBus/QDBusConnection> #include <QtDBus/QDBusConnection>
#include <QtDBus/QDBusMessage> #include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusReply> #include <QtDBus/QDBusReply>

@ -10,15 +10,15 @@
#include "side_reviews.h" #include "side_reviews.h"
// qt/kde includes // qt/kde includes
#include <QtCore/QStringList> #include <QStringList>
#include <QtWidgets/QHeaderView> #include <QHeaderView>
#include <QtWidgets/QLayout> #include <QLayout>
#include <QtGui/QPaintEvent> #include <QPaintEvent>
#include <QtGui/QPainter> #include <QPainter>
#include <QtWidgets/QSizePolicy> #include <QSizePolicy>
#include <QtGui/QTextDocument> #include <QTextDocument>
#include <QtWidgets/QToolBar> #include <QToolBar>
#include <QtWidgets/QTreeView> #include <QTreeView>
#include <qaction.h> #include <qaction.h>
#include <KLocalizedString> #include <KLocalizedString>

@ -10,9 +10,9 @@
#ifndef _OKULAR_SIDE_REVIEWS_H_ #ifndef _OKULAR_SIDE_REVIEWS_H_
#define _OKULAR_SIDE_REVIEWS_H_ #define _OKULAR_SIDE_REVIEWS_H_
#include <QtCore/QModelIndexList> #include <QModelIndexList>
#include <QtCore/QVector> #include <QVector>
#include <QtWidgets/QWidget> #include <QWidget>
#include "core/observer.h" #include "core/observer.h"

@ -12,7 +12,7 @@
#include <phonon/mediaobject.h> #include <phonon/mediaobject.h>
#include <phonon/videowidget.h> #include <phonon/videowidget.h>
#include <QtGui/QImage> #include <QImage>
SnapshotTaker::SnapshotTaker(const QUrl &url, QObject *parent ) SnapshotTaker::SnapshotTaker(const QUrl &url, QObject *parent )
: QObject( parent ) : QObject( parent )

Loading…
Cancel
Save