summaryrefslogtreecommitdiff
path: root/xfa/fxgraphics
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-06-18 06:25:37 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-18 06:25:37 -0700
commiteec3a366adbfada36b98f1de651546ee09df8fc0 (patch)
tree794aa8c69392b60d8737a8a5b424732b98bdd4b4 /xfa/fxgraphics
parent4ce94e118d66064715de5baebeb4b2b580dcac66 (diff)
downloadpdfium-eec3a366adbfada36b98f1de651546ee09df8fc0.tar.xz
Make code compile with clang_use_chrome_plugin (final)
This change mainly contains files in xfa/ and fxjse/ directories which were not covered by previous changes. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. After this change, PDFium can be compiled with "clang_use_chrome_plugin=true" for GN build. Since clang_use_chrome_plugin is true by default, we no longer need to set this parameter explicitly. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups; BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2072803002
Diffstat (limited to 'xfa/fxgraphics')
-rw-r--r--xfa/fxgraphics/cfx_graphics.cpp11
-rw-r--r--xfa/fxgraphics/include/cfx_graphics.h11
2 files changed, 12 insertions, 10 deletions
diff --git a/xfa/fxgraphics/cfx_graphics.cpp b/xfa/fxgraphics/cfx_graphics.cpp
index 7776f5ef3d..c3f5b7b096 100644
--- a/xfa/fxgraphics/cfx_graphics.cpp
+++ b/xfa/fxgraphics/cfx_graphics.cpp
@@ -1540,6 +1540,17 @@ FWL_Error CFX_Graphics::CalcTextInfo(const CFX_WideString& text,
return FWL_Error::Succeeded;
}
+CFX_Graphics::TInfo::TInfo()
+ : isAntialiasing(TRUE),
+ strokeAlignment(FX_STROKEALIGNMENT_Center),
+ isActOnDash(FALSE),
+ strokeColor(nullptr),
+ fillColor(nullptr),
+ font(nullptr),
+ fontSize(40.0),
+ fontHScale(1.0),
+ fontSpacing(0.0) {}
+
CFX_Graphics::TInfo::TInfo(const TInfo& info)
: graphState(info.graphState),
isAntialiasing(info.isAntialiasing),
diff --git a/xfa/fxgraphics/include/cfx_graphics.h b/xfa/fxgraphics/include/cfx_graphics.h
index 3f969432ea..1c2cb354cc 100644
--- a/xfa/fxgraphics/include/cfx_graphics.h
+++ b/xfa/fxgraphics/include/cfx_graphics.h
@@ -180,16 +180,7 @@ class CFX_Graphics {
private:
struct TInfo {
- TInfo()
- : isAntialiasing(TRUE),
- strokeAlignment(FX_STROKEALIGNMENT_Center),
- isActOnDash(FALSE),
- strokeColor(nullptr),
- fillColor(nullptr),
- font(nullptr),
- fontSize(40.0),
- fontHScale(1.0),
- fontSpacing(0.0) {}
+ TInfo();
explicit TInfo(const TInfo& info);
TInfo& operator=(const TInfo& other);