[Libreoffice-commits] core.git: 2 commits - include/svx include/unotools include/xmloff sw/qa unotools/source xmloff/source
László Németh (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 17 08:43:42 UTC 2021
include/svx/svdmrkv.hxx | 5 -
include/svx/svdoashp.hxx | 5 -
include/svx/svdoattr.hxx | 6 -
include/svx/svdocapt.hxx | 6 -
include/svx/svdocirc.hxx | 5 -
include/svx/svdoedge.hxx | 5 -
include/svx/svdograf.hxx | 5 -
include/svx/svdogrp.hxx | 5 -
include/svx/svdomeas.hxx | 5 -
include/svx/svdomedia.hxx | 5 -
include/svx/svdoole2.hxx | 5 -
include/svx/svdopage.hxx | 6 -
include/svx/svdopath.hxx | 5 -
include/svx/svdorect.hxx | 5 -
include/svx/svdotable.hxx | 5 -
include/svx/svdotext.hxx | 6 -
include/svx/svdouno.hxx | 5 -
include/svx/svdoutl.hxx | 4 -
include/svx/svdovirt.hxx | 5 -
include/svx/svdpage.hxx | 6 -
include/svx/svdpagv.hxx | 8 --
include/svx/svdpntv.hxx | 5 -
include/svx/svdpoev.hxx | 5 -
include/svx/svdpool.hxx | 6 -
include/svx/svdsnpv.hxx | 5 -
include/svx/svdsob.hxx | 6 -
include/svx/svdtext.hxx | 5 -
include/svx/svdtrans.hxx | 6 -
include/svx/svdtypes.hxx | 5 -
include/svx/svdundo.hxx | 5 -
include/svx/svdview.hxx | 4 -
include/svx/svdviter.hxx | 5 -
include/svx/svdxcgv.hxx | 5 -
include/unotools/securityoptions.hxx | 12 +++
include/xmloff/xmlexp.hxx | 6 +
sw/qa/uitest/data/redline-autocorrect.fodt | 24 ++++++
sw/qa/uitest/writer_tests7/tdf90401.py | 103 +++++++++++++++++++++++++++++
unotools/source/config/securityoptions.cxx | 14 +++
xmloff/source/core/xmlexp.cxx | 3
xmloff/source/draw/sdxmlexp.cxx | 16 +++-
xmloff/source/text/XMLRedlineExport.cxx | 24 +++++-
xmloff/source/text/txtflde.cxx | 13 +++
42 files changed, 240 insertions(+), 149 deletions(-)
New commits:
commit 12da70f88517bf3c053afe1c504bb70bd27573f2
Author: László Németh <nemeth at numbertext.org>
AuthorDate: Mon Jun 14 20:46:17 2021 +0200
Commit: László Németh <nemeth at numbertext.org>
CommitDate: Thu Jun 17 10:43:08 2021 +0200
tdf#90401 xmloff: remove personal info of comments and changes
If Options → LibreOffice → Security → Security Options
and Warnings → Options... → Security Options → Remove personal
information on saving" is enabled.
Use the same time (1970-01-01T00:00:00) for mandatory
time stamps, and replace authors and creator-initials with
"1", "2", "3" etc., also to avoid of joining adjacent
redline ranges.
Note: to see the work of the unit test in Linux command line:
(cd sw && make UITest_writer_tests7 UITEST_TEST_NAME="tdf90401.tdf90401.test_tdf90401_remove_personal_info" SAL_USE_VCLPLUGIN=gen)
Change-Id: I3b4d710dbeeee12177aff378597cd2b683ca6c25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117319
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth at numbertext.org>
diff --git a/include/unotools/securityoptions.hxx b/include/unotools/securityoptions.hxx
index 7a339a90bcf8..944e6fba5a34 100644
--- a/include/unotools/securityoptions.hxx
+++ b/include/unotools/securityoptions.hxx
@@ -25,6 +25,7 @@
#include <rtl/ustring.hxx>
#include <unotools/options.hxx>
#include <memory>
+#include <unordered_map>
namespace osl { class Mutex; }
@@ -184,6 +185,17 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtSecurityOptions final : public utl::
}; // class SvtSecurityOptions
+// map personal info strings, e.g. authors to 1, 2, 3... for removing personal info
+typedef ::std::unordered_map< OUString, size_t > SvtSecurityMapPersonalInfoType;
+
+class UNOTOOLS_DLLPUBLIC SvtSecurityMapPersonalInfo final
+{
+ SvtSecurityMapPersonalInfoType aInfoIDs;
+
+public:
+ size_t GetInfoID( const OUString sPersonalInfo );
+};
+
#endif // INCLUDED_UNOTOOLS_SECURITYOPTIONS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx
index adba9e653077..5b72788313ef 100644
--- a/include/xmloff/xmlexp.hxx
+++ b/include/xmloff/xmlexp.hxx
@@ -43,6 +43,7 @@
#include <com/sun/star/container/XNamed.hpp>
#include <unotools/saveopt.hxx>
+#include <unotools/securityoptions.hxx>
#include <xmloff/XMLPageExport.hxx>
#include <comphelper/servicehelper.hxx>
@@ -69,6 +70,7 @@ namespace com::sun::star::xml::sax { class XExtendedDocumentHandler; }
namespace com::sun::star::xml::sax { class XLocator; }
class SvXMLNamespaceMap;
+class SvtSecurityMapPersonalInfo;
class SvXMLExport_Impl;
class ProgressBarHelper;
class XMLEventExport;
@@ -135,6 +137,7 @@ class XMLOFF_DLLPUBLIC SvXMLExport : public cppu::WeakImplHelper<
OUString msFilterName;
OUString msImgFilterName;
std::unique_ptr<SvXMLNamespaceMap> mpNamespaceMap; // the namespace map
+ std::unique_ptr<SvtSecurityMapPersonalInfo> mpAuthorIDs; // map authors to remove personal info
SvXMLUnitConverter maUnitConv; // the unit converter
std::unique_ptr<SvXMLNumFmtExport> mpNumExport;
std::unique_ptr<ProgressBarHelper> mpProgressBarHelper;
@@ -390,6 +393,9 @@ public:
// Get (const) namespace map.
const SvXMLNamespaceMap& GetNamespaceMap() const { return *mpNamespaceMap; }
+ // Get author id to remove personal info
+ size_t GetInfoID( const OUString sPersonalInfo ) const { return mpAuthorIDs->GetInfoID(sPersonalInfo); }
+
// Get unit converter
const SvXMLUnitConverter& GetMM100UnitConverter() const { return maUnitConv; }
diff --git a/sw/qa/uitest/data/redline-autocorrect.fodt b/sw/qa/uitest/data/redline-autocorrect.fodt
new file mode 100644
index 000000000000..ce874d299a8f
--- /dev/null
+++ b/sw/qa/uitest/data/redline-autocorrect.fodt
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <office:styles>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="en" fo:country="US"/>
+ </style:default-style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct94099223789984" text:id="ct94099223789984">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>NL</dc:creator>
+ <dc:date>2020-11-03T19:19:05</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p text:style-name="P1"><text:change-start text:change-id="ct94099223789984"/>t<text:change-end text:change-id="ct94099223789984"/>s</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/uitest/writer_tests7/tdf90401.py b/sw/qa/uitest/writer_tests7/tdf90401.py
new file mode 100644
index 000000000000..7260ae914268
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/tdf90401.py
@@ -0,0 +1,103 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from uitest.framework import UITestCase
+#from uitest.uihelper.common import type_text
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import get_url_for_data_file
+from uitest.uihelper.common import select_pos
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from org.libreoffice.unotest import systemPathToFileUrl
+from tempfile import TemporaryDirectory
+import os.path
+#Bug 90401 - remove personal info on redlines and annotations
+
+class tdf90401(UITestCase):
+
+ def test_tdf90401_remove_personal_info(self):
+
+ # load a test document with a tracked change, and add a comment
+
+ writer_doc = self.ui_test.load_file(get_url_for_data_file('redline-autocorrect.fodt'))
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild('writer_edit')
+
+ document = self.ui_test.get_component()
+ selection = self.xUITest.executeCommand('.uno:SelectAll')
+ self.xUITest.executeCommand('.uno:InsertAnnotation')
+
+ # enable remove personal info security option
+
+ self.ui_test.execute_dialog_through_command('.uno:OptionsTreeDialog') #optionsdialog
+ xDialog = self.xUITest.getTopFocusWindow()
+
+ xPages = xDialog.getChild('pages')
+ xGenEntry = xPages.getChild('0')
+ xSecurityPage = xGenEntry.getChild('6')
+ xSecurityPage.executeAction('SELECT', tuple())
+ # Click Button Options...
+ xOptions = xDialog.getChild('options')
+ def handle_options_dlg(dialog):
+ xRemovePersonal = dialog.getChild('removepersonal')
+ xRemovePersonal.executeAction('CLICK', tuple())
+ #Click on its button Close
+ xOkBtn = dialog.getChild('ok')
+ xOkBtn.executeAction('CLICK', tuple())
+
+ self.ui_test.execute_blocking_action(xOptions.executeAction, args=('CLICK', ()),
+ dialog_handler=handle_options_dlg)
+
+ xOKBtn = xDialog.getChild('ok')
+ self.ui_test.close_dialog_through_button(xOKBtn)
+
+ # save and reload the document to remove personal info
+
+ with TemporaryDirectory() as tempdir:
+ xFilePath = os.path.join(tempdir, 'tdf90401-tmp.fodt')
+
+ # Save Copy as
+ self.ui_test.execute_dialog_through_command('.uno:SaveAs')
+ xDialog = self.xUITest.getTopFocusWindow()
+
+ xFileName = xDialog.getChild('file_name')
+ xFileName.executeAction('TYPE', mkPropertyValues({'KEYCODE':'CTRL+A'}))
+ xFileName.executeAction('TYPE', mkPropertyValues({'KEYCODE':'BACKSPACE'}))
+ xFileName.executeAction('TYPE', mkPropertyValues({'TEXT': xFilePath}))
+
+ xOpenBtn = xDialog.getChild('open')
+ self.ui_test.close_dialog_through_button(xOpenBtn)
+
+ # Close the Writer document
+ self.ui_test.close_doc()
+
+ self.ui_test.load_file(systemPathToFileUrl(xFilePath))
+ document = self.ui_test.get_component()
+
+ # check removed personal info on comments
+
+ textfields = document.getTextFields()
+ author = ""
+ year = -1
+ for textfield in textfields:
+ if textfield.supportsService("com.sun.star.text.TextField.Annotation"):
+ author = textfield.Author
+ year = textfield.Date.Year
+ # This was 'Unknown Author'
+ self.assertEqual(author, 'Author2')
+ # This was 2021
+ self.assertEqual(year, 0)
+
+ # check removed personal info on tracked changes
+
+ self.ui_test.execute_modeless_dialog_through_command('.uno:AcceptTrackedChanges')
+ xTrackDlg = self.xUITest.getTopFocusWindow()
+ xTreeList = xTrackDlg.getChild('writerchanges')
+ state = get_state_as_dict(xTreeList)
+ # This was 'NL\t11/03/2020 19:19:05\t', containing personal info
+ self.assertEqual(state['SelectEntryText'], 'Author1\t01/01/1970 00:00:00\t')
+
+ self.ui_test.close_doc()
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx
index 7acb0ff2d3c0..ff10bcb584b9 100644
--- a/unotools/source/config/securityoptions.cxx
+++ b/unotools/source/config/securityoptions.cxx
@@ -933,4 +933,18 @@ Mutex& SvtSecurityOptions::GetInitMutex()
return theSecurityOptionsMutex::get();
}
+// map personal info strings to 1, 2, ... to remove personal info
+size_t SvtSecurityMapPersonalInfo::GetInfoID( const OUString sPersonalInfo )
+{
+ SvtSecurityMapPersonalInfoType::iterator aIter = aInfoIDs.find( sPersonalInfo );
+ if ( aIter == aInfoIDs.end() )
+ {
+ size_t nNewID = aInfoIDs.size() + 1;
+ aInfoIDs[sPersonalInfo] = nNewID;
+ return nNewID;
+ }
+
+ return aIter->second;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 05d44229e321..d73783994271 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -459,6 +459,7 @@ SvXMLExport::SvXMLExport(
m_xContext(xContext), m_implementationName(implementationName),
mxAttrList( new SvXMLAttributeList ),
mpNamespaceMap( new SvXMLNamespaceMap ),
+ mpAuthorIDs( new SvtSecurityMapPersonalInfo ),
maUnitConv(xContext, util::MeasureUnit::MM_100TH, eDefaultMeasureUnit, getSaneDefaultVersion()),
meClass( eClass ),
mnExportFlags( nExportFlags ),
@@ -484,6 +485,7 @@ SvXMLExport::SvXMLExport(
mxAttrList( new SvXMLAttributeList ),
msOrigFileName( rFileName ),
mpNamespaceMap( new SvXMLNamespaceMap ),
+ mpAuthorIDs( new SvtSecurityMapPersonalInfo ),
maUnitConv(xContext, util::MeasureUnit::MM_100TH, eDefaultMeasureUnit, getSaneDefaultVersion()),
meClass( XML_TOKEN_INVALID ),
mnExportFlags( SvXMLExportFlags::NONE ),
@@ -517,6 +519,7 @@ SvXMLExport::SvXMLExport(
mxAttrList( new SvXMLAttributeList ),
msOrigFileName( rFileName ),
mpNamespaceMap( new SvXMLNamespaceMap ),
+ mpAuthorIDs( new SvtSecurityMapPersonalInfo ),
maUnitConv( xContext,
util::MeasureUnit::MM_100TH,
SvXMLUnitConverter::GetMeasureUnit(eDefaultFieldUnit),
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 652bce79610d..db1542fc511f 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2516,6 +2516,10 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage )
Reference< XAnnotationEnumeration > xAnnotationEnumeration( xAnnotationAccess->createAnnotationEnumeration() );
if( xAnnotationEnumeration.is() && xAnnotationEnumeration->hasMoreElements() )
{
+ SvtSecurityOptions aSecOpt;
+ bool bRemovePersonalInfo = aSecOpt.IsOptionSet(
+ SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo );
+
OUStringBuffer sStringBuffer;
do
{
@@ -2551,7 +2555,9 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage )
if( !aAuthor.isEmpty() )
{
SvXMLElementExport aCreatorElem( *this, XML_NAMESPACE_DC, XML_CREATOR, true, false );
- Characters(aAuthor);
+ Characters( bRemovePersonalInfo
+ ? "Author" + OUString::number( SvXMLExport::GetInfoID(aAuthor) )
+ : aAuthor );
}
// initials
@@ -2567,7 +2573,9 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage )
? XML_CREATOR_INITIALS
: XML_SENDER_INITIALS,
true, false );
- Characters(aInitials);
+ Characters( bRemovePersonalInfo
+ ? OUString::number( SvXMLExport::GetInfoID(aInitials) )
+ : aInitials );
}
{
@@ -2575,7 +2583,9 @@ void SdXMLExport::exportAnnotations( const Reference<XDrawPage>& xDrawPage )
css::util::DateTime aDate( xAnnotation->getDateTime() );
::sax::Converter::convertDateTime(sStringBuffer, aDate, nullptr, true);
SvXMLElementExport aDateElem( *this, XML_NAMESPACE_DC, XML_DATE, true, false );
- Characters(sStringBuffer.makeStringAndClear());
+ Characters( bRemovePersonalInfo
+ ? "1970-01-01T00:00::00"
+ : sStringBuffer.makeStringAndClear() );
}
css::uno::Reference < css::text::XText > xText( xAnnotation->getTextRange() );
diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx
index e309b1d86731..fad527a77b59 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -42,6 +42,7 @@
#include <xmloff/xmlnamespace.hxx>
#include <xmloff/xmlexp.hxx>
#include <xmloff/xmluconv.hxx>
+#include <unotools/securityoptions.hxx>
using namespace ::com::sun::star;
@@ -433,6 +434,9 @@ OUString XMLRedlineExport::GetRedlineID(
void XMLRedlineExport::ExportChangeInfo(
const Reference<XPropertySet> & rPropSet)
{
+ SvtSecurityOptions aSecOpt;
+ bool bRemovePersonalInfo = aSecOpt.IsOptionSet(
+ SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo );
SvXMLElementExport aChangeInfo(rExport, XML_NAMESPACE_OFFICE,
XML_CHANGE_INFO, true, true);
@@ -445,7 +449,9 @@ void XMLRedlineExport::ExportChangeInfo(
SvXMLElementExport aCreatorElem( rExport, XML_NAMESPACE_DC,
XML_CREATOR, true,
false );
- rExport.Characters(sTmp);
+ rExport.Characters(bRemovePersonalInfo
+ ? "Author" + OUString::number(rExport.GetInfoID(sTmp))
+ : sTmp );
}
aAny = rPropSet->getPropertyValue("RedlineDateTime");
@@ -457,7 +463,9 @@ void XMLRedlineExport::ExportChangeInfo(
SvXMLElementExport aDateElem( rExport, XML_NAMESPACE_DC,
XML_DATE, true,
false );
- rExport.Characters(sBuf.makeStringAndClear());
+ rExport.Characters(bRemovePersonalInfo
+ ? "1970-01-01T00:00:00"
+ : sBuf.makeStringAndClear());
}
// comment as <text:p> sequence
@@ -470,6 +478,9 @@ void XMLRedlineExport::ExportChangeInfo(
const Sequence<PropertyValue> & rPropertyValues)
{
OUString sComment;
+ SvtSecurityOptions aSecOpt;
+ bool bRemovePersonalInfo = aSecOpt.IsOptionSet(
+ SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo );
for(const PropertyValue& rVal : rPropertyValues)
{
@@ -479,7 +490,9 @@ void XMLRedlineExport::ExportChangeInfo(
rVal.Value >>= sTmp;
if (!sTmp.isEmpty())
{
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CHG_AUTHOR, sTmp);
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CHG_AUTHOR, bRemovePersonalInfo
+ ? "Author" + OUString::number(rExport.GetInfoID(sTmp))
+ : sTmp);
}
}
else if( rVal.Name == "RedlineComment" )
@@ -492,8 +505,9 @@ void XMLRedlineExport::ExportChangeInfo(
rVal.Value >>= aDateTime;
OUStringBuffer sBuf;
::sax::Converter::convertDateTime(sBuf, aDateTime, nullptr);
- rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CHG_DATE_TIME,
- sBuf.makeStringAndClear());
+ rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CHG_DATE_TIME, bRemovePersonalInfo
+ ? "1970-01-01T00:00:00"
+ : sBuf.makeStringAndClear());
}
else if( rVal.Name == "RedlineType" )
{
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index 962e30e995d4..93f43ee6c082 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -1746,6 +1746,10 @@ void XMLTextFieldExport::ExportFieldHelper(
DBG_ASSERT(sPresentation.isEmpty(),
"Unexpected presentation for annotation field");
+ SvtSecurityOptions aSecOpt;
+ bool bRemovePersonalInfo = aSecOpt.IsOptionSet(
+ SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo );
+
// annotation element + content
OUString aName;
rPropSet->getPropertyValue(gsPropertyName) >>= aName;
@@ -1774,11 +1778,14 @@ void XMLTextFieldExport::ExportFieldHelper(
SvXMLElementExport aCreatorElem( GetExport(), XML_NAMESPACE_DC,
XML_CREATOR, true,
false );
- GetExport().Characters(aAuthor);
+ GetExport().Characters( bRemovePersonalInfo
+ ? "Author" + OUString::number( rExport.GetInfoID(aAuthor) )
+ : aAuthor );
}
// date time
util::DateTime aDate( GetDateTimeProperty(gsPropertyDateTimeValue, rPropSet) );
+ if ( !bRemovePersonalInfo )
{
OUStringBuffer aBuffer;
::sax::Converter::convertDateTime(aBuffer, aDate, nullptr, true);
@@ -1804,7 +1811,9 @@ void XMLTextFieldExport::ExportFieldHelper(
? XML_CREATOR_INITIALS
: XML_SENDER_INITIALS,
true, false );
- GetExport().Characters(aInitials);
+ GetExport().Characters( bRemovePersonalInfo
+ ? OUString::number( rExport.GetInfoID(aInitials) )
+ : aInitials);
}
}
commit 68eb62b9bf8a64d892b3cfa58447e7c890ed3ec4
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Tue Jun 15 21:36:24 2021 +0900
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Thu Jun 17 10:42:59 2021 +0200
svx: pragma once for some SdrObject subclasses
Change-Id: Ibbadf5069fbf5327a8a5964a3003bf6e258fd00b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117351
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index bbe0e8eb2446..48ebb4917414 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDMRKV_HXX
-#define INCLUDED_SVX_SVDMRKV_HXX
+#pragma once
#include <svx/svdmark.hxx>
#include <svx/svdhdl.hxx>
@@ -460,6 +459,4 @@ public:
// In opposite, a hit in the surrounding sensitive area enables Dragging.
-#endif // INCLUDED_SVX_SVDMRKV_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx
index 65540e93a9d5..48374bc035aa 100644
--- a/include/svx/svdoashp.hxx
+++ b/include/svx/svdoashp.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOASHP_HXX
-#define INCLUDED_SVX_SVDOASHP_HXX
+#pragma once
#include <svx/svdobj.hxx>
#include <svx/svdotext.hxx>
@@ -251,6 +250,4 @@ public:
OUString GetCustomShapeName() const;
};
-#endif // INCLUDED_SVX_SVDOASHP_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdoattr.hxx b/include/svx/svdoattr.hxx
index 2505811d2948..3933caa3f3f5 100644
--- a/include/svx/svdoattr.hxx
+++ b/include/svx/svdoattr.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOATTR_HXX
-#define INCLUDED_SVX_SVDOATTR_HXX
+#pragma once
#include <svx/svdobj.hxx>
#include <svx/svxdllapi.h>
@@ -64,7 +63,4 @@ public:
virtual const tools::Rectangle& GetSnapRect() const override;
};
-
-#endif // INCLUDED_SVX_SVDOATTR_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdocapt.hxx b/include/svx/svdocapt.hxx
index 2805a147a5cf..28337b6631c4 100644
--- a/include/svx/svdocapt.hxx
+++ b/include/svx/svdocapt.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOCAPT_HXX
-#define INCLUDED_SVX_SVDOCAPT_HXX
+#pragma once
#include <svx/svdorect.hxx>
#include <svx/svxdllapi.h>
@@ -152,7 +151,4 @@ public:
::basegfx::B2DPolygon getTailPolygon() const;
};
-
-#endif //_SVDOCAPT_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdocirc.hxx b/include/svx/svdocirc.hxx
index a13eeac0e241..5da739068aee 100644
--- a/include/svx/svdocirc.hxx
+++ b/include/svx/svdocirc.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOCIRC_HXX
-#define INCLUDED_SVX_SVDOCIRC_HXX
+#pragma once
#include <svx/svdorect.hxx>
#include <svx/svxdllapi.h>
@@ -141,6 +140,4 @@ public:
};
-#endif // INCLUDED_SVX_SVDOCIRC_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx
index 17108ad856ec..3389fd19c151 100644
--- a/include/svx/svdoedge.hxx
+++ b/include/svx/svdoedge.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOEDGE_HXX
-#define INCLUDED_SVX_SVDOEDGE_HXX
+#pragma once
#include <memory>
#include <svx/svdotext.hxx>
@@ -408,6 +407,4 @@ public:
// entire object, then the connector tries to find the most
// convenient of the 4 vertex glue points (and only of those).
-#endif // INCLUDED_SVX_SVDOEDGE_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx
index 950bb00b6cd5..0903f448b251 100644
--- a/include/svx/svdograf.hxx
+++ b/include/svx/svdograf.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOGRAF_HXX
-#define INCLUDED_SVX_SVDOGRAF_HXX
+#pragma once
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
@@ -309,6 +308,4 @@ public:
}
};
-#endif // INCLUDED_SVX_SVDOGRAF_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdogrp.hxx b/include/svx/svdogrp.hxx
index 3eef83bbd3ac..f92c5c7a1e53 100644
--- a/include/svx/svdogrp.hxx
+++ b/include/svx/svdogrp.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOGRP_HXX
-#define INCLUDED_SVX_SVDOGRP_HXX
+#pragma once
#include <memory>
#include <svx/svdobj.hxx>
@@ -113,6 +112,4 @@ public:
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
-#endif // INCLUDED_SVX_SVDOGRP_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdomeas.hxx b/include/svx/svdomeas.hxx
index 4e9738bc2906..e3ca9abc3449 100644
--- a/include/svx/svdomeas.hxx
+++ b/include/svx/svdomeas.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOMEAS_HXX
-#define INCLUDED_SVX_SVDOMEAS_HXX
+#pragma once
#include <svx/svdotext.hxx>
#include <svx/svxdllapi.h>
@@ -195,6 +194,4 @@ public:
// -> during Copy, etc. use the respective code of the connectors?!?
// this probably will be pretty complicated ...
-#endif // INCLUDED_SVX_SVDOMEAS_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdomedia.hxx b/include/svx/svdomedia.hxx
index bc80acfff76c..d80ec5a577b9 100644
--- a/include/svx/svdomedia.hxx
+++ b/include/svx/svdomedia.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOMEDIA_HXX
-#define INCLUDED_SVX_SVDOMEDIA_HXX
+#pragma once
#include <memory>
#include <svx/svdorect.hxx>
@@ -81,6 +80,4 @@ private:
std::unique_ptr<Impl> m_xImpl;
};
-#endif // INCLUDED_SVX_SVDOMEDIA_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
index 56b40a6f00df..ae6ff818bdf6 100644
--- a/include/svx/svdoole2.hxx
+++ b/include/svx/svdoole2.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOOLE2_HXX
-#define INCLUDED_SVX_SVDOOLE2_HXX
+#pragma once
#include <memory>
#include <svx/svdorect.hxx>
@@ -200,6 +199,4 @@ public:
void Connect() { GetRealObject(); }
};
-#endif // INCLUDED_SVX_SVDOOLE2_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdopage.hxx b/include/svx/svdopage.hxx
index c5e700ad9acd..a6be49dad6df 100644
--- a/include/svx/svdopage.hxx
+++ b/include/svx/svdopage.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOPAGE_HXX
-#define INCLUDED_SVX_SVDOPAGE_HXX
+#pragma once
#include <svx/svdobj.hxx>
#include <svx/sdrpageuser.hxx>
@@ -67,7 +66,4 @@ public:
virtual OUString TakeObjNamePlural() const override;
};
-
-#endif // INCLUDED_SVX_SVDOPAGE_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdopath.hxx b/include/svx/svdopath.hxx
index be345a850b7d..fc7e2686dcd2 100644
--- a/include/svx/svdopath.hxx
+++ b/include/svx/svdopath.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOPATH_HXX
-#define INCLUDED_SVX_SVDOPATH_HXX
+#pragma once
#include <svx/svdotext.hxx>
#include <svx/svxdllapi.h>
@@ -172,6 +171,4 @@ public:
void SetHandleScale(bool bHandleScale);
};
-#endif // INCLUDED_SVX_SVDOPATH_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdorect.hxx b/include/svx/svdorect.hxx
index f10105db87ba..4e52c6289faa 100644
--- a/include/svx/svdorect.hxx
+++ b/include/svx/svdorect.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDORECT_HXX
-#define INCLUDED_SVX_SVDORECT_HXX
+#pragma once
#include <memory>
#include <svx/svdotext.hxx>
@@ -125,6 +124,4 @@ public:
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
};
-#endif // INCLUDED_SVX_SVDORECT_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx
index 59299425d2b1..88c5728412b6 100644
--- a/include/svx/svdotable.hxx
+++ b/include/svx/svdotable.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOTABLE_HXX
-#define INCLUDED_SVX_SVDOTABLE_HXX
+#pragma once
#include <com/sun/star/text/WritingMode.hpp>
#include <com/sun/star/container/XIndexAccess.hpp>
@@ -288,6 +287,4 @@ SVX_DLLPUBLIC void ImportAsRTF( SvStream& rStrm, SdrTableObj& rObj );
}
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index 360c8c72daac..ab235ef6dbb4 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOTEXT_HXX
-#define INCLUDED_SVX_SVDOTEXT_HXX
+#pragma once
#include <svx/itextprovider.hxx>
#include <svx/svdoattr.hxx>
@@ -639,7 +638,4 @@ public:
friend class ::SdrTextObjTest;
};
-
-#endif // INCLUDED_SVX_SVDOTEXT_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdouno.hxx b/include/svx/svdouno.hxx
index c416439ecb5d..2c81f47a185b 100644
--- a/include/svx/svdouno.hxx
+++ b/include/svx/svdouno.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOUNO_HXX
-#define INCLUDED_SVX_SVDOUNO_HXX
+#pragma once
#include <com/sun/star/awt/XControlModel.hpp>
#include <com/sun/star/awt/XControl.hpp>
@@ -143,6 +142,4 @@ private:
SVX_DLLPRIVATE bool impl_getViewContact( sdr::contact::ViewContactOfUnoControl*& _out_rpContact ) const;
};
-#endif // INCLUDED_SVX_SVDOUNO_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdoutl.hxx b/include/svx/svdoutl.hxx
index 767d8231862b..453d3b4ba3a7 100644
--- a/include/svx/svdoutl.hxx
+++ b/include/svx/svdoutl.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOUTL_HXX
-#define INCLUDED_SVX_SVDOUTL_HXX
+#pragma once
#include <editeng/outliner.hxx>
#include <svx/svxdllapi.h>
@@ -48,6 +47,5 @@ public:
bool hasEditViewCallbacks() const;
};
-#endif // INCLUDED_SVX_SVDOUTL_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx
index d4fdd821acf3..fa2f935f34e5 100644
--- a/include/svx/svdovirt.hxx
+++ b/include/svx/svdovirt.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDOVIRT_HXX
-#define INCLUDED_SVX_SVDOVIRT_HXX
+#pragma once
#include <svx/svdobj.hxx>
#include <svx/svxdllapi.h>
@@ -148,6 +147,4 @@ public:
virtual Point GetOffset() const;
};
-#endif // INCLUDED_SVX_SVDOVIRT_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index 11d49191a017..9837a422572b 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDPAGE_HXX
-#define INCLUDED_SVX_SVDPAGE_HXX
+#pragma once
#include <cppuhelper/weak.hxx>
#include <svl/stylesheetuser.hxx>
@@ -533,7 +532,4 @@ public:
bool bEdit );
};
-
-#endif // INCLUDED_SVX_SVDPAGE_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdpagv.hxx b/include/svx/svdpagv.hxx
index 6d703d5c6145..ab9bfa5625ae 100644
--- a/include/svx/svdpagv.hxx
+++ b/include/svx/svdpagv.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDPAGV_HXX
-#define INCLUDED_SVX_SVDPAGV_HXX
+#pragma once
#include <com/sun/star/awt/XControlContainer.hpp>
#include <rtl/ustring.hxx>
@@ -118,7 +117,7 @@ private:
public:
SdrPageView(SdrPage* pPage1, SdrView& rNewView);
~SdrPageView();
-
+
SdrPageView& operator=( SdrPageView const & ) = delete; // MSVC2017 workaround
SdrPageView( SdrPageView const & ) = delete; // MSVC2017 workaround
@@ -256,7 +255,6 @@ public:
const Color& GetApplicationDocumentColor() const { return maDocumentColor;}
};
-
-#endif // INCLUDED_SVX_SVDPAGV_HXX
+#pragma once
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index 7fe2bcc9a23d..0e06b2c681db 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDPNTV_HXX
-#define INCLUDED_SVX_SVDPNTV_HXX
+#pragma once
#include <svl/SfxBroadcaster.hxx>
#include <svl/lstner.hxx>
@@ -509,6 +508,4 @@ public:
const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
};
-#endif // INCLUDED_SVX_SVDPNTV_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdpoev.hxx b/include/svx/svdpoev.hxx
index 0ad7addd3a63..8c0c8947cd71 100644
--- a/include/svx/svdpoev.hxx
+++ b/include/svx/svdpoev.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDPOEV_HXX
-#define INCLUDED_SVX_SVDPOEV_HXX
+#pragma once
#include <svx/svxdllapi.h>
#include <svx/svdedtv.hxx>
@@ -80,6 +79,4 @@ public:
void CheckPolyPossibilitiesHelper( SdrMark* pM, bool& b1stSmooth, bool& b1stSegm, bool& bCurve, bool& bSmoothFuz, bool& bSegmFuz, basegfx::B2VectorContinuity& eSmooth );
};
-#endif // INCLUDED_SVX_SVDPOEV_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdpool.hxx b/include/svx/svdpool.hxx
index 95eea37c59c5..e61b6fe97005 100644
--- a/include/svx/svdpool.hxx
+++ b/include/svx/svdpool.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDPOOL_HXX
-#define INCLUDED_SVX_SVDPOOL_HXX
+#pragma once
#include <svx/xpool.hxx>
#include <svx/svxdllapi.h>
@@ -26,7 +25,6 @@
class XLineAttrSetItem;
class XFillAttrSetItem;
-
class SVXCORE_DLLPUBLIC SdrItemPool final : public XOutdevItemPool
{
public:
@@ -45,6 +43,4 @@ public:
static OUString GetItemName(sal_uInt16 nWhich);
};
-#endif // INCLUDED_SVX_SVDPOOL_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdsnpv.hxx b/include/svx/svdsnpv.hxx
index b7b06e499590..1fd8fce3ba97 100644
--- a/include/svx/svdsnpv.hxx
+++ b/include/svx/svdsnpv.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDSNPV_HXX
-#define INCLUDED_SVX_SVDSNPV_HXX
+#pragma once
#include <svx/svdpntv.hxx>
#include <svx/svdhlpln.hxx>
@@ -285,6 +284,4 @@ public:
Degree100 GetEliminatePolyPointLimitAngle() const { return nEliminatePolyPointLimitAngle; }
};
-#endif // INCLUDED_SVX_SVDSNPV_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdsob.hxx b/include/svx/svdsob.hxx
index 92725a329bae..2d17ab05640a 100644
--- a/include/svx/svdsob.hxx
+++ b/include/svx/svdsob.hxx
@@ -17,15 +17,13 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDSOB_HXX
-#define INCLUDED_SVX_SVDSOB_HXX
+#pragma once
#include <com/sun/star/uno/Any.hxx>
#include <svx/svxdllapi.h>
#include <svx/svdtypes.hxx>
-
/*
Stores a bitfield of the layer values that have been set.
*/
@@ -87,6 +85,4 @@ public:
};
-#endif // INCLUDED_SVX_SVDSOB_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdtext.hxx b/include/svx/svdtext.hxx
index 2eb8ac691c0d..4a11c12b841e 100644
--- a/include/svx/svdtext.hxx
+++ b/include/svx/svdtext.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDTEXT_HXX
-#define INCLUDED_SVX_SVDTEXT_HXX
+#pragma once
#include <svx/sdr/properties/defaultproperties.hxx>
#include <svx/svxdllapi.h>
@@ -78,6 +77,4 @@ private:
bool mbPortionInfoChecked;
};
-#endif // INCLUDED_SVX_SVDTEXT_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx
index ccc6308fc018..abc19bf617cd 100644
--- a/include/svx/svdtrans.hxx
+++ b/include/svx/svdtrans.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDTRANS_HXX
-#define INCLUDED_SVX_SVDTRANS_HXX
+#pragma once
#include <rtl/ustring.hxx>
#include <svx/svxdllapi.h>
@@ -297,7 +296,4 @@ public:
static OUString GetUnitStr(FieldUnit eUnit);
};
-
-#endif // INCLUDED_SVX_SVDTRANS_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdtypes.hxx b/include/svx/svdtypes.hxx
index a2c065c4b342..5b73552a5719 100644
--- a/include/svx/svdtypes.hxx
+++ b/include/svx/svdtypes.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDTYPES_HXX
-#define INCLUDED_SVX_SVDTYPES_HXX
+#pragma once
#include <sal/types.h>
#include <o3tl/strong_int.hxx>
@@ -88,6 +87,4 @@ enum class SdrRepeatFunc
ImportMtf,
};
-#endif // INCLUDED_SVX_SVDTYPES_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx
index 04665b9daa28..b624b6e77428 100644
--- a/include/svx/svdundo.hxx
+++ b/include/svx/svdundo.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDUNDO_HXX
-#define INCLUDED_SVX_SVDUNDO_HXX
+#pragma once
#include <config_options.h>
#include <sal/config.h>
@@ -738,6 +737,4 @@ public:
virtual std::unique_ptr<SdrUndoAction> CreateUndoPageChangeMasterPage(SdrPage& rChangedPage);
};
-#endif // INCLUDED_SVX_SVDUNDO_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx
index f7efd59b708e..7415e50ff7f6 100644
--- a/include/svx/svdview.hxx
+++ b/include/svx/svdview.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDVIEW_HXX
-#define INCLUDED_SVX_SVDVIEW_HXX
+#pragma once
// HACK to avoid too deep includes and to have some
// levels free in svdmark itself (MS compiler include depth limit)
@@ -279,6 +278,5 @@ public:
// Pointer GetPreferredPointer(const Point& rMousePos, const OutputDevice* pOut, sal_uInt16 nTol=0) const;
// OUString GetStatusText();
-#endif // INCLUDED_SVX_SVDVIEW_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdviter.hxx b/include/svx/svdviter.hxx
index d8a3de57727f..2a74d6741f80 100644
--- a/include/svx/svdviter.hxx
+++ b/include/svx/svdviter.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDVITER_HXX
-#define INCLUDED_SVX_SVDVITER_HXX
+#pragma once
#include <svx/svxdllapi.h>
@@ -82,6 +81,4 @@ public:
SdrView* NextView();
};
-#endif // INCLUDED_SVX_SVDVITER_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdxcgv.hxx b/include/svx/svdxcgv.hxx
index 8ed2adbb126d..87ea2a28569b 100644
--- a/include/svx/svdxcgv.hxx
+++ b/include/svx/svdxcgv.hxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SVDXCGV_HXX
-#define INCLUDED_SVX_SVDXCGV_HXX
+#pragma once
#include <svx/svdedxv.hxx>
@@ -111,6 +110,4 @@ public:
bool Paste(SvStream& rInput, EETextFormat eFormat, const Point& rPos, SdrObjList* pLst, SdrInsertFlags nOptions);
};
-#endif // INCLUDED_SVX_SVDXCGV_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list