diff options
author | Devansh Jain <d.jain.182002@gmail.com> | 2023-02-04 17:07:28 +0530 |
---|---|---|
committer | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | 2023-02-09 06:26:18 +0000 |
commit | 81fa02eedbda2afa34c82420a02cd3b3f825be06 (patch) | |
tree | 296c883d82165d1c2fc93eb44b499ee0af38c883 | |
parent | 6bc6da1d03327450571b6811e192787ad90ecea2 (diff) |
tdf#143148 Use pragma once instead of include guards in hwpfilter
Change-Id: I010b6c76c1f859340f544409bbaab946cf2a6aa2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146554
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
-rw-r--r-- | hwpfilter/source/fontmap.hxx | 5 | ||||
-rw-r--r-- | hwpfilter/source/grammar.hxx | 5 | ||||
-rw-r--r-- | hwpfilter/source/hwpreader.hxx | 77 |
3 files changed, 39 insertions, 48 deletions
diff --git a/hwpfilter/source/fontmap.hxx b/hwpfilter/source/fontmap.hxx index 3ab2e0849e1d..1debe8ede2bd 100644 --- a/hwpfilter/source/fontmap.hxx +++ b/hwpfilter/source/fontmap.hxx @@ -17,13 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_HWPFILTER_SOURCE_FONTMAP_HXX -#define INCLUDED_HWPFILTER_SOURCE_FONTMAP_HXX +#pragma once #include <sal/config.h> int getRepFamilyName(char const*, char*, double&); -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/hwpfilter/source/grammar.hxx b/hwpfilter/source/grammar.hxx index a4a2e39cb0bb..041b4606a530 100644 --- a/hwpfilter/source/grammar.hxx +++ b/hwpfilter/source/grammar.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_HWPFILTER_SOURCE_GRAMMAR_HXX -#define INCLUDED_HWPFILTER_SOURCE_GRAMMAR_HXX +#pragma once #include <sal/config.h> @@ -26,6 +25,4 @@ class Node; Node* mainParse(char const* _code); -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx index 0cb9e62c0c19..d99099f2b31c 100644 --- a/hwpfilter/source/hwpreader.hxx +++ b/hwpfilter/source/hwpreader.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_HWPFILTER_SOURCE_HWPREADER_HXX -#define INCLUDED_HWPFILTER_SOURCE_HWPREADER_HXX +#pragma once #include <sal/config.h> @@ -77,7 +76,6 @@ struct HwpReaderPrivate; */ class HwpReader : public WeakImplHelper<XFilter> { - public: HwpReader(); virtual ~HwpReader() override; @@ -86,24 +84,26 @@ public: /** * parseStream does Parser-startup initializations */ - virtual sal_Bool SAL_CALL filter(const Sequence< PropertyValue >& aDescriptor) override; + virtual sal_Bool SAL_CALL filter(const Sequence<PropertyValue>& aDescriptor) override; virtual void SAL_CALL cancel() override {} - void setDocumentHandler(Reference< XDocumentHandler > const & xHandler) + void setDocumentHandler(Reference<XDocumentHandler> const& xHandler) { m_rxDocumentHandler = xHandler; } bool importHStream(std::unique_ptr<HStream> stream); + private: - Reference< XDocumentHandler > m_rxDocumentHandler; + Reference<XDocumentHandler> m_rxDocumentHandler; rtl::Reference<AttributeListImpl> mxList; HWPFile hwpfile; std::unique_ptr<HwpReaderPrivate> d; + private: /* -------- Document Parsing --------- */ void makeMeta(); void makeStyles(); - void makeDrawMiscStyle(HWPDrawingObject *); + void makeDrawMiscStyle(HWPDrawingObject*); void makeAutoStyles(); void makeMasterStyles(); void makeBody(); @@ -111,45 +111,45 @@ private: void makeTextDecls(); /* -------- Paragraph Parsing --------- */ - void parsePara(HWPPara *para); - void make_text_p0(HWPPara *para, bool bParaStart); - void make_text_p1(HWPPara *para, bool bParaStart); - void make_text_p3(HWPPara *para, bool bParaStart); + void parsePara(HWPPara* para); + void make_text_p0(HWPPara* para, bool bParaStart); + void make_text_p1(HWPPara* para, bool bParaStart); + void make_text_p3(HWPPara* para, bool bParaStart); /* -------- rDocument->characters(x) --------- */ - void makeChars(hchar_string & rStr); + void makeChars(hchar_string& rStr); /* -------- Special Char Parsing --------- */ - void makeFieldCode(hchar_string const & rStr, FieldCode const *hbox); //6 - void makeBookmark(Bookmark const *hbox); //6 - void makeDateFormat(DateCode *hbox); //7 - void makeDateCode(DateCode *hbox); //8 - void makeTab(); //9 - void makeTable(TxtBox *hbox); - void makeTextBox(TxtBox *hbox); - void makeFormula(TxtBox *hbox); - void makeHyperText(TxtBox *hbox); - void makePicture(Picture *hbox); - void makePictureDRAW(HWPDrawingObject *drawobj, const Picture *hbox); + void makeFieldCode(hchar_string const& rStr, FieldCode const* hbox); //6 + void makeBookmark(Bookmark const* hbox); //6 + void makeDateFormat(DateCode* hbox); //7 + void makeDateCode(DateCode* hbox); //8 + void makeTab(); //9 + void makeTable(TxtBox* hbox); + void makeTextBox(TxtBox* hbox); + void makeFormula(TxtBox* hbox); + void makeHyperText(TxtBox* hbox); + void makePicture(Picture* hbox); + void makePictureDRAW(HWPDrawingObject* drawobj, const Picture* hbox); void makeLine(); - void makeHidden(Hidden *hbox); - void makeFootnote(Footnote *hbox); - void makeAutoNum(AutoNum const *hbox); + void makeHidden(Hidden* hbox); + void makeFootnote(Footnote* hbox); + void makeAutoNum(AutoNum const* hbox); void makeShowPageNum(); - void makeMailMerge(MailMerge *hbox); - void makeOutline(Outline const *hbox); + void makeMailMerge(MailMerge* hbox); + void makeOutline(Outline const* hbox); /* --------- Styles Parsing ------------ */ void makePageStyle(); - void makeColumns(ColumnDef const *); - void makeTStyle(CharShape const *); - void makePStyle(ParaShape const *); - void makeFStyle(FBoxStyle *); - void makeCaptionStyle(FBoxStyle *); - void makeDrawStyle(HWPDrawingObject *,FBoxStyle *); - void makeTableStyle(Table *); - void parseCharShape(CharShape const *); - void parseParaShape(ParaShape const *); + void makeColumns(ColumnDef const*); + void makeTStyle(CharShape const*); + void makePStyle(ParaShape const*); + void makeFStyle(FBoxStyle*); + void makeCaptionStyle(FBoxStyle*); + void makeDrawStyle(HWPDrawingObject*, FBoxStyle*); + void makeTableStyle(Table*); + void parseCharShape(CharShape const*); + void parseParaShape(ParaShape const*); static OUString getTStyleName(int); static OUString getPStyleName(int); @@ -158,7 +158,4 @@ private: void chars(const OUString& s); }; - -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |