Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
a8a36a64
Commit
a8a36a64
authored
Aug 17, 2011
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Sankore/Sankore-3.1
parents
8e3899f9
61409390
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
497 additions
and
60 deletions
+497
-60
UBCFFSubsetAdaptor.cpp
src/adaptors/UBCFFSubsetAdaptor.cpp
+438
-52
UBCFFSubsetAdaptor.h
src/adaptors/UBCFFSubsetAdaptor.h
+26
-1
UBImportCFF.cpp
src/adaptors/UBImportCFF.cpp
+18
-7
UBImportCFF.h
src/adaptors/UBImportCFF.h
+15
-0
No files found.
src/adaptors/UBCFFSubsetAdaptor.cpp
View file @
a8a36a64
This diff is collapsed.
Click to expand it.
src/adaptors/UBCFFSubsetAdaptor.h
View file @
a8a36a64
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UBCFFSUBSETADAPTOR_H
#ifndef UBCFFSUBSETADAPTOR_H
#define UBCFFSUBSETADAPTOR_H
#define UBCFFSUBSETADAPTOR_H
...
@@ -8,6 +23,8 @@
...
@@ -8,6 +23,8 @@
class
UBDocumentProxy
;
class
UBDocumentProxy
;
class
UBGraphicsScene
;
class
UBGraphicsScene
;
class
QSvgGenerator
;
class
QSvgGenerator
;
class
UBGraphicsSvgItem
;
class
QTransform
;
class
UBCFFSubsetAdaptor
class
UBCFFSubsetAdaptor
{
{
...
@@ -42,8 +59,10 @@ private:
...
@@ -42,8 +59,10 @@ private:
private
:
private
:
QString
mTempFilePath
;
QString
mTempFilePath
;
UBGraphicsScene
*
mCurrentScene
;
UBGraphicsScene
*
mCurrentScene
;
QRectF
mCurrentSceneRect
;
QString
mIndent
;
QString
mIndent
;
QRectF
mViewBox
;
QRectF
mViewBox
;
QPointF
mViewBoxCenter
;
QSize
mSize
;
QSize
mSize
;
//methods to store current xml parse state
//methods to store current xml parse state
...
@@ -63,6 +82,7 @@ private:
...
@@ -63,6 +82,7 @@ private:
bool
parseRect
();
bool
parseRect
();
bool
parseEllipse
();
bool
parseEllipse
();
bool
parseTextArea
();
bool
parseTextArea
();
bool
parseText
();
bool
parsePolygon
();
bool
parsePolygon
();
bool
parsePage
();
bool
parsePage
();
bool
parsePageSet
();
bool
parsePageSet
();
...
@@ -75,11 +95,16 @@ private:
...
@@ -75,11 +95,16 @@ private:
int
currentState
;
int
currentState
;
//helper methods
//helper methods
bool
getCurElementTransorm
(
QTransform
&
transform
);
void
repositionSvgItem
(
UBGraphicsSvgItem
*
item
,
qreal
width
,
qreal
height
,
qreal
x
,
qreal
y
,
bool
useTransform
,
QTransform
&
transform
);
QColor
colorFromString
(
const
QString
&
clrString
);
QColor
colorFromString
(
const
QString
&
clrString
);
QTransform
transformFromString
(
const
QString
trString
);
QTransform
transformFromString
(
const
QString
trString
);
bool
getViewBoxDimenstions
(
const
QString
&
viewBox
);
bool
getViewBoxDimenstions
(
const
QString
&
viewBox
);
QSvgGenerator
*
createSvgGenerator
();
QSvgGenerator
*
createSvgGenerator
(
qreal
width
,
qreal
height
);
bool
getTempFileName
();
bool
getTempFileName
();
void
parseTextAttributes
(
qreal
&
fontSize
,
QColor
&
fontColor
,
QString
&
fontFamily
,
QString
&
fontStretch
,
bool
&
italic
,
int
&
fontWeight
,
int
&
textAlign
,
QTransform
&
fontTransform
);
};
};
};
};
...
...
src/adaptors/UBImportCFF.cpp
View file @
a8a36a64
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QDir>
#include <QDir>
#include "UBImportCFF.h"
#include "document/UBDocumentProxy.h"
#include "core/UBApplication.h"
#include "core/UBApplication.h"
#include "core/UBPersistenceManager.h"
#include "core/UBPersistenceManager.h"
#include "core/UBDocumentManager.h"
#include "core/UBDocumentManager.h"
#include "core/memcheck.h"
#include "core/memcheck.h"
#include "core/UBPersistenceManager.h"
#include "core/UBPersistenceManager.h"
#include "document/UBDocumentProxy.h"
#include "frameworks/UBFileSystemUtils.h"
#include "domain/UBGraphicsPDFItem.h"
#include "domain/UBGraphicsPDFItem.h"
#include "frameworks/UBFileSystemUtils.h"
#include "pdf/PDFRenderer.h"
#include "pdf/PDFRenderer.h"
#include "UBCFFSubsetAdaptor.h"
#include "UBCFFSubsetAdaptor.h"
#include "UBImportCFF.h"
#include "quazip.h"
#include "quazip.h"
#include "quazipfile.h"
#include "quazipfile.h"
...
...
src/adaptors/UBImportCFF.h
View file @
a8a36a64
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UBIMPORTCFF_H
#ifndef UBIMPORTCFF_H
#define UBIMPORTCFF_H
#define UBIMPORTCFF_H
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment