summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorPhilipp Hofer <philipp.hofer@protonmail.com>2020-11-12 13:14:09 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-11-22 01:56:52 +0100
commit1e17165f6643afe583bb97a40fb25ecb7bab24d9 (patch)
tree7689985f76e4f50741319ab770d35a194169ffca /sd
parenta9bce41c64bda648be2609a0dc4aea728fa8ec77 (diff)
tdf#123936 Formatting files in module sd with clang-format
Change-Id: Ieb02e9ae91123bcf1decc141a43fe7e985bf47f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105703 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/AnnotationEnumeration.hxx13
-rw-r--r--sd/inc/CustomAnimationCloner.hxx6
-rw-r--r--sd/inc/createpresentation.hxx9
-rw-r--r--sd/inc/createunopageimpl.hxx7
-rw-r--r--sd/inc/cusshow.hxx22
-rw-r--r--sd/inc/helper/simplereferencecomponent.hxx9
-rw-r--r--sd/inc/randomnode.hxx5
-rw-r--r--sd/inc/sdattr.hxx29
-rw-r--r--sd/inc/sddllapi.h4
-rw-r--r--sd/inc/sdenumdef.hxx7
-rw-r--r--sd/inc/sdgrffilter.hxx8
-rw-r--r--sd/inc/sdhtmlfilter.hxx6
-rw-r--r--sd/inc/undo/undoobjects.hxx23
-rw-r--r--sd/inc/undoanim.hxx11
-rw-r--r--sd/qa/unit/import-tests-smartart.cxx305
-rw-r--r--sd/source/core/drawdoc_animations.cxx10
-rw-r--r--sd/source/filter/html/sdhtmlfilter.cxx15
-rw-r--r--sd/source/filter/ppt/pptatom.hxx50
-rw-r--r--sd/source/helper/simplereferencecomponent.cxx24
-rw-r--r--sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx27
-rw-r--r--sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx27
-rw-r--r--sd/source/ui/accessibility/AccessiblePresentationShape.cxx23
-rw-r--r--sd/source/ui/accessibility/AccessibleViewForwarder.cxx35
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.hxx8
-rw-r--r--sd/source/ui/dlg/RemoteDialog.cxx6
-rw-r--r--sd/source/ui/dlg/RemoteDialog.hxx3
-rw-r--r--sd/source/ui/dlg/dlgpage.cxx45
-rw-r--r--sd/source/ui/dlg/ins_paste.cxx9
-rw-r--r--sd/source/ui/dlg/sdabstdlg.cxx12
-rw-r--r--sd/source/ui/dlg/sduiexp.cxx11
-rw-r--r--sd/source/ui/docshell/grdocsh.cxx19
-rw-r--r--sd/source/ui/framework/configuration/ChangeRequestQueue.cxx6
-rw-r--r--sd/source/ui/framework/configuration/ChangeRequestQueue.hxx11
-rw-r--r--sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx24
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationClassifier.hxx47
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationTracer.hxx25
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationUpdater.hxx57
-rw-r--r--sd/source/ui/framework/configuration/UpdateRequest.cxx20
-rw-r--r--sd/source/ui/framework/factories/FrameWindowPane.cxx19
-rw-r--r--sd/source/ui/framework/factories/FrameWindowPane.hxx17
-rw-r--r--sd/source/ui/framework/module/CenterViewFocusModule.hxx37
-rw-r--r--sd/source/ui/framework/module/DrawModule.cxx10
-rw-r--r--sd/source/ui/framework/module/PresentationModule.cxx6
-rw-r--r--sd/source/ui/framework/module/ShellStackGuard.hxx34
-rw-r--r--sd/source/ui/func/sdundogr.cxx15
-rw-r--r--sd/source/ui/inc/AccessibleViewForwarder.hxx17
-rw-r--r--sd/source/ui/inc/BezierObjectBar.hxx9
-rw-r--r--sd/source/ui/inc/BreakDlg.hxx8
-rw-r--r--sd/source/ui/inc/Client.hxx16
-rw-r--r--sd/source/ui/inc/ClientView.hxx11
-rw-r--r--sd/source/ui/inc/EventMultiplexer.hxx22
-rw-r--r--sd/source/ui/inc/FormShellManager.hxx23
-rw-r--r--sd/source/ui/inc/GraphicDocShell.hxx7
-rw-r--r--sd/source/ui/inc/GraphicViewShell.hxx21
-rw-r--r--sd/source/ui/inc/GraphicViewShellBase.hxx11
-rw-r--r--sd/source/ui/inc/ImpressViewShellBase.hxx11
-rw-r--r--sd/source/ui/inc/MasterPageObserver.hxx39
-rw-r--r--sd/source/ui/inc/OutlineBulletDlg.hxx10
-rw-r--r--sd/source/ui/inc/OutlineViewShellBase.hxx9
-rw-r--r--sd/source/ui/inc/PaneShells.hxx10
-rw-r--r--sd/source/ui/inc/PresentationViewShell.hxx18
-rw-r--r--sd/source/ui/inc/PresentationViewShellBase.hxx9
-rw-r--r--sd/source/ui/inc/ShellFactory.hxx11
-rw-r--r--sd/source/ui/inc/SlideSorterViewShellBase.hxx9
-rw-r--r--sd/source/ui/inc/SpellDialogChildWindow.hxx17
-rw-r--r--sd/source/ui/inc/TemplateScanner.hxx33
-rw-r--r--sd/source/ui/inc/ViewClipboard.hxx20
-rw-r--r--sd/source/ui/inc/ViewShellHint.hxx14
-rw-r--r--sd/source/ui/inc/ViewShellImplementation.hxx28
-rw-r--r--sd/source/ui/inc/ViewShellManager.hxx51
-rw-r--r--sd/source/ui/inc/Window.hxx84
-rw-r--r--sd/source/ui/inc/WindowUpdater.hxx28
-rw-r--r--sd/source/ui/inc/annotationmanager.hxx10
-rw-r--r--sd/source/ui/inc/bulmaper.hxx5
-rw-r--r--sd/source/ui/inc/copydlg.hxx12
-rw-r--r--sd/source/ui/inc/createtabledesignpanel.hxx12
-rw-r--r--sd/source/ui/inc/createtableobjectbar.hxx14
-rw-r--r--sd/source/ui/inc/diactrl.hxx15
-rw-r--r--sd/source/ui/inc/filedlg.hxx8
-rw-r--r--sd/source/ui/inc/framework/DrawModule.hxx17
-rw-r--r--sd/source/ui/inc/framework/ImpressModule.hxx17
-rw-r--r--sd/source/ui/inc/framework/PresentationModule.hxx17
-rw-r--r--sd/source/ui/inc/gluectrl.hxx16
-rw-r--r--sd/source/ui/inc/prntopts.hxx18
-rw-r--r--sd/source/ui/inc/pubdlg.hxx74
-rw-r--r--sd/source/ui/inc/registerinterfaces.hxx7
-rw-r--r--sd/source/ui/inc/smarttag.hxx55
-rw-r--r--sd/source/ui/inc/tablefunction.hxx7
-rw-r--r--sd/source/ui/inc/tools/AsynchronousCall.hxx11
-rw-r--r--sd/source/ui/inc/tools/AsynchronousTask.hxx4
-rw-r--r--sd/source/ui/inc/tools/IconCache.hxx7
-rw-r--r--sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx22
-rw-r--r--sd/source/ui/inc/uiobject.hxx6
-rw-r--r--sd/source/ui/inc/unchss.hxx5
-rw-r--r--sd/source/ui/inc/view/viewoverlaymanager.hxx27
-rw-r--r--sd/source/ui/inc/zoomlist.hxx19
-rw-r--r--sd/source/ui/presenter/CanvasUpdateRequester.hxx26
-rw-r--r--sd/source/ui/remotecontrol/OSXNetworkService.h16
-rw-r--r--sd/source/ui/sidebar/IDisposable.hxx4
-rw-r--r--sd/source/ui/sidebar/ISidebarReceiver.hxx4
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.hxx50
-rw-r--r--sd/source/ui/sidebar/MasterPageContainer.hxx80
-rw-r--r--sd/source/ui/sidebar/MasterPageContainerFiller.hxx20
-rw-r--r--sd/source/ui/sidebar/MasterPageContainerProviders.hxx44
-rw-r--r--sd/source/ui/sidebar/PreviewValueSet.hxx18
-rw-r--r--sd/source/ui/slideshow/PaneHider.cxx22
-rw-r--r--sd/source/ui/slideshow/PaneHider.hxx19
-rw-r--r--sd/source/ui/slideshow/SlideShowRestarter.hxx26
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx49
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx39
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx9
-rw-r--r--sd/source/ui/slidesorter/cache/SlsCacheConfiguration.hxx13
-rw-r--r--sd/source/ui/slidesorter/cache/SlsRequestFactory.hxx8
-rw-r--r--sd/source/ui/slidesorter/cache/SlsRequestPriorityClass.hxx4
-rw-r--r--sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx24
-rw-r--r--sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx17
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx20
-rw-r--r--sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx19
-rw-r--r--sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx33
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx94
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx32
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx37
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx48
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx51
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx40
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx32
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx16
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx40
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx22
-rw-r--r--sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx53
-rw-r--r--sd/source/ui/slidesorter/inc/model/SlsEnumeration.hxx9
-rw-r--r--sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx24
-rw-r--r--sd/source/ui/slidesorter/inc/model/SlsPageEnumerationProvider.hxx10
-rw-r--r--sd/source/ui/slidesorter/inc/model/SlsSharedPageDescriptor.hxx4
-rw-r--r--sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx10
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx10
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx13
-rw-r--r--sd/source/ui/slidesorter/model/SlsVisualState.cxx16
-rw-r--r--sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx28
-rw-r--r--sd/source/ui/tools/AsynchronousCall.cxx14
-rw-r--r--sd/source/ui/tools/IconCache.cxx20
-rw-r--r--sd/source/ui/uitest/uiobject.cxx33
-rw-r--r--sd/source/ui/unoidl/UnoDocumentSettings.hxx8
-rw-r--r--sd/source/ui/unoidl/unopool.hxx3
-rw-r--r--sd/source/ui/view/GraphicViewShellBase.cxx35
-rw-r--r--sd/source/ui/view/ViewShellHint.cxx10
-rw-r--r--sd/source/ui/view/clview.cxx14
-rw-r--r--sd/source/ui/view/drvwshrg.cxx12
-rw-r--r--sd/source/ui/view/zoomlist.cxx33
149 files changed, 1748 insertions, 1654 deletions
diff --git a/sd/inc/AnnotationEnumeration.hxx b/sd/inc/AnnotationEnumeration.hxx
index cc053f9db947..3acc18e9a131 100644
--- a/sd/inc/AnnotationEnumeration.hxx
+++ b/sd/inc/AnnotationEnumeration.hxx
@@ -24,14 +24,15 @@
#include "sdpage.hxx"
-namespace com::sun::star::office {
- class XAnnotationEnumeration;
+namespace com::sun::star::office
+{
+class XAnnotationEnumeration;
}
-namespace sd {
-
-css::uno::Reference< css::office::XAnnotationEnumeration > createAnnotationEnumeration( const AnnotationVector& );
-
+namespace sd
+{
+css::uno::Reference<css::office::XAnnotationEnumeration>
+createAnnotationEnumeration(const AnnotationVector&);
}
#endif
diff --git a/sd/inc/CustomAnimationCloner.hxx b/sd/inc/CustomAnimationCloner.hxx
index 86b4e6b1fcd5..52b727c97289 100644
--- a/sd/inc/CustomAnimationCloner.hxx
+++ b/sd/inc/CustomAnimationCloner.hxx
@@ -26,9 +26,9 @@ class SdPage;
namespace sd
{
- css::uno::Reference< css::animations::XAnimationNode > Clone(
- const css::uno::Reference< css::animations::XAnimationNode >& xSourceNode,
- const SdPage* pSource = nullptr, const SdPage* pTarget = nullptr );
+css::uno::Reference<css::animations::XAnimationNode>
+Clone(const css::uno::Reference<css::animations::XAnimationNode>& xSourceNode,
+ const SdPage* pSource = nullptr, const SdPage* pTarget = nullptr);
}
#endif // INCLUDED_SD_INC_CUSTOMANIMATIONCLONER_HXX
diff --git a/sd/inc/createpresentation.hxx b/sd/inc/createpresentation.hxx
index 77e45243c678..de1a79c71d55 100644
--- a/sd/inc/createpresentation.hxx
+++ b/sd/inc/createpresentation.hxx
@@ -24,13 +24,14 @@
#include <com/sun/star/uno/Reference.hxx>
-namespace com::sun::star::presentation {
- class XPresentation2;
+namespace com::sun::star::presentation
+{
+class XPresentation2;
}
class SdDrawDocument;
-css::uno::Reference<css::presentation::XPresentation2> CreatePresentation(
- SdDrawDocument const & rDocument);
+css::uno::Reference<css::presentation::XPresentation2>
+CreatePresentation(SdDrawDocument const& rDocument);
#endif
diff --git a/sd/inc/createunopageimpl.hxx b/sd/inc/createunopageimpl.hxx
index cc134fb45fb9..2d8159f0fe2e 100644
--- a/sd/inc/createunopageimpl.hxx
+++ b/sd/inc/createunopageimpl.hxx
@@ -22,10 +22,13 @@
#include <com/sun/star/uno/Reference.hxx>
-namespace com::sun::star::uno { class XInterface; }
+namespace com::sun::star::uno
+{
+class XInterface;
+}
class SdPage;
-css::uno::Reference< css::uno::XInterface > createUnoPageImpl( SdPage* pPage );
+css::uno::Reference<css::uno::XInterface> createUnoPageImpl(SdPage* pPage);
#endif
diff --git a/sd/inc/cusshow.hxx b/sd/inc/cusshow.hxx
index b8dafdd373aa..a30894c943a4 100644
--- a/sd/inc/cusshow.hxx
+++ b/sd/inc/cusshow.hxx
@@ -32,35 +32,35 @@ public:
typedef ::std::vector<const SdPage*> PageVec;
private:
- PageVec maPages;
- OUString aName;
+ PageVec maPages;
+ OUString aName;
// this is a weak reference to a possible living api wrapper for this custom show
- css::uno::WeakReference< css::uno::XInterface > mxUnoCustomShow;
+ css::uno::WeakReference<css::uno::XInterface> mxUnoCustomShow;
public:
SdCustomShow();
- SdCustomShow(css::uno::Reference< css::uno::XInterface > const & xShow );
+ SdCustomShow(css::uno::Reference<css::uno::XInterface> const& xShow);
~SdCustomShow();
// @@@ copy ctor, but no copy assignment? @@@
- SdCustomShow( const SdCustomShow& rShow );
+ SdCustomShow(const SdCustomShow& rShow);
- SdCustomShow& operator=( const SdCustomShow& rShow ) = delete;
+ SdCustomShow& operator=(const SdCustomShow& rShow) = delete;
/** Provides a direct access to the collection of the SdPage objects. */
- PageVec& PagesVector() { return maPages;}
+ PageVec& PagesVector() { return maPages; }
/**
* Replaces all occurrences of pOldPage with pNewPage.
* If pNewPage is 0 then removes all occurrences of pOldPage.
*/
- void ReplacePage( const SdPage* pOldPage, const SdPage* pNewPage );
+ void ReplacePage(const SdPage* pOldPage, const SdPage* pNewPage);
- void SetName(const OUString& rName);
- const OUString& GetName() const { return aName;}
+ void SetName(const OUString& rName);
+ const OUString& GetName() const { return aName; }
- css::uno::Reference< css::uno::XInterface > getUnoCustomShow();
+ css::uno::Reference<css::uno::XInterface> getUnoCustomShow();
};
#endif // INCLUDED_SD_INC_CUSSHOW_HXX
diff --git a/sd/inc/helper/simplereferencecomponent.hxx b/sd/inc/helper/simplereferencecomponent.hxx
index 53ad24a9ef6a..153d8573da42 100644
--- a/sd/inc/helper/simplereferencecomponent.hxx
+++ b/sd/inc/helper/simplereferencecomponent.hxx
@@ -24,8 +24,8 @@
#include <sddllapi.h>
-namespace sd {
-
+namespace sd
+{
/** A simple base implementation for reference-counted components.
acts like sal::SimpleReferenceObject but calls the virtual disposing()
methods before the ref count switches from 1 to zero.
@@ -56,12 +56,11 @@ protected:
private:
oslInterlockedCount m_nCount;
- SimpleReferenceComponent(SimpleReferenceComponent const &) = delete;
- void operator =(SimpleReferenceComponent const &) = delete;
+ SimpleReferenceComponent(SimpleReferenceComponent const&) = delete;
+ void operator=(SimpleReferenceComponent const&) = delete;
bool mbDisposed;
};
-
}
#endif // _SALHELPER_SimpleReferenceComponent_HXX_
diff --git a/sd/inc/randomnode.hxx b/sd/inc/randomnode.hxx
index 2a30b448541e..62cd3805747c 100644
--- a/sd/inc/randomnode.hxx
+++ b/sd/inc/randomnode.hxx
@@ -27,11 +27,10 @@
#include "sddllapi.h"
-namespace sd {
-
+namespace sd
+{
SD_DLLPUBLIC css::uno::Reference<css::uno::XInterface>
RandomAnimationNode_createInstance(sal_Int16 nPresetClass);
-
}
#endif
diff --git a/sd/inc/sdattr.hxx b/sd/inc/sdattr.hxx
index a7b0614114e2..44e0eb0d20a4 100644
--- a/sd/inc/sdattr.hxx
+++ b/sd/inc/sdattr.hxx
@@ -26,40 +26,37 @@
#include "sdattr.hrc"
// layer attributes
-inline SfxStringItem makeSdAttrLayerName( const OUString& aStr )
+inline SfxStringItem makeSdAttrLayerName(const OUString& aStr)
{
- return SfxStringItem( ATTR_LAYER_NAME, aStr );
+ return SfxStringItem(ATTR_LAYER_NAME, aStr);
}
-inline SfxStringItem makeSdAttrLayerTitle( const OUString& aStr = OUString() )
+inline SfxStringItem makeSdAttrLayerTitle(const OUString& aStr = OUString())
{
- return SfxStringItem( ATTR_LAYER_TITLE, aStr );
+ return SfxStringItem(ATTR_LAYER_TITLE, aStr);
}
-inline SfxStringItem makeSdAttrLayerDesc( const OUString& aStr = OUString() )
+inline SfxStringItem makeSdAttrLayerDesc(const OUString& aStr = OUString())
{
- return SfxStringItem( ATTR_LAYER_DESC, aStr );
+ return SfxStringItem(ATTR_LAYER_DESC, aStr);
}
-inline SfxBoolItem makeSdAttrLayerVisible( bool bValue = true )
+inline SfxBoolItem makeSdAttrLayerVisible(bool bValue = true)
{
- return SfxBoolItem( ATTR_LAYER_VISIBLE, bValue );
+ return SfxBoolItem(ATTR_LAYER_VISIBLE, bValue);
}
-inline SfxBoolItem makeSdAttrLayerPrintable( bool bValue = true )
+inline SfxBoolItem makeSdAttrLayerPrintable(bool bValue = true)
{
- return SfxBoolItem( ATTR_LAYER_PRINTABLE, bValue );
+ return SfxBoolItem(ATTR_LAYER_PRINTABLE, bValue);
}
-inline SfxBoolItem makeSdAttrLayerLocked( bool bValue = false )
+inline SfxBoolItem makeSdAttrLayerLocked(bool bValue = false)
{
- return SfxBoolItem( ATTR_LAYER_LOCKED, bValue );
+ return SfxBoolItem(ATTR_LAYER_LOCKED, bValue);
}
-inline SfxBoolItem makeSdAttrLayerThisPage()
-{
- return SfxBoolItem( ATTR_LAYER_THISPAGE, false );
-}
+inline SfxBoolItem makeSdAttrLayerThisPage() { return SfxBoolItem(ATTR_LAYER_THISPAGE, false); }
#endif // INCLUDED_SD_INC_SDATTR_HXX
diff --git a/sd/inc/sddllapi.h b/sd/inc/sddllapi.h
index e12e28613abe..bcf377dbff25 100644
--- a/sd/inc/sddllapi.h
+++ b/sd/inc/sddllapi.h
@@ -23,9 +23,9 @@
#include <sal/types.h>
#if defined(SD_DLLIMPLEMENTATION)
-#define SD_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#define SD_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
#else
-#define SD_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#define SD_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
#endif // INCLUDED_SD_INC_SDDLLAPI_H
diff --git a/sd/inc/sdenumdef.hxx b/sd/inc/sdenumdef.hxx
index d042c7671f12..d307f3d7128e 100644
--- a/sd/inc/sdenumdef.hxx
+++ b/sd/inc/sdenumdef.hxx
@@ -22,7 +22,12 @@
#define RET_SNAP_DELETE 111
-enum class SnapKind { Horizontal, Vertical, Point };
+enum class SnapKind
+{
+ Horizontal,
+ Vertical,
+ Point
+};
#endif
diff --git a/sd/inc/sdgrffilter.hxx b/sd/inc/sdgrffilter.hxx
index 2ec180a52bf3..90366e2df7da 100644
--- a/sd/inc/sdgrffilter.hxx
+++ b/sd/inc/sdgrffilter.hxx
@@ -27,14 +27,14 @@ class ErrCode;
class SdGRFFilter final : public SdFilter
{
public:
- SdGRFFilter ( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell );
+ SdGRFFilter(SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell);
virtual ~SdGRFFilter() override;
- bool Import();
- bool Export() override;
+ bool Import();
+ bool Export() override;
- static void HandleGraphicFilterError( ErrCode nFilterError, ErrCode nStreamError );
+ static void HandleGraphicFilterError(ErrCode nFilterError, ErrCode nStreamError);
};
#endif // INCLUDED_SD_INC_SDGRFFILTER_HXX
diff --git a/sd/inc/sdhtmlfilter.hxx b/sd/inc/sdhtmlfilter.hxx
index c55d24150b71..788a87ed569a 100644
--- a/sd/inc/sdhtmlfilter.hxx
+++ b/sd/inc/sdhtmlfilter.hxx
@@ -26,12 +26,10 @@
class SdHTMLFilter final : public SdFilter
{
public:
- SdHTMLFilter (
- SfxMedium& rMedium,
- ::sd::DrawDocShell& rDocShell);
+ SdHTMLFilter(SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell);
virtual ~SdHTMLFilter() override;
- virtual bool Export() override;
+ virtual bool Export() override;
};
#endif // INCLUDED_SD_INC_SDHTMLFILTER_HXX
diff --git a/sd/inc/undo/undoobjects.hxx b/sd/inc/undo/undoobjects.hxx
index be3c5584c95d..5670002345f2 100644
--- a/sd/inc/undo/undoobjects.hxx
+++ b/sd/inc/undo/undoobjects.hxx
@@ -30,20 +30,19 @@ class SdPage;
namespace sd
{
-
class UndoRemovePresObjectImpl
{
protected:
- UndoRemovePresObjectImpl( SdrObject& rObject );
+ UndoRemovePresObjectImpl(SdrObject& rObject);
virtual ~UndoRemovePresObjectImpl();
virtual void Undo();
virtual void Redo();
private:
- std::unique_ptr<SfxUndoAction> mpUndoUsercall;
- std::unique_ptr<SfxUndoAction> mpUndoAnimation;
- std::unique_ptr<SfxUndoAction> mpUndoPresObj;
+ std::unique_ptr<SfxUndoAction> mpUndoUsercall;
+ std::unique_ptr<SfxUndoAction> mpUndoAnimation;
+ std::unique_ptr<SfxUndoAction> mpUndoPresObj;
};
class UndoRemoveObject final : public SdrUndoRemoveObj, public UndoRemovePresObjectImpl
@@ -61,7 +60,7 @@ private:
class UndoDeleteObject final : public SdrUndoDelObj, public UndoRemovePresObjectImpl
{
public:
- UndoDeleteObject( SdrObject& rObject, bool bOrdNumDirect );
+ UndoDeleteObject(SdrObject& rObject, bool bOrdNumDirect);
virtual void Undo() override;
virtual void Redo() override;
@@ -73,7 +72,7 @@ private:
class UndoReplaceObject final : public SdrUndoReplaceObj, public UndoRemovePresObjectImpl
{
public:
- UndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject );
+ UndoReplaceObject(SdrObject& rOldObject, SdrObject& rNewObject);
virtual void Undo() override;
virtual void Redo() override;
@@ -85,7 +84,7 @@ private:
class UndoObjectSetText final : public SdrUndoObjSetText
{
public:
- UndoObjectSetText( SdrObject& rNewObj, sal_Int32 nText );
+ UndoObjectSetText(SdrObject& rNewObj, sal_Int32 nText);
virtual ~UndoObjectSetText() override;
virtual void Undo() override;
@@ -93,7 +92,7 @@ public:
private:
std::unique_ptr<SfxUndoAction> mpUndoAnimation;
- bool mbNewEmptyPresObj;
+ bool mbNewEmptyPresObj;
::tools::WeakReference<SdrObject> mxSdrObject;
};
@@ -136,7 +135,7 @@ private:
class UndoAutoLayoutPosAndSize final : public SfxUndoAction
{
public:
- UndoAutoLayoutPosAndSize( SdPage& rPage );
+ UndoAutoLayoutPosAndSize(SdPage& rPage);
virtual void Undo() override;
virtual void Redo() override;
@@ -148,7 +147,7 @@ private:
class UndoGeoObject final : public SdrUndoGeoObj
{
public:
- UndoGeoObject( SdrObject& rNewObj );
+ UndoGeoObject(SdrObject& rNewObj);
virtual void Undo() override;
virtual void Redo() override;
@@ -161,7 +160,7 @@ private:
class UndoAttrObject final : public SdrUndoAttrObj
{
public:
- UndoAttrObject( SdrObject& rObject, bool bStyleSheet1, bool bSaveText );
+ UndoAttrObject(SdrObject& rObject, bool bStyleSheet1, bool bSaveText);
virtual void Undo() override;
virtual void Redo() override;
diff --git a/sd/inc/undoanim.hxx b/sd/inc/undoanim.hxx
index 68169b686a5c..44b0fa67fcac 100644
--- a/sd/inc/undoanim.hxx
+++ b/sd/inc/undoanim.hxx
@@ -30,13 +30,12 @@ class SdPage;
namespace sd
{
-
struct UndoAnimationImpl;
class UndoAnimation final : public SdrUndoAction
{
public:
- UndoAnimation( SdDrawDocument* pDoc, SdPage* pThePage );
+ UndoAnimation(SdDrawDocument* pDoc, SdPage* pThePage);
virtual ~UndoAnimation() override;
virtual void Undo() override;
@@ -45,14 +44,15 @@ public:
virtual OUString GetComment() const override;
private:
- std::unique_ptr<UndoAnimationImpl> mpImpl;
+ std::unique_ptr<UndoAnimationImpl> mpImpl;
};
struct UndoAnimationPathImpl;
class UndoAnimationPath final : public SdrUndoAction
{
public:
- UndoAnimationPath( SdDrawDocument* pDoc, SdPage* pThePage, const css::uno::Reference< css::animations::XAnimationNode >& xNode );
+ UndoAnimationPath(SdDrawDocument* pDoc, SdPage* pThePage,
+ const css::uno::Reference<css::animations::XAnimationNode>& xNode);
virtual ~UndoAnimationPath() override;
virtual void Undo() override;
@@ -69,7 +69,7 @@ struct UndoTransitionImpl;
class UndoTransition final : public SdUndoAction
{
public:
- UndoTransition( SdDrawDocument* pDoc, SdPage* pThePage );
+ UndoTransition(SdDrawDocument* pDoc, SdPage* pThePage);
virtual ~UndoTransition() override;
virtual void Undo() override;
@@ -80,7 +80,6 @@ public:
private:
std::unique_ptr<UndoTransitionImpl> mpImpl;
};
-
}
#endif // INCLUDED_SD_INC_UNDOANIM_HXX
diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx
index 6cb1e91f7307..2a3dcda08983 100644
--- a/sd/qa/unit/import-tests-smartart.cxx
+++ b/sd/qa/unit/import-tests-smartart.cxx
@@ -27,7 +27,8 @@ using namespace ::com::sun::star;
namespace
{
/// Gets one child of xShape, which one is specified by nIndex.
-uno::Reference<drawing::XShape> getChildShape(const uno::Reference<drawing::XShape>& xShape, sal_Int32 nIndex)
+uno::Reference<drawing::XShape> getChildShape(const uno::Reference<drawing::XShape>& xShape,
+ sal_Int32 nIndex)
{
uno::Reference<container::XIndexAccess> xGroup(xShape, uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -171,8 +172,10 @@ public:
void SdImportTestSmartArt::testBase()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart1.pptx"), PPTX);
- uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart1.pptx"), PPTX);
+ uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
+ uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xShapeGroup->getCount());
uno::Reference<text::XText> xText0(xShapeGroup->getByIndex(1), uno::UNO_QUERY_THROW);
@@ -196,28 +199,32 @@ void SdImportTestSmartArt::testBase()
uno::Reference<text::XTextRange> xParagraph(getParagraphFromShape(0, xShape));
uno::Reference<beans::XPropertySet> xPropSet(xParagraph, uno::UNO_QUERY_THROW);
xPropSet->getPropertyValue("ParaAdjust") >>= nParaAdjust;
- CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER, static_cast<style::ParagraphAdjust>(nParaAdjust));
+ CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER,
+ static_cast<style::ParagraphAdjust>(nParaAdjust));
uno::Reference<drawing::XShape> xShape0(xShapeGroup->getByIndex(1), uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape1(xShapeGroup->getByIndex(2), uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape2(xShapeGroup->getByIndex(3), uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape3(xShapeGroup->getByIndex(4), uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape4(xShapeGroup->getByIndex(5), uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT_EQUAL(xShape0->getPosition().Y,xShape1->getPosition().Y);
- CPPUNIT_ASSERT_EQUAL(xShape2->getPosition().Y,xShape3->getPosition().Y);
+ CPPUNIT_ASSERT_EQUAL(xShape0->getPosition().Y, xShape1->getPosition().Y);
+ CPPUNIT_ASSERT_EQUAL(xShape2->getPosition().Y, xShape3->getPosition().Y);
CPPUNIT_ASSERT(xShape2->getPosition().Y > xShape0->getPosition().Y);
CPPUNIT_ASSERT(xShape4->getPosition().Y > xShape2->getPosition().Y);
CPPUNIT_ASSERT(xShape0->getPosition().X < xShape1->getPosition().X);
CPPUNIT_ASSERT(xShape2->getPosition().X < xShape3->getPosition().X);
- CPPUNIT_ASSERT((xShape2->getPosition().X < xShape4->getPosition().X) && (xShape3->getPosition().X > xShape4->getPosition().X));
+ CPPUNIT_ASSERT((xShape2->getPosition().X < xShape4->getPosition().X)
+ && (xShape3->getPosition().X > xShape4->getPosition().X));
xDocShRef->DoClose();
}
void SdImportTestSmartArt::testChildren()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-children.pptx"), PPTX);
- uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-children.pptx"), PPTX);
+ uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
+ uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xShapeGroup->getCount());
uno::Reference<drawing::XShapes> xShapeGroup0(xShapeGroup->getByIndex(1), uno::UNO_QUERY_THROW);
@@ -253,8 +260,10 @@ void SdImportTestSmartArt::testChildren()
void SdImportTestSmartArt::testText()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-text.pptx"), PPTX);
- uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-text.pptx"), PPTX);
+ uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
+ uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShapes> xShapeGroup2(xShapeGroup->getByIndex(1), uno::UNO_QUERY_THROW);
uno::Reference<text::XText> xText0(xShapeGroup2->getByIndex(0), uno::UNO_QUERY_THROW);
@@ -268,11 +277,13 @@ void SdImportTestSmartArt::testText()
void SdImportTestSmartArt::testCnt()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-cnt.pptx"), PPTX);
- uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-cnt.pptx"), PPTX);
+ uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
+ uno::UNO_QUERY_THROW);
sal_Int32 nCount = xShapeGroup->getCount();
sal_Int32 nCorrect = 0;
- for (sal_Int32 i=0; i<nCount; i++)
+ for (sal_Int32 i = 0; i < nCount; i++)
{
uno::Reference<text::XText> xText(xShapeGroup->getByIndex(i), uno::UNO_QUERY);
if (xText.is() && !xText->getString().isEmpty())
@@ -285,8 +296,10 @@ void SdImportTestSmartArt::testCnt()
void SdImportTestSmartArt::testDir()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-dir.pptx"), PPTX);
- uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-dir.pptx"), PPTX);
+ uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
+ uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xShapeGroup->getCount());
uno::Reference<drawing::XShape> xShape0(xShapeGroup->getByIndex(1), uno::UNO_QUERY_THROW);
@@ -298,8 +311,10 @@ void SdImportTestSmartArt::testDir()
void SdImportTestSmartArt::testMaxDepth()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-maxdepth.pptx"), PPTX);
- uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-maxdepth.pptx"), PPTX);
+ uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
+ uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xShapeGroup->getCount());
uno::Reference<text::XText> xText0(xShapeGroup->getByIndex(1), uno::UNO_QUERY_THROW);
@@ -309,24 +324,29 @@ void SdImportTestSmartArt::testMaxDepth()
uno::Reference<drawing::XShape> xShape0(xShapeGroup->getByIndex(1), uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape1(xShapeGroup->getByIndex(2), uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT_EQUAL(xShape0->getPosition().Y , xShape1->getPosition().Y); // Confirms shapes are in same Y axis-level.
+ CPPUNIT_ASSERT_EQUAL(xShape0->getPosition().Y,
+ xShape1->getPosition().Y); // Confirms shapes are in same Y axis-level.
xDocShRef->DoClose();
}
void SdImportTestSmartArt::testRotation()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-rotation.pptx"), PPTX);
- uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-rotation.pptx"), PPTX);
+ uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
+ uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xShape0(xShapeGroup->getByIndex(1), uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xShape0->getPropertyValue("RotateAngle").get<sal_Int32>());
uno::Reference<beans::XPropertySet> xShape1(xShapeGroup->getByIndex(2), uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(24000), xShape1->getPropertyValue("RotateAngle").get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(24000),
+ xShape1->getPropertyValue("RotateAngle").get<sal_Int32>());
uno::Reference<beans::XPropertySet> xShape2(xShapeGroup->getByIndex(3), uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(12000), xShape2->getPropertyValue("RotateAngle").get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(12000),
+ xShape2->getPropertyValue("RotateAngle").get<sal_Int32>());
xDocShRef->DoClose();
}
@@ -365,58 +385,58 @@ void SdImportTestSmartArt::testTextAutoRotation()
};
// Slide 1: absent autoTxRot => defaults to "upr"
- testText(0, 0, "a", 0, 0);
- testText(0, 1, "b", 33750, 0);
- testText(0, 2, "c", 31500, 0);
- testText(0, 3, "d", 29250, 90);
- testText(0, 4, "e", 27000, 90);
- testText(0, 5, "f", 24750, 90);
- testText(0, 6, "g", 22500, 180);
- testText(0, 7, "h", 20250, 180);
- testText(0, 8, "i", 18000, 180);
- testText(0, 9, "j", 15750, 180);
+ testText(0, 0, "a", 0, 0);
+ testText(0, 1, "b", 33750, 0);
+ testText(0, 2, "c", 31500, 0);
+ testText(0, 3, "d", 29250, 90);
+ testText(0, 4, "e", 27000, 90);
+ testText(0, 5, "f", 24750, 90);
+ testText(0, 6, "g", 22500, 180);
+ testText(0, 7, "h", 20250, 180);
+ testText(0, 8, "i", 18000, 180);
+ testText(0, 9, "j", 15750, 180);
testText(0, 10, "k", 13500, 180);
testText(0, 11, "l", 11250, 270);
- testText(0, 12, "m", 9000, 270);
- testText(0, 13, "n", 6750, 270);
- testText(0, 14, "o", 4500, 0);
- testText(0, 15, "p", 2250, 0);
+ testText(0, 12, "m", 9000, 270);
+ testText(0, 13, "n", 6750, 270);
+ testText(0, 14, "o", 4500, 0);
+ testText(0, 15, "p", 2250, 0);
// Slide 2: autoTxRot == "none"
- testText(1, 0, "a", 0, 0);
- testText(1, 1, "b", 33750, 0);
- testText(1, 2, "c", 31500, 0);
- testText(1, 3, "d", 29250, 0);
- testText(1, 4, "e", 27000, 0);
- testText(1, 5, "f", 24750, 0);
- testText(1, 6, "g", 22500, 0);
- testText(1, 7, "h", 20250, 0);
- testText(1, 8, "i", 18000, 0);
- testText(1, 9, "j", 15750, 0);
+ testText(1, 0, "a", 0, 0);
+ testText(1, 1, "b", 33750, 0);
+ testText(1, 2, "c", 31500, 0);
+ testText(1, 3, "d", 29250, 0);
+ testText(1, 4, "e", 27000, 0);
+ testText(1, 5, "f", 24750, 0);
+ testText(1, 6, "g", 22500, 0);
+ testText(1, 7, "h", 20250, 0);
+ testText(1, 8, "i", 18000, 0);
+ testText(1, 9, "j", 15750, 0);
testText(1, 10, "k", 13500, 0);
testText(1, 11, "l", 11250, 0);
- testText(1, 12, "m", 9000, 0);
- testText(1, 13, "n", 6750, 0);
- testText(1, 14, "o", 4500, 0);
- testText(1, 15, "p", 2250, 0);
+ testText(1, 12, "m", 9000, 0);
+ testText(1, 13, "n", 6750, 0);
+ testText(1, 14, "o", 4500, 0);
+ testText(1, 15, "p", 2250, 0);
// Slide 3: autoTxRot == "grav"
- testText(2, 0, "a", 0, 0);
- testText(2, 1, "b", 33750, 0);
- testText(2, 2, "c", 31500, 0);
- testText(2, 3, "d", 29250, 0);
- testText(2, 4, "e", 27000, 0);
- testText(2, 5, "f", 24750, 180);
- testText(2, 6, "g", 22500, 180);
- testText(2, 7, "h", 20250, 180);
- testText(2, 8, "i", 18000, 180);
- testText(2, 9, "j", 15750, 180);
+ testText(2, 0, "a", 0, 0);
+ testText(2, 1, "b", 33750, 0);
+ testText(2, 2, "c", 31500, 0);
+ testText(2, 3, "d", 29250, 0);
+ testText(2, 4, "e", 27000, 0);
+ testText(2, 5, "f", 24750, 180);
+ testText(2, 6, "g", 22500, 180);
+ testText(2, 7, "h", 20250, 180);
+ testText(2, 8, "i", 18000, 180);
+ testText(2, 9, "j", 15750, 180);
testText(2, 10, "k", 13500, 180);
testText(2, 11, "l", 11250, 180);
- testText(2, 12, "m", 9000, 0);
- testText(2, 13, "n", 6750, 0);
- testText(2, 14, "o", 4500, 0);
- testText(2, 15, "p", 2250, 0);
+ testText(2, 12, "m", 9000, 0);
+ testText(2, 13, "n", 6750, 0);
+ testText(2, 14, "o", 4500, 0);
+ testText(2, 15, "p", 2250, 0);
xDocShRef->DoClose();
}
@@ -433,8 +453,10 @@ void SdImportTestSmartArt::testPyramid()
void SdImportTestSmartArt::testChevron()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-chevron.pptx"), PPTX);
- uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-chevron.pptx"), PPTX);
+ uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
+ uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xShapeGroup->getCount());
uno::Reference<text::XText> xText0(xShapeGroup->getByIndex(1), uno::UNO_QUERY_THROW);
@@ -448,7 +470,8 @@ void SdImportTestSmartArt::testChevron()
uno::Reference<drawing::XShape> xShape1(xShapeGroup->getByIndex(2), uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape2(xShapeGroup->getByIndex(3), uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT(xShape0->getPosition().X < xShape1->getPosition().X && xShape1->getPosition().X < xShape2->getPosition().X);
+ CPPUNIT_ASSERT(xShape0->getPosition().X < xShape1->getPosition().X
+ && xShape1->getPosition().X < xShape2->getPosition().X);
CPPUNIT_ASSERT_EQUAL(xShape0->getPosition().Y, xShape1->getPosition().Y);
CPPUNIT_ASSERT_EQUAL(xShape1->getPosition().Y, xShape2->getPosition().Y);
@@ -457,8 +480,8 @@ void SdImportTestSmartArt::testChevron()
void SdImportTestSmartArt::testCycle()
{
- sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-cycle.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-cycle.pptx"), PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -477,9 +500,11 @@ void SdImportTestSmartArt::testCycle()
// xShapeConn is connector between shapes 0 and 2
// it should lay between them and be rotated 0 -> 2
CPPUNIT_ASSERT(xShape0->getPosition().X < xShapeConn->getPosition().X);
- CPPUNIT_ASSERT(xShape0->getPosition().Y < xShapeConn->getPosition().Y && xShapeConn->getPosition().Y < xShape2->getPosition().Y);
+ CPPUNIT_ASSERT(xShape0->getPosition().Y < xShapeConn->getPosition().Y
+ && xShapeConn->getPosition().Y < xShape2->getPosition().Y);
uno::Reference<beans::XPropertySet> xPropSetConn(xShapeConn, uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(32400), xPropSetConn->getPropertyValue("RotateAngle").get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(32400),
+ xPropSetConn->getPropertyValue("RotateAngle").get<sal_Int32>());
// Make sure that we have an arrow shape between the two shapes
comphelper::SequenceAsHashMap aCustomShapeGeometry(
@@ -513,8 +538,8 @@ void SdImportTestSmartArt::testMultidirectional()
{
// similar document as cycle, but arrows are pointing in both directions
- sd::DrawDocShellRef xDocShRef
- = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-multidirectional.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(
+ m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-multidirectional.pptx"), PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -552,8 +577,11 @@ void SdImportTestSmartArt::testSegmentedCycle()
void SdImportTestSmartArt::testBaseRtoL()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-rightoleftblockdiagram.pptx"), PPTX);
- uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY_THROW);
+ sd::DrawDocShellRef xDocShRef = loadURL(
+ m_directories.getURLFromSrc("sd/qa/unit/data/pptx/smartart-rightoleftblockdiagram.pptx"),
+ PPTX);
+ uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef),
+ uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xShapeGroup->getCount());
uno::Reference<text::XText> xText0(xShapeGroup->getByIndex(1), uno::UNO_QUERY_THROW);
@@ -577,20 +605,22 @@ void SdImportTestSmartArt::testBaseRtoL()
uno::Reference<text::XTextRange> xParagraph(getParagraphFromShape(0, xShape));
uno::Reference<beans::XPropertySet> xPropSet(xParagraph, uno::UNO_QUERY_THROW);
xPropSet->getPropertyValue("ParaAdjust") >>= nParaAdjust;
- CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER, static_cast<style::ParagraphAdjust>(nParaAdjust));
+ CPPUNIT_ASSERT_EQUAL(style::ParagraphAdjust_CENTER,
+ static_cast<style::ParagraphAdjust>(nParaAdjust));
uno::Reference<drawing::XShape> xShape0(xShapeGroup->getByIndex(1), uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape1(xShapeGroup->getByIndex(2), uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape2(xShapeGroup->getByIndex(3), uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape3(xShapeGroup->getByIndex(4), uno::UNO_QUERY_THROW);
uno::Reference<drawing::XShape> xShape4(xShapeGroup->getByIndex(5), uno::UNO_QUERY_THROW);
- CPPUNIT_ASSERT_EQUAL(xShape0->getPosition().Y,xShape1->getPosition().Y);
- CPPUNIT_ASSERT_EQUAL(xShape2->getPosition().Y,xShape3->getPosition().Y);
+ CPPUNIT_ASSERT_EQUAL(xShape0->getPosition().Y, xShape1->getPosition().Y);
+ CPPUNIT_ASSERT_EQUAL(xShape2->getPosition().Y, xShape3->getPosition().Y);
CPPUNIT_ASSERT(xShape2->getPosition().Y > xShape0->getPosition().Y);
CPPUNIT_ASSERT(xShape4->getPosition().Y > xShape2->getPosition().Y);
CPPUNIT_ASSERT(xShape0->getPosition().X > xShape1->getPosition().X);
CPPUNIT_ASSERT(xShape2->getPosition().X > xShape3->getPosition().X);
- CPPUNIT_ASSERT((xShape2->getPosition().X > xShape4->getPosition().X) && (xShape3->getPosition().X < xShape4->getPosition().X));
+ CPPUNIT_ASSERT((xShape2->getPosition().X > xShape4->getPosition().X)
+ && (xShape3->getPosition().X < xShape4->getPosition().X));
xDocShRef->DoClose();
}
@@ -650,8 +680,8 @@ void SdImportTestSmartArt::testVerticalBracketList()
void SdImportTestSmartArt::testTableList()
{
- sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/table-list.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/table-list.pptx"), PPTX);
uno::Reference<drawing::XShapes> xShapeGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xShapeGroup.is());
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4), xShapeGroup->getCount());
@@ -804,8 +834,7 @@ void SdImportTestSmartArt::testOrgChart()
{
// Simple org chart with 1 manager and 1 employee only.
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-org-chart.pptx"),
- PPTX);
+ m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-org-chart.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -892,8 +921,8 @@ void SdImportTestSmartArt::testOrgChart()
CPPUNIT_ASSERT_GREATER(aAssistantPos.Y, aEmployeePos.Y);
// Make sure the connector of the assistant is above the shape.
- uno::Reference<drawing::XShape> xAssistantConnector =
- getChildShape(getChildShape(getChildShape(xGroup, 1), 1), 0);
+ uno::Reference<drawing::XShape> xAssistantConnector
+ = getChildShape(getChildShape(getChildShape(xGroup, 1), 1), 0);
CPPUNIT_ASSERT(xAssistantConnector.is());
//awt::Point aAssistantConnectorPos = xAssistantConnector->getPosition();
// This failed, the vertical positions of the connector and the shape of
@@ -1158,8 +1187,10 @@ void SdImportTestSmartArt::testBackgroundDrawingmlFallback()
{
// same as testBackground, but test file contains drawingML fallback
- sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-background-drawingml-fallback.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc(
+ "/sd/qa/unit/data/pptx/smartart-background-drawingml-fallback.pptx"),
+ PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -1252,7 +1283,8 @@ void SdImportTestSmartArt::testFontSize()
void SdImportTestSmartArt::testVerticalBlockList()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-vertical-block-list.pptx"), PPTX);
+ m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-vertical-block-list.pptx"),
+ PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -1266,7 +1298,8 @@ void SdImportTestSmartArt::testVerticalBlockList()
CPPUNIT_ASSERT_EQUAL(OUString("b\nc"), xTextBC->getString());
uno::Reference<beans::XPropertySet> xPropSetBC(xShapeBC, uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(27000), xPropSetBC->getPropertyValue("RotateAngle").get<sal_Int32>());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(27000),
+ xPropSetBC->getPropertyValue("RotateAngle").get<sal_Int32>());
// BC shape is rotated 90*, so width and height is swapped
CPPUNIT_ASSERT_GREATER(xShapeA->getSize().Width, xShapeBC->getSize().Height);
@@ -1283,7 +1316,8 @@ void SdImportTestSmartArt::testVerticalBlockList()
CPPUNIT_ASSERT_EQUAL(xShapeA->getSize().Width, xShapeEmpty->getSize().Width);
CPPUNIT_ASSERT_EQUAL(xShapeA->getSize().Height, xShapeEmpty->getSize().Height);
CPPUNIT_ASSERT_EQUAL(xShapeA->getPosition().X, xShapeEmpty->getPosition().X);
- CPPUNIT_ASSERT_GREATER(xShapeA->getPosition().Y + 2*xShapeA->getSize().Height, xShapeEmpty->getPosition().Y);
+ CPPUNIT_ASSERT_GREATER(xShapeA->getPosition().Y + 2 * xShapeA->getSize().Height,
+ xShapeEmpty->getPosition().Y);
uno::Reference<drawing::XShape> xGroupShape(xGroup, uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(xGroupShape->getPosition().Y + xGroupShape->getSize().Height,
@@ -1295,8 +1329,7 @@ void SdImportTestSmartArt::testVerticalBlockList()
void SdImportTestSmartArt::testMissingBulletAndIndent()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-missing-bullet.pptx"),
- PPTX);
+ m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-missing-bullet.pptx"), PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
uno::Reference<drawing::XShapes> xGroup1(xGroup->getByIndex(2), uno::UNO_QUERY);
uno::Reference<drawing::XShapes> xGroup2(xGroup1->getByIndex(0), uno::UNO_QUERY);
@@ -1305,23 +1338,23 @@ void SdImportTestSmartArt::testMissingBulletAndIndent()
uno::Reference<container::XEnumerationAccess> xParasAccess(xText, uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xParas = xParasAccess->createEnumeration();
- xParas->nextElement();// skip parent
+ xParas->nextElement(); // skip parent
uno::Reference<beans::XPropertySet> xPara1(xParas->nextElement(), uno::UNO_QUERY);
CPPUNIT_ASSERT(xPara1.is());
sal_Int16 nNumberingLevel = -1;
- xPara1->getPropertyValue("NumberingLevel")>>= nNumberingLevel;
+ xPara1->getPropertyValue("NumberingLevel") >>= nNumberingLevel;
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), nNumberingLevel);
- uno::Reference< container::XIndexAccess > xNumRule;
+ uno::Reference<container::XIndexAccess> xNumRule;
xPara1->getPropertyValue("NumberingRules") >>= xNumRule;
uno::Sequence<beans::PropertyValue> aBulletProps;
xNumRule->getByIndex(1) >>= aBulletProps;
- for (beans::PropertyValue const & rProp : std::as_const(aBulletProps))
+ for (beans::PropertyValue const& rProp : std::as_const(aBulletProps))
{
- if(rProp.Name == "LeftMargin")
+ if (rProp.Name == "LeftMargin")
CPPUNIT_ASSERT_EQUAL(sal_Int32(309), rProp.Value.get<sal_Int32>());
}
}
@@ -1329,8 +1362,7 @@ void SdImportTestSmartArt::testMissingBulletAndIndent()
void SdImportTestSmartArt::testBulletList()
{
sd::DrawDocShellRef xDocShRef = loadURL(
- m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-bullet-list.pptx"),
- PPTX);
+ m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-bullet-list.pptx"), PPTX);
uno::Reference<drawing::XShapes> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
CPPUNIT_ASSERT(xGroup.is());
@@ -1341,12 +1373,14 @@ void SdImportTestSmartArt::testBulletList()
// child levels should have bullets
uno::Reference<beans::XPropertySet> xPara1(xParas->nextElement(), uno::UNO_QUERY);
- uno::Reference<container::XIndexAccess> xRules1(xPara1->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xRules1(xPara1->getPropertyValue("NumberingRules"),
+ uno::UNO_QUERY);
comphelper::SequenceAsHashMap aRule1(xRules1->getByIndex(1));
CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8(u8"•"), aRule1["BulletChar"].get<OUString>());
uno::Reference<beans::XPropertySet> xPara2(xParas->nextElement(), uno::UNO_QUERY);
- uno::Reference<container::XIndexAccess> xRules2(xPara2->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xRules2(xPara2->getPropertyValue("NumberingRules"),
+ uno::UNO_QUERY);
comphelper::SequenceAsHashMap aRule2(xRules2->getByIndex(2));
CPPUNIT_ASSERT_EQUAL(OUString::fromUtf8(u8"•"), aRule2["BulletChar"].get<OUString>());
@@ -1376,9 +1410,11 @@ void SdImportTestSmartArt::testRecursion()
CPPUNIT_ASSERT_EQUAL(OUString("B1"), xTextB1->getString());
uno::Reference<drawing::XShape> xGroupC12(xGroupB1->getByIndex(1), uno::UNO_QUERY);
- uno::Reference<text::XText> xTextC1(getChildShape(getChildShape(getChildShape(xGroupC12, 0), 0), 0), uno::UNO_QUERY);
+ uno::Reference<text::XText> xTextC1(
+ getChildShape(getChildShape(getChildShape(xGroupC12, 0), 0), 0), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("C1"), xTextC1->getString());
- uno::Reference<text::XText> xTextC2(getChildShape(getChildShape(getChildShape(xGroupC12, 1), 0), 0), uno::UNO_QUERY);
+ uno::Reference<text::XText> xTextC2(
+ getChildShape(getChildShape(getChildShape(xGroupC12, 1), 0), 0), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("C2"), xTextC2->getString());
uno::Reference<drawing::XShapes> xGroupB2(xGroupB->getByIndex(5), uno::UNO_QUERY);
@@ -1388,7 +1424,8 @@ void SdImportTestSmartArt::testRecursion()
CPPUNIT_ASSERT_EQUAL(OUString("B2"), xTextB2->getString());
uno::Reference<drawing::XShape> xGroupC3(xGroupB2->getByIndex(1), uno::UNO_QUERY);
- uno::Reference<text::XText> xTextC3(getChildShape(getChildShape(getChildShape(xGroupC3, 0), 0), 0), uno::UNO_QUERY);
+ uno::Reference<text::XText> xTextC3(
+ getChildShape(getChildShape(getChildShape(xGroupC3, 0), 0), 0), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("C3"), xTextC3->getString());
xDocShRef->DoClose();
@@ -1407,34 +1444,41 @@ void SdImportTestSmartArt::testDataFollow()
uno::Reference<drawing::XShapes> xGroupLeft(xGroup->getByIndex(1), uno::UNO_QUERY);
uno::Reference<drawing::XShape> xGroupB(xGroupLeft->getByIndex(1), uno::UNO_QUERY);
- uno::Reference<drawing::XShape> xShapeB1 = getChildShape(getChildShape(getChildShape(xGroupB, 1), 0), 0);
+ uno::Reference<drawing::XShape> xShapeB1
+ = getChildShape(getChildShape(getChildShape(xGroupB, 1), 0), 0);
uno::Reference<text::XText> xTextB1(xShapeB1, uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("B1"), xTextB1->getString());
- uno::Reference<drawing::XShape> xShapeB2 = getChildShape(getChildShape(getChildShape(xGroupB, 3), 0), 0);
+ uno::Reference<drawing::XShape> xShapeB2
+ = getChildShape(getChildShape(getChildShape(xGroupB, 3), 0), 0);
uno::Reference<text::XText> xTextB2(xShapeB2, uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("B2"), xTextB2->getString());
CPPUNIT_ASSERT_EQUAL(xShapeB1->getPosition().Y, xShapeB2->getPosition().Y);
- CPPUNIT_ASSERT_GREATEREQUAL(xShapeB1->getPosition().X + xShapeB1->getSize().Width, xShapeB2->getPosition().X);
+ CPPUNIT_ASSERT_GREATEREQUAL(xShapeB1->getPosition().X + xShapeB1->getSize().Width,
+ xShapeB2->getPosition().X);
uno::Reference<drawing::XShapes> xGroupRight(xGroup->getByIndex(2), uno::UNO_QUERY);
uno::Reference<drawing::XShape> xGroupC(xGroupRight->getByIndex(1), uno::UNO_QUERY);
- uno::Reference<drawing::XShape> xShapeC1 = getChildShape(getChildShape(getChildShape(xGroupC, 3), 0), 0);
+ uno::Reference<drawing::XShape> xShapeC1
+ = getChildShape(getChildShape(getChildShape(xGroupC, 3), 0), 0);
uno::Reference<text::XText> xTextC1(xShapeC1, uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("C1"), xTextC1->getString());
- uno::Reference<drawing::XShape> xShapeC2 = getChildShape(getChildShape(getChildShape(xGroupC, 5), 0), 0);
+ uno::Reference<drawing::XShape> xShapeC2
+ = getChildShape(getChildShape(getChildShape(xGroupC, 5), 0), 0);
uno::Reference<text::XText> xTextC2(xShapeC2, uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("C2"), xTextC2->getString());
CPPUNIT_ASSERT_EQUAL(xShapeC1->getPosition().X, xShapeC2->getPosition().X);
- CPPUNIT_ASSERT_GREATEREQUAL(xShapeC1->getPosition().Y + xShapeC1->getSize().Height, xShapeC2->getPosition().Y);
+ CPPUNIT_ASSERT_GREATEREQUAL(xShapeC1->getPosition().Y + xShapeC1->getSize().Height,
+ xShapeC2->getPosition().Y);
xDocShRef->DoClose();
}
void SdImportTestSmartArt::testOrgChart2()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-org-chart2.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(
+ m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-org-chart2.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShapeC1 = findChildShapeByText(xGroup, "C1");
@@ -1452,31 +1496,37 @@ void SdImportTestSmartArt::testOrgChart2()
CPPUNIT_ASSERT(xShapeD2.is());
CPPUNIT_ASSERT_EQUAL(xShapeC1->getPosition().Y, xShapeC2->getPosition().Y);
- CPPUNIT_ASSERT_GREATEREQUAL(xShapeC1->getPosition().X + xShapeC1->getSize().Width, xShapeC2->getPosition().X);
+ CPPUNIT_ASSERT_GREATEREQUAL(xShapeC1->getPosition().X + xShapeC1->getSize().Width,
+ xShapeC2->getPosition().X);
CPPUNIT_ASSERT_EQUAL(xShapeC3->getPosition().X, xShapeC4->getPosition().X);
- CPPUNIT_ASSERT_GREATEREQUAL(xShapeC3->getPosition().Y + xShapeC3->getSize().Height, xShapeC4->getPosition().Y);
+ CPPUNIT_ASSERT_GREATEREQUAL(xShapeC3->getPosition().Y + xShapeC3->getSize().Height,
+ xShapeC4->getPosition().Y);
CPPUNIT_ASSERT_EQUAL(xShapeD1->getPosition().X, xShapeD2->getPosition().X);
- CPPUNIT_ASSERT_GREATEREQUAL(xShapeD1->getPosition().Y + xShapeD1->getSize().Height, xShapeD2->getPosition().Y);
+ CPPUNIT_ASSERT_GREATEREQUAL(xShapeD1->getPosition().Y + xShapeD1->getSize().Height,
+ xShapeD2->getPosition().Y);
CPPUNIT_ASSERT_GREATEREQUAL(xShapeC2->getPosition().X, xShapeD1->getPosition().X);
- CPPUNIT_ASSERT_GREATEREQUAL(xShapeC2->getPosition().Y + xShapeC2->getSize().Height, xShapeD1->getPosition().Y);
+ CPPUNIT_ASSERT_GREATEREQUAL(xShapeC2->getPosition().Y + xShapeC2->getSize().Height,
+ xShapeD1->getPosition().Y);
- CPPUNIT_ASSERT_GREATEREQUAL(xShapeD1->getPosition().X + xShapeD1->getSize().Width, xShapeC4->getPosition().X);
+ CPPUNIT_ASSERT_GREATEREQUAL(xShapeD1->getPosition().X + xShapeD1->getSize().Width,
+ xShapeC4->getPosition().X);
xDocShRef->DoClose();
}
void SdImportTestSmartArt::testTdf131553()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf131553.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf131553.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
- const SdrPage *pPage = GetPage(1, xDocShRef);
- const SdrObjGroup *pObjGroup = dynamic_cast<SdrObjGroup *>(pPage->GetObj(0));
+ const SdrPage* pPage = GetPage(1, xDocShRef);
+ const SdrObjGroup* pObjGroup = dynamic_cast<SdrObjGroup*>(pPage->GetObj(0));
CPPUNIT_ASSERT(pObjGroup);
- const SdrObject *pObj = pObjGroup->GetSubList()->GetObj(1);
+ const SdrObject* pObj = pObjGroup->GetSubList()->GetObj(1);
CPPUNIT_ASSERT_MESSAGE("no object", pObj != nullptr);
CPPUNIT_ASSERT_EQUAL(OBJ_OLE2, pObj->GetObjIdentifier());
@@ -1520,7 +1570,8 @@ void SdImportTestSmartArt::testFillColorList()
void SdImportTestSmartArt::testTdf134221()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-tdf134221.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(
+ m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-tdf134221.pptx"), PPTX);
xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShapeB = findChildShapeByText(xGroup, "B");
@@ -1528,14 +1579,15 @@ void SdImportTestSmartArt::testTdf134221()
uno::Reference<beans::XPropertySet> xTxtProps(xShapeB, uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(736),
- xTxtProps->getPropertyValue("TextUpperDistance").get<sal_Int32>());
+ xTxtProps->getPropertyValue("TextUpperDistance").get<sal_Int32>());
xDocShRef->DoClose();
}
void SdImportTestSmartArt::testLinearRule()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-linear-rule.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(
+ m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-linear-rule.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
// Last child, then first child inside that.
@@ -1572,7 +1624,8 @@ void SdImportTestSmartArt::testLinearRule()
void SdImportTestSmartArt::testLinearRuleVert()
{
- sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-linear-rule-vert.pptx"), PPTX);
+ sd::DrawDocShellRef xDocShRef = loadURL(
+ m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/smartart-linear-rule-vert.pptx"), PPTX);
uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY);
// Get the P1 shape.
@@ -1621,7 +1674,7 @@ void SdImportTestSmartArt::testAutofitSync()
// i.e. the 3rd shape had font size as direct formatting, but its automatic text scale was not
// disabled.
uno::Reference<beans::XPropertySet> xThirdInner(getChildShape(getChildShape(xMiddle, 4), 0),
- uno::UNO_QUERY);
+ uno::UNO_QUERY);
drawing::TextFitToSizeType eType{};
CPPUNIT_ASSERT(xThirdInner->getPropertyValue("TextFitToSize") >>= eType);
CPPUNIT_ASSERT_EQUAL(drawing::TextFitToSizeType_NONE, eType);
diff --git a/sd/source/core/drawdoc_animations.cxx b/sd/source/core/drawdoc_animations.cxx
index f4d2d51fcab8..9fab403d50b5 100644
--- a/sd/source/core/drawdoc_animations.cxx
+++ b/sd/source/core/drawdoc_animations.cxx
@@ -30,9 +30,9 @@ using namespace ::com::sun::star::presentation;
/** replaces a slide from all custom shows with a new one or removes a slide from
all custom shows if pNewPage is 0.
*/
-void SdDrawDocument::ReplacePageInCustomShows( const SdPage* pOldPage, const SdPage* pNewPage )
+void SdDrawDocument::ReplacePageInCustomShows(const SdPage* pOldPage, const SdPage* pNewPage)
{
- if ( mpCustomShowList )
+ if (mpCustomShowList)
{
for (sal_uLong i = 0; i < mpCustomShowList->size(); i++)
{
@@ -42,11 +42,11 @@ void SdDrawDocument::ReplacePageInCustomShows( const SdPage* pOldPage, const SdP
}
}
-const Reference< XPresentation2 >& SdDrawDocument::getPresentation() const
+const Reference<XPresentation2>& SdDrawDocument::getPresentation() const
{
- if( !mxPresentation.is() )
+ if (!mxPresentation.is())
{
- const_cast< SdDrawDocument* >( this )->mxPresentation = CreatePresentation(*this);
+ const_cast<SdDrawDocument*>(this)->mxPresentation = CreatePresentation(*this);
}
return mxPresentation;
}
diff --git a/sd/source/filter/html/sdhtmlfilter.cxx b/sd/source/filter/html/sdhtmlfilter.cxx
index a722d1c53d53..6e9488c04278 100644
--- a/sd/source/filter/html/sdhtmlfilter.cxx
+++ b/sd/source/filter/html/sdhtmlfilter.cxx
@@ -24,28 +24,25 @@
#include "htmlex.hxx"
#include <sdhtmlfilter.hxx>
-
-SdHTMLFilter::SdHTMLFilter( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell ) :
- SdFilter( rMedium, rDocShell )
+SdHTMLFilter::SdHTMLFilter(SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell)
+ : SdFilter(rMedium, rDocShell)
{
}
-SdHTMLFilter::~SdHTMLFilter()
-{
-}
+SdHTMLFilter::~SdHTMLFilter() {}
bool SdHTMLFilter::Export()
{
mrMedium.Close();
mrMedium.Commit();
- SfxItemSet *pSet = mrMedium.GetItemSet();
+ SfxItemSet* pSet = mrMedium.GetItemSet();
- css::uno::Sequence< css::beans::PropertyValue > aParams;
+ css::uno::Sequence<css::beans::PropertyValue> aParams;
const SfxPoolItem* pItem;
- if ( pSet->GetItemState( SID_FILTER_DATA, false, &pItem ) == SfxItemState::SET )
+ if (pSet->GetItemState(SID_FILTER_DATA, false, &pItem) == SfxItemState::SET)
static_cast<const SfxUnoAnyItem*>(pItem)->GetValue() >>= aParams;
HtmlExport aExport(mrMedium.GetName(), aParams, &mrDocument, &mrDocShell);
diff --git a/sd/source/filter/ppt/pptatom.hxx b/sd/source/filter/ppt/pptatom.hxx
index a177c443da3c..6976e2c70cc8 100644
--- a/sd/source/filter/ppt/pptatom.hxx
+++ b/sd/source/filter/ppt/pptatom.hxx
@@ -24,29 +24,28 @@
namespace ppt
{
-
class Atom
{
public:
~Atom();
/** imports this atom and its child atoms */
- static Atom* import( const DffRecordHeader& rRootRecordHeader, SvStream& rStCtrl );
+ static Atom* import(const DffRecordHeader& rRootRecordHeader, SvStream& rStCtrl);
/** @return true if at least one atom with the given nRecType is found */
- inline bool hasChildAtom( sal_uInt16 nRecType ) const;
+ inline bool hasChildAtom(sal_uInt16 nRecType) const;
/** @return the first child atom with nRecType or NULL */
- inline const Atom* findFirstChildAtom( sal_uInt16 nRecType ) const;
+ inline const Atom* findFirstChildAtom(sal_uInt16 nRecType) const;
/** @return the next child atom after pLast with nRecType or NULL */
- const Atom* findNextChildAtom( sal_uInt16 nRecType, const Atom* pLast ) const;
+ const Atom* findNextChildAtom(sal_uInt16 nRecType, const Atom* pLast) const;
/** @return the first child atom or NULL */
inline const Atom* findFirstChildAtom() const;
/** @return the next child atom after pLast or NULL */
- static inline const Atom* findNextChildAtom( const Atom* pLast );
+ static inline const Atom* findNextChildAtom(const Atom* pLast);
/** @return true if this atom is a container */
inline bool isContainer() const;
@@ -64,7 +63,7 @@ public:
inline sal_uInt32 getLength() const;
private:
- Atom( const DffRecordHeader& rRecordHeader, SvStream& rStCtrl );
+ Atom(const DffRecordHeader& rRecordHeader, SvStream& rStCtrl);
SvStream& mrStream;
DffRecordHeader maRecordHeader;
@@ -72,51 +71,36 @@ private:
Atom* mpNextAtom;
};
-inline bool Atom::hasChildAtom( sal_uInt16 nRecType ) const
+inline bool Atom::hasChildAtom(sal_uInt16 nRecType) const
{
- return findFirstChildAtom( nRecType ) != nullptr;
+ return findFirstChildAtom(nRecType) != nullptr;
}
-inline const Atom* Atom::findFirstChildAtom( sal_uInt16 nRecType ) const
+inline const Atom* Atom::findFirstChildAtom(sal_uInt16 nRecType) const
{
- return findNextChildAtom( nRecType, nullptr );
+ return findNextChildAtom(nRecType, nullptr);
}
-inline const Atom* Atom::findFirstChildAtom() const
-{
- return mpFirstChild;
-}
+inline const Atom* Atom::findFirstChildAtom() const { return mpFirstChild; }
-inline const Atom* Atom::findNextChildAtom( const Atom* pLast )
+inline const Atom* Atom::findNextChildAtom(const Atom* pLast)
{
return pLast ? pLast->mpNextAtom : pLast;
}
-inline bool Atom::isContainer() const
-{
- return maRecordHeader.IsContainer();
-}
+inline bool Atom::isContainer() const { return maRecordHeader.IsContainer(); }
inline bool Atom::seekToContent() const
{
- maRecordHeader.SeekToContent( mrStream );
+ maRecordHeader.SeekToContent(mrStream);
return mrStream.GetError() == ERRCODE_NONE;
}
-inline sal_uInt16 Atom::getType() const
-{
- return maRecordHeader.nRecType;
-}
+inline sal_uInt16 Atom::getType() const { return maRecordHeader.nRecType; }
-inline sal_uInt16 Atom::getInstance() const
-{
- return maRecordHeader.nRecInstance;
-}
+inline sal_uInt16 Atom::getInstance() const { return maRecordHeader.nRecInstance; }
-inline sal_uInt32 Atom::getLength() const
-{
- return maRecordHeader.nRecLen;
-}
+inline sal_uInt32 Atom::getLength() const { return maRecordHeader.nRecLen; }
} // namespace ppt
diff --git a/sd/source/helper/simplereferencecomponent.cxx b/sd/source/helper/simplereferencecomponent.cxx
index f405bc8ae485..740c2629bbd4 100644
--- a/sd/source/helper/simplereferencecomponent.cxx
+++ b/sd/source/helper/simplereferencecomponent.cxx
@@ -27,8 +27,8 @@ using com::sun::star::uno::RuntimeException;
using sd::SimpleReferenceComponent;
SimpleReferenceComponent::SimpleReferenceComponent()
-: m_nCount(0)
-, mbDisposed(false)
+ : m_nCount(0)
+ , mbDisposed(false)
{
}
@@ -38,39 +38,35 @@ SimpleReferenceComponent::~SimpleReferenceComponent()
OSL_ASSERT(mbDisposed);
}
-void SimpleReferenceComponent::acquire()
-{
- osl_atomic_increment(&m_nCount);
-}
+void SimpleReferenceComponent::acquire() { osl_atomic_increment(&m_nCount); }
void SimpleReferenceComponent::release()
{
- if((1 == m_nCount) && !mbDisposed)
+ if ((1 == m_nCount) && !mbDisposed)
{
try
{
Dispose();
}
- catch (RuntimeException const &) // don't break throw ()
+ catch (RuntimeException const&) // don't break throw ()
{
- TOOLS_WARN_EXCEPTION( "sd", "" );
+ TOOLS_WARN_EXCEPTION("sd", "");
}
}
- if(osl_atomic_decrement(&m_nCount) == 0) delete this;
+ if (osl_atomic_decrement(&m_nCount) == 0)
+ delete this;
}
void SimpleReferenceComponent::Dispose()
{
- if( !mbDisposed )
+ if (!mbDisposed)
{
mbDisposed = true;
disposing();
}
}
-void SimpleReferenceComponent::disposing()
-{
-}
+void SimpleReferenceComponent::disposing() {}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx b/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx
index 909f13a156b0..a5bb8ef68581 100644
--- a/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx
+++ b/sd/source/ui/accessibility/AccessiblePresentationGraphicShape.cxx
@@ -29,36 +29,31 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
-namespace accessibility {
-
+namespace accessibility
+{
//===== internal ============================================================
-AccessiblePresentationGraphicShape::AccessiblePresentationGraphicShape (
- const AccessibleShapeInfo& rShapeInfo,
- const AccessibleShapeTreeInfo& rShapeTreeInfo)
- : AccessibleGraphicShape (rShapeInfo, rShapeTreeInfo)
+AccessiblePresentationGraphicShape::AccessiblePresentationGraphicShape(
+ const AccessibleShapeInfo& rShapeInfo, const AccessibleShapeTreeInfo& rShapeTreeInfo)
+ : AccessibleGraphicShape(rShapeInfo, rShapeTreeInfo)
{
}
-AccessiblePresentationGraphicShape::~AccessiblePresentationGraphicShape()
-{
-}
+AccessiblePresentationGraphicShape::~AccessiblePresentationGraphicShape() {}
// XServiceInfo
-OUString SAL_CALL
- AccessiblePresentationGraphicShape::getImplementationName()
+OUString SAL_CALL AccessiblePresentationGraphicShape::getImplementationName()
{
return "AccessiblePresentationGraphicShape";
}
/// Set this object's name if is different to the current name.
-OUString
- AccessiblePresentationGraphicShape::CreateAccessibleBaseName()
+OUString AccessiblePresentationGraphicShape::CreateAccessibleBaseName()
{
OUString sName;
- ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
+ ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId(mxShape);
switch (nShapeType)
{
case PRESENTATION_GRAPHIC_OBJECT:
@@ -73,9 +68,9 @@ OUString
return sName;
}
-sal_Int16 SAL_CALL AccessiblePresentationGraphicShape::getAccessibleRole ()
+sal_Int16 SAL_CALL AccessiblePresentationGraphicShape::getAccessibleRole()
{
- return AccessibleRole::GRAPHIC ;
+ return AccessibleRole::GRAPHIC;
}
} // end of namespace accessibility
diff --git a/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx b/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx
index 0cdba64548c4..be98d89711f6 100644
--- a/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx
+++ b/sd/source/ui/accessibility/AccessiblePresentationOLEShape.cxx
@@ -29,36 +29,31 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
-namespace accessibility {
-
+namespace accessibility
+{
//===== internal ============================================================
-AccessiblePresentationOLEShape::AccessiblePresentationOLEShape (
- const AccessibleShapeInfo& rShapeInfo,
- const AccessibleShapeTreeInfo& rShapeTreeInfo)
- : AccessibleOLEShape (rShapeInfo, rShapeTreeInfo)
+AccessiblePresentationOLEShape::AccessiblePresentationOLEShape(
+ const AccessibleShapeInfo& rShapeInfo, const AccessibleShapeTreeInfo& rShapeTreeInfo)
+ : AccessibleOLEShape(rShapeInfo, rShapeTreeInfo)
{
}
-AccessiblePresentationOLEShape::~AccessiblePresentationOLEShape()
-{
-}
+AccessiblePresentationOLEShape::~AccessiblePresentationOLEShape() {}
// XServiceInfo
-OUString SAL_CALL
- AccessiblePresentationOLEShape::getImplementationName()
+OUString SAL_CALL AccessiblePresentationOLEShape::getImplementationName()
{
return "AccessiblePresentationOLEShape";
}
/// Set this object's name if it is different to the current name.
-OUString
- AccessiblePresentationOLEShape::CreateAccessibleBaseName()
+OUString AccessiblePresentationOLEShape::CreateAccessibleBaseName()
{
OUString sName;
- ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
+ ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId(mxShape);
switch (nShapeType)
{
case PRESENTATION_OLE:
@@ -80,9 +75,9 @@ OUString
}
// Return this object's role.
-sal_Int16 SAL_CALL AccessiblePresentationOLEShape::getAccessibleRole ()
+sal_Int16 SAL_CALL AccessiblePresentationOLEShape::getAccessibleRole()
{
- return AccessibleRole::EMBEDDED_OBJECT ;
+ return AccessibleRole::EMBEDDED_OBJECT;
}
} // end of namespace accessibility
diff --git a/sd/source/ui/accessibility/AccessiblePresentationShape.cxx b/sd/source/ui/accessibility/AccessiblePresentationShape.cxx
index d6e157a374fc..a0713fe857ca 100644
--- a/sd/source/ui/accessibility/AccessiblePresentationShape.cxx
+++ b/sd/source/ui/accessibility/AccessiblePresentationShape.cxx
@@ -31,25 +31,21 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
-namespace accessibility {
-
+namespace accessibility
+{
//===== internal ============================================================
-AccessiblePresentationShape::AccessiblePresentationShape (
- const AccessibleShapeInfo& rShapeInfo,
- const AccessibleShapeTreeInfo& rShapeTreeInfo)
- : AccessibleShape (rShapeInfo, rShapeTreeInfo)
+AccessiblePresentationShape::AccessiblePresentationShape(
+ const AccessibleShapeInfo& rShapeInfo, const AccessibleShapeTreeInfo& rShapeTreeInfo)
+ : AccessibleShape(rShapeInfo, rShapeTreeInfo)
{
}
-AccessiblePresentationShape::~AccessiblePresentationShape()
-{
-}
+AccessiblePresentationShape::~AccessiblePresentationShape() {}
// XServiceInfo
-OUString SAL_CALL
- AccessiblePresentationShape::getImplementationName()
+OUString SAL_CALL AccessiblePresentationShape::getImplementationName()
{
return "AccessiblePresentationShape";
}
@@ -59,7 +55,7 @@ OUString AccessiblePresentationShape::CreateAccessibleBaseName()
{
OUString sName;
- ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
+ ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId(mxShape);
switch (nShapeType)
{
case PRESENTATION_TITLE:
@@ -105,7 +101,7 @@ OUString AccessiblePresentationShape::GetStyle()
{
OUString sName;
- ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId (mxShape);
+ ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId(mxShape);
switch (nShapeType)
{
case PRESENTATION_TITLE:
@@ -145,7 +141,6 @@ OUString AccessiblePresentationShape::GetStyle()
}
return sName;
-
}
} // end of namespace accessibility
diff --git a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
index e7cf58debcc6..25810ab7dc09 100644
--- a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
+++ b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
@@ -23,8 +23,8 @@
#include <svx/sdrpaintwindow.hxx>
#include <osl/diagnose.h>
-namespace accessibility {
-
+namespace accessibility
+{
/** For the time being, the implementation of this class will not use the
member mrDevice. Instead the device is retrieved from the view
every time it is used. This is necessary because the device has to stay
@@ -32,17 +32,17 @@ namespace accessibility {
May change in the future.
*/
-AccessibleViewForwarder::AccessibleViewForwarder (SdrPaintView* pView, OutputDevice& rDevice)
- : mpView (pView),
- mnWindowId (0)
+AccessibleViewForwarder::AccessibleViewForwarder(SdrPaintView* pView, OutputDevice& rDevice)
+ : mpView(pView)
+ , mnWindowId(0)
{
// Search the output device to determine its id.
- for(sal_uInt32 a(0); a < mpView->PaintWindowCount(); a++)
+ for (sal_uInt32 a(0); a < mpView->PaintWindowCount(); a++)
{
SdrPaintWindow* pPaintWindow = mpView->GetPaintWindow(a);
OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
- if(&rOutDev == &rDevice)
+ if (&rOutDev == &rDevice)
{
mnWindowId = static_cast<sal_uInt16>(a);
break;
@@ -59,7 +59,7 @@ AccessibleViewForwarder::~AccessibleViewForwarder()
{
::tools::Rectangle aVisibleArea;
- if(static_cast<sal_uInt32>(mnWindowId) < mpView->PaintWindowCount())
+ if (static_cast<sal_uInt32>(mnWindowId) < mpView->PaintWindowCount())
{
SdrPaintWindow* pPaintWindow = mpView->GetPaintWindow(static_cast<sal_uInt32>(mnWindowId));
aVisibleArea = pPaintWindow->GetVisibleArea();
@@ -72,28 +72,29 @@ AccessibleViewForwarder::~AccessibleViewForwarder()
coordinates of the window origin are added to make the point coordinates
absolute.
*/
-Point AccessibleViewForwarder::LogicToPixel (const Point& rPoint) const
+Point AccessibleViewForwarder::LogicToPixel(const Point& rPoint) const
{
- OSL_ASSERT (mpView != nullptr);
- if(static_cast<sal_uInt32>(mnWindowId) < mpView->PaintWindowCount())
+ OSL_ASSERT(mpView != nullptr);
+ if (static_cast<sal_uInt32>(mnWindowId) < mpView->PaintWindowCount())
{
SdrPaintWindow* pPaintWindow = mpView->GetPaintWindow(static_cast<sal_uInt32>(mnWindowId));
OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
- ::tools::Rectangle aBBox(static_cast<vcl::Window&>(rOutDev).GetWindowExtentsRelative(nullptr));
- return rOutDev.LogicToPixel (rPoint) + aBBox.TopLeft();
+ ::tools::Rectangle aBBox(
+ static_cast<vcl::Window&>(rOutDev).GetWindowExtentsRelative(nullptr));
+ return rOutDev.LogicToPixel(rPoint) + aBBox.TopLeft();
}
else
return Point();
}
-Size AccessibleViewForwarder::LogicToPixel (const Size& rSize) const
+Size AccessibleViewForwarder::LogicToPixel(const Size& rSize) const
{
- OSL_ASSERT (mpView != nullptr);
- if(static_cast<sal_uInt32>(mnWindowId) < mpView->PaintWindowCount())
+ OSL_ASSERT(mpView != nullptr);
+ if (static_cast<sal_uInt32>(mnWindowId) < mpView->PaintWindowCount())
{
SdrPaintWindow* pPaintWindow = mpView->GetPaintWindow(static_cast<sal_uInt32>(mnWindowId));
OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
- return rOutDev.LogicToPixel (rSize);
+ return rOutDev.LogicToPixel(rSize);
}
else
return Size();
diff --git a/sd/source/ui/controller/slidelayoutcontroller.hxx b/sd/source/ui/controller/slidelayoutcontroller.hxx
index d4f6ca791aae..bff9eed17962 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.hxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.hxx
@@ -24,7 +24,6 @@
namespace sd
{
-
class SlideLayoutController : public svt::PopupWindowController
{
public:
@@ -32,19 +31,18 @@ public:
bool bInsertPage);
virtual std::unique_ptr<WeldToolbarPopup> weldPopupWindow() override;
- virtual VclPtr<vcl::Window> createVclPopupWindow( vcl::Window* pParent ) override;
+ virtual VclPtr<vcl::Window> createVclPopupWindow(vcl::Window* pParent) override;
// XInitialization
- virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
+ virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& aArguments) override;
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
- virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+ virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
private:
bool mbInsertPage;
};
-
}
#endif // INCLUDED_SD_SOURCE_UI_CONTROLLER_SLIDELAYOUTCONTROLLER_HXX
diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx
index 56f5754a5900..e54b130c3a57 100644
--- a/sd/source/ui/dlg/RemoteDialog.cxx
+++ b/sd/source/ui/dlg/RemoteDialog.cxx
@@ -13,7 +13,7 @@
using namespace ::sd;
using namespace ::std;
-RemoteDialog::RemoteDialog(weld::Window *pWindow)
+RemoteDialog::RemoteDialog(weld::Window* pWindow)
: GenericDialogController(pWindow, "modules/simpress/ui/remotedialog.ui", "RemoteDialog")
, m_xButtonConnect(m_xBuilder->weld_button("ok"))
, m_xClientBox(new sd::ClientBox(m_xBuilder->weld_scrolled_window("scroll"),
@@ -22,9 +22,7 @@ RemoteDialog::RemoteDialog(weld::Window *pWindow)
m_xButtonConnect->connect_clicked(LINK(this, RemoteDialog, HandleConnectButton));
}
-RemoteDialog::~RemoteDialog()
-{
-}
+RemoteDialog::~RemoteDialog() {}
IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton, weld::Button&, void)
{
diff --git a/sd/source/ui/dlg/RemoteDialog.hxx b/sd/source/ui/dlg/RemoteDialog.hxx
index ea0c492f6440..20644ed3fa68 100644
--- a/sd/source/ui/dlg/RemoteDialog.hxx
+++ b/sd/source/ui/dlg/RemoteDialog.hxx
@@ -15,7 +15,6 @@
namespace sd
{
-
class RemoteDialog : public weld::GenericDialogController
{
private:
@@ -23,12 +22,12 @@ private:
std::unique_ptr<ClientBox> m_xClientBox;
DECL_LINK(HandleConnectButton, weld::Button&, void);
+
public:
explicit RemoteDialog(weld::Window* pWindow);
virtual short run() override;
virtual ~RemoteDialog() override;
};
-
}
#endif // INCLUDED_SD_SOURCE_UI_DLG_REMOTEDIALOG_HXX
diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx
index 04915721d8f6..a149a65ce74e 100644
--- a/sd/source/ui/dlg/dlgpage.cxx
+++ b/sd/source/ui/dlg/dlgpage.cxx
@@ -36,16 +36,16 @@
/**
* Constructor of tab dialog: appends pages to the dialog
*/
-SdPageDlg::SdPageDlg(SfxObjectShell const * pDocSh, weld::Window* pParent, const SfxItemSet* pAttr, bool bAreaPage, bool bIsImpressDoc)
+SdPageDlg::SdPageDlg(SfxObjectShell const* pDocSh, weld::Window* pParent, const SfxItemSet* pAttr,
+ bool bAreaPage, bool bIsImpressDoc)
: SfxTabDialogController(pParent, "modules/sdraw/ui/drawpagedialog.ui", "DrawPageDialog", pAttr)
, mbIsImpressDoc(bIsImpressDoc)
{
-
- SvxColorListItem const * pColorListItem = pDocSh->GetItem( SID_COLOR_TABLE );
- SvxGradientListItem const * pGradientListItem = pDocSh->GetItem( SID_GRADIENT_LIST );
- SvxBitmapListItem const * pBitmapListItem = pDocSh->GetItem( SID_BITMAP_LIST );
- SvxPatternListItem const * pPatternListItem = pDocSh->GetItem( SID_PATTERN_LIST );
- SvxHatchListItem const * pHatchListItem = pDocSh->GetItem( SID_HATCH_LIST );
+ SvxColorListItem const* pColorListItem = pDocSh->GetItem(SID_COLOR_TABLE);
+ SvxGradientListItem const* pGradientListItem = pDocSh->GetItem(SID_GRADIENT_LIST);
+ SvxBitmapListItem const* pBitmapListItem = pDocSh->GetItem(SID_BITMAP_LIST);
+ SvxPatternListItem const* pPatternListItem = pDocSh->GetItem(SID_PATTERN_LIST);
+ SvxHatchListItem const* pHatchListItem = pDocSh->GetItem(SID_HATCH_LIST);
mpColorList = pColorListItem->GetColorList();
mpGradientList = pGradientListItem->GetGradientList();
@@ -57,9 +57,10 @@ SdPageDlg::SdPageDlg(SfxObjectShell const * pDocSh, weld::Window* pParent, const
AddTabPage("RID_SVXPAGE_PAGE", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PAGE), nullptr);
AddTabPage("RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_AREA), nullptr);
- AddTabPage("RID_SVXPAGE_TRANSPARENCE", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TRANSPARENCE), nullptr);
+ AddTabPage("RID_SVXPAGE_TRANSPARENCE", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TRANSPARENCE),
+ nullptr);
- if (!bAreaPage) // I have to add the page before I remove it !
+ if (!bAreaPage) // I have to add the page before I remove it !
{
RemoveTabPage("RID_SVXPAGE_AREA");
RemoveTabPage("RID_SVXPAGE_TRANSPARENCE");
@@ -77,9 +78,9 @@ void SdPageDlg::PageCreated(const OString& rId, SfxTabPage& rPage)
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
if (rId == "RID_SVXPAGE_PAGE")
{
- aSet.Put (SfxUInt16Item(sal_uInt16(SID_ENUM_PAGE_MODE), SVX_PAGE_MODE_PRESENTATION));
- aSet.Put (SfxUInt16Item(SID_PAPER_START, PAPER_A0));
- aSet.Put (SfxUInt16Item(SID_PAPER_END, PAPER_E));
+ aSet.Put(SfxUInt16Item(sal_uInt16(SID_ENUM_PAGE_MODE), SVX_PAGE_MODE_PRESENTATION));
+ aSet.Put(SfxUInt16Item(SID_PAPER_START, PAPER_A0));
+ aSet.Put(SfxUInt16Item(SID_PAPER_END, PAPER_E));
if (mbIsImpressDoc)
aSet.Put(SfxBoolItem(SID_IMPRESS_DOC, true));
@@ -88,20 +89,20 @@ void SdPageDlg::PageCreated(const OString& rId, SfxTabPage& rPage)
}
else if (rId == "RID_SVXPAGE_AREA")
{
- aSet.Put (SvxColorListItem(mpColorList,SID_COLOR_TABLE));
- aSet.Put (SvxGradientListItem(mpGradientList,SID_GRADIENT_LIST));
- aSet.Put (SvxHatchListItem(mpHatchingList,SID_HATCH_LIST));
- aSet.Put (SvxBitmapListItem(mpBitmapList,SID_BITMAP_LIST));
- aSet.Put (SvxPatternListItem(mpPatternList,SID_PATTERN_LIST));
- aSet.Put (SfxUInt16Item(SID_PAGE_TYPE,0));
- aSet.Put (SfxUInt16Item(SID_DLG_TYPE,1));
- aSet.Put (SfxUInt16Item(SID_TABPAGE_POS,0));
+ aSet.Put(SvxColorListItem(mpColorList, SID_COLOR_TABLE));
+ aSet.Put(SvxGradientListItem(mpGradientList, SID_GRADIENT_LIST));
+ aSet.Put(SvxHatchListItem(mpHatchingList, SID_HATCH_LIST));
+ aSet.Put(SvxBitmapListItem(mpBitmapList, SID_BITMAP_LIST));
+ aSet.Put(SvxPatternListItem(mpPatternList, SID_PATTERN_LIST));
+ aSet.Put(SfxUInt16Item(SID_PAGE_TYPE, 0));
+ aSet.Put(SfxUInt16Item(SID_DLG_TYPE, 1));
+ aSet.Put(SfxUInt16Item(SID_TABPAGE_POS, 0));
rPage.PageCreated(aSet);
}
else if (rId == "RID_SVXPAGE_TRANSPARENCE")
{
- aSet.Put(SfxUInt16Item(SID_PAGE_TYPE,0));
- aSet.Put(SfxUInt16Item(SID_DLG_TYPE,1));
+ aSet.Put(SfxUInt16Item(SID_PAGE_TYPE, 0));
+ aSet.Put(SfxUInt16Item(SID_DLG_TYPE, 1));
rPage.PageCreated(aSet);
}
}
diff --git a/sd/source/ui/dlg/ins_paste.cxx b/sd/source/ui/dlg/ins_paste.cxx
index a0b6f305d404..f1020c0cb286 100644
--- a/sd/source/ui/dlg/ins_paste.cxx
+++ b/sd/source/ui/dlg/ins_paste.cxx
@@ -27,13 +27,8 @@ SdInsertPasteDlg::SdInsertPasteDlg(weld::Window* pWindow)
m_xRbAfter->set_active(true);
}
-SdInsertPasteDlg::~SdInsertPasteDlg()
-{
-}
+SdInsertPasteDlg::~SdInsertPasteDlg() {}
-bool SdInsertPasteDlg::IsInsertBefore() const
-{
- return m_xRbBefore->get_active();
-}
+bool SdInsertPasteDlg::IsInsertBefore() const { return m_xRbBefore->get_active(); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/dlg/sdabstdlg.cxx b/sd/source/ui/dlg/sdabstdlg.cxx
index e79289b503da..cfb80456e011 100644
--- a/sd/source/ui/dlg/sdabstdlg.cxx
+++ b/sd/source/ui/dlg/sdabstdlg.cxx
@@ -26,7 +26,9 @@ typedef SdAbstractDialogFactory* (*SdFuncPtrCreateDialogFactory)();
#ifndef DISABLE_DYNLOADING
-extern "C" { static void thisModule() {} }
+extern "C" {
+static void thisModule() {}
+}
#else
@@ -40,13 +42,13 @@ SdAbstractDialogFactory* SdAbstractDialogFactory::Create()
#ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary;
static constexpr OUStringLiteral sLibName(u"" SDUI_DLL_NAME);
- if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName ) )
- fp = reinterpret_cast<SdAbstractDialogFactory* (SAL_CALL*)()>(
- aDialogLibrary.getFunctionSymbol( "SdCreateDialogFactory" ));
+ if (aDialogLibrary.is() || aDialogLibrary.loadRelative(&thisModule, sLibName))
+ fp = reinterpret_cast<SdAbstractDialogFactory*(SAL_CALL*)()>(
+ aDialogLibrary.getFunctionSymbol("SdCreateDialogFactory"));
#else
fp = SdCreateDialogFactory;
#endif
- if ( fp )
+ if (fp)
return fp();
return nullptr;
}
diff --git a/sd/source/ui/dlg/sduiexp.cxx b/sd/source/ui/dlg/sduiexp.cxx
index 14a4351ba06b..62901c70d0aa 100644
--- a/sd/source/ui/dlg/sduiexp.cxx
+++ b/sd/source/ui/dlg/sduiexp.cxx
@@ -22,13 +22,12 @@
class SdAbstractDialogFactory;
-extern "C"
+extern "C" {
+SAL_DLLPUBLIC_EXPORT SdAbstractDialogFactory* SdCreateDialogFactory()
{
- SAL_DLLPUBLIC_EXPORT SdAbstractDialogFactory* SdCreateDialogFactory()
- {
- static SdAbstractDialogFactory_Impl aFactory;
- return &aFactory;
- }
+ static SdAbstractDialogFactory_Impl aFactory;
+ return &aFactory;
+}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/docshell/grdocsh.cxx b/sd/source/ui/docshell/grdocsh.cxx
index 7dc8a7d6f615..f0f5af956288 100644
--- a/sd/source/ui/docshell/grdocsh.cxx
+++ b/sd/source/ui/docshell/grdocsh.cxx
@@ -33,7 +33,6 @@ using namespace sd;
namespace sd
{
-
SFX_IMPL_SUPERCLASS_INTERFACE(GraphicDocShell, SfxObjectShell)
void GraphicDocShell::InitInterface_Impl()
@@ -41,23 +40,21 @@ void GraphicDocShell::InitInterface_Impl()
GetStaticInterface()->RegisterChildWindow(SID_SEARCH_DLG);
}
-SFX_IMPL_OBJECTFACTORY( GraphicDocShell, SvGlobalName(SO3_SDRAW_CLASSID_60), "sdraw" )
+SFX_IMPL_OBJECTFACTORY(GraphicDocShell, SvGlobalName(SO3_SDRAW_CLASSID_60), "sdraw")
-GraphicDocShell::GraphicDocShell(SfxObjectCreateMode eMode) :
- DrawDocShell(eMode, /*bDataObject*/true, DocumentType::Draw)
+GraphicDocShell::GraphicDocShell(SfxObjectCreateMode eMode)
+ : DrawDocShell(eMode, /*bDataObject*/ true, DocumentType::Draw)
{
- SetStyleFamily( SfxStyleFamily::Para );
+ SetStyleFamily(SfxStyleFamily::Para);
}
-GraphicDocShell::GraphicDocShell(SfxModelFlags nModelCreationFlags) :
- DrawDocShell(nModelCreationFlags, /*bDataObject*/false, DocumentType::Draw)
+GraphicDocShell::GraphicDocShell(SfxModelFlags nModelCreationFlags)
+ : DrawDocShell(nModelCreationFlags, /*bDataObject*/ false, DocumentType::Draw)
{
- SetStyleFamily( SfxStyleFamily::Para );
+ SetStyleFamily(SfxStyleFamily::Para);
}
-GraphicDocShell::~GraphicDocShell()
-{
-}
+GraphicDocShell::~GraphicDocShell() {}
} // end of namespace sd
diff --git a/sd/source/ui/framework/configuration/ChangeRequestQueue.cxx b/sd/source/ui/framework/configuration/ChangeRequestQueue.cxx
index 8b74200eed74..0168c162b50c 100644
--- a/sd/source/ui/framework/configuration/ChangeRequestQueue.cxx
+++ b/sd/source/ui/framework/configuration/ChangeRequestQueue.cxx
@@ -19,11 +19,9 @@
#include "ChangeRequestQueue.hxx"
-namespace sd::framework {
-
-ChangeRequestQueue::ChangeRequestQueue()
+namespace sd::framework
{
-}
+ChangeRequestQueue::ChangeRequestQueue() {}
} // end of namespace sd::framework
diff --git a/sd/source/ui/framework/configuration/ChangeRequestQueue.hxx b/sd/source/ui/framework/configuration/ChangeRequestQueue.hxx
index 4961f0dc2cbb..27fa5d2b6abf 100644
--- a/sd/source/ui/framework/configuration/ChangeRequestQueue.hxx
+++ b/sd/source/ui/framework/configuration/ChangeRequestQueue.hxx
@@ -24,16 +24,19 @@
#include <queue>
-namespace com::sun::star::drawing::framework { class XConfigurationChangeRequest; }
-
-namespace sd::framework {
+namespace com::sun::star::drawing::framework
+{
+class XConfigurationChangeRequest;
+}
+namespace sd::framework
+{
/** The ChangeRequestQueue stores the pending requests for changes to the
requested configuration. It is the task of the
ChangeRequestQueueProcessor to process these requests.
*/
class ChangeRequestQueue
- : public ::std::queue<css::uno::Reference< css::drawing::framework::XConfigurationChangeRequest> >
+ : public ::std::queue<css::uno::Reference<css::drawing::framework::XConfigurationChangeRequest>>
{
public:
/** Create an empty queue.
diff --git a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx
index fcd433b8f2ae..ebb08b41cfd7 100644
--- a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx
+++ b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.hxx
@@ -27,13 +27,19 @@
#include <memory>
-namespace com::sun::star::drawing::framework { class XConfiguration; }
-namespace com::sun::star::drawing::framework { class XConfigurationChangeRequest; }
+namespace com::sun::star::drawing::framework
+{
+class XConfiguration;
+}
+namespace com::sun::star::drawing::framework
+{
+class XConfigurationChangeRequest;
+}
struct ImplSVEvent;
-namespace sd::framework {
-
+namespace sd::framework
+{
class ConfigurationUpdater;
/** The ChangeRequestQueueProcessor owns the ChangeRequestQueue and
@@ -52,22 +58,22 @@ public:
ConfigurationController so that its UpdateConfiguration() method can
be called when the queue becomes empty.
*/
- explicit ChangeRequestQueueProcessor (
- const std::shared_ptr<ConfigurationUpdater>& rpUpdater);
+ explicit ChangeRequestQueueProcessor(const std::shared_ptr<ConfigurationUpdater>& rpUpdater);
~ChangeRequestQueueProcessor();
/** Sets the configuration who will be changed by subsequent change
requests. This method should be called only by the configuration
controller who owns the configuration.
*/
- void SetConfiguration (
+ void SetConfiguration(
const css::uno::Reference<css::drawing::framework::XConfiguration>& rxConfiguration);
/** The given request is appended to the end of the queue and will
eventually be processed when all other entries in front of it have
been processed.
*/
- void AddRequest (const css::uno::Reference<css::drawing::framework::XConfigurationChangeRequest>& rxRequest);
+ void AddRequest(
+ const css::uno::Reference<css::drawing::framework::XConfigurationChangeRequest>& rxRequest);
/** Returns </sal_True> when the queue is empty.
*/
@@ -100,7 +106,7 @@ private:
so that a pending user event can be removed when the queue processor
is destroyed.
*/
- ImplSVEvent * mnUserEventId;
+ ImplSVEvent* mnUserEventId;
css::uno::Reference<css::drawing::framework::XConfiguration> mxConfiguration;
diff --git a/sd/source/ui/framework/configuration/ConfigurationClassifier.hxx b/sd/source/ui/framework/configuration/ConfigurationClassifier.hxx
index 9bf953a105f8..0dd9ef32a62e 100644
--- a/sd/source/ui/framework/configuration/ConfigurationClassifier.hxx
+++ b/sd/source/ui/framework/configuration/ConfigurationClassifier.hxx
@@ -25,11 +25,17 @@
#include <vector>
-namespace com::sun::star::drawing::framework { class XConfiguration; }
-namespace com::sun::star::drawing::framework { class XResourceId; }
-
-namespace sd::framework {
+namespace com::sun::star::drawing::framework
+{
+class XConfiguration;
+}
+namespace com::sun::star::drawing::framework
+{
+class XResourceId;
+}
+namespace sd::framework
+{
/** A ConfigurationClassifier object compares two configurations of
resources and gives access to the differences. It is used mainly when
changes to the current configuration have been requested and the various
@@ -42,7 +48,7 @@ public:
/** Create a new ConfigurationClassifier object that will compare the
two given configurations.
*/
- ConfigurationClassifier (
+ ConfigurationClassifier(
const css::uno::Reference<css::drawing::framework::XConfiguration>& rxConfiguration1,
const css::uno::Reference<css::drawing::framework::XConfiguration>& rxConfiguration2);
@@ -55,7 +61,8 @@ public:
*/
bool Partition();
- typedef ::std::vector<css::uno::Reference<css::drawing::framework::XResourceId> > ResourceIdVector;
+ typedef ::std::vector<css::uno::Reference<css::drawing::framework::XResourceId>>
+ ResourceIdVector;
/** Return the resources that belong to the configuration given as
rxConfiguration1 to the constructor but that do not belong to
@@ -65,7 +72,7 @@ public:
returned. This reference remains valid as long as the called
ConfigurationClassifier object stays alive.
*/
- const ResourceIdVector& GetC1minusC2() const { return maC1minusC2;}
+ const ResourceIdVector& GetC1minusC2() const { return maC1minusC2; }
/** Return the resources that belong to the configuration given as
rxConfiguration2 to the constructor but that do not belong to
@@ -75,7 +82,7 @@ public:
returned. This reference remains valid as long as the called
ConfigurationClassifier object stays alive.
*/
- const ResourceIdVector& GetC2minusC1() const { return maC2minusC1;}
+ const ResourceIdVector& GetC2minusC1() const { return maC2minusC1; }
#if DEBUG_SD_CONFIGURATION_TRACE
@@ -86,11 +93,9 @@ public:
returned. This reference remains valid as long as the called
ConfigurationClassifier object stays alive.
*/
- const ResourceIdVector& GetC1andC2() const { return maC1andC2;}
+ const ResourceIdVector& GetC1andC2() const { return maC1andC2; }
- static void TraceResourceIdVector (
- const char* pMessage,
- const ResourceIdVector& rResources);
+ static void TraceResourceIdVector(const char* pMessage, const ResourceIdVector& rResources);
#endif
@@ -118,9 +123,9 @@ private:
@param rS2
Another sequence of XResourceId objects.
*/
- void PartitionResources (
- const css::uno::Sequence<css::uno::Reference<css::drawing::framework::XResourceId> >& rS1,
- const css::uno::Sequence<css::uno::Reference<css::drawing::framework::XResourceId> >& rS2);
+ void PartitionResources(
+ const css::uno::Sequence<css::uno::Reference<css::drawing::framework::XResourceId>>& rS1,
+ const css::uno::Sequence<css::uno::Reference<css::drawing::framework::XResourceId>>& rS2);
/** Compare the given sequences of resource ids and put their elements
in one of three vectors depending on whether an element belongs to
@@ -132,12 +137,10 @@ private:
@param rS2
Another sequence of XResourceId objects.
*/
- static void ClassifyResources (
- const css::uno::Sequence<css::uno::Reference<css::drawing::framework::XResourceId> >& rS1,
- const css::uno::Sequence<css::uno::Reference<css::drawing::framework::XResourceId> >& rS2,
- ResourceIdVector& rS1minusS2,
- ResourceIdVector& rS2minusS1,
- ResourceIdVector& rS1andS2);
+ static void ClassifyResources(
+ const css::uno::Sequence<css::uno::Reference<css::drawing::framework::XResourceId>>& rS1,
+ const css::uno::Sequence<css::uno::Reference<css::drawing::framework::XResourceId>>& rS2,
+ ResourceIdVector& rS1minusS2, ResourceIdVector& rS2minusS1, ResourceIdVector& rS1andS2);
/** Copy the resources given in rSource to the list of resources
specified by rTarget. Resources bound to the ones in rSource,
@@ -152,7 +155,7 @@ private:
This list is filled with resources from rSource and the ones
bound to them.
*/
- static void CopyResources (
+ static void CopyResources(
const ResourceIdVector& rSource,
const css::uno::Reference<css::drawing::framework::XConfiguration>& rxConfiguration,
ResourceIdVector& rTarget);
diff --git a/sd/source/ui/framework/configuration/ConfigurationTracer.hxx b/sd/source/ui/framework/configuration/ConfigurationTracer.hxx
index 8c7950443aa1..d8ca76ccdd9d 100644
--- a/sd/source/ui/framework/configuration/ConfigurationTracer.hxx
+++ b/sd/source/ui/framework/configuration/ConfigurationTracer.hxx
@@ -22,23 +22,32 @@
#include <sal/types.h>
-namespace com::sun::star::drawing::framework { class XConfiguration; }
-namespace com::sun::star::drawing::framework { class XResourceId; }
-namespace com::sun::star::uno { template <typename > class Reference; }
-
-namespace sd::framework {
+namespace com::sun::star::drawing::framework
+{
+class XConfiguration;
+}
+namespace com::sun::star::drawing::framework
+{
+class XResourceId;
+}
+namespace com::sun::star::uno
+{
+template <typename> class Reference;
+}
+namespace sd::framework
+{
/** Print debug information about configurations to the standard error
output channel.
*/
class ConfigurationTracer
{
public:
- static void TraceConfiguration (
+ static void TraceConfiguration(
const css::uno::Reference<css::drawing::framework::XConfiguration>& rxConfiguration,
const char* pMessage);
-#if OSL_DEBUG_LEVEL >=1
- static void TraceBoundResources (
+#if OSL_DEBUG_LEVEL >= 1
+ static void TraceBoundResources(
const css::uno::Reference<css::drawing::framework::XConfiguration>& rxConfiguration,
const css::uno::Reference<css::drawing::framework::XResourceId>& rxResourceId,
const int nIndentation);
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
index 51348321d548..84c81fc13ee1 100644
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.hxx
@@ -25,12 +25,21 @@
#include <memory>
#include <vector>
-namespace com::sun::star::drawing::framework { class XConfiguration; }
-namespace com::sun::star::drawing::framework { class XControllerManager; }
-namespace com::sun::star::drawing::framework { class XResourceId; }
-
-namespace sd::framework {
+namespace com::sun::star::drawing::framework
+{
+class XConfiguration;
+}
+namespace com::sun::star::drawing::framework
+{
+class XControllerManager;
+}
+namespace com::sun::star::drawing::framework
+{
+class XResourceId;
+}
+namespace sd::framework
+{
class ConfigurationClassifier;
class ConfigurationUpdaterLock;
class ConfigurationControllerResourceManager;
@@ -51,11 +60,11 @@ public:
/** Create a new ConfigurationUpdater object that notifies configuration
changes and the start and end of updates via the given broadcaster.
*/
- ConfigurationUpdater (
+ ConfigurationUpdater(
const std::shared_ptr<ConfigurationControllerBroadcaster>& rpBroadcaster,
const std::shared_ptr<ConfigurationControllerResourceManager>& rpResourceManager,
- const css::uno::Reference<
- css::drawing::framework::XControllerManager>& rxControllerManager);
+ const css::uno::Reference<css::drawing::framework::XControllerManager>&
+ rxControllerManager);
~ConfigurationUpdater();
/** Request an update of the current configuration so that it looks like
@@ -64,11 +73,14 @@ public:
if that is the case. Otherwise it schedules a later call to
UpdateConfiguration().
*/
- void RequestUpdate (const css::uno::Reference<
- css::drawing::framework::XConfiguration>& rxRequestedConfiguration);
+ void RequestUpdate(const css::uno::Reference<css::drawing::framework::XConfiguration>&
+ rxRequestedConfiguration);
- const css::uno::Reference<
- css::drawing::framework::XConfiguration>& GetCurrentConfiguration() const { return mxCurrentConfiguration;}
+ const css::uno::Reference<css::drawing::framework::XConfiguration>&
+ GetCurrentConfiguration() const
+ {
+ return mxCurrentConfiguration;
+ }
friend class ConfigurationUpdaterLock;
/** Return a lock of the called ConfigurationUpdater. While the
@@ -81,16 +93,14 @@ private:
/** A reference to the XControllerManager is kept so that
UpdateConfiguration() has access to the other sub controllers.
*/
- css::uno::Reference<
- css::drawing::framework::XControllerManager> mxControllerManager;
+ css::uno::Reference<css::drawing::framework::XControllerManager> mxControllerManager;
std::shared_ptr<ConfigurationControllerBroadcaster> mpBroadcaster;
/** The current configuration holds the resources that are currently
active. It is modified during an update.
*/
- css::uno::Reference<
- css::drawing::framework::XConfiguration> mxCurrentConfiguration;
+ css::uno::Reference<css::drawing::framework::XConfiguration> mxCurrentConfiguration;
/** The requested configuration holds the resources that have been
requested to activate or to deactivate since the last update. It is
@@ -98,8 +108,7 @@ private:
maintained by the ConfigurationController and given to the
ConfigurationUpdater in the RequestUpdate() method.
*/
- css::uno::Reference<
- css::drawing::framework::XConfiguration> mxRequestedConfiguration;
+ css::uno::Reference<css::drawing::framework::XConfiguration> mxRequestedConfiguration;
/** This flag is set to </sal_True> when an update of the current
configuration was requested (because the last request in the queue
@@ -127,7 +136,7 @@ private:
This is used to overcome problems with resources that become
available asynchronously.
*/
- Timer maUpdateTimer;
+ Timer maUpdateTimer;
/** The number of failed updates (those after which the current
configuration is not equivalent to the requested configuration) is
@@ -147,15 +156,15 @@ private:
/** Basically calls UpdaterStart() andUpdateEnd() and makes some debug
output.
*/
- void UpdateCore (const ConfigurationClassifier& rClassifier);
+ void UpdateCore(const ConfigurationClassifier& rClassifier);
/** Check for all pure anchors if they have at least one child.
Childless pure anchors are deactivated.
This affects only the current configuration.
*/
- void CheckPureAnchors (
+ void CheckPureAnchors(
const css::uno::Reference<css::drawing::framework::XConfiguration>& rxConfiguration,
- ::std::vector<css::uno::Reference<css::drawing::framework::XResourceId> >&
+ ::std::vector<css::uno::Reference<css::drawing::framework::XResourceId>>&
rResourcesToDeactivate);
/** Remove from the requested configuration all pure anchors that have no
@@ -174,7 +183,7 @@ private:
prevent reentrance problems. This method allows function objects
easily and safely to modify the variable.
*/
- void SetUpdateBeingProcessed (bool bValue);
+ void SetUpdateBeingProcessed(bool bValue);
/** Return whether it is possible to do an update of the configuration.
This takes into account whether another update is currently being
@@ -193,7 +202,7 @@ private:
*/
void UnlockUpdates();
- DECL_LINK(TimeoutHandler, Timer *, void);
+ DECL_LINK(TimeoutHandler, Timer*, void);
};
} // end of namespace sd::framework
diff --git a/sd/source/ui/framework/configuration/UpdateRequest.cxx b/sd/source/ui/framework/configuration/UpdateRequest.cxx
index 7a8bb84bdf05..ec927e238003 100644
--- a/sd/source/ui/framework/configuration/UpdateRequest.cxx
+++ b/sd/source/ui/framework/configuration/UpdateRequest.cxx
@@ -23,30 +23,24 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
-namespace sd::framework {
-
-UpdateRequest::UpdateRequest()
- throw()
+namespace sd::framework
+{
+UpdateRequest::UpdateRequest() throw()
: UpdateRequestInterfaceBase(MutexOwner::maMutex)
{
}
-UpdateRequest::~UpdateRequest() throw()
-{
-}
+UpdateRequest::~UpdateRequest() throw() {}
-void SAL_CALL UpdateRequest::execute (const Reference<XConfiguration>&)
+void SAL_CALL UpdateRequest::execute(const Reference<XConfiguration>&)
{
// Do nothing here. The configuration is updated when the request queue
// becomes empty.
}
-OUString SAL_CALL UpdateRequest::getName()
-{
- return "UpdateRequest";
-}
+OUString SAL_CALL UpdateRequest::getName() { return "UpdateRequest"; }
-void SAL_CALL UpdateRequest::setName (const OUString&)
+void SAL_CALL UpdateRequest::setName(const OUString&)
{
// Ignored.
}
diff --git a/sd/source/ui/framework/factories/FrameWindowPane.cxx b/sd/source/ui/framework/factories/FrameWindowPane.cxx
index d5469dd126bb..bd0cd6eeb8f3 100644
--- a/sd/source/ui/framework/factories/FrameWindowPane.cxx
+++ b/sd/source/ui/framework/factories/FrameWindowPane.cxx
@@ -23,23 +23,16 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
-namespace sd::framework {
-
-FrameWindowPane::FrameWindowPane (
- const Reference<XResourceId>& rxPaneId,
- vcl::Window* pWindow)
- : Pane(rxPaneId,pWindow)
+namespace sd::framework
{
-}
-
-FrameWindowPane::~FrameWindowPane() throw()
+FrameWindowPane::FrameWindowPane(const Reference<XResourceId>& rxPaneId, vcl::Window* pWindow)
+ : Pane(rxPaneId, pWindow)
{
}
-sal_Bool SAL_CALL FrameWindowPane::isAnchorOnly()
-{
- return false;
-}
+FrameWindowPane::~FrameWindowPane() throw() {}
+
+sal_Bool SAL_CALL FrameWindowPane::isAnchorOnly() { return false; }
} // end of namespace sd::framework
diff --git a/sd/source/ui/framework/factories/FrameWindowPane.hxx b/sd/source/ui/framework/factories/FrameWindowPane.hxx
index d19d18e67f9e..236b3381cf7f 100644
--- a/sd/source/ui/framework/factories/FrameWindowPane.hxx
+++ b/sd/source/ui/framework/factories/FrameWindowPane.hxx
@@ -22,20 +22,21 @@
#include <framework/Pane.hxx>
-namespace com::sun::star::drawing::framework { class XResourceId; }
-
-namespace sd::framework {
+namespace com::sun::star::drawing::framework
+{
+class XResourceId;
+}
+namespace sd::framework
+{
/** This subclass is not necessary anymore. We can remove it if that
remains so.
*/
-class FrameWindowPane
- : public Pane
+class FrameWindowPane : public Pane
{
public:
- FrameWindowPane (
- const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
- vcl::Window* pWindow);
+ FrameWindowPane(const css::uno::Reference<css::drawing::framework::XResourceId>& rxPaneId,
+ vcl::Window* pWindow);
virtual ~FrameWindowPane() throw() override;
/** A frame window typically can (and should) exists on its own without
diff --git a/sd/source/ui/framework/module/CenterViewFocusModule.hxx b/sd/source/ui/framework/module/CenterViewFocusModule.hxx
index ab31ee038539..ad27922c0eb3 100644
--- a/sd/source/ui/framework/module/CenterViewFocusModule.hxx
+++ b/sd/source/ui/framework/module/CenterViewFocusModule.hxx
@@ -25,46 +25,47 @@
#include <com/sun/star/drawing/framework/XConfigurationChangeListener.hpp>
#include <cppuhelper/compbase.hxx>
-namespace com::sun::star::drawing::framework { class XConfigurationController; }
-namespace com::sun::star::frame { class XController; }
-
-namespace sd {
+namespace com::sun::star::drawing::framework
+{
+class XConfigurationController;
+}
+namespace com::sun::star::frame
+{
+class XController;
+}
+namespace sd
+{
class ViewShellBase;
-
}
-namespace sd::framework {
-
-typedef ::cppu::WeakComponentImplHelper <
- css::drawing::framework::XConfigurationChangeListener
- > CenterViewFocusModuleInterfaceBase;
+namespace sd::framework
+{
+typedef ::cppu::WeakComponentImplHelper<css::drawing::framework::XConfigurationChangeListener>
+ CenterViewFocusModuleInterfaceBase;
/** This module waits for new views to be created for the center pane and
then moves the center view to the top most place on the shell stack. As
we are moving away from the shell stack this module may become obsolete
or has to be modified.
*/
-class CenterViewFocusModule
- : private sd::MutexOwner,
- public CenterViewFocusModuleInterfaceBase
+class CenterViewFocusModule : private sd::MutexOwner, public CenterViewFocusModuleInterfaceBase
{
public:
- explicit CenterViewFocusModule (
- css::uno::Reference<css::frame::XController> const & rxController);
+ explicit CenterViewFocusModule(
+ css::uno::Reference<css::frame::XController> const& rxController);
virtual ~CenterViewFocusModule() override;
virtual void SAL_CALL disposing() override;
// XConfigurationChangeListener
- virtual void SAL_CALL notifyConfigurationChange (
+ virtual void SAL_CALL notifyConfigurationChange(
const css::drawing::framework::ConfigurationChangeEvent& rEvent) override;
// XEventListener
- virtual void SAL_CALL disposing (
- const css::lang::EventObject& rEvent) override;
+ virtual void SAL_CALL disposing(const css::lang::EventObject& rEvent) override;
private:
class ViewShellContainer;
diff --git a/sd/source/ui/framework/module/DrawModule.cxx b/sd/source/ui/framework/module/DrawModule.cxx
index 1d5fb0ee231c..17f4671fcb7f 100644
--- a/sd/source/ui/framework/module/DrawModule.cxx
+++ b/sd/source/ui/framework/module/DrawModule.cxx
@@ -27,14 +27,12 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-namespace sd::framework {
-
-void DrawModule::Initialize (Reference<frame::XController> const & rxController)
+namespace sd::framework
+{
+void DrawModule::Initialize(Reference<frame::XController> const& rxController)
{
new sd::framework::CenterViewFocusModule(rxController);
- new sd::framework::SlideSorterModule(
- rxController,
- FrameworkHelper::msLeftDrawPaneURL);
+ new sd::framework::SlideSorterModule(rxController, FrameworkHelper::msLeftDrawPaneURL);
new ToolBarModule(rxController);
}
diff --git a/sd/source/ui/framework/module/PresentationModule.cxx b/sd/source/ui/framework/module/PresentationModule.cxx
index 453e5f1fa4c1..fb0ac0558d80 100644
--- a/sd/source/ui/framework/module/PresentationModule.cxx
+++ b/sd/source/ui/framework/module/PresentationModule.cxx
@@ -24,9 +24,9 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-namespace sd::framework {
-
-void PresentationModule::Initialize (Reference<frame::XController> const & rxController)
+namespace sd::framework
+{
+void PresentationModule::Initialize(Reference<frame::XController> const& rxController)
{
new sd::framework::CenterViewFocusModule(rxController);
}
diff --git a/sd/source/ui/framework/module/ShellStackGuard.hxx b/sd/source/ui/framework/module/ShellStackGuard.hxx
index 3a93a7fd590c..e1e3b7fd9558 100644
--- a/sd/source/ui/framework/module/ShellStackGuard.hxx
+++ b/sd/source/ui/framework/module/ShellStackGuard.hxx
@@ -30,20 +30,24 @@
#include <cppuhelper/compbase.hxx>
#include <memory>
-namespace com::sun::star::drawing::framework { class XConfigurationController; }
-namespace com::sun::star::frame { class XController; }
-
-namespace sd {
+namespace com::sun::star::drawing::framework
+{
+class XConfigurationController;
+}
+namespace com::sun::star::frame
+{
+class XController;
+}
+namespace sd
+{
class ViewShellBase;
-
}
-namespace sd::framework {
-
-typedef ::cppu::WeakComponentImplHelper <
- css::drawing::framework::XConfigurationChangeListener
- > ShellStackGuardInterfaceBase;
+namespace sd::framework
+{
+typedef ::cppu::WeakComponentImplHelper<css::drawing::framework::XConfigurationChangeListener>
+ ShellStackGuardInterfaceBase;
/** This module locks updates of the current configuration in situations
when the shell stack must not be modified.
@@ -55,24 +59,22 @@ typedef ::cppu::WeakComponentImplHelper <
When in the future there are no resources left that use shells then this
module can be removed.
*/
-class ShellStackGuard
- : private ::cppu::BaseMutex,
- public ShellStackGuardInterfaceBase
+class ShellStackGuard : private ::cppu::BaseMutex, public ShellStackGuardInterfaceBase
{
public:
- explicit ShellStackGuard (css::uno::Reference<css::frame::XController> const & rxController);
+ explicit ShellStackGuard(css::uno::Reference<css::frame::XController> const& rxController);
virtual ~ShellStackGuard() override;
virtual void SAL_CALL disposing() override;
// XConfigurationChangeListener
- virtual void SAL_CALL notifyConfigurationChange (
+ virtual void SAL_CALL notifyConfigurationChange(
const css::drawing::framework::ConfigurationChangeEvent& rEvent) override;
// XEventListener
- virtual void SAL_CALL disposing (const css::lang::EventObject& rEvent) override;
+ virtual void SAL_CALL disposing(const css::lang::EventObject& rEvent) override;
private:
css::uno::Reference<css::drawing::framework::XConfigurationController>
diff --git a/sd/source/ui/func/sdundogr.cxx b/sd/source/ui/func/sdundogr.cxx
index 497c27c8d6c7..a2e97386d57b 100644
--- a/sd/source/ui/func/sdundogr.cxx
+++ b/sd/source/ui/func/sdundogr.cxx
@@ -22,17 +22,17 @@
SdUndoGroup::~SdUndoGroup() = default;
-bool SdUndoGroup::Merge( SfxUndoAction* pNextAction )
+bool SdUndoGroup::Merge(SfxUndoAction* pNextAction)
{
bool bRet = false;
- if( auto pSdUndoAction = dynamic_cast<SdUndoAction *>( pNextAction ) )
+ if (auto pSdUndoAction = dynamic_cast<SdUndoAction*>(pNextAction))
{
SdUndoAction* pClone = pSdUndoAction->Clone();
- if( pClone )
+ if (pClone)
{
- AddAction( pClone );
+ AddAction(pClone);
bRet = true;
}
}
@@ -50,7 +50,6 @@ void SdUndoGroup::Undo()
{
aCtn[nAction]->Undo();
}
-
}
void SdUndoGroup::Redo()
@@ -60,12 +59,8 @@ void SdUndoGroup::Redo()
{
aCtn[nAction]->Redo();
}
-
}
-void SdUndoGroup::AddAction(SdUndoAction* pAction)
-{
- aCtn.emplace_back(pAction);
-}
+void SdUndoGroup::AddAction(SdUndoAction* pAction) { aCtn.emplace_back(pAction); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/AccessibleViewForwarder.hxx b/sd/source/ui/inc/AccessibleViewForwarder.hxx
index 6dc085331054..a8f350b3f4fc 100644
--- a/sd/source/ui/inc/AccessibleViewForwarder.hxx
+++ b/sd/source/ui/inc/AccessibleViewForwarder.hxx
@@ -25,8 +25,8 @@
class SdrPaintView;
class OutputDevice;
-namespace accessibility {
-
+namespace accessibility
+{
/** <p>This class provides the means to transform between internal coordinates
and screen coordinates without giving direct access to the underlying
view. It represents a certain window. A call to
@@ -38,13 +38,12 @@ namespace accessibility {
different transformations between internal and screen coordinates or
change the validity of the forwarder have to be signaled separately.
*/
-class AccessibleViewForwarder final
- : public IAccessibleViewForwarder
+class AccessibleViewForwarder final : public IAccessibleViewForwarder
{
public:
//===== internal ========================================================
- AccessibleViewForwarder (SdrPaintView* pView, OutputDevice& rDevice);
+ AccessibleViewForwarder(SdrPaintView* pView, OutputDevice& rDevice);
virtual ~AccessibleViewForwarder() override;
@@ -68,7 +67,7 @@ public:
The same point but in screen coordinates relative to the upper
left corner of the (current) screen.
*/
- virtual Point LogicToPixel (const Point& rPoint) const override;
+ virtual Point LogicToPixel(const Point& rPoint) const override;
/** Transform the specified size from internal coordinates to a screen
* position.
@@ -79,14 +78,14 @@ public:
@return
The same size but in screen coordinates.
*/
- virtual Size LogicToPixel (const Size& rSize) const override;
+ virtual Size LogicToPixel(const Size& rSize) const override;
private:
SdrPaintView* mpView;
sal_uInt16 mnWindowId;
- AccessibleViewForwarder (AccessibleViewForwarder const &) = delete;
- AccessibleViewForwarder& operator= (AccessibleViewForwarder const &) = delete;
+ AccessibleViewForwarder(AccessibleViewForwarder const&) = delete;
+ AccessibleViewForwarder& operator=(AccessibleViewForwarder const&) = delete;
};
} // end of namespace accessibility
diff --git a/sd/source/ui/inc/BezierObjectBar.hxx b/sd/source/ui/inc/BezierObjectBar.hxx
index 3da03be2a2f9..3ecff3432e0a 100644
--- a/sd/source/ui/inc/BezierObjectBar.hxx
+++ b/sd/source/ui/inc/BezierObjectBar.hxx
@@ -23,13 +23,12 @@
#include <sfx2/shell.hxx>
#include <glob.hxx>
-namespace sd {
-
+namespace sd
+{
class View;
class ViewShell;
-class BezierObjectBar final
- : public SfxShell
+class BezierObjectBar final : public SfxShell
{
public:
SFX_DECL_INTERFACE(SD_IF_SDDRAWBEZIEROBJECTBAR)
@@ -38,7 +37,7 @@ public:
virtual ~BezierObjectBar() override;
void GetAttrState(SfxItemSet& rSet);
- void Execute(SfxRequest &rReq);
+ void Execute(SfxRequest& rReq);
private:
/// SfxInterface initializer.
diff --git a/sd/source/ui/inc/BreakDlg.hxx b/sd/source/ui/inc/BreakDlg.hxx
index faf0635ce03f..b7aaf3da835c 100644
--- a/sd/source/ui/inc/BreakDlg.hxx
+++ b/sd/source/ui/inc/BreakDlg.hxx
@@ -25,8 +25,8 @@
#include <svx/svdetc.hxx>
#include <vcl/idle.hxx>
-namespace sd {
-
+namespace sd
+{
class DrawDocShell;
class DrawView;
@@ -49,9 +49,9 @@ private:
DrawView* m_pDrView;
- bool m_bCancel;
+ bool m_bCancel;
- Idle m_aUpdateIdle;
+ Idle m_aUpdateIdle;
std::unique_ptr<SvdProgressInfo> m_xProgrInfo;
std::unique_ptr<SfxProgress> m_xProgress;
diff --git a/sd/source/ui/inc/Client.hxx b/sd/source/ui/inc/Client.hxx
index 408ccd989a9c..34d6b83cd322 100644
--- a/sd/source/ui/inc/Client.hxx
+++ b/sd/source/ui/inc/Client.hxx
@@ -23,21 +23,21 @@
#include <sfx2/ipclient.hxx>
class SdrOle2Obj;
-namespace sd {
-
+namespace sd
+{
class ViewShell;
class Client : public SfxInPlaceClient
{
- ViewShell* mpViewShell;
- SdrOle2Obj* pSdrOle2Obj;
+ ViewShell* mpViewShell;
+ SdrOle2Obj* pSdrOle2Obj;
- virtual void ObjectAreaChanged() override;
- virtual void RequestNewObjectArea( ::tools::Rectangle& ) override;
- virtual void ViewChanged() override;
+ virtual void ObjectAreaChanged() override;
+ virtual void RequestNewObjectArea(::tools::Rectangle&) override;
+ virtual void ViewChanged() override;
public:
- Client (SdrOle2Obj* pObj, ViewShell* pSdViewShell, vcl::Window* pWindow);
+ Client(SdrOle2Obj* pObj, ViewShell* pSdViewShell, vcl::Window* pWindow);
virtual ~Client() override;
};
diff --git a/sd/source/ui/inc/ClientView.hxx b/sd/source/ui/inc/ClientView.hxx
index 793e3b639449..677f5a811210 100644
--- a/sd/source/ui/inc/ClientView.hxx
+++ b/sd/source/ui/inc/ClientView.hxx
@@ -22,18 +22,15 @@
#include "drawview.hxx"
-namespace sd {
-
+namespace sd
+{
/**
* The SdClientView is used for DrawDocShell::Draw()
*/
-class ClientView
- : public DrawView
+class ClientView : public DrawView
{
public:
- ClientView (
- DrawDocShell* pDocSh,
- OutputDevice* pOutDev);
+ ClientView(DrawDocShell* pDocSh, OutputDevice* pOutDev);
virtual ~ClientView() override;
/* if the view should not do an Invalidate() on the windows, you have to
diff --git a/sd/source/ui/inc/EventMultiplexer.hxx b/sd/source/ui/inc/EventMultiplexer.hxx
index df9a64b8c03b..01bc543f9681 100644
--- a/sd/source/ui/inc/EventMultiplexer.hxx
+++ b/sd/source/ui/inc/EventMultiplexer.hxx
@@ -26,11 +26,11 @@
template <typename Arg, typename Ret> class Link;
-namespace sd {
+namespace sd
+{
class ViewShellBase;
}
-
enum class EventMultiplexerEventId
{
/** The EventMultiplexer itself is being disposed. Called for a live
@@ -115,17 +115,15 @@ enum class EventMultiplexerEventId
EditModeMaster,
};
-namespace sd::tools {
-
+namespace sd::tools
+{
class EventMultiplexerEvent
{
public:
EventMultiplexerEventId meEventId;
const void* mpUserData;
- EventMultiplexerEvent (
- EventMultiplexerEventId eEventId,
- const void* pUserData);
+ EventMultiplexerEvent(EventMultiplexerEventId eEventId, const void* pUserData);
};
/** This convenience class makes it easy to listen to various events that
@@ -140,7 +138,7 @@ class EventMultiplexer
public:
/** Create new EventMultiplexer for the given ViewShellBase object.
*/
- EventMultiplexer (ViewShellBase& rBase);
+ EventMultiplexer(ViewShellBase& rBase);
~EventMultiplexer();
/** Add an event listener that will be informed about the specified
@@ -149,11 +147,11 @@ public:
The callback to call as soon as one of the event specified by
aEventTypeSet is received by the EventMultiplexer.
*/
- void AddEventListener(const Link<EventMultiplexerEvent&,void>& rCallback);
+ void AddEventListener(const Link<EventMultiplexerEvent&, void>& rCallback);
/** Remove an event listener for the specified event types.
*/
- void RemoveEventListener(const Link<EventMultiplexerEvent&,void>& rCallback);
+ void RemoveEventListener(const Link<EventMultiplexerEvent&, void>& rCallback);
/** This method is used for out-of-line events. An event of the
specified type will be sent to all listeners that are registered for
@@ -163,9 +161,7 @@ public:
@param pUserData
Some data sent to the listeners along with the event.
*/
- void MultiplexEvent(
- EventMultiplexerEventId eEventId,
- void const * pUserData);
+ void MultiplexEvent(EventMultiplexerEventId eEventId, void const* pUserData);
private:
class Implementation;
diff --git a/sd/source/ui/inc/FormShellManager.hxx b/sd/source/ui/inc/FormShellManager.hxx
index a40fa3d66bfa..341c81527ffd 100644
--- a/sd/source/ui/inc/FormShellManager.hxx
+++ b/sd/source/ui/inc/FormShellManager.hxx
@@ -28,12 +28,18 @@
class VclWindowEvent;
class FmFormShell;
-namespace vcl { class Window; }
-
-namespace sd::tools { class EventMultiplexerEvent; }
+namespace vcl
+{
+class Window;
+}
-namespace sd {
+namespace sd::tools
+{
+class EventMultiplexerEvent;
+}
+namespace sd
+{
class ViewShellBase;
/** This simple class is responsible for putting the form shell above or
@@ -48,11 +54,10 @@ class ViewShellBase;
The form shell is created and destroyed by the ViewShellManager by using
a factory object provided by the FormShellManager.
*/
-class FormShellManager
- : public SfxListener
+class FormShellManager : public SfxListener
{
public:
- FormShellManager (ViewShellBase& rBase);
+ FormShellManager(ViewShellBase& rBase);
virtual ~FormShellManager() override;
/** Typically called by a ShellFactory. It tells the
@@ -61,14 +66,14 @@ public:
This may be <NULL/> to disconnect the ViewShellManager from the
form shell.
*/
- void SetFormShell (FmFormShell* pFormShell);
+ void SetFormShell(FmFormShell* pFormShell);
/** Return the form shell last set with SetFormShell().
@return
The result may be <NULL/> when the SetFormShell() method has not
yet been called or was last called with <NULL/>.
*/
- FmFormShell* GetFormShell() { return mpFormShell;}
+ FmFormShell* GetFormShell() { return mpFormShell; }
private:
ViewShellBase& mrBase;
diff --git a/sd/source/ui/inc/GraphicDocShell.hxx b/sd/source/ui/inc/GraphicDocShell.hxx
index 59b6635000d3..d215d0fccc8e 100644
--- a/sd/source/ui/inc/GraphicDocShell.hxx
+++ b/sd/source/ui/inc/GraphicDocShell.hxx
@@ -26,13 +26,12 @@
#include <glob.hxx>
#include <sddllapi.h>
-namespace sd {
-
+namespace sd
+{
/**
* document shell for draw documents
*/
-class SD_DLLPUBLIC GraphicDocShell
- : public DrawDocShell
+class SD_DLLPUBLIC GraphicDocShell : public DrawDocShell
{
public:
SFX_DECL_INTERFACE(SD_IF_SDGRAPHICDOCSHELL)
diff --git a/sd/source/ui/inc/GraphicViewShell.hxx b/sd/source/ui/inc/GraphicViewShell.hxx
index fd79bda658d7..65fb74443294 100644
--- a/sd/source/ui/inc/GraphicViewShell.hxx
+++ b/sd/source/ui/inc/GraphicViewShell.hxx
@@ -22,10 +22,13 @@
#include "DrawViewShell.hxx"
-namespace vcl { class Window; }
-
-namespace sd {
+namespace vcl
+{
+class Window;
+}
+namespace sd
+{
/** View shell of the Draw application.
<p>This class is an example of how not to do it: specialization by
@@ -35,11 +38,9 @@ namespace sd {
ViewShell that turns off some of the features for GraphicViewShell
instances.</p>
*/
-class SAL_DLLPUBLIC_RTTI GraphicViewShell final
- : public DrawViewShell
+class SAL_DLLPUBLIC_RTTI GraphicViewShell final : public DrawViewShell
{
public:
-
SFX_DECL_VIEWFACTORY(GraphicViewShell);
SFX_DECL_INTERFACE(SD_IF_SDGRAPHICVIEWSHELL)
@@ -50,16 +51,14 @@ public:
The frame view that makes it possible to pass information from
one view shell to the next.
*/
- GraphicViewShell (
- ViewShellBase& rViewShellBase,
- vcl::Window* pParentWindow,
- FrameView* pFrameView);
+ GraphicViewShell(ViewShellBase& rViewShellBase, vcl::Window* pParentWindow,
+ FrameView* pFrameView);
virtual ~GraphicViewShell() override;
/** Override this method in order to have the layer mode always active.
*/
- virtual void ChangeEditMode (EditMode eMode, bool bIsLayerModeActive) override;
+ virtual void ChangeEditMode(EditMode eMode, bool bIsLayerModeActive) override;
private:
/// SfxInterface initializer.
diff --git a/sd/source/ui/inc/GraphicViewShellBase.hxx b/sd/source/ui/inc/GraphicViewShellBase.hxx
index f13b75790045..37e76b40dae0 100644
--- a/sd/source/ui/inc/GraphicViewShellBase.hxx
+++ b/sd/source/ui/inc/GraphicViewShellBase.hxx
@@ -22,13 +22,12 @@
#include "ViewShellBase.hxx"
-namespace sd {
-
+namespace sd
+{
/** This class exists to be able to register another factory that
creates the view shell for the Draw application.
*/
-class GraphicViewShellBase
- : public ViewShellBase
+class GraphicViewShellBase : public ViewShellBase
{
public:
SFX_DECL_VIEWFACTORY(GraphicViewShellBase);
@@ -36,12 +35,12 @@ public:
/** This constructor is used by the view factory of the SFX
macros.
*/
- GraphicViewShellBase (SfxViewFrame *pFrame, SfxViewShell* pOldShell);
+ GraphicViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell);
virtual ~GraphicViewShellBase() override;
/** Callback function for general slot calls.
*/
- virtual void Execute (SfxRequest& rRequest) override;
+ virtual void Execute(SfxRequest& rRequest) override;
protected:
virtual void InitializeFramework() override;
diff --git a/sd/source/ui/inc/ImpressViewShellBase.hxx b/sd/source/ui/inc/ImpressViewShellBase.hxx
index f4cce44c3424..cd964c2aaba6 100644
--- a/sd/source/ui/inc/ImpressViewShellBase.hxx
+++ b/sd/source/ui/inc/ImpressViewShellBase.hxx
@@ -22,13 +22,12 @@
#include "ViewShellBase.hxx"
-namespace sd {
-
+namespace sd
+{
/** This class implements a few features that exist only for the Impress
application.
*/
-class ImpressViewShellBase
- : public ViewShellBase
+class ImpressViewShellBase : public ViewShellBase
{
public:
SFX_DECL_VIEWFACTORY(ImpressViewShellBase);
@@ -36,12 +35,12 @@ public:
/** This constructor is used by the view factory of the SFX
macros.
*/
- ImpressViewShellBase (SfxViewFrame *pFrame, SfxViewShell* pOldShell);
+ ImpressViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell);
virtual ~ImpressViewShellBase() override;
/** Callback function for general slot calls.
*/
- virtual void Execute (SfxRequest& rRequest) override;
+ virtual void Execute(SfxRequest& rRequest) override;
protected:
virtual void InitializeFramework() override;
diff --git a/sd/source/ui/inc/MasterPageObserver.hxx b/sd/source/ui/inc/MasterPageObserver.hxx
index 4febb242aa21..c7c121e0818e 100644
--- a/sd/source/ui/inc/MasterPageObserver.hxx
+++ b/sd/source/ui/inc/MasterPageObserver.hxx
@@ -26,12 +26,15 @@
#include <memory>
#include <set>
-namespace osl { class Mutex; }
+namespace osl
+{
+class Mutex;
+}
class SdDrawDocument;
-namespace sd {
-
+namespace sd
+{
class MasterPageObserverEvent;
/** This singleton observes all registered documents for changes in the used
@@ -39,8 +42,7 @@ class MasterPageObserverEvent;
listener is the master page selector control in the tool panel that
shows the recently used master pages.
*/
-class MasterPageObserver
- : public SdGlobalResource
+class MasterPageObserver : public SdGlobalResource
{
public:
typedef ::std::set<OUString> MasterPageNameSet;
@@ -52,12 +54,12 @@ public:
/** The master page observer will listen to events of this document and
detect changes of the use of master pages.
*/
- void RegisterDocument (SdDrawDocument& rDocument);
+ void RegisterDocument(SdDrawDocument& rDocument);
/** The master page observer will stop to listen to events of this
document.
*/
- void UnregisterDocument (SdDrawDocument& rDocument);
+ void UnregisterDocument(SdDrawDocument& rDocument);
/** Add a listener that is informed of master pages that are newly
assigned to slides or become unassigned.
@@ -65,7 +67,7 @@ public:
The event listener to call for future events. Call
RemoveEventListener() before the listener is destroyed.
*/
- void AddEventListener (const Link<MasterPageObserverEvent&,void>& rEventListener);
+ void AddEventListener(const Link<MasterPageObserverEvent&, void>& rEventListener);
/** Remove the given listener from the list of listeners.
@param rEventListener
@@ -73,7 +75,7 @@ public:
from this object. Passing a listener that has not
been registered before is safe and is silently ignored.
*/
- void RemoveEventListener (const Link<MasterPageObserverEvent&,void>& rEventListener);
+ void RemoveEventListener(const Link<MasterPageObserverEvent&, void>& rEventListener);
private:
class Implementation;
@@ -82,9 +84,9 @@ private:
MasterPageObserver();
virtual ~MasterPageObserver() override;
- MasterPageObserver (const MasterPageObserver&) = delete;
+ MasterPageObserver(const MasterPageObserver&) = delete;
- MasterPageObserver& operator= (const MasterPageObserver&) = delete;
+ MasterPageObserver& operator=(const MasterPageObserver&) = delete;
};
/** Objects of this class are sent to listeners of the MasterPageObserver
@@ -93,7 +95,8 @@ private:
class MasterPageObserverEvent
{
public:
- enum EventType {
+ enum EventType
+ {
/// Master page already exists when document is registered.
ET_MASTER_PAGE_EXISTS,
/// Master page has been added to a document.
@@ -105,13 +108,11 @@ public:
EventType meType;
const OUString& mrMasterPageName;
- MasterPageObserverEvent (
- EventType eType,
- const OUString& rMasterPageName)
- : meType(eType),
- mrMasterPageName(rMasterPageName)
- {}
-
+ MasterPageObserverEvent(EventType eType, const OUString& rMasterPageName)
+ : meType(eType)
+ , mrMasterPageName(rMasterPageName)
+ {
+ }
};
} // end of namespace sd
diff --git a/sd/source/ui/inc/OutlineBulletDlg.hxx b/sd/source/ui/inc/OutlineBulletDlg.hxx
index 8542e79d7ac5..b7d8555c48fd 100644
--- a/sd/source/ui/inc/OutlineBulletDlg.hxx
+++ b/sd/source/ui/inc/OutlineBulletDlg.hxx
@@ -22,8 +22,8 @@
#include <sfx2/tabdlg.hxx>
-namespace sd {
-
+namespace sd
+{
class View;
/**
@@ -33,18 +33,18 @@ class OutlineBulletDlg : public SfxTabDialogController
{
public:
OutlineBulletDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView);
- virtual ~OutlineBulletDlg () override;
+ virtual ~OutlineBulletDlg() override;
const SfxItemSet* GetBulletOutputItemSet() const;
protected:
- virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
+ virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
private:
SfxItemSet m_aInputSet;
std::unique_ptr<SfxItemSet> m_xOutputSet;
bool m_bTitle;
- ::sd::View *m_pSdView;
+ ::sd::View* m_pSdView;
};
} // end of namespace sd
diff --git a/sd/source/ui/inc/OutlineViewShellBase.hxx b/sd/source/ui/inc/OutlineViewShellBase.hxx
index 266b59721db6..16f50f18c67a 100644
--- a/sd/source/ui/inc/OutlineViewShellBase.hxx
+++ b/sd/source/ui/inc/OutlineViewShellBase.hxx
@@ -22,13 +22,12 @@
#include "ImpressViewShellBase.hxx"
-namespace sd {
-
+namespace sd
+{
/** This class exists to be able to register a factory that
creates an outline view shell as default.
*/
-class OutlineViewShellBase
- : public ImpressViewShellBase
+class OutlineViewShellBase : public ImpressViewShellBase
{
public:
SFX_DECL_VIEWFACTORY(OutlineViewShellBase);
@@ -36,7 +35,7 @@ public:
/** This constructor is used by the view factory of the SFX
macros.
*/
- OutlineViewShellBase (SfxViewFrame *pFrame, SfxViewShell* pOldShell);
+ OutlineViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell);
virtual ~OutlineViewShellBase() override;
};
diff --git a/sd/source/ui/inc/PaneShells.hxx b/sd/source/ui/inc/PaneShells.hxx
index ae33b2009f53..4e681f3cc9b9 100644
--- a/sd/source/ui/inc/PaneShells.hxx
+++ b/sd/source/ui/inc/PaneShells.hxx
@@ -23,13 +23,12 @@
#include <sfx2/shell.hxx>
#include <glob.hxx>
-namespace sd {
-
+namespace sd
+{
/** Shell that displays the left pane for Impress. The shell does not do
anything else and has especially no slots.
*/
-class LeftImpressPaneShell
- : public SfxShell
+class LeftImpressPaneShell : public SfxShell
{
public:
SFX_DECL_INTERFACE(SD_IF_SDLEFTIMPRESSPANESHELL)
@@ -46,8 +45,7 @@ public:
/** Shell that displays the left pane for Draw. The shell does not do
anything else and has especially no slots.
*/
-class LeftDrawPaneShell
- : public SfxShell
+class LeftDrawPaneShell : public SfxShell
{
public:
SFX_DECL_INTERFACE(SD_IF_SDLEFTDRAWPANESHELL)
diff --git a/sd/source/ui/inc/PresentationViewShell.hxx b/sd/source/ui/inc/PresentationViewShell.hxx
index 7adbc6631461..d194cbab5d16 100644
--- a/sd/source/ui/inc/PresentationViewShell.hxx
+++ b/sd/source/ui/inc/PresentationViewShell.hxx
@@ -22,23 +22,23 @@
#include "DrawViewShell.hxx"
-namespace sd {
-
+namespace sd
+{
/** This view shell is responsible for showing the presentation of an
Impress document.
*/
class PresentationViewShell : public DrawViewShell
{
public:
-
- SFX_DECL_INTERFACE( SD_IF_SDPRESVIEWSHELL )
+ SFX_DECL_INTERFACE(SD_IF_SDPRESVIEWSHELL)
private:
/// SfxInterface initializer.
static void InitInterface_Impl();
public:
- PresentationViewShell( ViewShellBase& rViewShellBase, vcl::Window* pParentWindow, FrameView* pFrameView);
+ PresentationViewShell(ViewShellBase& rViewShellBase, vcl::Window* pParentWindow,
+ FrameView* pFrameView);
virtual ~PresentationViewShell() override;
/** This method is used by a simple class that passes some
@@ -48,7 +48,7 @@ public:
The frame view that is typically used by the creating object and
that shall be shared by the created view shell.
*/
- void FinishInitialization( FrameView* pFrameView );
+ void FinishInitialization(FrameView* pFrameView);
virtual void Resize() override;
@@ -57,11 +57,11 @@ protected:
virtual VclPtr<SvxRuler> CreateVRuler(::sd::Window* pWin) override;
private:
- ::tools::Rectangle maOldVisArea;
+ ::tools::Rectangle maOldVisArea;
ImplSVEvent* mnAbortSlideShowEvent;
- virtual void Activate (bool bIsMDIActivate) override;
- virtual void Paint (const ::tools::Rectangle& rRect, ::sd::Window* pWin) override;
+ virtual void Activate(bool bIsMDIActivate) override;
+ virtual void Paint(const ::tools::Rectangle& rRect, ::sd::Window* pWin) override;
DECL_LINK(AbortSlideShowHdl, void*, void);
};
diff --git a/sd/source/ui/inc/PresentationViewShellBase.hxx b/sd/source/ui/inc/PresentationViewShellBase.hxx
index 8c23c604aaf5..4d4d686008b6 100644
--- a/sd/source/ui/inc/PresentationViewShellBase.hxx
+++ b/sd/source/ui/inc/PresentationViewShellBase.hxx
@@ -22,13 +22,12 @@
#include "ViewShellBase.hxx"
-namespace sd {
-
+namespace sd
+{
/** This class exists to be able to register another factory that
creates the view shell for the presentation.
*/
-class PresentationViewShellBase
- : public ViewShellBase
+class PresentationViewShellBase : public ViewShellBase
{
public:
SFX_DECL_VIEWFACTORY(PresentationViewShellBase);
@@ -36,7 +35,7 @@ public:
/** This constructor is used by the view factory of the SFX
macros.
*/
- PresentationViewShellBase (SfxViewFrame *pFrame, SfxViewShell* pOldShell);
+ PresentationViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell);
virtual ~PresentationViewShellBase() override;
protected:
diff --git a/sd/source/ui/inc/ShellFactory.hxx b/sd/source/ui/inc/ShellFactory.hxx
index 20770a1897c0..a11e67979309 100644
--- a/sd/source/ui/inc/ShellFactory.hxx
+++ b/sd/source/ui/inc/ShellFactory.hxx
@@ -22,18 +22,17 @@
#include <sfx2/toolbarids.hxx>
-namespace sd {
-
+namespace sd
+{
typedef ToolbarId ShellId;
-template<class ShellType>
-class ShellFactory
+template <class ShellType> class ShellFactory
{
public:
/** This abstract virtual class needs a destructor so that the
destructors of derived classes are called.
*/
- virtual ~ShellFactory() {};
+ virtual ~ShellFactory(){};
/** Create a new instance of a view shell for the given id that will
be stacked onto the given view shell base.
@@ -46,7 +45,7 @@ public:
/** Tell the factory that a shell is no longer in use. It may destroy
it or put it for future use in a cache.
*/
- virtual void ReleaseShell (ShellType* pShell) = 0;
+ virtual void ReleaseShell(ShellType* pShell) = 0;
};
} // end of namespace sd
diff --git a/sd/source/ui/inc/SlideSorterViewShellBase.hxx b/sd/source/ui/inc/SlideSorterViewShellBase.hxx
index 2e3644db5bed..1e8b2391ef6c 100644
--- a/sd/source/ui/inc/SlideSorterViewShellBase.hxx
+++ b/sd/source/ui/inc/SlideSorterViewShellBase.hxx
@@ -22,13 +22,12 @@
#include "ImpressViewShellBase.hxx"
-namespace sd {
-
+namespace sd
+{
/** This class exists to be able to register a factory that creates a
slide sorter view shell as default.
*/
-class SlideSorterViewShellBase
- : public ImpressViewShellBase
+class SlideSorterViewShellBase : public ImpressViewShellBase
{
public:
SFX_DECL_VIEWFACTORY(SlideSorterViewShellBase);
@@ -36,7 +35,7 @@ public:
/** This constructor is used by the view factory of the SFX
macros.
*/
- SlideSorterViewShellBase (SfxViewFrame *pFrame, SfxViewShell* pOldShell);
+ SlideSorterViewShellBase(SfxViewFrame* pFrame, SfxViewShell* pOldShell);
virtual ~SlideSorterViewShellBase() override;
};
diff --git a/sd/source/ui/inc/SpellDialogChildWindow.hxx b/sd/source/ui/inc/SpellDialogChildWindow.hxx
index 41bd7de7aad6..eb0c2b9c0f4d 100644
--- a/sd/source/ui/inc/SpellDialogChildWindow.hxx
+++ b/sd/source/ui/inc/SpellDialogChildWindow.hxx
@@ -25,22 +25,17 @@
class SdOutliner;
-namespace sd {
-
+namespace sd
+{
/** This derivation of the svx::SpellDialogChildWindow base class
provides Draw and Impress specific implementations of
GetNextWrongSentence() and ApplyChangedSentence().
*/
-class SpellDialogChildWindow
- : public svx::SpellDialogChildWindow
- , public SfxListener
+class SpellDialogChildWindow : public svx::SpellDialogChildWindow, public SfxListener
{
public:
- SpellDialogChildWindow (
- vcl::Window* pParent,
- sal_uInt16 nId,
- SfxBindings* pBindings,
- SfxChildWinInfo* pInfo);
+ SpellDialogChildWindow(vcl::Window* pParent, sal_uInt16 nId, SfxBindings* pBindings,
+ SfxChildWinInfo* pInfo);
virtual ~SpellDialogChildWindow() override;
/** This method makes the one from the base class public so that
@@ -58,7 +53,7 @@ protected:
next sentence with spelling errors. While doing so the view
mode may be changed and text shapes are set into edit mode.
*/
- virtual svx::SpellPortions GetNextWrongSentence( bool bRecheck ) override;
+ virtual svx::SpellPortions GetNextWrongSentence(bool bRecheck) override;
/** This method is responsible for merging corrections made in the
spelling dialog back into the document.
diff --git a/sd/source/ui/inc/TemplateScanner.hxx b/sd/source/ui/inc/TemplateScanner.hxx
index 3a8d2488b4fd..02db64fbdedf 100644
--- a/sd/source/ui/inc/TemplateScanner.hxx
+++ b/sd/source/ui/inc/TemplateScanner.hxx
@@ -28,22 +28,29 @@
#include <memory>
#include <vector>
-namespace com::sun::star::ucb {
- class XContent;
- class XCommandEnvironment;
+namespace com::sun::star::ucb
+{
+class XContent;
+class XCommandEnvironment;
}
-namespace com::sun::star::sdbc { class XResultSet; }
-
-namespace sd {
+namespace com::sun::star::sdbc
+{
+class XResultSet;
+}
+namespace sd
+{
/** Representation of a template or layout file.
*/
class TemplateEntry
{
public:
- TemplateEntry (const OUString& rsTitle, const OUString& rsPath)
- : msTitle(rsTitle), msPath(rsPath) {}
+ TemplateEntry(const OUString& rsTitle, const OUString& rsPath)
+ : msTitle(rsTitle)
+ , msPath(rsPath)
+ {
+ }
OUString msTitle;
OUString msPath;
@@ -86,13 +93,17 @@ public:
<nullptr/> is returned either before the template scanning is
started or after it has ended.
*/
- const TemplateEntry* GetLastAddedEntry() const { return mpTemplateEntries.empty()?nullptr:mpTemplateEntries.back().get();}
+ const TemplateEntry* GetLastAddedEntry() const
+ {
+ return mpTemplateEntries.empty() ? nullptr : mpTemplateEntries.back().get();
+ }
private:
/** The current state determines which step will be executed next by
RunNextStep().
*/
- enum State {
+ enum State
+ {
INITIALIZE_SCANNING,
INITIALIZE_FOLDER_SCANNING,
GATHER_FOLDER_LIST,
@@ -105,7 +116,7 @@ private:
State meState;
::ucbhelper::Content maFolderContent;
- ::std::vector< std::unique_ptr<TemplateEntry> > mpTemplateEntries;
+ ::std::vector<std::unique_ptr<TemplateEntry>> mpTemplateEntries;
/** The folders that are collected by GatherFolderList().
*/
diff --git a/sd/source/ui/inc/ViewClipboard.hxx b/sd/source/ui/inc/ViewClipboard.hxx
index 1ed178307166..535d94e61ba6 100644
--- a/sd/source/ui/inc/ViewClipboard.hxx
+++ b/sd/source/ui/inc/ViewClipboard.hxx
@@ -25,8 +25,8 @@
class SdPage;
class SdTransferable;
-namespace sd {
-
+namespace sd
+{
class View;
/** Handle clipboard related tasks for the draw view.
@@ -34,13 +34,13 @@ class View;
class ViewClipboard
{
public:
- ViewClipboard (::sd::View& rView);
+ ViewClipboard(::sd::View& rView);
virtual ~ViewClipboard();
/** Handle the drop of a drag-and-drop action where the transferable
contains a set of pages.
*/
- void HandlePageDrop (const SdTransferable& rTransferable);
+ void HandlePageDrop(const SdTransferable& rTransferable);
protected:
::sd::View& mrView;
@@ -49,19 +49,17 @@ protected:
bookmark list of the transferable contains at least one non-master
page then NULL is returned.
*/
- static SdPage* GetFirstMasterPage (const SdTransferable& rTransferable);
+ static SdPage* GetFirstMasterPage(const SdTransferable& rTransferable);
/** Assign the (first) master page of the given transferable to the
(...) slide.
*/
- void AssignMasterPage (
- const SdTransferable& rTransferable,
- SdPage const * pMasterPage);
+ void AssignMasterPage(const SdTransferable& rTransferable, SdPage const* pMasterPage);
/** Return an index of a page after which the pages of the transferable
are to be inserted into the target document.
*/
- virtual sal_uInt16 DetermineInsertPosition ();
+ virtual sal_uInt16 DetermineInsertPosition();
/** Insert the slides in the given transferable behind the last selected
slide or, when the selection is empty, behind the last slide.
@@ -73,9 +71,7 @@ protected:
@return
Returns the number of inserted slides.
*/
- sal_uInt16 InsertSlides (
- const SdTransferable& rTransferable,
- sal_uInt16 nInsertPosition);
+ sal_uInt16 InsertSlides(const SdTransferable& rTransferable, sal_uInt16 nInsertPosition);
};
} // end of namespace ::sd
diff --git a/sd/source/ui/inc/ViewShellHint.hxx b/sd/source/ui/inc/ViewShellHint.hxx
index dbbd3d3d0d03..399317964b44 100644
--- a/sd/source/ui/inc/ViewShellHint.hxx
+++ b/sd/source/ui/inc/ViewShellHint.hxx
@@ -22,16 +22,16 @@
#include <svl/hint.hxx>
-namespace sd {
-
+namespace sd
+{
/** Local derivation of the SfxHint class that defines some hint ids that
are used by the ViewShell class and its descendants.
*/
-class ViewShellHint
- : public SfxHint
+class ViewShellHint : public SfxHint
{
public:
- enum HintId {
+ enum HintId
+ {
// Indicate that a page resize is about to begin.
HINT_PAGE_RESIZE_START,
// Indicate that a page resize has been completed.
@@ -45,9 +45,9 @@ public:
HINT_COMPLEX_MODEL_CHANGE_END
};
- ViewShellHint (HintId nHintId);
+ ViewShellHint(HintId nHintId);
- HintId GetHintId() const { return meHintId;}
+ HintId GetHintId() const { return meHintId; }
private:
HintId meHintId;
diff --git a/sd/source/ui/inc/ViewShellImplementation.hxx b/sd/source/ui/inc/ViewShellImplementation.hxx
index 89fbe2ddf87e..c11dc2ad56d3 100644
--- a/sd/source/ui/inc/ViewShellImplementation.hxx
+++ b/sd/source/ui/inc/ViewShellImplementation.hxx
@@ -28,8 +28,8 @@
class SvxIMapDlg;
-namespace sd {
-
+namespace sd
+{
/** This class contains (will contain) the implementation of methods that
have not be accessible from the outside.
*/
@@ -61,8 +61,8 @@ public:
/** Create a new instance. This allows the mpSelf member to be set
automatically.
*/
- static std::shared_ptr<ToolBarManagerLock> Create (
- const std::shared_ptr<ToolBarManager>& rpManager);
+ static std::shared_ptr<ToolBarManagerLock>
+ Create(const std::shared_ptr<ToolBarManager>& rpManager);
/** Release the lock. When the UI is captured
(Application::IsUICaptured() returns <TRUE/>) then the lock is
released later asynchronously.
@@ -70,10 +70,13 @@ public:
When this flag is <TRUE/> then the lock is released even
when IsUICaptured() returns <TRUE/>.
*/
- void Release (bool bForce = false);
- DECL_LINK(TimeoutCallback, Timer *, void);
+ void Release(bool bForce = false);
+ DECL_LINK(TimeoutCallback, Timer*, void);
+
private:
- ::std::unique_ptr<ToolBarManager::UpdateLock, o3tl::default_delete<ToolBarManager::UpdateLock>> mpLock;
+ ::std::unique_ptr<ToolBarManager::UpdateLock,
+ o3tl::default_delete<ToolBarManager::UpdateLock>>
+ mpLock;
/** The timer is used both as a safe guard to unlock the update lock
when Release() is not called explicitly. It is also used to
defer the release of the lock to a time when the UI is not
@@ -85,7 +88,7 @@ public:
holds another shared_ptr longer than only temporary.
*/
std::shared_ptr<ToolBarManagerLock> mpSelf;
- ToolBarManagerLock (const std::shared_ptr<sd::ToolBarManager>& rpManager);
+ ToolBarManagerLock(const std::shared_ptr<sd::ToolBarManager>& rpManager);
~ToolBarManagerLock();
class Deleter;
@@ -95,22 +98,19 @@ public:
// control.
std::weak_ptr<ToolBarManagerLock> mpUpdateLockForMouse;
- Implementation (ViewShell& rViewShell);
+ Implementation(ViewShell& rViewShell);
~Implementation() COVERITY_NOEXCEPT_FALSE;
/** Process the SID_MODIFY slot.
*/
- void ProcessModifyPageSlot (
- SfxRequest& rRequest,
- SdPage* pCurrentPage,
- PageKind ePageKind);
+ void ProcessModifyPageSlot(SfxRequest& rRequest, SdPage* pCurrentPage, PageKind ePageKind);
/** Assign the given layout to the given page. This method is at the
moment merely a front end for ProcessModifyPageSlot.
@param pPage
If a NULL pointer is given then this call is ignored.
*/
- void AssignLayout ( SfxRequest const & rRequest, PageKind ePageKind );
+ void AssignLayout(SfxRequest const& rRequest, PageKind ePageKind);
/** Determine the view id of the view shell. This corresponds to the
view id stored in the SfxViewFrame class.
diff --git a/sd/source/ui/inc/ViewShellManager.hxx b/sd/source/ui/inc/ViewShellManager.hxx
index c9e89ee86aa9..19c11133d1fd 100644
--- a/sd/source/ui/inc/ViewShellManager.hxx
+++ b/sd/source/ui/inc/ViewShellManager.hxx
@@ -27,8 +27,8 @@
class FmFormShell;
class SfxShell;
-namespace sd {
-
+namespace sd
+{
class ViewShell;
class ViewShellBase;
@@ -54,9 +54,9 @@ class ViewShellBase;
class ViewShellManager
{
public:
- typedef std::shared_ptr<ShellFactory<SfxShell> > SharedShellFactory;
+ typedef std::shared_ptr<ShellFactory<SfxShell>> SharedShellFactory;
- ViewShellManager (ViewShellBase& rBase);
+ ViewShellManager(ViewShellBase& rBase);
/** Before the destructor is called the method Shutdown() has to have
been called.
@@ -72,32 +72,28 @@ public:
/** Set the factory for sub shells of the specified view shell.
*/
- void AddSubShellFactory (
- ViewShell const * pViewShell,
- const SharedShellFactory& rpFactory);
- void RemoveSubShellFactory (
- ViewShell const * pViewShell,
- const SharedShellFactory& rpFactory);
+ void AddSubShellFactory(ViewShell const* pViewShell, const SharedShellFactory& rpFactory);
+ void RemoveSubShellFactory(ViewShell const* pViewShell, const SharedShellFactory& rpFactory);
/** Activate the given view shell.
*/
- void ActivateViewShell (ViewShell* pViewShell);
+ void ActivateViewShell(ViewShell* pViewShell);
/** Activate the given shell which is not a view shell. For view shells
use the ActivateViewShell() method.
*/
- void ActivateShell (SfxShell* pShell);
+ void ActivateShell(SfxShell* pShell);
/** Deactivate the specified shell, i.e. take it and all of its
object bars from the shell stack.
@param pShell
The shell to deactivate.
*/
- void DeactivateViewShell (const ViewShell* pShell);
+ void DeactivateViewShell(const ViewShell* pShell);
/** Deactivate the specified shell. The shell is not destroyed.
*/
- void DeactivateShell (const SfxShell* pShell);
+ void DeactivateShell(const SfxShell* pShell);
/** Associate the form shell with a view shell and their relative
position. This method does not change the shell stack, it just
@@ -111,7 +107,7 @@ public:
pViewShell on the SFX shell stack. Otherwise the form shell is
placed directly below the view shell.
*/
- void SetFormShell (const ViewShell* pParentShell, FmFormShell* pFormShell, bool bAbove);
+ void SetFormShell(const ViewShell* pParentShell, FmFormShell* pFormShell, bool bAbove);
/** Activate the specified shell as sub shell for the given view shell.
The sub shell factory associated with the view shell is used to
@@ -122,17 +118,16 @@ public:
This id is used only with the factory registered for the parent
view shell.
*/
- void ActivateSubShell (const ViewShell& rParentShell, ShellId nId);
+ void ActivateSubShell(const ViewShell& rParentShell, ShellId nId);
/** Deactivate the specified sub shell.
*/
- void DeactivateSubShell (const ViewShell& rParentShell, ShellId nId);
+ void DeactivateSubShell(const ViewShell& rParentShell, ShellId nId);
/** Send all sub shells of the specified view shell an Invalidate()
call. This does not modify the shell stack.
*/
- void InvalidateAllSubShells (
- ViewShell const * pViewShell);
+ void InvalidateAllSubShells(ViewShell const* pViewShell);
/** Move the specified view shell to the top most position on the stack
of view shells in relation to the other view shells. After this the
@@ -147,7 +142,7 @@ public:
@param nId
The id of the shell to move to the top.
*/
- void MoveToTop (const ViewShell& rShell);
+ void MoveToTop(const ViewShell& rShell);
/** Return the first, i.e. top most, view shell that has been activated
under the given id.
@@ -157,7 +152,7 @@ public:
When the specified shell is currently not active then NULL is
returned.
*/
- SfxShell* GetShell (ShellId nId) const;
+ SfxShell* GetShell(ShellId nId) const;
/** Return the top-most shell on the SFX shell stack regardless of
whether that is a view shell or a sub shell.
@@ -173,9 +168,13 @@ public:
class UpdateLock
{
public:
- UpdateLock (const std::shared_ptr<ViewShellManager>& rpManager)
- : mpManager(rpManager) {mpManager->LockUpdate();}
- ~UpdateLock() COVERITY_NOEXCEPT_FALSE {mpManager->UnlockUpdate();}
+ UpdateLock(const std::shared_ptr<ViewShellManager>& rpManager)
+ : mpManager(rpManager)
+ {
+ mpManager->LockUpdate();
+ }
+ ~UpdateLock() COVERITY_NOEXCEPT_FALSE { mpManager->UnlockUpdate(); }
+
private:
std::shared_ptr<ViewShellManager> mpManager;
};
@@ -183,7 +182,9 @@ public:
private:
class Implementation;
- std::unique_ptr<ViewShellManager::Implementation, o3tl::default_delete<ViewShellManager::Implementation>> mpImpl;
+ std::unique_ptr<ViewShellManager::Implementation,
+ o3tl::default_delete<ViewShellManager::Implementation>>
+ mpImpl;
bool mbValid;
void LockUpdate();
diff --git a/sd/source/ui/inc/Window.hxx b/sd/source/ui/inc/Window.hxx
index 979983e492ff..9e4e736bc01f 100644
--- a/sd/source/ui/inc/Window.hxx
+++ b/sd/source/ui/inc/Window.hxx
@@ -27,8 +27,8 @@
class OutlinerView;
-namespace sd {
-
+namespace sd
+{
class ViewShell;
/** An SdWindow contains the actual working area of ViewShell.
@@ -42,16 +42,14 @@ class ViewShell;
member of the <type>OutputDevice</type> base class. It is calculated to
be an integer percent value.
*/
-class Window
- : public vcl::Window,
- public ::DropTargetHelper
+class Window : public vcl::Window, public ::DropTargetHelper
{
public:
- Window (vcl::Window* pParent);
- virtual ~Window () override;
+ Window(vcl::Window* pParent);
+ virtual ~Window() override;
virtual void dispose() override;
- void SetViewShell (ViewShell* pViewSh);
+ void SetViewShell(ViewShell* pViewSh);
ViewShell* GetViewShell();
/** Set the zoom factor to the specified value and center the display
@@ -59,7 +57,7 @@ public:
@param nZoom
The zoom factor is given as integral percent value.
*/
- void SetZoomIntegral(::tools::Long nZoom);
+ void SetZoomIntegral(::tools::Long nZoom);
/** This internally used method performs the actual adaptation of the
window's map mode to the specified zoom factor.
@@ -72,7 +70,7 @@ public:
forced into that interval. Therefore the returned value is a
valid zoom factor.
*/
- ::tools::Long SetZoomFactor(::tools::Long nZoom);
+ ::tools::Long SetZoomFactor(::tools::Long nZoom);
/** This method is called when the whole page shall be displayed in the
window. Position and zoom factor are set so that the given
@@ -86,11 +84,11 @@ public:
@return
The new zoom factor is returned as integral percent value.
*/
- ::tools::Long SetZoomRect (const ::tools::Rectangle& rZoomRect);
+ ::tools::Long SetZoomRect(const ::tools::Rectangle& rZoomRect);
- ::tools::Long GetZoomForRect( const ::tools::Rectangle& rZoomRect );
+ ::tools::Long GetZoomForRect(const ::tools::Rectangle& rZoomRect);
- void SetMinZoomAutoCalc (bool bAuto);
+ void SetMinZoomAutoCalc(bool bAuto);
/** Calculate the minimal zoom factor as the value at which the
application area would completely fill the window. All values set
@@ -103,20 +101,20 @@ public:
<member>bMinZoomAutoCalc</member> is set (to <TRUE/>).</p>
*/
void CalcMinZoom();
- void SetMinZoom (::tools::Long nMin);
- ::tools::Long GetMinZoom() const { return mnMinZoom;}
- void SetMaxZoom (::tools::Long nMax);
- ::tools::Long GetMaxZoom() const { return mnMaxZoom;}
+ void SetMinZoom(::tools::Long nMin);
+ ::tools::Long GetMinZoom() const { return mnMinZoom; }
+ void SetMaxZoom(::tools::Long nMax);
+ ::tools::Long GetMaxZoom() const { return mnMaxZoom; }
::tools::Long GetZoom() const;
- const Point& GetWinViewPos() const { return maWinPos;}
- const Point& GetViewOrigin() const { return maViewOrigin;}
- const Size& GetViewSize() const { return maViewSize;}
+ const Point& GetWinViewPos() const { return maWinPos; }
+ const Point& GetViewOrigin() const { return maViewOrigin; }
+ const Size& GetViewSize() const { return maViewSize; }
void SetWinViewPos(const Point& rPnt);
void SetViewOrigin(const Point& rPnt);
void SetViewSize(const Size& rSize);
- void SetCenterAllowed (bool bIsAllowed);
+ void SetCenterAllowed(bool bIsAllowed);
/** Calculate origin of the map mode according to the size of the view
and window (its size in model coordinates; that takes the zoom
@@ -125,36 +123,38 @@ public:
larger than the view or the value of aWinPos in this direction is -1
then the window is centered in this direction.
*/
- void UpdateMapOrigin (bool bInvalidate = true);
+ void UpdateMapOrigin(bool bInvalidate = true);
void UpdateMapMode();
- double GetVisibleX() const; // interface for ScrollBars
- double GetVisibleY() const;
- void SetVisibleXY(double fX, double fY);
- double GetVisibleWidth() const;
- double GetVisibleHeight() const;
- Point GetVisibleCenter();
- double GetScrlLineWidth() const;
- double GetScrlLineHeight() const;
- double GetScrlPageWidth() const;
- double GetScrlPageHeight() const;
+ double GetVisibleX() const; // interface for ScrollBars
+ double GetVisibleY() const;
+ void SetVisibleXY(double fX, double fY);
+ double GetVisibleWidth() const;
+ double GetVisibleHeight() const;
+ Point GetVisibleCenter();
+ double GetScrlLineWidth() const;
+ double GetScrlLineHeight() const;
+ double GetScrlPageWidth() const;
+ double GetScrlPageHeight() const;
void GrabFocus();
- virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
+ virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
// DropTargetHelper
- virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ) override;
- virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ) override;
+ virtual sal_Int8 AcceptDrop(const AcceptDropEvent& rEvt) override;
+ virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent& rEvt) override;
/** The DropScroll() method is used by AcceptDrop() to scroll the
content of the window while dragging and dropping. With this method
you can control whether DropScroll() shall be used.
*/
- void SetUseDropScroll (bool bUseDropScroll);
- void DropScroll (const Point& rMousePos);
+ void SetUseDropScroll(bool bUseDropScroll);
+ void DropScroll(const Point& rMousePos);
virtual void KeyInput(const KeyEvent& rKEvt) override;
+
private:
OutlinerView* GetOutlinerView() const;
+
protected:
Point maWinPos;
Point maViewOrigin;
@@ -175,14 +175,15 @@ protected:
virtual void Resize() override;
virtual void PrePaint(vcl::RenderContext& rRenderContext) override;
- virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override;
+ virtual void Paint(vcl::RenderContext& rRenderContext,
+ const ::tools::Rectangle& rRect) override;
virtual void MouseMove(const MouseEvent& rMEvt) override;
virtual void MouseButtonUp(const MouseEvent& rMEvt) override;
virtual void MouseButtonDown(const MouseEvent& rMEvt) override;
virtual void Command(const CommandEvent& rCEvt) override;
- virtual void RequestHelp( const HelpEvent& rEvt ) override;
+ virtual void RequestHelp(const HelpEvent& rEvt) override;
virtual void LoseFocus() override;
- virtual bool EventNotify( NotifyEvent& rNEvt ) override;
+ virtual bool EventNotify(NotifyEvent& rNEvt) override;
/** Create an accessibility object that makes this window accessible.
@@ -190,8 +191,7 @@ protected:
The returned reference is empty if an accessible object could
not be created.
*/
- virtual css::uno::Reference<css::accessibility::XAccessible>
- CreateAccessible() override;
+ virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override;
OUString GetSurroundingText() const override;
Selection GetSurroundingTextSelection() const override;
diff --git a/sd/source/ui/inc/WindowUpdater.hxx b/sd/source/ui/inc/WindowUpdater.hxx
index a9d5947a9939..d13581aefc67 100644
--- a/sd/source/ui/inc/WindowUpdater.hxx
+++ b/sd/source/ui/inc/WindowUpdater.hxx
@@ -26,12 +26,15 @@
#include <vector>
-namespace vcl { class Window; }
+namespace vcl
+{
+class Window;
+}
class OutputDevice;
class SdDrawDocument;
-namespace sd {
-
+namespace sd
+{
/** The purpose of the <type>WindowUpdater</type> is to update output
devices to take care of modified global values. These values are
monitored for changes. At the moment this is
@@ -59,7 +62,7 @@ public:
This device is added to the device list if it is not <null/> and
when it is not already a member of that list.
*/
- void RegisterWindow (vcl::Window* pWindow);
+ void RegisterWindow(vcl::Window* pWindow);
/** Remove the given device from the list of devices which will be updated
when one of the monitored values changes.
@@ -67,7 +70,7 @@ public:
This device is removed from the device list when it is a member
of that list.
*/
- void UnregisterWindow (vcl::Window* pWindow);
+ void UnregisterWindow(vcl::Window* pWindow);
/** Set the document so that it is reformatted when one of the monitored
values changes.
@@ -75,7 +78,7 @@ public:
When <null/> is given document reformatting will not take
place in the future.
*/
- void SetDocument (SdDrawDocument* pDocument);
+ void SetDocument(SdDrawDocument* pDocument);
/** Update the given output device and update all text objects of the
view shell if not told otherwise.
@@ -83,12 +86,13 @@ public:
The device to update. When the given pointer is NULL then
nothing is done.
*/
- void Update (OutputDevice* pDevice) const;
+ void Update(OutputDevice* pDevice) const;
/** Callback that waits for notifications of a
<type>SvtCTLOptions</type> object.
*/
- virtual void ConfigurationChanged ( utl::ConfigurationBroadcaster*, ConfigurationHints nHint) override;
+ virtual void ConfigurationChanged(utl::ConfigurationBroadcaster*,
+ ConfigurationHints nHint) override;
private:
/// Options to monitor for changes.
@@ -97,14 +101,14 @@ private:
/// The document rendered in the output devices.
SdDrawDocument* mpDocument;
- WindowUpdater (const WindowUpdater& rUpdater) = delete;
+ WindowUpdater(const WindowUpdater& rUpdater) = delete;
- WindowUpdater operator= (const WindowUpdater& rUpdater) = delete;
+ WindowUpdater operator=(const WindowUpdater& rUpdater) = delete;
/** Type and data member for a list of devices that have to be kept
up-to-date.
*/
- typedef ::std::vector< VclPtr<vcl::Window> > tWindowList;
+ typedef ::std::vector<VclPtr<vcl::Window>> tWindowList;
tWindowList maWindowList;
/** The central method of this class. Update the given output device.
@@ -114,7 +118,7 @@ private:
The output device to update. When it is <null/> then the call
is ignored.
*/
- void UpdateWindow (OutputDevice* pDevice) const;
+ void UpdateWindow(OutputDevice* pDevice) const;
};
} // end of namespace sd
diff --git a/sd/source/ui/inc/annotationmanager.hxx b/sd/source/ui/inc/annotationmanager.hxx
index 81ed8037f88c..cb42d63ab832 100644
--- a/sd/source/ui/inc/annotationmanager.hxx
+++ b/sd/source/ui/inc/annotationmanager.hxx
@@ -27,23 +27,21 @@ class SfxItemSet;
namespace sd
{
-
class ViewShellBase;
class AnnotationManagerImpl;
class AnnotationManager
{
public:
- AnnotationManager( ViewShellBase& rViewShellBase );
+ AnnotationManager(ViewShellBase& rViewShellBase);
~AnnotationManager();
- void ExecuteAnnotation (SfxRequest const & rRequest);
- void GetAnnotationState (SfxItemSet& rItemSet);
+ void ExecuteAnnotation(SfxRequest const& rRequest);
+ void GetAnnotationState(SfxItemSet& rItemSet);
private:
- ::rtl::Reference< AnnotationManagerImpl > mxImpl;
+ ::rtl::Reference<AnnotationManagerImpl> mxImpl;
};
-
}
#endif // INCLUDED_SD_SOURCE_UI_INC_ANNOTATIONMANAGER_HXX
diff --git a/sd/source/ui/inc/bulmaper.hxx b/sd/source/ui/inc/bulmaper.hxx
index d2f8d6524f9f..3de99d2626bf 100644
--- a/sd/source/ui/inc/bulmaper.hxx
+++ b/sd/source/ui/inc/bulmaper.hxx
@@ -27,12 +27,11 @@ class SvxNumRule;
class SD_DLLPUBLIC SdBulletMapper
{
public:
-/* #i35937#
+ /* #i35937#
static void PreMapNumBulletForDialog( SfxItemSet& rSet );
static void PostMapNumBulletForDialog( SfxItemSet& rSet );
*/
- static void MapFontsInNumRule( SvxNumRule& aNumRule, const SfxItemSet& rSet );
-
+ static void MapFontsInNumRule(SvxNumRule& aNumRule, const SfxItemSet& rSet);
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/copydlg.hxx b/sd/source/ui/inc/copydlg.hxx
index e6a114c15fcb..3f95cf2e12d1 100644
--- a/sd/source/ui/inc/copydlg.hxx
+++ b/sd/source/ui/inc/copydlg.hxx
@@ -25,8 +25,8 @@
class ColorListBox;
-namespace sd {
-
+namespace sd
+{
class View;
/**
@@ -38,13 +38,13 @@ public:
CopyDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View* pView);
virtual ~CopyDlg() override;
- void GetAttr( SfxItemSet& rOutAttrs );
+ void GetAttr(SfxItemSet& rOutAttrs);
void Reset();
private:
- const SfxItemSet& mrOutAttrs;
- Fraction maUIScale;
- ::sd::View* mpView;
+ const SfxItemSet& mrOutAttrs;
+ Fraction maUIScale;
+ ::sd::View* mpView;
std::unique_ptr<weld::SpinButton> m_xNumFldCopies;
std::unique_ptr<weld::Button> m_xBtnSetViewData;
diff --git a/sd/source/ui/inc/createtabledesignpanel.hxx b/sd/source/ui/inc/createtabledesignpanel.hxx
index 42ae072ea325..2ed8ec9672e1 100644
--- a/sd/source/ui/inc/createtabledesignpanel.hxx
+++ b/sd/source/ui/inc/createtabledesignpanel.hxx
@@ -23,14 +23,16 @@
#include <sal/config.h>
#include <vcl/vclptr.hxx>
-namespace vcl { class Window; }
+namespace vcl
+{
+class Window;
+}
class ViewShellBase;
-namespace sd {
-
-VclPtr<vcl::Window> createTableDesignPanel (vcl::Window* pParent, ViewShellBase& rBase);
-
+namespace sd
+{
+VclPtr<vcl::Window> createTableDesignPanel(vcl::Window* pParent, ViewShellBase& rBase);
}
#endif
diff --git a/sd/source/ui/inc/createtableobjectbar.hxx b/sd/source/ui/inc/createtableobjectbar.hxx
index 310e30c0d045..8fc21f19fcfc 100644
--- a/sd/source/ui/inc/createtableobjectbar.hxx
+++ b/sd/source/ui/inc/createtableobjectbar.hxx
@@ -23,15 +23,15 @@
class SfxShell;
-namespace sd {
- class View;
- class ViewShell;
+namespace sd
+{
+class View;
+class ViewShell;
}
-namespace sd::ui::table {
-
-SfxShell* CreateTableObjectBar( ViewShell& rShell, ::sd::View* pView );
-
+namespace sd::ui::table
+{
+SfxShell* CreateTableObjectBar(ViewShell& rShell, ::sd::View* pView);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/diactrl.hxx b/sd/source/ui/inc/diactrl.hxx
index dae2ec2def26..850779a4b4be 100644
--- a/sd/source/ui/inc/diactrl.hxx
+++ b/sd/source/ui/inc/diactrl.hxx
@@ -23,7 +23,10 @@
#include <vcl/InterimItemWindow.hxx>
#include <sfx2/tbxctrl.hxx>
-namespace com::sun::star::frame { class XFrame; }
+namespace com::sun::star::frame
+{
+class XFrame;
+}
class SfxUInt16Item;
// SdPagesField:
@@ -45,7 +48,7 @@ public:
void set_sensitive(bool bSensitive);
virtual ~SdPagesField() override;
- void UpdatePagesField( const SfxUInt16Item* pItem );
+ void UpdatePagesField(const SfxUInt16Item* pItem);
};
// SdTbxCtlDiaPages:
@@ -53,13 +56,13 @@ public:
class SdTbxCtlDiaPages : public SfxToolBoxControl
{
public:
- virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
- const SfxPoolItem* pState ) override;
- virtual VclPtr<InterimItemWindow> CreateItemWindow( vcl::Window *pParent ) override;
+ virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState,
+ const SfxPoolItem* pState) override;
+ virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override;
SFX_DECL_TOOLBOX_CONTROL();
- SdTbxCtlDiaPages( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
+ SdTbxCtlDiaPages(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
virtual ~SdTbxCtlDiaPages() override;
};
diff --git a/sd/source/ui/inc/filedlg.hxx b/sd/source/ui/inc/filedlg.hxx
index 48c89e95cf6e..752bf7225979 100644
--- a/sd/source/ui/inc/filedlg.hxx
+++ b/sd/source/ui/inc/filedlg.hxx
@@ -39,10 +39,10 @@ class SdFileDialog_Imp;
*/
class SD_DLLPUBLIC SdOpenSoundFileDialog
{
- const std::unique_ptr< SdFileDialog_Imp > mpImpl;
+ const std::unique_ptr<SdFileDialog_Imp> mpImpl;
- SdOpenSoundFileDialog (const SdOpenSoundFileDialog &) = delete;
- SdOpenSoundFileDialog & operator= (const SdOpenSoundFileDialog &) = delete;
+ SdOpenSoundFileDialog(const SdOpenSoundFileDialog&) = delete;
+ SdOpenSoundFileDialog& operator=(const SdOpenSoundFileDialog&) = delete;
public:
SdOpenSoundFileDialog(weld::Window* pParent);
@@ -50,7 +50,7 @@ public:
ErrCode Execute();
OUString GetPath() const;
- void SetPath( const OUString& rPath );
+ void SetPath(const OUString& rPath);
// WIP, please don't remove, dear Clang plugins
bool IsInsertAsLinkSelected() const;
};
diff --git a/sd/source/ui/inc/framework/DrawModule.hxx b/sd/source/ui/inc/framework/DrawModule.hxx
index 24be5293ef24..cf8801b74c8f 100644
--- a/sd/source/ui/inc/framework/DrawModule.hxx
+++ b/sd/source/ui/inc/framework/DrawModule.hxx
@@ -22,19 +22,24 @@
#include <sal/types.h>
-namespace com::sun::star::frame { class XController; }
-namespace com::sun::star::uno { template <typename > class Reference; }
-
-namespace sd::framework {
+namespace com::sun::star::frame
+{
+class XController;
+}
+namespace com::sun::star::uno
+{
+template <typename> class Reference;
+}
+namespace sd::framework
+{
/** The task of this module is to instantiate all modules that belong to the
Draw application.
*/
class DrawModule
{
public:
- static void Initialize (
- css::uno::Reference<css::frame::XController> const & rxController);
+ static void Initialize(css::uno::Reference<css::frame::XController> const& rxController);
};
} // end of namespace sd::framework
diff --git a/sd/source/ui/inc/framework/ImpressModule.hxx b/sd/source/ui/inc/framework/ImpressModule.hxx
index 5f46ab0d3944..86b95da1a399 100644
--- a/sd/source/ui/inc/framework/ImpressModule.hxx
+++ b/sd/source/ui/inc/framework/ImpressModule.hxx
@@ -22,19 +22,24 @@
#include <sal/types.h>
-namespace com::sun::star::frame { class XController; }
-namespace com::sun::star::uno { template <class interface_type> class Reference; }
-
-namespace sd::framework {
+namespace com::sun::star::frame
+{
+class XController;
+}
+namespace com::sun::star::uno
+{
+template <class interface_type> class Reference;
+}
+namespace sd::framework
+{
/** The task of this module is to instantiate all modules that belong to the
Impress application.
*/
class ImpressModule
{
public:
- static void Initialize (
- css::uno::Reference<css::frame::XController> const & rxController);
+ static void Initialize(css::uno::Reference<css::frame::XController> const& rxController);
};
} // end of namespace sd::framework
diff --git a/sd/source/ui/inc/framework/PresentationModule.hxx b/sd/source/ui/inc/framework/PresentationModule.hxx
index a8f3fcc3ded3..4da48f090cf2 100644
--- a/sd/source/ui/inc/framework/PresentationModule.hxx
+++ b/sd/source/ui/inc/framework/PresentationModule.hxx
@@ -22,19 +22,24 @@
#include <sal/types.h>
-namespace com::sun::star::frame { class XController; }
-namespace com::sun::star::uno { template <class interface_type> class Reference; }
-
-namespace sd::framework {
+namespace com::sun::star::frame
+{
+class XController;
+}
+namespace com::sun::star::uno
+{
+template <class interface_type> class Reference;
+}
+namespace sd::framework
+{
/** The task of this module is to instantiate all modules that belong to the
fullscreen presentation.
*/
class PresentationModule
{
public:
- static void Initialize (
- css::uno::Reference<css::frame::XController> const & rxController);
+ static void Initialize(css::uno::Reference<css::frame::XController> const& rxController);
};
} // end of namespace sd::framework
diff --git a/sd/source/ui/inc/gluectrl.hxx b/sd/source/ui/inc/gluectrl.hxx
index 3b837a78b284..5176c980f402 100644
--- a/sd/source/ui/inc/gluectrl.hxx
+++ b/sd/source/ui/inc/gluectrl.hxx
@@ -31,7 +31,7 @@ enum class SdrEscapeDirection;
class GlueEscDirLB final : public InterimItemWindow
{
private:
- css::uno::Reference< css::frame::XFrame > m_xFrame;
+ css::uno::Reference<css::frame::XFrame> m_xFrame;
std::unique_ptr<weld::ComboBox> m_xWidget;
DECL_LINK(SelectHdl, weld::ComboBox&, void);
@@ -51,19 +51,19 @@ public:
/**
* Toolbox controller for glue-point escape direction
*/
-class SdTbxCtlGlueEscDir: public SfxToolBoxControl
+class SdTbxCtlGlueEscDir : public SfxToolBoxControl
{
private:
- static sal_uInt16 GetEscDirPos( SdrEscapeDirection nEscDir );
+ static sal_uInt16 GetEscDirPos(SdrEscapeDirection nEscDir);
public:
- virtual void StateChanged( sal_uInt16 nSId, SfxItemState eState,
- const SfxPoolItem* pState ) override;
- virtual VclPtr<InterimItemWindow> CreateItemWindow( vcl::Window *pParent ) override;
+ virtual void StateChanged(sal_uInt16 nSId, SfxItemState eState,
+ const SfxPoolItem* pState) override;
+ virtual VclPtr<InterimItemWindow> CreateItemWindow(vcl::Window* pParent) override;
- SFX_DECL_TOOLBOX_CONTROL();
+ SFX_DECL_TOOLBOX_CONTROL();
- SdTbxCtlGlueEscDir( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
+ SdTbxCtlGlueEscDir(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx);
};
#endif // INCLUDED_SD_SOURCE_UI_INC_GLUECTRL_HXX
diff --git a/sd/source/ui/inc/prntopts.hxx b/sd/source/ui/inc/prntopts.hxx
index 554182b8203d..8325e5e5fb10 100644
--- a/sd/source/ui/inc/prntopts.hxx
+++ b/sd/source/ui/inc/prntopts.hxx
@@ -24,7 +24,7 @@
class SdPrintOptions : public SfxTabPage
{
- friend class SdModule;
+ friend class SdModule;
private:
std::unique_ptr<weld::Frame> m_xFrmContent;
@@ -47,21 +47,23 @@ private:
std::unique_ptr<weld::CheckButton> m_xCbxBack;
std::unique_ptr<weld::CheckButton> m_xCbxPaperbin;
- DECL_LINK( ClickCheckboxHdl, weld::ToggleButton&, void );
- DECL_LINK( ClickBookletHdl, weld::ToggleButton&, void );
+ DECL_LINK(ClickCheckboxHdl, weld::ToggleButton&, void);
+ DECL_LINK(ClickBookletHdl, weld::ToggleButton&, void);
void updateControls();
public:
- SdPrintOptions(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
+ SdPrintOptions(weld::Container* pPage, weld::DialogController* pController,
+ const SfxItemSet& rInAttrs);
virtual ~SdPrintOptions() override;
- static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
+ static std::unique_ptr<SfxTabPage>
+ Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet*);
- virtual bool FillItemSet( SfxItemSet* ) override;
- virtual void Reset( const SfxItemSet * ) override;
+ virtual bool FillItemSet(SfxItemSet*) override;
+ virtual void Reset(const SfxItemSet*) override;
- void SetDrawMode();
+ void SetDrawMode();
virtual void PageCreated(const SfxAllItemSet& aSet) override;
};
diff --git a/sd/source/ui/inc/pubdlg.hxx b/sd/source/ui/inc/pubdlg.hxx
index 9556249c1135..4832a5c9dde4 100644
--- a/sd/source/ui/inc/pubdlg.hxx
+++ b/sd/source/ui/inc/pubdlg.hxx
@@ -35,8 +35,14 @@ class SdHtmlAttrPreview;
class SdPublishingDesign;
class ButtonSet;
-namespace com::sun::star::beans { struct PropertyValue; }
-namespace com::sun::star::uno { template <class E> class Sequence; }
+namespace com::sun::star::beans
+{
+struct PropertyValue;
+}
+namespace com::sun::star::uno
+{
+template <class E> class Sequence;
+}
// *********************************************************************
// Html-Export Autopilot
@@ -141,17 +147,17 @@ private:
std::unique_ptr<SdHtmlAttrPreview> m_xPage6_Preview;
std::unique_ptr<weld::CustomWeld> m_xPage6_PreviewWnd;
- std::unique_ptr< ButtonSet > m_xButtonSet;
+ std::unique_ptr<ButtonSet> m_xButtonSet;
// standard controls
std::unique_ptr<weld::Button> m_xLastPageButton;
std::unique_ptr<weld::Button> m_xNextPageButton;
std::unique_ptr<weld::Button> m_xFinishButton;
- Assistent aAssistentFunc;
+ Assistent aAssistentFunc;
- bool m_bImpress;
- bool m_bButtonsDirty;
+ bool m_bImpress;
+ bool m_bButtonsDirty;
void SetDefaults();
void CreatePages();
@@ -159,41 +165,41 @@ private:
Color m_aBackColor, m_aTextColor, m_aLinkColor;
Color m_aVLinkColor, m_aALinkColor;
- void ChangePage();
- void UpdatePage();
+ void ChangePage();
+ void UpdatePage();
- std::vector<SdPublishingDesign> m_aDesignList;
- bool m_bDesignListDirty;
+ std::vector<SdPublishingDesign> m_aDesignList;
+ bool m_bDesignListDirty;
SdPublishingDesign* m_pDesign;
- void Load();
- bool Save();
-
- void GetDesign( SdPublishingDesign* pDesign );
- void SetDesign( SdPublishingDesign const * pDesign );
-
- void LoadPreviewButtons();
-
- DECL_LINK( FinishHdl, weld::Button&, void );
- DECL_LINK( NextPageHdl, weld::Button&, void );
- DECL_LINK( LastPageHdl, weld::Button&, void );
-
- DECL_LINK( DesignHdl, weld::Button&, void );
- DECL_LINK( DesignSelectHdl, weld::TreeView&, void );
- DECL_LINK( DesignDeleteHdl, weld::Button&, void );
- DECL_LINK( BaseHdl, weld::Button&, void );
- DECL_LINK( ContentHdl, weld::Button&, void );
- DECL_LINK( GfxFormatHdl, weld::Button&, void );
- DECL_LINK( ResolutionHdl, weld::Button&, void );
- DECL_LINK( ButtonsHdl, ValueSet*, void );
- DECL_LINK( ColorHdl, weld::Button&, void );
- DECL_LINK( WebServerHdl, weld::Button&, void );
- DECL_LINK( SlideChgHdl, weld::Button&, void );
+ void Load();
+ bool Save();
+
+ void GetDesign(SdPublishingDesign* pDesign);
+ void SetDesign(SdPublishingDesign const* pDesign);
+
+ void LoadPreviewButtons();
+
+ DECL_LINK(FinishHdl, weld::Button&, void);
+ DECL_LINK(NextPageHdl, weld::Button&, void);
+ DECL_LINK(LastPageHdl, weld::Button&, void);
+
+ DECL_LINK(DesignHdl, weld::Button&, void);
+ DECL_LINK(DesignSelectHdl, weld::TreeView&, void);
+ DECL_LINK(DesignDeleteHdl, weld::Button&, void);
+ DECL_LINK(BaseHdl, weld::Button&, void);
+ DECL_LINK(ContentHdl, weld::Button&, void);
+ DECL_LINK(GfxFormatHdl, weld::Button&, void);
+ DECL_LINK(ResolutionHdl, weld::Button&, void);
+ DECL_LINK(ButtonsHdl, ValueSet*, void);
+ DECL_LINK(ColorHdl, weld::Button&, void);
+ DECL_LINK(WebServerHdl, weld::Button&, void);
+ DECL_LINK(SlideChgHdl, weld::Button&, void);
public:
SdPublishingDlg(weld::Window* pWindow, DocumentType eDocType);
virtual ~SdPublishingDlg() override;
- void GetParameterSequence( css::uno::Sequence< css::beans::PropertyValue >& rParams );
+ void GetParameterSequence(css::uno::Sequence<css::beans::PropertyValue>& rParams);
};
#endif // INCLUDED_SD_SOURCE_UI_INC_PUBDLG_HXX
diff --git a/sd/source/ui/inc/registerinterfaces.hxx b/sd/source/ui/inc/registerinterfaces.hxx
index 15120cd03e4b..d5e394fa0d17 100644
--- a/sd/source/ui/inc/registerinterfaces.hxx
+++ b/sd/source/ui/inc/registerinterfaces.hxx
@@ -23,10 +23,9 @@
#include <sal/config.h>
#include <sfx2/module.hxx>
-namespace sd::ui::table {
-
-void RegisterInterfaces( const SfxModule* pMod );
-
+namespace sd::ui::table
+{
+void RegisterInterfaces(const SfxModule* pMod);
}
#endif
diff --git a/sd/source/ui/inc/smarttag.hxx b/sd/source/ui/inc/smarttag.hxx
index a1117b8f33f9..4ce1e20234da 100644
--- a/sd/source/ui/inc/smarttag.hxx
+++ b/sd/source/ui/inc/smarttag.hxx
@@ -29,8 +29,8 @@
class KeyEvent;
class MouseEvent;
-namespace sd {
-
+namespace sd
+{
class View;
class SmartHdl;
@@ -46,20 +46,20 @@ class SmartTag : public SimpleReferenceComponent
friend class SmartTagSet;
public:
- explicit SmartTag( ::sd::View& rView );
+ explicit SmartTag(::sd::View& rView);
virtual ~SmartTag() override;
/** returns true if the SmartTag consumes this event. */
- virtual bool MouseButtonDown( const MouseEvent&, SmartHdl& );
+ virtual bool MouseButtonDown(const MouseEvent&, SmartHdl&);
/** returns true if the SmartTag consumes this event. */
- virtual bool KeyInput( const KeyEvent& rKEvt );
+ virtual bool KeyInput(const KeyEvent& rKEvt);
/** returns true if the SmartTag consumes this event. */
- virtual bool Command( const CommandEvent& rCEvt );
+ virtual bool Command(const CommandEvent& rCEvt);
/** returns true if this smart tag is currently selected */
- bool isSelected() const { return mbSelected;}
+ bool isSelected() const { return mbSelected; }
::sd::View& getView() const { return mrView; }
@@ -70,10 +70,10 @@ protected:
virtual void CheckPossibilities();
virtual bool MarkPoints(const ::tools::Rectangle* pRect, bool bUnmark);
- virtual void addCustomHandles( SdrHdlList& rHandlerList );
+ virtual void addCustomHandles(SdrHdlList& rHandlerList);
virtual void select();
virtual void deselect();
- virtual bool getContext( SdrViewContext& rContext );
+ virtual bool getContext(SdrViewContext& rContext);
virtual void disposing() override;
@@ -81,22 +81,23 @@ protected:
bool mbSelected;
private:
- SmartTag( const SmartTag& ) = delete;
- SmartTag& operator=( const SmartTag& ) = delete;
+ SmartTag(const SmartTag&) = delete;
+ SmartTag& operator=(const SmartTag&) = delete;
};
-typedef rtl::Reference< SmartTag > SmartTagReference;
+typedef rtl::Reference<SmartTag> SmartTagReference;
/** class to administrate the available smart tags for a single view. */
class SmartTagSet
{
friend class SmartTag;
+
public:
- explicit SmartTagSet( ::sd::View& rView );
+ explicit SmartTagSet(::sd::View& rView);
~SmartTagSet();
/** selects the given smart tag and updates all handles */
- void select( const SmartTagReference& xTag );
+ void select(const SmartTagReference& xTag);
/** deselects the current selected smart tag and updates all handles */
void deselect();
@@ -105,23 +106,23 @@ public:
const SmartTagReference& getSelected() const { return mxSelectedTag; }
/** returns true if a SmartTag consumes this event. */
- bool MouseButtonDown( const MouseEvent& );
+ bool MouseButtonDown(const MouseEvent&);
/** returns true if a SmartTag consumes this event. */
- bool KeyInput( const KeyEvent& rKEvt );
+ bool KeyInput(const KeyEvent& rKEvt);
/** returns true if a SmartTag consumes this event. */
- bool Command( const CommandEvent& rCEvt );
+ bool Command(const CommandEvent& rCEvt);
/** disposes all smart tags and clears the set */
void Dispose();
/** adds the handles from all smart tags to the given list */
- void addCustomHandles( SdrHdlList& rHandlerList );
+ void addCustomHandles(SdrHdlList& rHandlerList);
/** returns true if the currently selected smart tag has
a special context, returned in rContext. */
- bool getContext( SdrViewContext& rContext ) const;
+ bool getContext(SdrViewContext& rContext) const;
// support point editing
bool HasMarkablePoints() const;
@@ -134,16 +135,16 @@ public:
void CheckPossibilities();
private:
- SmartTagSet( const SmartTagSet& ) = delete;
- SmartTagSet& operator=( const SmartTagSet& ) = delete;
+ SmartTagSet(const SmartTagSet&) = delete;
+ SmartTagSet& operator=(const SmartTagSet&) = delete;
/** adds a new smart tag to this set */
- void add( const SmartTagReference& xTag );
+ void add(const SmartTagReference& xTag);
/** removes the given smart tag from this set */
- void remove( const SmartTagReference& xTag );
+ void remove(const SmartTagReference& xTag);
- std::set< SmartTagReference > maSet;
+ std::set<SmartTagReference> maSet;
::sd::View& mrView;
SmartTagReference mxSelectedTag;
@@ -156,10 +157,12 @@ private:
class SmartHdl : public SdrHdl
{
public:
- SmartHdl( const SmartTagReference& xTag, SdrObject* pObject, const Point& rPnt, SdrHdlKind eNewKind );
- SmartHdl( const SmartTagReference& xTag, const Point& rPnt, SdrHdlKind eNewKind );
+ SmartHdl(const SmartTagReference& xTag, SdrObject* pObject, const Point& rPnt,
+ SdrHdlKind eNewKind);
+ SmartHdl(const SmartTagReference& xTag, const Point& rPnt, SdrHdlKind eNewKind);
const SmartTagReference& getTag() const { return mxSmartTag; }
+
private:
SmartTagReference mxSmartTag;
};
diff --git a/sd/source/ui/inc/tablefunction.hxx b/sd/source/ui/inc/tablefunction.hxx
index 6593cce9c494..c803f90eb76a 100644
--- a/sd/source/ui/inc/tablefunction.hxx
+++ b/sd/source/ui/inc/tablefunction.hxx
@@ -25,10 +25,9 @@
#include <tools/stream.hxx>
#include <drawdoc.hxx>
-namespace sd {
-
-void CreateTableFromRTF( SvStream& rStream, SdDrawDocument* pModel );
-
+namespace sd
+{
+void CreateTableFromRTF(SvStream& rStream, SdDrawDocument* pModel);
}
#endif
diff --git a/sd/source/ui/inc/tools/AsynchronousCall.hxx b/sd/source/ui/inc/tools/AsynchronousCall.hxx
index fe5b7ab18826..eac29c869d77 100644
--- a/sd/source/ui/inc/tools/AsynchronousCall.hxx
+++ b/sd/source/ui/inc/tools/AsynchronousCall.hxx
@@ -25,8 +25,8 @@
#include <memory>
#include <functional>
-namespace sd::tools {
-
+namespace sd::tools
+{
/** Store a function object and execute it asynchronous.
The features of this class are:
@@ -61,9 +61,8 @@ public:
The function object that may be called asynchronously in the
near future.
*/
- typedef ::std::function<void ()> AsynchronousFunction;
- void Post (
- const AsynchronousFunction& rFunction);
+ typedef ::std::function<void()> AsynchronousFunction;
+ void Post(const AsynchronousFunction& rFunction);
private:
Timer maTimer;
@@ -71,7 +70,7 @@ private:
function is called the next time. This pointer may be NULL.
*/
::std::unique_ptr<AsynchronousFunction> mpFunction;
- DECL_LINK(TimerCallback,Timer*,void);
+ DECL_LINK(TimerCallback, Timer*, void);
};
} // end of namespace ::sd::tools
diff --git a/sd/source/ui/inc/tools/AsynchronousTask.hxx b/sd/source/ui/inc/tools/AsynchronousTask.hxx
index e6244b141f3c..39e9bdb31ee7 100644
--- a/sd/source/ui/inc/tools/AsynchronousTask.hxx
+++ b/sd/source/ui/inc/tools/AsynchronousTask.hxx
@@ -20,8 +20,8 @@
#ifndef INCLUDED_SD_SOURCE_UI_INC_TOOLS_ASYNCHRONOUSTASK_HXX
#define INCLUDED_SD_SOURCE_UI_INC_TOOLS_ASYNCHRONOUSTASK_HXX
-namespace sd::tools {
-
+namespace sd::tools
+{
/** Interface for the asynchronous execution of a task. This interface
allows a controller to run the task either timer based with a fixed
amount of time between the steps or thread based one step right after
diff --git a/sd/source/ui/inc/tools/IconCache.hxx b/sd/source/ui/inc/tools/IconCache.hxx
index 9cd3c65fed2c..361be6ab7e6e 100644
--- a/sd/source/ui/inc/tools/IconCache.hxx
+++ b/sd/source/ui/inc/tools/IconCache.hxx
@@ -24,8 +24,8 @@
#include <tools/SdGlobalResourceContainer.hxx>
#include <vcl/image.hxx>
-namespace sd {
-
+namespace sd
+{
/** This simple class stores frequently used icons so that the classes that
use the icons do not have to store them in every one of their
instances.
@@ -35,8 +35,7 @@ namespace sd {
This cache acts like a singleton with a lifetime equal to that of the sd
module.
*/
-class IconCache
- : public SdGlobalResource
+class IconCache : public SdGlobalResource
{
public:
/** The lifetime of the returned reference is limited to that of the sd
diff --git a/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx b/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx
index 5d401a98a456..85d149124dac 100644
--- a/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx
+++ b/sd/source/ui/inc/tools/SdGlobalResourceContainer.hxx
@@ -24,15 +24,21 @@
#include <sal/types.h>
#include <o3tl/deleter.hxx>
-namespace com::sun::star::uno { template <class interface_type> class Reference; }
-namespace com::sun::star::uno { class XInterface; }
-
-namespace sd {
+namespace com::sun::star::uno
+{
+template <class interface_type> class Reference;
+}
+namespace com::sun::star::uno
+{
+class XInterface;
+}
+namespace sd
+{
class SdGlobalResource
{
public:
- virtual ~SdGlobalResource() COVERITY_NOEXCEPT_FALSE {};
+ virtual ~SdGlobalResource() COVERITY_NOEXCEPT_FALSE{};
};
/** The purpose of this container is to hold references to resources that
@@ -68,7 +74,7 @@ public:
When in doubt, use the shared_ptr variant of this method.
*/
- void AddResource (::std::unique_ptr<SdGlobalResource> pResource);
+ void AddResource(::std::unique_ptr<SdGlobalResource> pResource);
/** Add a resource to the container. By using a shared_ptr and
releasing it only when the SgGlobalResourceContainer is destroyed
@@ -76,13 +82,13 @@ public:
time of the destruction of SgGlobalResourceContainer no other
references exist the resource is destroyed as well.
*/
- void AddResource (const std::shared_ptr<SdGlobalResource>& pResource);
+ void AddResource(const std::shared_ptr<SdGlobalResource>& pResource);
/** Add a resource that is implemented as UNO object. Destruction
(when the sd modules is unloaded) is done by a) calling dispose()
when the XComponent is supported and by b) releasing the reference.
*/
- void AddResource (const css::uno::Reference<css::uno::XInterface>& rxResource);
+ void AddResource(const css::uno::Reference<css::uno::XInterface>& rxResource);
private:
friend class SdGlobalResourceContainerInstance;
diff --git a/sd/source/ui/inc/uiobject.hxx b/sd/source/ui/inc/uiobject.hxx
index bfc43dd4a370..06cf98937a52 100644
--- a/sd/source/ui/inc/uiobject.hxx
+++ b/sd/source/ui/inc/uiobject.hxx
@@ -14,13 +14,11 @@
class ImpressWindowUIObject : public WindowUIObject
{
public:
-
ImpressWindowUIObject(const VclPtr<sd::Window>& xWindow);
virtual StringMap get_state() override;
- virtual void execute(const OUString& rAction,
- const StringMap& rParameters) override;
+ virtual void execute(const OUString& rAction, const StringMap& rParameters) override;
virtual std::unique_ptr<UIObject> get_child(const OUString& rID) override;
@@ -29,11 +27,9 @@ public:
static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
protected:
-
virtual OUString get_name() const override;
private:
-
VclPtr<sd::Window> mxWindow;
};
diff --git a/sd/source/ui/inc/unchss.hxx b/sd/source/ui/inc/unchss.hxx
index dfdf040413e3..bba7f7d4114f 100644
--- a/sd/source/ui/inc/unchss.hxx
+++ b/sd/source/ui/inc/unchss.hxx
@@ -32,14 +32,13 @@ class SdDrawDocument;
class StyleSheetUndoAction : public SdUndoAction
{
- SfxStyleSheet* mpStyleSheet;
+ SfxStyleSheet* mpStyleSheet;
std::unique_ptr<SfxItemSet> mpNewSet;
std::unique_ptr<SfxItemSet> mpOldSet;
public:
- StyleSheetUndoAction(SdDrawDocument* pTheDoc,
- SfxStyleSheet* pTheStyleSheet,
+ StyleSheetUndoAction(SdDrawDocument* pTheDoc, SfxStyleSheet* pTheStyleSheet,
const SfxItemSet* pTheNewItemSet);
virtual void Undo() override;
diff --git a/sd/source/ui/inc/view/viewoverlaymanager.hxx b/sd/source/ui/inc/view/viewoverlaymanager.hxx
index 0fda1b28cd6f..363554f167f3 100644
--- a/sd/source/ui/inc/view/viewoverlaymanager.hxx
+++ b/sd/source/ui/inc/view/viewoverlaymanager.hxx
@@ -26,27 +26,35 @@
#include <vector>
-namespace sd { class SmartTag; }
-namespace sd::tools { class EventMultiplexerEvent; }
-namespace sd { class ViewShellBase; }
+namespace sd
+{
+class SmartTag;
+}
+namespace sd::tools
+{
+class EventMultiplexerEvent;
+}
+namespace sd
+{
+class ViewShellBase;
+}
struct ImplSVEvent;
namespace sd
{
-
-typedef std::vector< rtl::Reference< SmartTag > > ViewTagVector;
+typedef std::vector<rtl::Reference<SmartTag>> ViewTagVector;
class ViewOverlayManager : public SfxListener
{
public:
- ViewOverlayManager( ViewShellBase& rViewShellBase );
+ ViewOverlayManager(ViewShellBase& rViewShellBase);
virtual ~ViewOverlayManager() override;
void onZoomChanged();
void UpdateTags();
DECL_LINK(EventMultiplexerListener, tools::EventMultiplexerEvent&, void);
- DECL_LINK(UpdateTagsHdl, void *, void);
+ DECL_LINK(UpdateTagsHdl, void*, void);
bool CreateTags();
bool DisposeTags();
@@ -55,11 +63,10 @@ public:
private:
ViewShellBase& mrBase;
- ImplSVEvent * mnUpdateTagsEvent;
+ ImplSVEvent* mnUpdateTagsEvent;
- ViewTagVector maTagVector;
+ ViewTagVector maTagVector;
};
-
}
#endif // INCLUDED_SD_SOURCE_UI_INC_VIEW_VIEWOVERLAYMANAGER_HXX
diff --git a/sd/source/ui/inc/zoomlist.hxx b/sd/source/ui/inc/zoomlist.hxx
index fa16473ff802..f818f49fdc97 100644
--- a/sd/source/ui/inc/zoomlist.hxx
+++ b/sd/source/ui/inc/zoomlist.hxx
@@ -24,25 +24,24 @@
#include <tools/gen.hxx>
-namespace sd {
-
+namespace sd
+{
class ViewShell;
class ZoomList
{
public:
-
ZoomList(ViewShell* pViewShell);
- void InsertZoomRect(const ::tools::Rectangle& rRect);
- ::tools::Rectangle const & GetNextZoomRect();
- ::tools::Rectangle const & GetPreviousZoomRect();
- bool IsNextPossible() const;
- bool IsPreviousPossible() const;
+ void InsertZoomRect(const ::tools::Rectangle& rRect);
+ ::tools::Rectangle const& GetNextZoomRect();
+ ::tools::Rectangle const& GetPreviousZoomRect();
+ bool IsNextPossible() const;
+ bool IsPreviousPossible() const;
private:
- ViewShell* mpViewShell;
- sal_uInt32 mnCurPos;
+ ViewShell* mpViewShell;
+ sal_uInt32 mnCurPos;
std::vector<::tools::Rectangle> maRectangles;
};
diff --git a/sd/source/ui/presenter/CanvasUpdateRequester.hxx b/sd/source/ui/presenter/CanvasUpdateRequester.hxx
index 97da675fb858..855360c5f608 100644
--- a/sd/source/ui/presenter/CanvasUpdateRequester.hxx
+++ b/sd/source/ui/presenter/CanvasUpdateRequester.hxx
@@ -24,19 +24,21 @@
#include <tools/link.hxx>
#include <memory>
-namespace com::sun::star::rendering { class XSpriteCanvas; }
+namespace com::sun::star::rendering
+{
+class XSpriteCanvas;
+}
struct ImplSVEvent;
-namespace sd::presenter {
-
+namespace sd::presenter
+{
/** Each UpdateRequester handles update requests (calls to
XCanvas::updateScreen()) for one shared canvas (a canvas that has one or
more PresenterCanvas wrappers). Multiple calls are collected and lead
to a single call to updateScreen.
*/
-class CanvasUpdateRequester
- : public std::enable_shared_from_this<CanvasUpdateRequester>
+class CanvasUpdateRequester : public std::enable_shared_from_this<CanvasUpdateRequester>
{
public:
CanvasUpdateRequester(const CanvasUpdateRequester&) = delete;
@@ -45,20 +47,22 @@ public:
/** @return the Canvas UpdateRequester object for the given shared canvas.
A new object is created when it does not already exist.
*/
- static std::shared_ptr<CanvasUpdateRequester> Instance (
- const css::uno::Reference<css::rendering::XSpriteCanvas>& rxCanvas);
+ static std::shared_ptr<CanvasUpdateRequester>
+ Instance(const css::uno::Reference<css::rendering::XSpriteCanvas>& rxCanvas);
- void RequestUpdate (const bool bUpdateAll);
+ void RequestUpdate(const bool bUpdateAll);
private:
- explicit CanvasUpdateRequester (const css::uno::Reference<css::rendering::XSpriteCanvas>& rxCanvas);
+ explicit CanvasUpdateRequester(
+ const css::uno::Reference<css::rendering::XSpriteCanvas>& rxCanvas);
~CanvasUpdateRequester();
- class Deleter; friend class Deleter;
+ class Deleter;
+ friend class Deleter;
/// keep instance alive waiting for event dispatch
std::shared_ptr<CanvasUpdateRequester> m_pThis;
css::uno::Reference<css::rendering::XSpriteCanvas> mxCanvas;
- ImplSVEvent * m_pUserEventId;
+ ImplSVEvent* m_pUserEventId;
bool mbUpdateFlag;
DECL_LINK(Callback, void*, void);
diff --git a/sd/source/ui/remotecontrol/OSXNetworkService.h b/sd/source/ui/remotecontrol/OSXNetworkService.h
index 8772de2f05c1..b32b409fd6b1 100644
--- a/sd/source/ui/remotecontrol/OSXNetworkService.h
+++ b/sd/source/ui/remotecontrol/OSXNetworkService.h
@@ -13,18 +13,18 @@
#include <sys/socket.h>
#include <netinet/in.h>
- #include <premac.h>
- #import <CoreFoundation/CoreFoundation.h>
- #import <Foundation/NSNetServices.h>
- #import <Foundation/NSRunLoop.h>
- #include <postmac.h>
+#include <premac.h>
+#import <CoreFoundation/CoreFoundation.h>
+#import <Foundation/NSNetServices.h>
+#import <Foundation/NSRunLoop.h>
+#include <postmac.h>
-@interface OSXBonjourService : NSObject<NSNetServiceDelegate>
+@interface OSXBonjourService : NSObject <NSNetServiceDelegate>
{
- NSNetService *netService;
+ NSNetService* netService;
}
-- (void) publishImpressRemoteServiceOnLocalNetworkWithName:(NSString *)sName;
+- (void)publishImpressRemoteServiceOnLocalNetworkWithName:(NSString*)sName;
@end
diff --git a/sd/source/ui/sidebar/IDisposable.hxx b/sd/source/ui/sidebar/IDisposable.hxx
index 0220d870927e..d0ba4eb9a986 100644
--- a/sd/source/ui/sidebar/IDisposable.hxx
+++ b/sd/source/ui/sidebar/IDisposable.hxx
@@ -19,8 +19,8 @@
#ifndef INCLUDED_SD_SOURCE_UI_SIDEBAR_IDISPOSABLE_HXX
#define INCLUDED_SD_SOURCE_UI_SIDEBAR_IDISPOSABLE_HXX
-namespace sd::sidebar {
-
+namespace sd::sidebar
+{
class IDisposable
{
public:
diff --git a/sd/source/ui/sidebar/ISidebarReceiver.hxx b/sd/source/ui/sidebar/ISidebarReceiver.hxx
index 3a67d650bca2..afa04daa665d 100644
--- a/sd/source/ui/sidebar/ISidebarReceiver.hxx
+++ b/sd/source/ui/sidebar/ISidebarReceiver.hxx
@@ -19,8 +19,8 @@
#ifndef INCLUDED_SD_SOURCE_UI_SIDEBAR_ISIDEBARRECEIVER_HXX
#define INCLUDED_SD_SOURCE_UI_SIDEBAR_ISIDEBARRECEIVER_HXX
-namespace sd::sidebar {
-
+namespace sd::sidebar
+{
class ISidebarReceiver
{
public:
diff --git a/sd/source/ui/sidebar/LayoutMenu.hxx b/sd/source/ui/sidebar/LayoutMenu.hxx
index 4981a919a86e..4fae9a6bb5b7 100644
--- a/sd/source/ui/sidebar/LayoutMenu.hxx
+++ b/sd/source/ui/sidebar/LayoutMenu.hxx
@@ -29,23 +29,31 @@
#include <sfx2/request.hxx>
#include <xmloff/autolayout.hxx>
-namespace com::sun::star::frame { class XStatusListener; }
-namespace com::sun::star::ui { class XSidebar; }
-
+namespace com::sun::star::frame
+{
+class XStatusListener;
+}
+namespace com::sun::star::ui
+{
+class XSidebar;
+}
-namespace sd {
+namespace sd
+{
class DrawDocShell;
class ViewShellBase;
}
-namespace sd::tools { class EventMultiplexerEvent; }
-
-namespace sd::sidebar {
+namespace sd::tools
+{
+class EventMultiplexerEvent;
+}
+namespace sd::sidebar
+{
class LayoutValueSet;
-class LayoutMenu : public PanelLayout
- , public sfx2::sidebar::ILayoutableWindow
+class LayoutMenu : public PanelLayout, public sfx2::sidebar::ILayoutableWindow
{
public:
/** Create a new layout menu. Depending on the given flag it
@@ -56,10 +64,8 @@ public:
@param i_rPanelViewShell
the view shell of the task pane.
*/
- LayoutMenu (
- vcl::Window* pParent,
- ViewShellBase& rViewShellBase,
- const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
+ LayoutMenu(vcl::Window* pParent, ViewShellBase& rViewShellBase,
+ const css::uno::Reference<css::ui::XSidebar>& rxSidebar);
virtual ~LayoutMenu() override;
virtual void dispose() override;
@@ -71,14 +77,14 @@ public:
AutoLayout GetSelectedAutoLayout() const;
// From ILayoutableWindow
- virtual css::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth) override;
+ virtual css::ui::LayoutSize GetHeightForWidth(const sal_Int32 nWidth) override;
// From vcl::Window
virtual void Resize() override;
/** Show a context menu when the right mouse button is pressed.
*/
- virtual void MouseButtonDown (const MouseEvent& rEvent) override;
+ virtual void MouseButtonDown(const MouseEvent& rEvent) override;
/** Call this method when the set of displayed layouts is not up-to-date
anymore. It will re-assemble this set according to the current
@@ -93,7 +99,7 @@ public:
/** Call Fill() when switching to or from high contrast mode so that the
correct set of icons is displayed.
*/
- virtual void DataChanged (const DataChangedEvent& rEvent) override;
+ virtual void DataChanged(const DataChangedEvent& rEvent) override;
using Window::GetWindow;
@@ -117,7 +123,7 @@ private:
valueset. This number may be larger. In that case a vertical
scroll bar is displayed.
*/
- int CalculateRowCount (const Size& rItemSize, int nColumnCount);
+ int CalculateRowCount(const Size& rItemSize, int nColumnCount);
/** Fill the value set with the layouts that are applicable to the
current main view shell.
@@ -132,7 +138,7 @@ private:
If no slide sorter is active then this call is ignored. The slide
sorter in the center pane is preferred if the choice exists.
*/
- void AssignLayoutToSelectedSlides (AutoLayout aLayout);
+ void AssignLayoutToSelectedSlides(AutoLayout aLayout);
/** Insert a new page with the given layout. The page is inserted via
the main view shell, i.e. its SID_INSERTPAGE slot is called. If it
@@ -140,7 +146,7 @@ private:
place. The new page is inserted after the currently active one (the
one returned by ViewShell::GetActualPage().)
*/
- void InsertPageWithLayout (AutoLayout aLayout);
+ void InsertPageWithLayout(AutoLayout aLayout);
/** Create a request structure that can be used with the SID_INSERTPAGE
and SID_MODIFYPAGE slots. The parameters are set so that the given
@@ -150,16 +156,14 @@ private:
@param aLayout
Layout of the page to insert or to assign.
*/
- SfxRequest CreateRequest (
- sal_uInt16 nSlotId,
- AutoLayout aLayout);
+ SfxRequest CreateRequest(sal_uInt16 nSlotId, AutoLayout aLayout);
/** Select the layout that is used by the current page.
*/
void UpdateSelection();
// internal ctor
- void implConstruct( DrawDocShell& rDocumentShell );
+ void implConstruct(DrawDocShell& rDocumentShell);
/** When clicked then set the current page of the view in the center pane.
*/
diff --git a/sd/source/ui/sidebar/MasterPageContainer.hxx b/sd/source/ui/sidebar/MasterPageContainer.hxx
index 0c7c63e06a95..34520bc7d076 100644
--- a/sd/source/ui/sidebar/MasterPageContainer.hxx
+++ b/sd/source/ui/sidebar/MasterPageContainer.hxx
@@ -26,8 +26,8 @@
class SdPage;
-namespace sd::sidebar {
-
+namespace sd::sidebar
+{
class MasterPageDescriptor;
class MasterPageContainerChangeEvent;
@@ -55,28 +55,38 @@ public:
MasterPageContainer();
~MasterPageContainer();
- void AddChangeListener (const Link<MasterPageContainerChangeEvent&,void>& rLink);
- void RemoveChangeListener (const Link<MasterPageContainerChangeEvent&,void>& rLink);
+ void AddChangeListener(const Link<MasterPageContainerChangeEvent&, void>& rLink);
+ void RemoveChangeListener(const Link<MasterPageContainerChangeEvent&, void>& rLink);
- enum PreviewSize { SMALL, LARGE };
+ enum PreviewSize
+ {
+ SMALL,
+ LARGE
+ };
/** There are two different preview sizes, a small one and a large one.
Which one is used by the called container can be changed with this
method.
When the preview size is changed then all change listeners are
notified of this.
*/
- void SetPreviewSize (PreviewSize eSize);
+ void SetPreviewSize(PreviewSize eSize);
/** Returns the preview size.
*/
- PreviewSize GetPreviewSize() const { return mePreviewSize;}
+ PreviewSize GetPreviewSize() const { return mePreviewSize; }
/** Return the preview size in pixels.
*/
- Size const & GetPreviewSizePixel() const;
-
- enum PreviewState { PS_AVAILABLE, PS_CREATABLE, PS_PREPARING, PS_NOT_AVAILABLE };
- PreviewState GetPreviewState (Token aToken);
+ Size const& GetPreviewSizePixel() const;
+
+ enum PreviewState
+ {
+ PS_AVAILABLE,
+ PS_CREATABLE,
+ PS_PREPARING,
+ PS_NOT_AVAILABLE
+ };
+ PreviewState GetPreviewState(Token aToken);
/** This method is typically called for entries in the container for
which GetPreviewState() returns OS_CREATABLE. The creation of the
@@ -84,15 +94,16 @@ public:
point in time. When the preview is available the change listeners
will be notified.
*/
- bool RequestPreview (Token aToken);
+ bool RequestPreview(Token aToken);
/** Each entry of the container is either the first page of a template
document or is a master page of an Impress document.
*/
- enum Origin {
- MASTERPAGE, // Master page of a document.
- TEMPLATE, // First page of a template file.
- DEFAULT, // Empty master page with default style.
+ enum Origin
+ {
+ MASTERPAGE, // Master page of a document.
+ TEMPLATE, // First page of a template file.
+ DEFAULT, // Empty master page with default style.
UNKNOWN
};
@@ -102,9 +113,9 @@ public:
the existing entry is replaced/updated by the given one. Otherwise
a new entry is inserted.
*/
- Token PutMasterPage (const std::shared_ptr<MasterPageDescriptor>& rDescriptor);
- void AcquireToken (Token aToken);
- void ReleaseToken (Token aToken);
+ Token PutMasterPage(const std::shared_ptr<MasterPageDescriptor>& rDescriptor);
+ void AcquireToken(Token aToken);
+ void ReleaseToken(Token aToken);
/** This and the GetTokenForIndex() methods can be used to iterate over
all members of the container.
@@ -113,26 +124,26 @@ public:
/** Determine whether the container has a member for the given token.
*/
- bool HasToken (Token aToken) const;
+ bool HasToken(Token aToken) const;
/** Return a token for an index in the range
0 <= index < GetTokenCount().
*/
- Token GetTokenForIndex (int nIndex);
+ Token GetTokenForIndex(int nIndex);
- Token GetTokenForURL (const OUString& sURL);
- Token GetTokenForStyleName (const OUString& sStyleName);
- Token GetTokenForPageObject (const SdPage* pPage);
+ Token GetTokenForURL(const OUString& sURL);
+ Token GetTokenForStyleName(const OUString& sStyleName);
+ Token GetTokenForPageObject(const SdPage* pPage);
- OUString GetURLForToken (Token aToken);
- OUString GetPageNameForToken (Token aToken);
- OUString GetStyleNameForToken (Token aToken);
- SdPage* GetPageObjectForToken (Token aToken, bool bLoad);
- Origin GetOriginForToken (Token aToken);
- sal_Int32 GetTemplateIndexForToken (Token aToken);
- std::shared_ptr<MasterPageDescriptor> GetDescriptorForToken (Token aToken);
+ OUString GetURLForToken(Token aToken);
+ OUString GetPageNameForToken(Token aToken);
+ OUString GetStyleNameForToken(Token aToken);
+ SdPage* GetPageObjectForToken(Token aToken, bool bLoad);
+ Origin GetOriginForToken(Token aToken);
+ sal_Int32 GetTemplateIndexForToken(Token aToken);
+ std::shared_ptr<MasterPageDescriptor> GetDescriptorForToken(Token aToken);
- void InvalidatePreview (Token aToken);
+ void InvalidatePreview(Token aToken);
/** Return a preview for the specified token. When the preview is not
present then the PreviewProvider associated with the token is
@@ -146,7 +157,7 @@ public:
@return
The returned image is the requested preview or a substitution.
*/
- Image GetPreviewForToken (Token aToken);
+ Image GetPreviewForToken(Token aToken);
private:
class Implementation;
@@ -163,7 +174,8 @@ private:
class MasterPageContainerChangeEvent
{
public:
- enum class EventType {
+ enum class EventType
+ {
// A master page was added to the container.
CHILD_ADDED,
// A master page was removed from the container.
diff --git a/sd/source/ui/sidebar/MasterPageContainerFiller.hxx b/sd/source/ui/sidebar/MasterPageContainerFiller.hxx
index 00b49d66d633..65dbeaf334b0 100644
--- a/sd/source/ui/sidebar/MasterPageContainerFiller.hxx
+++ b/sd/source/ui/sidebar/MasterPageContainerFiller.hxx
@@ -25,26 +25,27 @@
#include "MasterPageDescriptor.hxx"
#include <tools/AsynchronousTask.hxx>
-namespace sd {
+namespace sd
+{
class TemplateScanner;
class TemplateEntry;
}
-namespace sd::sidebar {
-
+namespace sd::sidebar
+{
/** Fill a MasterPageContainer with information about the available master
pages. These are provided by one default page and from the existing
Impress templates. This is done asynchronously.
*/
-class MasterPageContainerFiller
- : public ::sd::tools::AsynchronousTask
+class MasterPageContainerFiller : public ::sd::tools::AsynchronousTask
{
public:
class ContainerAdapter
{
public:
- virtual MasterPageContainer::Token PutMasterPage (
- const SharedMasterPageDescriptor& rpDescriptor) = 0;
+ virtual MasterPageContainer::Token
+ PutMasterPage(const SharedMasterPageDescriptor& rpDescriptor)
+ = 0;
/** This method is called when all Impress templates have been added
to the container via the PutMasterPage() method.
*/
@@ -54,7 +55,7 @@ public:
~ContainerAdapter() {}
};
- explicit MasterPageContainerFiller (ContainerAdapter& rContainerAdapter);
+ explicit MasterPageContainerFiller(ContainerAdapter& rContainerAdapter);
virtual ~MasterPageContainerFiller();
/** Run the next step of the task. After HasNextStep() returns false
@@ -71,7 +72,8 @@ public:
private:
ContainerAdapter& mrContainerAdapter;
// Remember what the next step has to do.
- enum State {
+ enum State
+ {
INITIALIZE_TEMPLATE_SCANNER,
SCAN_TEMPLATE,
ADD_TEMPLATE,
diff --git a/sd/source/ui/sidebar/MasterPageContainerProviders.hxx b/sd/source/ui/sidebar/MasterPageContainerProviders.hxx
index d03eaf265062..44e2bead2b39 100644
--- a/sd/source/ui/sidebar/MasterPageContainerProviders.hxx
+++ b/sd/source/ui/sidebar/MasterPageContainerProviders.hxx
@@ -26,11 +26,17 @@
class Image;
class SdDrawDocument;
class SdPage;
-namespace sd { class PreviewRenderer; }
-namespace sd { class DrawDocShell; }
-
-namespace sd::sidebar {
+namespace sd
+{
+class PreviewRenderer;
+}
+namespace sd
+{
+class DrawDocShell;
+}
+namespace sd::sidebar
+{
/** Interface for a provider of page objects. It is used by the
MasterPageDescriptor to create master page objects on demand.
*/
@@ -43,7 +49,7 @@ public:
The document of the MasterPageContainer. It may be used to
create new pages.
*/
- virtual SdPage* operator() (SdDrawDocument* pDocument) = 0;
+ virtual SdPage* operator()(SdDrawDocument* pDocument) = 0;
/** An abstract value for the expected cost of providing a master page
object.
@@ -74,7 +80,7 @@ public:
This PreviewRenderer may be used by the PreviewProvider to
create a preview image.
*/
- virtual Image operator() (int nWidth, SdPage* pPage, ::sd::PreviewRenderer& rRenderer) = 0;
+ virtual Image operator()(int nWidth, SdPage* pPage, ::sd::PreviewRenderer& rRenderer) = 0;
/** Return a value that indicates how expensive the creation of a
preview image is. The higher the returned value the more expensive
@@ -99,9 +105,10 @@ class PagePreviewProvider : public PreviewProvider
public:
PagePreviewProvider();
virtual ~PagePreviewProvider() {}
- virtual Image operator () (int nWidth, SdPage* pPage, ::sd::PreviewRenderer& rRenderer) override;
+ virtual Image operator()(int nWidth, SdPage* pPage, ::sd::PreviewRenderer& rRenderer) override;
virtual int GetCostIndex() override;
virtual bool NeedsPageObject() override;
+
private:
};
@@ -111,14 +118,15 @@ private:
class TemplatePageObjectProvider : public PageObjectProvider
{
public:
- explicit TemplatePageObjectProvider (const OUString& rsURL);
- virtual ~TemplatePageObjectProvider() {};
- virtual SdPage* operator () (SdDrawDocument* pDocument) override;
+ explicit TemplatePageObjectProvider(const OUString& rsURL);
+ virtual ~TemplatePageObjectProvider(){};
+ virtual SdPage* operator()(SdDrawDocument* pDocument) override;
virtual int GetCostIndex() override;
+
private:
OUString msURL;
SfxObjectShellLock mxDocumentShell;
- ::sd::DrawDocShell* LoadDocument (const OUString& sFileName);
+ ::sd::DrawDocShell* LoadDocument(const OUString& sFileName);
};
/** Provide previews for template documents by loading the thumbnails from
@@ -127,11 +135,12 @@ private:
class TemplatePreviewProvider : public PreviewProvider
{
public:
- explicit TemplatePreviewProvider (const OUString& rsURL);
- virtual ~TemplatePreviewProvider() {};
- virtual Image operator() (int nWidth, SdPage* pPage, ::sd::PreviewRenderer& rRenderer) override;
+ explicit TemplatePreviewProvider(const OUString& rsURL);
+ virtual ~TemplatePreviewProvider(){};
+ virtual Image operator()(int nWidth, SdPage* pPage, ::sd::PreviewRenderer& rRenderer) override;
virtual int GetCostIndex() override;
virtual bool NeedsPageObject() override;
+
private:
OUString msURL;
};
@@ -143,7 +152,7 @@ class DefaultPageObjectProvider : public PageObjectProvider
public:
DefaultPageObjectProvider();
virtual ~DefaultPageObjectProvider() {}
- virtual SdPage* operator () (SdDrawDocument* pDocument) override;
+ virtual SdPage* operator()(SdDrawDocument* pDocument) override;
virtual int GetCostIndex() override;
};
@@ -153,10 +162,11 @@ public:
class ExistingPageProvider : public PageObjectProvider
{
public:
- explicit ExistingPageProvider (SdPage* pPage);
+ explicit ExistingPageProvider(SdPage* pPage);
virtual ~ExistingPageProvider() {}
- virtual SdPage* operator() (SdDrawDocument* pDocument) override;
+ virtual SdPage* operator()(SdDrawDocument* pDocument) override;
virtual int GetCostIndex() override;
+
private:
SdPage* mpPage;
};
diff --git a/sd/source/ui/sidebar/PreviewValueSet.hxx b/sd/source/ui/sidebar/PreviewValueSet.hxx
index f489989479a4..c5e1f69eba1f 100644
--- a/sd/source/ui/sidebar/PreviewValueSet.hxx
+++ b/sd/source/ui/sidebar/PreviewValueSet.hxx
@@ -22,8 +22,8 @@
#include <svtools/valueset.hxx>
-namespace sd::sidebar {
-
+namespace sd::sidebar
+{
/** Adapt the svtools valueset to the needs of the master page controls.
*/
class PreviewValueSet : public ValueSet
@@ -33,12 +33,12 @@ public:
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
virtual ~PreviewValueSet() override;
- void SetRightMouseClickHandler (const Link<const MouseEvent&,void>& rLink);
+ void SetRightMouseClickHandler(const Link<const MouseEvent&, void>& rLink);
virtual void Resize() override;
- void SetPreviewSize (const Size& rSize);
+ void SetPreviewSize(const Size& rSize);
- sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
+ sal_Int32 GetPreferredHeight(sal_Int32 nWidth);
/** Set the number of rows and columns according to the current number
of items. Call this method when new items have been inserted.
@@ -46,14 +46,14 @@ public:
void Rearrange();
protected:
- virtual bool MouseButtonDown (const MouseEvent& rEvent) override;
+ virtual bool MouseButtonDown(const MouseEvent& rEvent) override;
private:
- Link<const MouseEvent&,void> maRightMouseClickHandler;
+ Link<const MouseEvent&, void> maRightMouseClickHandler;
Size maPreviewSize;
- sal_uInt16 CalculateColumnCount (int nWidth) const;
- sal_uInt16 CalculateRowCount (sal_uInt16 nColumnCount) const;
+ sal_uInt16 CalculateColumnCount(int nWidth) const;
+ sal_uInt16 CalculateRowCount(sal_uInt16 nColumnCount) const;
};
} // end of namespace sd::sidebar
diff --git a/sd/source/ui/slideshow/PaneHider.cxx b/sd/source/ui/slideshow/PaneHider.cxx
index 882425f45d9a..85858c0b631a 100644
--- a/sd/source/ui/slideshow/PaneHider.cxx
+++ b/sd/source/ui/slideshow/PaneHider.cxx
@@ -37,18 +37,18 @@ using namespace ::com::sun::star::drawing::framework;
using ::sd::framework::FrameworkHelper;
using ::com::sun::star::lang::DisposedException;
-namespace sd {
-
-PaneHider::PaneHider (const ViewShell& rViewShell, SlideshowImpl* pSlideShow)
+namespace sd
+{
+PaneHider::PaneHider(const ViewShell& rViewShell, SlideshowImpl* pSlideShow)
{
- // Hide the left and right pane windows when a slideshow exists and is
+ // Hide the left and right pane windows when a slideshow exists and is
// not full screen.
- if (pSlideShow==nullptr || pSlideShow->isFullScreen())
+ if (pSlideShow == nullptr || pSlideShow->isFullScreen())
return;
try
{
- Reference<XControllerManager> xControllerManager (
+ Reference<XControllerManager> xControllerManager(
rViewShell.GetViewShellBase().GetController(), UNO_QUERY_THROW);
mxConfigurationController = xControllerManager->getConfigurationController();
if (mxConfigurationController.is())
@@ -58,14 +58,12 @@ PaneHider::PaneHider (const ViewShell& rViewShell, SlideshowImpl* pSlideShow)
if (mxConfiguration.is())
{
// Iterate over the resources and deactivate the panes.
- const Sequence<Reference<XResourceId> > aResources (
- mxConfiguration->getResources(
- nullptr,
- framework::FrameworkHelper::msPaneURLPrefix,
- AnchorBindingMode_DIRECT));
+ const Sequence<Reference<XResourceId>> aResources(mxConfiguration->getResources(
+ nullptr, framework::FrameworkHelper::msPaneURLPrefix,
+ AnchorBindingMode_DIRECT));
for (const Reference<XResourceId>& xPaneId : aResources)
{
- if ( xPaneId->getResourceURL() != FrameworkHelper::msCenterPaneURL )
+ if (xPaneId->getResourceURL() != FrameworkHelper::msCenterPaneURL)
{
mxConfigurationController->requestResourceDeactivation(xPaneId);
}
diff --git a/sd/source/ui/slideshow/PaneHider.hxx b/sd/source/ui/slideshow/PaneHider.hxx
index d7344890d6e4..bede591b4106 100644
--- a/sd/source/ui/slideshow/PaneHider.hxx
+++ b/sd/source/ui/slideshow/PaneHider.hxx
@@ -22,11 +22,17 @@
#include <com/sun/star/uno/Reference.hxx>
-namespace com::sun::star::drawing::framework { class XConfiguration; }
-namespace com::sun::star::drawing::framework { class XConfigurationController; }
-
-namespace sd {
+namespace com::sun::star::drawing::framework
+{
+class XConfiguration;
+}
+namespace com::sun::star::drawing::framework
+{
+class XConfigurationController;
+}
+namespace sd
+{
class ViewShell;
class SlideshowImpl;
@@ -40,7 +46,7 @@ public:
/** The constructor hides all side panes that belong to the
ViewShellBase of the given view shell.
*/
- PaneHider (const ViewShell& rViewShell, SlideshowImpl* pSlideShow);
+ PaneHider(const ViewShell& rViewShell, SlideshowImpl* pSlideShow);
/** Restore the original visibility of the side panes.
*/
@@ -53,8 +59,7 @@ private:
css::uno::Reference<css::drawing::framework::XConfigurationController>
mxConfigurationController;
- css::uno::Reference<css::drawing::framework::XConfiguration>
- mxConfiguration;
+ css::uno::Reference<css::drawing::framework::XConfiguration> mxConfiguration;
};
} // end of namespace sd
diff --git a/sd/source/ui/slideshow/SlideShowRestarter.hxx b/sd/source/ui/slideshow/SlideShowRestarter.hxx
index 9cadc0a58189..68ebe2a45e1b 100644
--- a/sd/source/ui/slideshow/SlideShowRestarter.hxx
+++ b/sd/source/ui/slideshow/SlideShowRestarter.hxx
@@ -24,13 +24,19 @@
#include <tools/link.hxx>
#include <memory>
-namespace sd { class SlideShow; }
-namespace sd { class ViewShellBase; }
+namespace sd
+{
+class SlideShow;
+}
+namespace sd
+{
+class ViewShellBase;
+}
class SfxDispatcher;
struct ImplSVEvent;
-namespace sd {
-
+namespace sd
+{
/** This class is used when a display is removed or added to restart the
slide show. This is necessary at least with DirectX because
deactivating a display invalidates DirectX resources. Accessing those
@@ -39,8 +45,7 @@ namespace sd {
During a restart a possibly installed presenter extension is given the
opportunity to show or hide depending on the number of available displays.
*/
-class SlideShowRestarter
- : public std::enable_shared_from_this<SlideShowRestarter>
+class SlideShowRestarter : public std::enable_shared_from_this<SlideShowRestarter>
{
public:
/** Create a new SlideShowRestarter object.
@@ -51,9 +56,8 @@ public:
@param pViewShellBase
Used to get access to a slot dispatcher.
*/
- SlideShowRestarter (
- const ::rtl::Reference<SlideShow>& rpSlideShow,
- ViewShellBase* pViewShellBase);
+ SlideShowRestarter(const ::rtl::Reference<SlideShow>& rpSlideShow,
+ ViewShellBase* pViewShellBase);
virtual ~SlideShowRestarter();
/** Restarting the slide show is an asynchronous multi step process
@@ -61,10 +65,10 @@ public:
@param bForce
Used to force a re-start, even if the display count is unchanged.
*/
- void Restart (bool bForce);
+ void Restart(bool bForce);
private:
- ImplSVEvent * mnEventId;
+ ImplSVEvent* mnEventId;
::rtl::Reference<SlideShow> mpSlideShow;
ViewShellBase* mpViewShellBase;
::std::shared_ptr<SlideShowRestarter> mpSelf;
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
index 0eecd4c4c05a..c4cb1df83aff 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.hxx
@@ -26,8 +26,8 @@ class SdrPage;
#include <osl/mutex.hxx>
#include <memory>
-namespace sd::slidesorter::cache {
-
+namespace sd::slidesorter::cache
+{
class CacheCompactor;
class BitmapCompressor;
@@ -61,7 +61,7 @@ public:
When that does not exist then an internal default value is
used.
*/
- explicit BitmapCache ();
+ explicit BitmapCache();
/** The destructor clears the cache and releases all bitmaps still in it.
*/
@@ -75,34 +75,34 @@ public:
/** Return <TRUE/> when the cache is full, i.e. the cache compactor had
to be run.
*/
- bool IsFull() const { return mbIsFull;}
+ bool IsFull() const { return mbIsFull; }
/** Return the memory size that is occupied by all non-precious bitmaps
in the cache.
*/
- sal_Int32 GetSize() const { return mnNormalCacheSize;}
+ sal_Int32 GetSize() const { return mnNormalCacheSize; }
/** Return <TRUE/> when a preview bitmap exists for the given key.
*/
- bool HasBitmap (const CacheKey& rKey);
+ bool HasBitmap(const CacheKey& rKey);
/** Return <TRUE/> when a preview bitmap exists for the given key and
when it is up-to-date.
*/
- bool BitmapIsUpToDate (const CacheKey& rKey);
+ bool BitmapIsUpToDate(const CacheKey& rKey);
/** Return the preview bitmap for the given contact object.
*/
- BitmapEx GetBitmap (const CacheKey& rKey);
+ BitmapEx GetBitmap(const CacheKey& rKey);
/** Return the marked preview bitmap for the given contact object.
*/
- BitmapEx GetMarkedBitmap (const CacheKey& rKey);
+ BitmapEx GetMarkedBitmap(const CacheKey& rKey);
/** Release the reference to the preview bitmap that is associated with
the given key.
*/
- void ReleaseBitmap (const CacheKey& rKey);
+ void ReleaseBitmap(const CacheKey& rKey);
/** Mark the specified preview bitmap as not being up-to-date
anymore.
@@ -111,7 +111,7 @@ public:
return <TRUE/>. When the key is not known then <FALSE/>
is returned.
*/
- bool InvalidateBitmap (const CacheKey& rKey);
+ bool InvalidateBitmap(const CacheKey& rKey);
/** Mark all preview bitmaps as not being up-to-date anymore.
*/
@@ -119,21 +119,16 @@ public:
/** Add or replace a bitmap for the given key.
*/
- void SetBitmap (
- const CacheKey& rKey,
- const BitmapEx& rPreview,
- bool bIsPrecious);
+ void SetBitmap(const CacheKey& rKey, const BitmapEx& rPreview, bool bIsPrecious);
/** Add or replace a marked bitmap for the given key.
*/
- void SetMarkedBitmap (
- const CacheKey& rKey,
- const BitmapEx& rPreview);
+ void SetMarkedBitmap(const CacheKey& rKey, const BitmapEx& rPreview);
/** Mark the specified preview bitmap as precious, i.e. that it must not
be compressed or otherwise removed from the cache.
*/
- void SetPrecious (const CacheKey& rKey, bool bIsPrecious);
+ void SetPrecious(const CacheKey& rKey, bool bIsPrecious);
/** Calculate the cache size. This should rarely be necessary because
the cache size is tracked with each modification of preview
@@ -143,7 +138,7 @@ public:
/** Use the previews in the given cache to initialize missing previews.
*/
- void Recycle (const BitmapCache& rCache);
+ void Recycle(const BitmapCache& rCache);
/** Return a list of sorted cache keys that represent an index into (a
part of) the cache. The entries of the index are sorted according
@@ -151,15 +146,13 @@ public:
Entries with the precious flag set are omitted.
Entries with that have no preview bitmaps are omitted.
*/
- ::std::unique_ptr<CacheIndex> GetCacheIndex () const;
+ ::std::unique_ptr<CacheIndex> GetCacheIndex() const;
/** Compress the specified preview bitmap with the given bitmap
compressor. A reference to the compressor is stored for later
decompression.
*/
- void Compress (
- const CacheKey& rKey,
- const std::shared_ptr<BitmapCompressor>& rpCompressor);
+ void Compress(const CacheKey& rKey, const std::shared_ptr<BitmapCompressor>& rpCompressor);
private:
mutable ::osl::Mutex maMutex;
@@ -203,8 +196,12 @@ private:
precious flag of the specified preview bitmap and the specified
operation.
*/
- enum CacheOperation { ADD, REMOVE };
- void UpdateCacheSize (const CacheEntry& rKey, CacheOperation eOperation);
+ enum CacheOperation
+ {
+ ADD,
+ REMOVE
+ };
+ void UpdateCacheSize(const CacheEntry& rKey, CacheOperation eOperation);
};
} // end of namespace ::sd::slidesorter::cache
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx
index 135007a575b8..511c4f8dedec 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.hxx
@@ -25,8 +25,8 @@
class BitmapEx;
-namespace sd::slidesorter::cache {
-
+namespace sd::slidesorter::cache
+{
class BitmapReplacement;
/** This interface class provides the minimal method set for classes that
@@ -38,7 +38,7 @@ public:
/** Compress the given bitmap into a replacement format that is specific
to the compressor class.
*/
- virtual std::shared_ptr<BitmapReplacement> Compress (const BitmapEx& rBitmap) const = 0;
+ virtual std::shared_ptr<BitmapReplacement> Compress(const BitmapEx& rBitmap) const = 0;
/** Decompress the given replacement data into a preview bitmap.
Depending on the compression technique the returned bitmap may
@@ -47,7 +47,7 @@ public:
task of the caller to create a new preview bitmap if the returned
one is not as desired.
*/
- virtual BitmapEx Decompress (const BitmapReplacement& rBitmapData)const=0;
+ virtual BitmapEx Decompress(const BitmapReplacement& rBitmapData) const = 0;
/** Return whether the compression and decompression is lossless. This
value is used by the caller of Decompress() to decide whether to use
@@ -76,14 +76,14 @@ protected:
instead of compressing them.
This compressor is lossless.
*/
-class NoBitmapCompression
- : public BitmapCompressor
+class NoBitmapCompression : public BitmapCompressor
{
class DummyReplacement;
+
public:
virtual ~NoBitmapCompression() {}
- virtual std::shared_ptr<BitmapReplacement> Compress (const BitmapEx& rpBitmap) const override;
- virtual BitmapEx Decompress (const BitmapReplacement& rBitmapData) const override;
+ virtual std::shared_ptr<BitmapReplacement> Compress(const BitmapEx& rpBitmap) const override;
+ virtual BitmapEx Decompress(const BitmapReplacement& rBitmapData) const override;
virtual bool IsLossless() const override;
};
@@ -92,13 +92,12 @@ public:
NULL pointer. The caller has to create a new preview bitmap instead.
This compressor clearly is not lossless.
*/
-class CompressionByDeletion
- : public BitmapCompressor
+class CompressionByDeletion : public BitmapCompressor
{
public:
virtual ~CompressionByDeletion() {}
- virtual std::shared_ptr<BitmapReplacement> Compress (const BitmapEx& rBitmap) const override;
- virtual BitmapEx Decompress (const BitmapReplacement& rBitmapData) const override;
+ virtual std::shared_ptr<BitmapReplacement> Compress(const BitmapEx& rBitmap) const override;
+ virtual BitmapEx Decompress(const BitmapReplacement& rBitmapData) const override;
virtual bool IsLossless() const override;
};
@@ -107,31 +106,31 @@ public:
pixels.
This compressor is not lossless.
*/
-class ResolutionReduction
- : public BitmapCompressor
+class ResolutionReduction : public BitmapCompressor
{
class ResolutionReducedReplacement;
static const sal_Int32 mnWidth = 100;
+
public:
virtual ~ResolutionReduction() {}
- virtual std::shared_ptr<BitmapReplacement> Compress (const BitmapEx& rpBitmap) const override;
+ virtual std::shared_ptr<BitmapReplacement> Compress(const BitmapEx& rpBitmap) const override;
/** Scale the replacement bitmap up to the original size.
*/
- virtual BitmapEx Decompress (const BitmapReplacement& rBitmapData) const override;
+ virtual BitmapEx Decompress(const BitmapReplacement& rBitmapData) const override;
virtual bool IsLossless() const override;
};
/** Compress preview bitmaps using the PNG format.
This compressor is lossless.
*/
-class PngCompression
- : public BitmapCompressor
+class PngCompression : public BitmapCompressor
{
class PngReplacement;
+
public:
virtual ~PngCompression() {}
- virtual std::shared_ptr<BitmapReplacement> Compress (const BitmapEx& rBitmap) const override;
- virtual BitmapEx Decompress (const BitmapReplacement& rBitmapData) const override;
+ virtual std::shared_ptr<BitmapReplacement> Compress(const BitmapEx& rBitmap) const override;
+ virtual BitmapEx Decompress(const BitmapReplacement& rBitmapData) const override;
virtual bool IsLossless() const override;
};
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx
index e179ae0dbd98..bf863092ee24 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.hxx
@@ -25,8 +25,8 @@
class SdPage;
class Size;
-namespace sd::slidesorter::cache {
-
+namespace sd::slidesorter::cache
+{
/** This factory class creates preview bitmaps for page objects. It is
merely an adapter for the PreviewRenderer.
*/
@@ -36,10 +36,7 @@ public:
BitmapFactory();
~BitmapFactory();
- BitmapEx CreateBitmap (
- const SdPage& rPage,
- const Size& rPixelSize,
- const bool bDoSuperSampling);
+ BitmapEx CreateBitmap(const SdPage& rPage, const Size& rPixelSize, const bool bDoSuperSampling);
private:
PreviewRenderer maRenderer;
diff --git a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.hxx b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.hxx
index 2c3e1489e36c..e704fe20e2d4 100644
--- a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.hxx
@@ -24,10 +24,13 @@
#include <vcl/timer.hxx>
#include <memory>
-namespace com::sun::star::container { class XNameAccess; }
-
-namespace sd::slidesorter::cache {
+namespace com::sun::star::container
+{
+class XNameAccess;
+}
+namespace sd::slidesorter::cache
+{
/** A very simple and easy-to-use access to configuration entries regarding
the slide sorter cache.
*/
@@ -46,7 +49,7 @@ public:
MultiPaneGUI/SlideSorter/PreviewCache. When the specified value
does not exist then an empty Any is returned.
*/
- css::uno::Any GetValue (const OUString& rName);
+ css::uno::Any GetValue(const OUString& rName);
private:
/** When a caller holds a reference after we have released ours we use
@@ -58,7 +61,7 @@ private:
CacheConfiguration();
- DECL_STATIC_LINK(CacheConfiguration, TimerCallback, Timer *, void);
+ DECL_STATIC_LINK(CacheConfiguration, TimerCallback, Timer*, void);
};
} // end of namespace ::sd::slidesorter::cache
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestFactory.hxx b/sd/source/ui/slidesorter/cache/SlsRequestFactory.hxx
index c048a6e5b307..90629093ea04 100644
--- a/sd/source/ui/slidesorter/cache/SlsRequestFactory.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestFactory.hxx
@@ -22,16 +22,14 @@
#include <cache/SlsCacheContext.hxx>
-namespace sd::slidesorter::cache {
-
+namespace sd::slidesorter::cache
+{
class RequestQueue;
class RequestFactory
{
public:
- void operator() (
- RequestQueue& rRequestQueue,
- const SharedCacheContext& rpCacheContext);
+ void operator()(RequestQueue& rRequestQueue, const SharedCacheContext& rpCacheContext);
};
} // end of namespace ::sd::slidesorter::cache
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestPriorityClass.hxx b/sd/source/ui/slidesorter/cache/SlsRequestPriorityClass.hxx
index 8722d106e14a..96962183828e 100644
--- a/sd/source/ui/slidesorter/cache/SlsRequestPriorityClass.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestPriorityClass.hxx
@@ -20,8 +20,8 @@
#ifndef INCLUDED_SD_SOURCE_UI_SLIDESORTER_CACHE_SLSREQUESTPRIORITYCLASS_HXX
#define INCLUDED_SD_SOURCE_UI_SLIDESORTER_CACHE_SLSREQUESTPRIORITYCLASS_HXX
-namespace sd::slidesorter::cache {
-
+namespace sd::slidesorter::cache
+{
/** Each request for a preview creation has a priority. This enum defines
the available priorities. The special values MIN_CLASS and MAX_CLASS
are/can be used for validation and have to be kept up-to-date.
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
index 9687c1fe09c2..9280e7c2db31 100644
--- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.hxx
@@ -27,15 +27,15 @@
#include <memory>
-namespace sd::slidesorter::cache {
-
+namespace sd::slidesorter::cache
+{
/** The request queue stores requests that are described by the Request
sorted according to priority class and then priority.
*/
class RequestQueue : public sdr::PageUser
{
public:
- explicit RequestQueue (const SharedCacheContext& rpCacheContext);
+ explicit RequestQueue(const SharedCacheContext& rpCacheContext);
virtual ~RequestQueue();
/** Insert a request with highest or lowest priority in its priority
@@ -51,27 +51,23 @@ public:
priority in its class. When <FALSE/> the request is inserted
with lowest priority.
*/
- void AddRequest (
- CacheKey aKey,
- RequestPriorityClass eRequestClass);
+ void AddRequest(CacheKey aKey, RequestPriorityClass eRequestClass);
/** Remove the specified request from the queue.
@param aKey
It is OK when the specified request is not a member of the
queue.
*/
-#if OSL_DEBUG_LEVEL >=2
-bool
+#if OSL_DEBUG_LEVEL >= 2
+ bool
#else
-void
+ void
#endif
- RemoveRequest (CacheKey aKey);
+ RemoveRequest(CacheKey aKey);
/** Change the priority class of the specified request.
*/
- void ChangeClass (
- CacheKey aKey,
- RequestPriorityClass eNewRequestClass);
+ void ChangeClass(CacheKey aKey, RequestPriorityClass eNewRequestClass);
/** Get the request with the highest priority int the highest priority class.
*/
@@ -95,7 +91,7 @@ void
/** Return the mutex that guards the access to the priority queue.
*/
- ::osl::Mutex& GetMutex() { return maMutex;}
+ ::osl::Mutex& GetMutex() { return maMutex; }
/** Ensure we don't hand out a page deleted before anyone got a
chance to process it
diff --git a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx
index 9cbe68ad3e32..461b2c2714b9 100644
--- a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx
+++ b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx
@@ -24,10 +24,13 @@
class Point;
-namespace sd::slidesorter { class SlideSorter; }
-
-namespace sd::slidesorter::controller {
+namespace sd::slidesorter
+{
+class SlideSorter;
+}
+namespace sd::slidesorter::controller
+{
/** A DragAndDropContext object handles an active drag and drop operation.
When the mouse is moved from one slide sorter window to another the
target SlideSorter object is exchanged accordingly.
@@ -38,7 +41,7 @@ public:
/** Create a substitution display of the currently selected pages or,
when provided, the pages in the transferable.
*/
- explicit DragAndDropContext (SlideSorter& rSlideSorter);
+ explicit DragAndDropContext(SlideSorter& rSlideSorter);
~DragAndDropContext() COVERITY_NOEXCEPT_FALSE;
/** Call this method (for example as reaction to ESC key press) to avoid
@@ -51,10 +54,8 @@ public:
travelled since the last call to this method or to
CreateSubstitution(). The given point becomes the new anchor.
*/
- void UpdatePosition (
- const Point& rMousePosition,
- const InsertionIndicatorHandler::Mode eMode,
- const bool bAllowAutoScroll);
+ void UpdatePosition(const Point& rMousePosition, const InsertionIndicatorHandler::Mode eMode,
+ const bool bAllowAutoScroll);
void SetTargetSlideSorter();
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
index 5ac6fddda3f4..ea2cc281f01f 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
@@ -25,11 +25,11 @@
#include <controller/SlsFocusManager.hxx>
#include <sdpage.hxx>
-namespace sd::slidesorter::controller {
-
-SelectionObserver::Context::Context (SlideSorter const & rSlideSorter)
+namespace sd::slidesorter::controller
+{
+SelectionObserver::Context::Context(SlideSorter const& rSlideSorter)
: mpSelectionObserver(
- rSlideSorter.GetController().GetSelectionManager()->GetSelectionObserver())
+ rSlideSorter.GetController().GetSelectionManager()->GetSelectionObserver())
{
if (mpSelectionObserver)
mpSelectionObserver->StartObservation();
@@ -52,7 +52,7 @@ void SelectionObserver::Context::Abort()
//===== SelectionObserver =====================================================
-SelectionObserver::SelectionObserver (SlideSorter& rSlideSorter)
+SelectionObserver::SelectionObserver(SlideSorter& rSlideSorter)
: mrSlideSorter(rSlideSorter)
, mbIsObservationActive(false)
, mbPageEventOccurred(false)
@@ -60,11 +60,9 @@ SelectionObserver::SelectionObserver (SlideSorter& rSlideSorter)
{
}
-SelectionObserver::~SelectionObserver()
-{
-}
+SelectionObserver::~SelectionObserver() {}
-void SelectionObserver::NotifyPageEvent (const SdrPage* pSdrPage)
+void SelectionObserver::NotifyPageEvent(const SdrPage* pSdrPage)
{
if (!mbIsObservationActive)
return;
@@ -109,8 +107,8 @@ void SelectionObserver::EndObservation()
if (!mbPageEventOccurred)
return;
- PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector());
- PageSelector::UpdateLock aUpdateLock (mrSlideSorter);
+ PageSelector& rSelector(mrSlideSorter.GetController().GetPageSelector());
+ PageSelector::UpdateLock aUpdateLock(mrSlideSorter);
rSelector.DeselectAllPages();
if (!maInsertedPages.empty())
{
diff --git a/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx b/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx
index 16102f22f66c..3059af9a34db 100644
--- a/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx
+++ b/sd/source/ui/slidesorter/inc/cache/SlsCacheContext.hxx
@@ -25,12 +25,15 @@
#include <memory>
#include <vector>
-namespace com::sun::star::uno { class XInterface; }
+namespace com::sun::star::uno
+{
+class XInterface;
+}
class SdrPage;
-namespace sd::slidesorter::cache {
-
+namespace sd::slidesorter::cache
+{
typedef const SdrPage* CacheKey;
/** This interface allows the individualisation of different instances of
@@ -46,7 +49,7 @@ public:
@param aKey
The key of the page for which the preview has been created.
*/
- virtual void NotifyPreviewCreation (CacheKey aKey) = 0;
+ virtual void NotifyPreviewCreation(CacheKey aKey) = 0;
/** Called to determine whether the system is idle and a preview can be
created without annoying the user.
@@ -57,13 +60,13 @@ public:
or not. It is called when the cache becomes too large and some
previews have to be released or scaled down.
*/
- virtual bool IsVisible (CacheKey aKey) = 0;
+ virtual bool IsVisible(CacheKey aKey) = 0;
/** Return the page associated with the given key. Note that different
keys may map to a single page (this may be the case with custom
slide shows.)
*/
- virtual const SdrPage* GetPage (CacheKey aKey) = 0;
+ virtual const SdrPage* GetPage(CacheKey aKey) = 0;
/** This method is used when the request queue is filled. It asks for
the list of visible entries and maybe for the list of not visible
@@ -73,13 +76,13 @@ public:
to allow rendering of previews that are not visible (ahead of
time). When not then return an empty pointer or an empty vector.
*/
- virtual std::shared_ptr<std::vector<CacheKey> > GetEntryList (bool bVisible) = 0;
+ virtual std::shared_ptr<std::vector<CacheKey>> GetEntryList(bool bVisible) = 0;
/** Return the priority that defines the order in which previews are
created for different keys/pages. Typically the visible pages come
first, then top-down, left-to-right.
*/
- virtual sal_Int32 GetPriority (CacheKey aKey) = 0;
+ virtual sal_Int32 GetPriority(CacheKey aKey) = 0;
/** Return the model to which the pages belong for which the called
cache manages the previews. Different caches that belong to the
diff --git a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
index d320651e5331..20731f9eef6a 100644
--- a/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
+++ b/sd/source/ui/slidesorter/inc/cache/SlsPageCache.hxx
@@ -26,8 +26,8 @@
class Size;
-namespace sd::slidesorter::cache {
-
+namespace sd::slidesorter::cache
+{
class GenericPageCache;
/** The page cache is responsible for the creation and storage of preview
@@ -71,16 +71,12 @@ public:
It is the task of the PageCacheManager to create new objects of this
class.
*/
- PageCache (
- const Size& rPreviewSize,
- const bool bDoSuperSampling,
- const SharedCacheContext& rpCacheContext);
+ PageCache(const Size& rPreviewSize, const bool bDoSuperSampling,
+ const SharedCacheContext& rpCacheContext);
~PageCache();
- void ChangeSize(
- const Size& rPreviewSize,
- const bool bDoSuperSampling);
+ void ChangeSize(const Size& rPreviewSize, const bool bDoSuperSampling);
/** Request a preview bitmap for the specified page object in the
specified size. The returned bitmap may be a preview of the
@@ -102,21 +98,16 @@ public:
Returns a bitmap that is either empty, contains a scaled (up or
down) version or is the requested bitmap.
*/
- BitmapEx GetPreviewBitmap (
- const CacheKey aKey,
- const bool bResize);
+ BitmapEx GetPreviewBitmap(const CacheKey aKey, const bool bResize);
- BitmapEx GetMarkedPreviewBitmap (
- const CacheKey aKey);
- void SetMarkedPreviewBitmap (
- const CacheKey aKey,
- const BitmapEx& rBitmap);
+ BitmapEx GetMarkedPreviewBitmap(const CacheKey aKey);
+ void SetMarkedPreviewBitmap(const CacheKey aKey, const BitmapEx& rBitmap);
/** When the requested preview bitmap does not yet exist or is not
up-to-date then the rendering of one is scheduled. Otherwise this
method does nothing.
*/
- void RequestPreviewBitmap (const CacheKey aKey);
+ void RequestPreviewBitmap(const CacheKey aKey);
/** Tell the cache that the bitmap associated with the given request
data is not up-to-date anymore. This will invalidate all previews
@@ -124,20 +115,20 @@ public:
A new preview is requested and will lead
eventually to a repaint of the associated page object.
*/
- void InvalidatePreviewBitmap (const CacheKey aKey);
+ void InvalidatePreviewBitmap(const CacheKey aKey);
/** Call this method when all preview bitmaps have to be generated anew.
This is the case when the size of the page objects on the screen has
changed or when the model has changed.
*/
- void InvalidateCache ();
+ void InvalidateCache();
/** With the precious flag you can control whether a bitmap can be
removed or reduced in size to make room for other bitmaps or is so
precious that it will not touched. A typical use is to set the
precious flag for exactly the visible pages.
*/
- void SetPreciousFlag (const CacheKey aKey, const bool bIsPrecious);
+ void SetPreciousFlag(const CacheKey aKey, const bool bIsPrecious);
void Pause();
void Resume();
diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
index 44402fd2e47b..f407b888c85c 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
@@ -33,15 +33,39 @@
#include <memory>
#include <vector>
-namespace com::sun::star::container { class XIndexAccess; }
-namespace com::sun::star::uno { template <typename > class Reference; }
-namespace sd { class FuPoor; }
-namespace sd { class Window; }
-namespace vcl { class Window; }
+namespace com::sun::star::container
+{
+class XIndexAccess;
+}
+namespace com::sun::star::uno
+{
+template <typename> class Reference;
+}
+namespace sd
+{
+class FuPoor;
+}
+namespace sd
+{
+class Window;
+}
+namespace vcl
+{
+class Window;
+}
-namespace sd::slidesorter { class SlideSorter; }
-namespace sd::slidesorter::view { class SlideSorterView; }
-namespace sd::slidesorter::model { class SlideSorterModel; }
+namespace sd::slidesorter
+{
+class SlideSorter;
+}
+namespace sd::slidesorter::view
+{
+class SlideSorterView;
+}
+namespace sd::slidesorter::model
+{
+class SlideSorterModel;
+}
class CommandEvent;
class SdPage;
@@ -50,8 +74,8 @@ class SfxRequest;
class VclSimpleEvent;
class VclWindowEvent;
-namespace sd::slidesorter::controller {
-
+namespace sd::slidesorter::controller
+{
class Animator;
class Clipboard;
class CurrentSlideManager;
@@ -73,7 +97,7 @@ public:
The window that contains the controls of the new
controller.
*/
- SlideSorterController (SlideSorter& rSlideSorter);
+ SlideSorterController(SlideSorter& rSlideSorter);
/** Late initialization. Call this method once a new object has been
created.
@@ -87,7 +111,7 @@ public:
/** Place and size the scroll bars and the browser window so that the
given rectangle is filled.
*/
- void Resize (const ::tools::Rectangle& rAvailableSpace);
+ void Resize(const ::tools::Rectangle& rAvailableSpace);
/** Determine which of the UI elements--the scroll bars, the scroll bar
filler, the actual slide sorter view--are visible and place them in
@@ -98,7 +122,7 @@ public:
size does not change (the size does change when the visibility
of scroll bars changes.)
*/
- void Rearrange (bool bForce);
+ void Rearrange(bool bForce);
/** Return the descriptor of the page that is rendered under the
given position. This takes the IsOnlyPreviewTriggersMouseOver
@@ -108,7 +132,7 @@ public:
reference because when no page is found at the position
then NULL is returned to indicate this.
*/
- model::SharedPageDescriptor GetPageAt (const Point& rPixelPosition);
+ model::SharedPageDescriptor GetPageAt(const Point& rPixelPosition);
// Exported for unit test
SD_DLLPUBLIC PageSelector& GetPageSelector();
@@ -120,37 +144,37 @@ public:
*/
ScrollBarManager& GetScrollBarManager();
- std::shared_ptr<CurrentSlideManager> const & GetCurrentSlideManager() const;
- std::shared_ptr<SlotManager> const & GetSlotManager() const;
- std::shared_ptr<SelectionManager> const & GetSelectionManager() const;
- std::shared_ptr<InsertionIndicatorHandler> const & GetInsertionIndicatorHandler() const;
+ std::shared_ptr<CurrentSlideManager> const& GetCurrentSlideManager() const;
+ std::shared_ptr<SlotManager> const& GetSlotManager() const;
+ std::shared_ptr<SelectionManager> const& GetSelectionManager() const;
+ std::shared_ptr<InsertionIndicatorHandler> const& GetInsertionIndicatorHandler() const;
/** This method forwards the call to the SlideSorterView and executes
pending operations like moving selected pages into the visible area.
*/
- void Paint (const ::tools::Rectangle& rRect, vcl::Window* pWin);
+ void Paint(const ::tools::Rectangle& rRect, vcl::Window* pWin);
- void FuTemporary (SfxRequest& rRequest);
- void FuPermanent (SfxRequest& rRequest);
- void FuSupport (SfxRequest& rRequest);
- bool Command (
- const CommandEvent& rEvent,
- ::sd::Window* pWindow);
+ void FuTemporary(SfxRequest& rRequest);
+ void FuPermanent(SfxRequest& rRequest);
+ void FuSupport(SfxRequest& rRequest);
+ bool Command(const CommandEvent& rEvent, ::sd::Window* pWindow);
- void GetCtrlState (SfxItemSet &rSet);
- void GetStatusBarState (SfxItemSet& rSet);
+ void GetCtrlState(SfxItemSet& rSet);
+ void GetStatusBarState(SfxItemSet& rSet);
- void ExecCtrl (SfxRequest& rRequest);
- void GetAttrState (SfxItemSet& rSet);
+ void ExecCtrl(SfxRequest& rRequest);
+ void GetAttrState(SfxItemSet& rSet);
/** Create an object of this inner class to prevent updates due to model
changes.
*/
class ModelChangeLock
- {public:
+ {
+ public:
ModelChangeLock(SlideSorterController& rController);
~ModelChangeLock() COVERITY_NOEXCEPT_FALSE;
void Release();
+
private:
SlideSorterController* mpController;
};
@@ -174,7 +198,7 @@ public:
/** This factory method creates a selection function.
*/
- rtl::Reference<FuPoor> CreateSelectionFunction (SfxRequest& rRequest);
+ rtl::Reference<FuPoor> CreateSelectionFunction(SfxRequest& rRequest);
/** When the current function of the view shell is the slide sorter
selection function then return a reference to it. Otherwise return
@@ -193,7 +217,7 @@ public:
this method should be called between calls to
PrepareEditModeChange() and FinishEditModeChange().
*/
- void ChangeEditMode (EditMode eEditMode);
+ void ChangeEditMode(EditMode eEditMode);
/** Finish the change of the edit mode. Here we may select a page or
restore a previously saved selection.
@@ -208,16 +232,16 @@ public:
The old name of the page. The new name can be taken from the
page object.
*/
- void PageNameHasChanged (int nPageIndex, const OUString& rsOldName);
+ void PageNameHasChanged(int nPageIndex, const OUString& rsOldName);
/** Provide the set of pages to be displayed in the slide sorter. The
GetDocumentSlides() method can be found only in the SlideSorterModel.
*/
- void SetDocumentSlides (const css::uno::Reference<css::container::XIndexAccess>& rxSlides);
+ void SetDocumentSlides(const css::uno::Reference<css::container::XIndexAccess>& rxSlides);
/** Return an Animator object.
*/
- const std::shared_ptr<Animator>& GetAnimator() const { return mpAnimator;}
+ const std::shared_ptr<Animator>& GetAnimator() const { return mpAnimator; }
VisibleAreaManager& GetVisibleAreaManager() const;
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx
index d7bcb8e38db5..aecc6705b307 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsCurrentSlideManager.hxx
@@ -26,10 +26,13 @@
class SdPage;
-namespace sd::slidesorter { class SlideSorter; }
-
-namespace sd::slidesorter::controller {
+namespace sd::slidesorter
+{
+class SlideSorter;
+}
+namespace sd::slidesorter::controller
+{
/** Manage the current slide. This includes setting the according flags at
the PageDescriptor objects and setting the current slide at the main
view shell.
@@ -44,15 +47,15 @@ public:
/** Create a new CurrentSlideManager object that manages the current
slide for the given SlideSorter.
*/
- CurrentSlideManager (SlideSorter& rSlideSorter);
+ CurrentSlideManager(SlideSorter& rSlideSorter);
~CurrentSlideManager();
/** Call this when the current page of the main view shell has been
switched. Use SwitchCurrentSlide() to initiate such a switch.
*/
- void NotifyCurrentSlideChange (const sal_Int32 nSlideIndex);
- void NotifyCurrentSlideChange (const SdPage* pPage);
+ void NotifyCurrentSlideChange(const sal_Int32 nSlideIndex);
+ void NotifyCurrentSlideChange(const SdPage* pPage);
/** Call this method to switch the current page of the main view shell
to the given slide. Use CurrentSlideHasChanged() when the current
@@ -62,15 +65,14 @@ public:
The page selection is cleared and only the new
current slide is selected.
*/
- void SwitchCurrentSlide (const sal_Int32 nSlideIndex);
- void SwitchCurrentSlide (
- const model::SharedPageDescriptor& rpSlide,
- const bool bUpdateSelection = false);
+ void SwitchCurrentSlide(const sal_Int32 nSlideIndex);
+ void SwitchCurrentSlide(const model::SharedPageDescriptor& rpSlide,
+ const bool bUpdateSelection = false);
/** Return the page descriptor for the current slide. Note, that when
there is no current slide then the returned pointer is empty.
*/
- const model::SharedPageDescriptor& GetCurrentSlide() const { return mpCurrentSlide;}
+ const model::SharedPageDescriptor& GetCurrentSlide() const { return mpCurrentSlide; }
/** Release all references to model data.
*/
@@ -89,9 +91,9 @@ private:
*/
Timer maSwitchPageDelayTimer;
- void SetCurrentSlideAtViewShellBase (const model::SharedPageDescriptor& rpSlide);
- void SetCurrentSlideAtTabControl (const model::SharedPageDescriptor& rpSlide);
- void SetCurrentSlideAtXController (const model::SharedPageDescriptor& rpSlide);
+ void SetCurrentSlideAtViewShellBase(const model::SharedPageDescriptor& rpSlide);
+ void SetCurrentSlideAtTabControl(const model::SharedPageDescriptor& rpSlide);
+ void SetCurrentSlideAtXController(const model::SharedPageDescriptor& rpSlide);
/** When switching from one slide to a new current slide then this
method releases all ties to the old slide.
@@ -101,7 +103,7 @@ private:
/** When switching from one slide to a new current slide then this
method connects to the new current slide.
*/
- void AcquireCurrentSlide (const sal_Int32 nSlideIndex);
+ void AcquireCurrentSlide(const sal_Int32 nSlideIndex);
DECL_LINK(SwitchPageCallback, Timer*, void);
};
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
index 59d51fc91f33..6bbcf87554a7 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx
@@ -26,10 +26,13 @@
#include <tools/link.hxx>
#include <vector>
-namespace sd::slidesorter { class SlideSorter; }
-
-namespace sd::slidesorter::controller {
+namespace sd::slidesorter
+{
+class SlideSorter;
+}
+namespace sd::slidesorter::controller
+{
/** This class manages the focus of the slide sorter. There is the focus
page which is or is not focused. Initialized to point to the first page
it can be set to other pages by using the MoveFocus() method. The
@@ -43,7 +46,7 @@ public:
associated with the given controller. The focus page is set to the
first page. Focused state is off.
*/
- FocusManager (SlideSorter& rSlideSorter);
+ FocusManager(SlideSorter& rSlideSorter);
~FocusManager();
@@ -68,14 +71,14 @@ public:
The current page index is set to the nearest valid
page index.
*/
- void MoveFocus (FocusMoveDirection eDirection);
+ void MoveFocus(FocusMoveDirection eDirection);
/** Show the focus indicator of the current slide.
@param bScrollToFocus
When <TRUE/> (the default) then the view is scrolled so that the
focus rectangle lies inside its visible area.
*/
- void ShowFocus (const bool bScrollToFocus = true);
+ void ShowFocus(const bool bScrollToFocus = true);
/** Hide the focus indicator.
*/
@@ -105,7 +108,7 @@ public:
When there is no page that currently has the focus then -1 is
returned.
*/
- sal_Int32 GetFocusedPageIndex() const { return mnPageIndex;}
+ sal_Int32 GetFocusedPageIndex() const { return mnPageIndex; }
/** Set the focused page to the one described by the given page
descriptor. The visibility of the focus indicator is not modified.
@@ -113,14 +116,14 @@ public:
One of the page descriptors that are currently managed by the
SlideSorterModel.
*/
- bool SetFocusedPage (const model::SharedPageDescriptor& rDescriptor);
+ bool SetFocusedPage(const model::SharedPageDescriptor& rDescriptor);
/** Set the focused page to the one described by the given page
index. The visibility of the focus indicator is not modified.
@param nPageIndex
A valid page index that is understood by the SlideSorterModel.
*/
- void SetFocusedPage (sal_Int32 nPageIndex);
+ void SetFocusedPage(sal_Int32 nPageIndex);
bool SetFocusedPageToCurrentPage();
@@ -139,14 +142,14 @@ public:
the second and all following calls are ignored. Each listener
is added only once.
*/
- void AddFocusChangeListener (const Link<LinkParamNone*,void>& rListener);
+ void AddFocusChangeListener(const Link<LinkParamNone*, void>& rListener);
/** Remove a focus change listener.
@param rListener
It is safe to pass a listener that was not added are has been
removed previously. Such calls are ignored.
*/
- void RemoveFocusChangeListener (const Link<LinkParamNone*,void>& rListener);
+ void RemoveFocusChangeListener(const Link<LinkParamNone*, void>& rListener);
/** Create an instance of this class to temporarily hide the focus
indicator. It is restored to its former visibility state when the
@@ -155,8 +158,9 @@ public:
class FocusHider
{
public:
- FocusHider (FocusManager&);
+ FocusHider(FocusManager&);
~FocusHider() COVERITY_NOEXCEPT_FALSE;
+
private:
bool mbFocusVisible;
FocusManager& mrManager;
@@ -175,14 +179,14 @@ private:
*/
bool mbPageIsFocused;
- ::std::vector<Link<LinkParamNone*,void>> maFocusChangeListeners;
+ ::std::vector<Link<LinkParamNone*, void>> maFocusChangeListeners;
/** Reset the focus state of the given descriptor and request a repaint
so that the focus indicator is hidden.
@param pDescriptor
When NULL is given then the call is ignored.
*/
- void HideFocusIndicator (const model::SharedPageDescriptor& rpDescriptor);
+ void HideFocusIndicator(const model::SharedPageDescriptor& rpDescriptor);
/** Set the focus state of the given descriptor, scroll it into the
visible area and request a repaint so that the focus indicator is
@@ -193,9 +197,8 @@ private:
When <TRUE/> (the default) then the view is scrolled so that the
focus rectangle lies inside its visible area.
*/
- void ShowFocusIndicator (
- const model::SharedPageDescriptor& rpDescriptor,
- const bool bScrollToFocus);
+ void ShowFocusIndicator(const model::SharedPageDescriptor& rpDescriptor,
+ const bool bScrollToFocus);
/** Call all currently registered listeners that a focus change has
happened. The focus may be hidden or shown or moved from one page
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
index 48065e70aced..c61578954dae 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
@@ -29,11 +29,17 @@
class SdPage;
-namespace sd::slidesorter { class SlideSorter; }
-namespace sd::slidesorter::model { class SlideSorterModel; }
-
-namespace sd::slidesorter::controller {
+namespace sd::slidesorter
+{
+class SlideSorter;
+}
+namespace sd::slidesorter::model
+{
+class SlideSorterModel;
+}
+namespace sd::slidesorter::controller
+{
class SlideSorterController;
/** A sub-controller that handles page selection of the slide browser.
@@ -70,15 +76,15 @@ public:
/** Select the specified descriptor. The selection state of the other
descriptors is not affected.
*/
- void SelectPage (int nPageIndex);
+ void SelectPage(int nPageIndex);
/** Select the descriptor that is associated with the given page. The
selection state of the other descriptors is not affected.
*/
- void SelectPage (const SdPage* pPage);
+ void SelectPage(const SdPage* pPage);
/** Select the specified descriptor. The selection state of the other
descriptors is not affected.
*/
- void SelectPage (const model::SharedPageDescriptor& rpDescriptor);
+ void SelectPage(const model::SharedPageDescriptor& rpDescriptor);
/** Return whether the specified page is selected. This convenience
method is a substitute for
@@ -98,10 +104,9 @@ public:
The current page is updated to the first slide
of the remaining selection.
*/
- void DeselectPage (int nPageIndex);
- void DeselectPage (
- const model::SharedPageDescriptor& rpDescriptor,
- const bool bUpdateCurrentPage = true);
+ void DeselectPage(int nPageIndex);
+ void DeselectPage(const model::SharedPageDescriptor& rpDescriptor,
+ const bool bUpdateCurrentPage = true);
/** This convenience method returns the same number of pages that
SlideSorterModel.GetPageCount() returns. It is included here so
@@ -109,14 +114,14 @@ public:
deselect them.
*/
int GetPageCount() const;
- int GetSelectedPageCount() const { return mnSelectedPageCount;}
+ int GetSelectedPageCount() const { return mnSelectedPageCount; }
/** Return the anchor for a range selection. This usually is the first
selected page after all pages have been deselected.
@return
The returned anchor may be NULL.
*/
- const model::SharedPageDescriptor& GetSelectionAnchor() const { return mpSelectionAnchor;}
+ const model::SharedPageDescriptor& GetSelectionAnchor() const { return mpSelectionAnchor; }
typedef ::std::vector<SdPage*> PageSelection;
@@ -143,9 +148,8 @@ public:
When called from within UpdateCurrentPage() then this flag is
used to prevent a recursion loop.
*/
- void SetPageSelection (
- const std::shared_ptr<PageSelection>& rSelection,
- const bool bUpdateCurrentPage);
+ void SetPageSelection(const std::shared_ptr<PageSelection>& rSelection,
+ const bool bUpdateCurrentPage);
/** Call this method after the model has changed to set the number
of selected pages.
@@ -159,10 +163,11 @@ public:
class UpdateLock
{
public:
- UpdateLock (SlideSorter const & rSlideSorter);
- UpdateLock (PageSelector& rPageSelector);
+ UpdateLock(SlideSorter const& rSlideSorter);
+ UpdateLock(PageSelector& rPageSelector);
~UpdateLock();
void Release();
+
private:
PageSelector* mpSelector;
};
@@ -170,9 +175,10 @@ public:
class BroadcastLock
{
public:
- BroadcastLock (SlideSorter const & rSlideSorter);
- BroadcastLock (PageSelector& rPageSelector);
+ BroadcastLock(SlideSorter const& rSlideSorter);
+ BroadcastLock(PageSelector& rPageSelector);
~BroadcastLock();
+
private:
PageSelector& mrSelector;
};
@@ -204,7 +210,7 @@ private:
*/
void DisableBroadcasting();
- void UpdateCurrentPage (const bool bUpdateOnlyWhenPending = false);
+ void UpdateCurrentPage(const bool bUpdateOnlyWhenPending = false);
void CheckConsistency() const;
};
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
index 01579e9a76db..af269424d1dd 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsProperties.hxx
@@ -22,8 +22,8 @@
#include <tools/color.hxx>
-namespace sd::slidesorter::controller {
-
+namespace sd::slidesorter::controller
+{
/** An extensible set of properties used throughout the slide sorter.
*/
class Properties
@@ -40,70 +40,73 @@ public:
/** When this method returns <TRUE/> then the current slide is
highlighted in the view. The default value is <FALSE/>.
*/
- bool IsHighlightCurrentSlide() const { return mbIsHighlightCurrentSlide;}
- void SetHighlightCurrentSlide (const bool bIsHighlightCurrentSlide);
+ bool IsHighlightCurrentSlide() const { return mbIsHighlightCurrentSlide; }
+ void SetHighlightCurrentSlide(const bool bIsHighlightCurrentSlide);
/** When this method returns <TRUE/> then the selection is indicated in
the view (typically by drawing rectangles around the selected
slides.) The default value is <TRUE/>.
*/
- bool IsShowSelection() const { return mbIsShowSelection;}
- void SetShowSelection (const bool bIsShowSelection);
+ bool IsShowSelection() const { return mbIsShowSelection; }
+ void SetShowSelection(const bool bIsShowSelection);
/** When this method returns <TRUE/> then the focusdselection is indicated in
the view (typically by drawing dotted rectangles around the selected
slides.) The default value is <TRUE/>.
*/
- bool IsShowFocus() const { return mbIsShowFocus;}
- void SetShowFocus (const bool bIsShowFocus);
+ bool IsShowFocus() const { return mbIsShowFocus; }
+ void SetShowFocus(const bool bIsShowFocus);
/** When this method returns <TRUE/> then on a selection change the
visible area is adapted so that the selected slides are shown
centered in the view. This can be used to center the current slide
by selecting only the current slide. The default value is <FALSE/>.
*/
- bool IsCenterSelection() const { return mbIsCenterSelection;}
- void SetCenterSelection (const bool bIsCenterSelection);
+ bool IsCenterSelection() const { return mbIsCenterSelection; }
+ void SetCenterSelection(const bool bIsCenterSelection);
/** When this method returns <TRUE/> then the view may try to change the
visible area by scrolling it smoothly on the screen. Experimental.
Default value is <FALSE/>.
*/
- bool IsSmoothSelectionScrolling() const { return mbIsSmoothSelectionScrolling;}
- void SetSmoothSelectionScrolling (const bool bIsSmoothSelectionScrolling);
+ bool IsSmoothSelectionScrolling() const { return mbIsSmoothSelectionScrolling; }
+ void SetSmoothSelectionScrolling(const bool bIsSmoothSelectionScrolling);
/** When this method returns <TRUE/> then during a full screen
presentation the previews in a slide sorter are not updated.
Default value is <TRUE/>.
*/
- bool IsSuspendPreviewUpdatesDuringFullScreenPresentation() const { return mbIsSuspendPreviewUpdatesDuringFullScreenPresentation;}
- void SetSuspendPreviewUpdatesDuringFullScreenPresentation (const bool bFlag);
+ bool IsSuspendPreviewUpdatesDuringFullScreenPresentation() const
+ {
+ return mbIsSuspendPreviewUpdatesDuringFullScreenPresentation;
+ }
+ void SetSuspendPreviewUpdatesDuringFullScreenPresentation(const bool bFlag);
/** Return the background color.
*/
- const Color& GetBackgroundColor() const { return maBackgroundColor;}
- void SetBackgroundColor (const Color& rColor);
+ const Color& GetBackgroundColor() const { return maBackgroundColor; }
+ void SetBackgroundColor(const Color& rColor);
/** Return the text color.
*/
- const Color& GetTextColor() const { return maTextColor;}
- void SetTextColor (const Color& rColor);
+ const Color& GetTextColor() const { return maTextColor; }
+ void SetTextColor(const Color& rColor);
/** Return the color in which selections are to be painted.
*/
- const Color& GetSelectionColor() const { return maSelectionColor;}
- void SetSelectionColor (const Color& rColor);
+ const Color& GetSelectionColor() const { return maSelectionColor; }
+ void SetSelectionColor(const Color& rColor);
/** Return the color used for highlighting e.g. the current slide.
*/
- const Color& GetHighlightColor() const { return maHighlightColor;}
- void SetHighlightColor (const Color& rColor);
+ const Color& GetHighlightColor() const { return maHighlightColor; }
+ void SetHighlightColor(const Color& rColor);
/** The UI can be set to be read only independently from the model status.
Used for instance in the presenter view.
*/
- bool IsUIReadOnly() const { return mbIsUIReadOnly;}
- void SetUIReadOnly (const bool bIsUIReadOnly);
+ bool IsUIReadOnly() const { return mbIsUIReadOnly; }
+ void SetUIReadOnly(const bool bIsUIReadOnly);
private:
bool mbIsHighlightCurrentSlide;
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
index f7a31ea7e4b1..86f366720059 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionFunction.hxx
@@ -24,22 +24,24 @@
#include <fupoor.hxx>
#include <memory>
-namespace sd::slidesorter { class SlideSorter; }
+namespace sd::slidesorter
+{
+class SlideSorter;
+}
struct AcceptDropEvent;
-namespace sd::slidesorter::controller {
-
+namespace sd::slidesorter::controller
+{
class SlideSorterController;
-class SelectionFunction final
- : public FuPoor
+class SelectionFunction final : public FuPoor
{
public:
SelectionFunction(const SelectionFunction&) = delete;
SelectionFunction& operator=(const SelectionFunction&) = delete;
- static rtl::Reference<FuPoor> Create( SlideSorter& rSlideSorter, SfxRequest& rRequest );
+ static rtl::Reference<FuPoor> Create(SlideSorter& rSlideSorter, SfxRequest& rRequest);
// Mouse- & Key-Events
virtual bool KeyInput(const KeyEvent& rKEvt) override;
@@ -65,9 +67,7 @@ public:
*/
virtual bool cancel() override;
- void MouseDragged (
- const AcceptDropEvent& rEvent,
- const sal_Int8 nDragAction);
+ void MouseDragged(const AcceptDropEvent& rEvent, const sal_Int8 nDragAction);
/** Turn of substitution display and insertion indicator.
*/
@@ -84,7 +84,7 @@ public:
};
void SwitchToNormalMode();
void SwitchToDragAndDropMode(const Point& rMousePosition);
- void SwitchToMultiSelectionMode (const Point& rMousePosition, const sal_uInt32 nEventCode);
+ void SwitchToMultiSelectionMode(const Point& rMousePosition, const sal_uInt32 nEventCode);
void ResetShiftKeySelectionAnchor();
/** Special case handling for when the context menu is hidden. This
@@ -98,9 +98,7 @@ private:
SlideSorter& mrSlideSorter;
SlideSorterController& mrController;
- SelectionFunction (
- SlideSorter& rSlideSorter,
- SfxRequest& rRequest);
+ SelectionFunction(SlideSorter& rSlideSorter, SfxRequest& rRequest);
virtual ~SelectionFunction() override;
@@ -121,28 +119,26 @@ private:
When nOffset is negative then go back. When nOffset if positive go
forward. When it is zero then ignore the call.
*/
- void GotoNextPage (int nOffset);
+ void GotoNextPage(int nOffset);
/** Make the slide with the given index the new current slide.
@param nIndex
Index of the new current slide. When the new index is outside
the range of valid page numbers it is clipped to that range.
*/
- void GotoPage (int nIndex);
+ void GotoPage(int nIndex);
- void ProcessMouseEvent (sal_uInt32 nEventType, const MouseEvent& rEvent);
+ void ProcessMouseEvent(sal_uInt32 nEventType, const MouseEvent& rEvent);
// What follows are a couple of helper methods that are used by
// ProcessMouseEvent().
- void ProcessEvent (EventDescriptor& rEvent);
+ void ProcessEvent(EventDescriptor& rEvent);
- void MoveFocus (
- const FocusManager::FocusMoveDirection eDirection,
- const bool bIsShiftDown,
- const bool bIsControlDown);
+ void MoveFocus(const FocusManager::FocusMoveDirection eDirection, const bool bIsShiftDown,
+ const bool bIsControlDown);
- void SwitchMode (const std::shared_ptr<ModeHandler>& rpHandler);
+ void SwitchMode(const std::shared_ptr<ModeHandler>& rpHandler);
};
} // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx
index 8857a59f65fc..c2cd60305e5c 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionManager.hxx
@@ -27,10 +27,13 @@
class SdPage;
-namespace sd::slidesorter { class SlideSorter; }
-
-namespace sd::slidesorter::controller {
+namespace sd::slidesorter
+{
+class SlideSorter;
+}
+namespace sd::slidesorter::controller
+{
class SlideSorterController;
class SelectionObserver;
@@ -46,7 +49,7 @@ class SelectionManager
public:
/** Create a new SelectionManager for the given slide sorter.
*/
- SelectionManager (SlideSorter& rSlideSorter);
+ SelectionManager(SlideSorter& rSlideSorter);
~SelectionManager();
@@ -58,13 +61,13 @@ public:
When <FALSE/> then make the first slide before the selected
pages the new current slide.
*/
- void DeleteSelectedPages (const bool bSelectFollowingPage = true);
+ void DeleteSelectedPages(const bool bSelectFollowingPage = true);
/** Call this method after the selection has changed (possible several
calls to the PageSelector) to invalidate the relevant slots and send
appropriate events.
*/
- void SelectionHasChanged ();
+ void SelectionHasChanged();
/** Add a listener that is called when the selection of the slide sorter
changes.
@@ -73,7 +76,7 @@ public:
the second and all following calls are ignored. Each listener
is added only once.
*/
- void AddSelectionChangeListener (const Link<LinkParamNone*,void>& rListener);
+ void AddSelectionChangeListener(const Link<LinkParamNone*, void>& rListener);
/** Remove a listener that was called when the selection of the slide
sorter changes.
@@ -81,7 +84,7 @@ public:
It is safe to pass a listener that was not added are has been
removed previously. Such calls are ignored.
*/
- void RemoveSelectionChangeListener (const Link<LinkParamNone*,void>& rListener);
+ void RemoveSelectionChangeListener(const Link<LinkParamNone*, void>& rListener);
/** Return the position where to insert pasted slides based on the
current selection. When there is a selection then the insert
@@ -96,15 +99,18 @@ public:
/** Store an insertion position temporarily. It is reset when the
selection changes the next time.
*/
- void SetInsertionPosition (const sal_Int32 nInsertionPosition);
+ void SetInsertionPosition(const sal_Int32 nInsertionPosition);
- const std::shared_ptr<SelectionObserver>& GetSelectionObserver() const { return mpSelectionObserver;}
+ const std::shared_ptr<SelectionObserver>& GetSelectionObserver() const
+ {
+ return mpSelectionObserver;
+ }
private:
SlideSorter& mrSlideSorter;
SlideSorterController& mrController;
- ::std::vector<Link<LinkParamNone*,void>> maSelectionChangeListeners;
+ ::std::vector<Link<LinkParamNone*, void>> maSelectionChangeListeners;
/** The insertion position is only temporarily valid. Negative values
indicate that the explicit insertion position is not valid. In this
@@ -119,14 +125,14 @@ private:
@param rSelectedNormalPages
A list of normal pages. Supplying master pages is an error.
*/
- void DeleteSelectedNormalPages (const ::std::vector<SdPage*>& rSelectedNormalPages);
+ void DeleteSelectedNormalPages(const ::std::vector<SdPage*>& rSelectedNormalPages);
/** Delete the given list of master pages. This method is a helper
function for DeleteSelectedPages().
@param rSelectedMasterPages
A list of master pages. Supplying normal pages is an error.
*/
- void DeleteSelectedMasterPages (const ::std::vector<SdPage*>& rSelectedMasterPages);
+ void DeleteSelectedMasterPages(const ::std::vector<SdPage*>& rSelectedMasterPages);
};
} // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx
index 119a8d08cbb8..e97bf6965955 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSelectionObserver.hxx
@@ -24,13 +24,16 @@
#include <memory>
#include <vector>
-namespace sd::slidesorter { class SlideSorter; }
+namespace sd::slidesorter
+{
+class SlideSorter;
+}
class SdrPage;
class SdPage;
-namespace sd::slidesorter::controller {
-
+namespace sd::slidesorter::controller
+{
/** Observe insertions and deletions of pages between calls to
StartObservation() and EndObservation(). When the later is called
the selection is set to just the newly inserted pages.
@@ -38,10 +41,10 @@ namespace sd::slidesorter::controller {
class SelectionObserver final
{
public:
- SelectionObserver (SlideSorter& rSlideSorter);
+ SelectionObserver(SlideSorter& rSlideSorter);
~SelectionObserver();
- void NotifyPageEvent (const SdrPage* pPage);
+ void NotifyPageEvent(const SdrPage* pPage);
void StartObservation();
void AbortObservation();
void EndObservation();
@@ -54,9 +57,10 @@ public:
class Context
{
public:
- Context (SlideSorter const & rSlideSorter);
+ Context(SlideSorter const& rSlideSorter);
~Context() COVERITY_NOEXCEPT_FALSE;
void Abort();
+
private:
std::shared_ptr<SelectionObserver> mpSelectionObserver;
};
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
index 238c10a36ce0..0f94a9512dec 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsSlotManager.hxx
@@ -27,10 +27,13 @@ class AbstractSvxNameDialog;
class SfxItemSet;
class SfxRequest;
-namespace sd::slidesorter { class SlideSorter; }
-
-namespace sd::slidesorter::controller {
+namespace sd::slidesorter
+{
+class SlideSorter;
+}
+namespace sd::slidesorter::controller
+{
/** This manager takes over the work of handling slot calls from the
controller of the slide sorter.
*/
@@ -42,18 +45,18 @@ public:
@param rController
The controller for which to handle the slot calls.
*/
- SlotManager (SlideSorter& rSlideSorter);
+ SlotManager(SlideSorter& rSlideSorter);
~SlotManager();
- void FuTemporary (SfxRequest& rRequest);
- void FuPermanent (SfxRequest& rRequest);
- void FuSupport (SfxRequest& rRequest);
- void GetMenuState (SfxItemSet &rSet);
- void GetClipboardState (SfxItemSet &rSet);
- void GetStatusBarState (SfxItemSet& rSet);
- void ExecCtrl (SfxRequest& rRequest);
- void GetAttrState (SfxItemSet& rSet);
+ void FuTemporary(SfxRequest& rRequest);
+ void FuPermanent(SfxRequest& rRequest);
+ void FuSupport(SfxRequest& rRequest);
+ void GetMenuState(SfxItemSet& rSet);
+ void GetClipboardState(SfxItemSet& rSet);
+ void GetStatusBarState(SfxItemSet& rSet);
+ void ExecCtrl(SfxRequest& rRequest);
+ void GetAttrState(SfxItemSet& rSet);
/** Exclude or include one slide or all selected slides.
@param rpDescriptor
@@ -61,9 +64,8 @@ public:
selected pages. Otherwise apply the new state to just the
specified state.
*/
- void ChangeSlideExclusionState (
- const model::SharedPageDescriptor& rpDescriptor,
- const bool bExcludeSlide);
+ void ChangeSlideExclusionState(const model::SharedPageDescriptor& rpDescriptor,
+ const bool bExcludeSlide);
/** Call this after a change from normal mode to master mode or back.
The affected slots are invalidated.
@@ -77,16 +79,16 @@ private:
/** The implementation is a copy of the code for SID_RENAMEPAGE in
drviews2.cxx.
*/
- void RenameSlide( const SfxRequest& rRequest );
+ void RenameSlide(const SfxRequest& rRequest);
DECL_LINK(RenameSlideHdl, AbstractSvxNameDialog&, bool);
DECL_STATIC_LINK(SlotManager, RenameSlideTooltipHdl, AbstractSvxNameDialog&, OUString);
- bool RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUString& rName);
+ bool RenameSlideFromDrawViewShell(sal_uInt16 nPageId, const OUString& rName);
/** Handle SID_INSERTPAGE slot calls.
*/
- void InsertSlide (SfxRequest& rRequest);
+ void InsertSlide(SfxRequest& rRequest);
- void DuplicateSelectedSlides (SfxRequest& rRequest);
+ void DuplicateSelectedSlides(SfxRequest& rRequest);
/** Use one of several ways to determine where to insert a new page.
This can be the current selection or the insertion indicator.
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
index 2b7606c8b75e..3add2a4255d1 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
@@ -25,23 +25,26 @@
#include <tools/gen.hxx>
#include <vector>
-namespace sd::slidesorter { class SlideSorter; }
-
-namespace sd::slidesorter::controller {
+namespace sd::slidesorter
+{
+class SlideSorter;
+}
+namespace sd::slidesorter::controller
+{
/** Manage requests for scrolling page objects into view.
*/
class VisibleAreaManager
{
public:
- explicit VisibleAreaManager (SlideSorter& rSlideSorter);
+ explicit VisibleAreaManager(SlideSorter& rSlideSorter);
~VisibleAreaManager();
VisibleAreaManager(const VisibleAreaManager&) = delete;
VisibleAreaManager& operator=(const VisibleAreaManager&) = delete;
void ActivateCurrentSlideTracking();
void DeactivateCurrentSlideTracking();
- bool IsCurrentSlideTrackingActive() const { return mbIsCurrentSlideTrackingActive;}
+ bool IsCurrentSlideTrackingActive() const { return mbIsCurrentSlideTrackingActive; }
/** Request the current slide to be moved into the visible area.
This request is only obeyed when the current slide tracking is
@@ -52,17 +55,16 @@ public:
/** Request to make the specified page object visible.
*/
- void RequestVisible (
- const model::SharedPageDescriptor& rpDescriptor,
- const bool bForce = false);
+ void RequestVisible(const model::SharedPageDescriptor& rpDescriptor, const bool bForce = false);
/** Temporarily disable the update of the visible area.
*/
class TemporaryDisabler
{
public:
- explicit TemporaryDisabler (SlideSorter const & rSlideSorter);
+ explicit TemporaryDisabler(SlideSorter const& rSlideSorter);
~TemporaryDisabler();
+
private:
VisibleAreaManager& mrVisibleAreaManager;
};
@@ -78,7 +80,7 @@ private:
Point maRequestedVisibleTopLeft;
bool mbIsCurrentSlideTrackingActive;
- int mnDisableCount;
+ int mnDisableCount;
void MakeVisible();
::std::optional<Point> GetRequestedTopLeft() const;
diff --git a/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx b/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
index a2a87b8c9bdc..77fd175c491d 100644
--- a/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlideSorterModel.hxx
@@ -34,14 +34,23 @@ class SdDrawDocument;
class SdrPage;
class SdPage;
-namespace sd::slidesorter { class SlideSorter; }
-
-namespace com::sun::star::container { class XIndexAccess; }
-namespace com::sun::star::drawing { class XDrawPage; }
+namespace sd::slidesorter
+{
+class SlideSorter;
+}
-namespace sd::slidesorter::model {
+namespace com::sun::star::container
+{
+class XIndexAccess;
+}
+namespace com::sun::star::drawing
+{
+class XDrawPage;
+}
-inline sal_Int32 FromCoreIndex (const sal_uInt16 nCoreIndex) { return (nCoreIndex-1)/2; }
+namespace sd::slidesorter::model
+{
+inline sal_Int32 FromCoreIndex(const sal_uInt16 nCoreIndex) { return (nCoreIndex - 1) / 2; }
/** The model of the slide sorter gives access to the slides that are to be
displayed in the slide sorter view. Via the SetDocumentSlides() method
@@ -51,7 +60,7 @@ inline sal_Int32 FromCoreIndex (const sal_uInt16 nCoreIndex) { return (nCoreInde
class SlideSorterModel final
{
public:
- SlideSorterModel (SlideSorter& rSlideSorter);
+ SlideSorterModel(SlideSorter& rSlideSorter);
~SlideSorterModel();
void Dispose();
@@ -70,9 +79,9 @@ public:
changed and thus the page descriptor list has been set up
to reflect that change. A repaint is necessary.
*/
- bool SetEditMode (EditMode eEditMode);
+ bool SetEditMode(EditMode eEditMode);
- EditMode GetEditMode() const { return meEditMode;}
+ EditMode GetEditMode() const { return meEditMode; }
/** Return the number of slides in the document regardless of whether
they are visible or not or whether they are hidden or not.
@@ -97,9 +106,8 @@ public:
reference is returned. Note that the page count may change
between calls to GetPageCount() and GetPageDescriptor().
*/
- SharedPageDescriptor GetPageDescriptor (
- const sal_Int32 nPageIndex,
- const bool bCreate = true) const;
+ SharedPageDescriptor GetPageDescriptor(const sal_Int32 nPageIndex,
+ const bool bCreate = true) const;
/** Return a page descriptor for the given XDrawPage. Page descriptors
are created on demand. The page descriptor is found (or not found)
@@ -111,8 +119,7 @@ public:
Returns the index to the requested page descriptor or -1 when
there is no such page descriptor.
*/
- sal_Int32 GetIndex (
- const css::uno::Reference<css::drawing::XDrawPage>& rxSlide) const;
+ sal_Int32 GetIndex(const css::uno::Reference<css::drawing::XDrawPage>& rxSlide) const;
/** Return a page descriptor for the given SdrPage. Page descriptors
are created on demand. The page descriptor is found (or not found)
@@ -124,14 +131,14 @@ public:
Returns the index to the requested page descriptor or -1 when
there is no such page descriptor.
*/
- sal_Int32 GetIndex (const SdrPage* pPage) const;
+ sal_Int32 GetIndex(const SdrPage* pPage) const;
/** Return an index for accessing an SdrModel that corresponds to the
given SlideSorterModel index. In many cases we just have to apply
the n*2+1 magic. Only when a special model is set, like a custom
slide show, then the returned value is different.
*/
- sal_uInt16 GetCoreIndex (const sal_Int32 nIndex) const;
+ sal_uInt16 GetCoreIndex(const sal_Int32 nIndex) const;
/** Call this method after the document has changed its structure. This
will get the model in sync with the SdDrawDocument. This method
@@ -158,7 +165,7 @@ public:
/** Return the mutex so that the caller can lock it and then safely
access the model.
*/
- ::osl::Mutex& GetMutex() { return maMutex;}
+ ::osl::Mutex& GetMutex() { return maMutex; }
/** Set the XIndexAccess from which the called SlideSorterModel takes
its pages.
@@ -167,7 +174,7 @@ public:
necessarily the same as the ones of the XModel of the
XController (although it typically is a subset).
*/
- void SetDocumentSlides (const css::uno::Reference<css::container::XIndexAccess>& rxSlides);
+ void SetDocumentSlides(const css::uno::Reference<css::container::XIndexAccess>& rxSlides);
/** Return the set of pages that is currently displayed by the slide sorter.
*/
@@ -200,7 +207,7 @@ public:
Returns <TRUE/> when the given page is relevant for the current
page kind and edit mode.
*/
- bool NotifyPageEvent (const SdrPage* pPage);
+ bool NotifyPageEvent(const SdrPage* pPage);
private:
mutable ::osl::Mutex maMutex;
@@ -214,11 +221,11 @@ private:
*/
void AdaptSize();
- SdPage* GetPage (const sal_Int32 nCoreIndex) const;
- void InsertSlide (SdPage* pPage, bool bMarkSelected);
+ SdPage* GetPage(const sal_Int32 nCoreIndex) const;
+ void InsertSlide(SdPage* pPage, bool bMarkSelected);
// return if this page was marked as selected before being removed
- bool DeleteSlide (const SdPage* pPage);
- void UpdateIndices (const sal_Int32 nFirstIndex);
+ bool DeleteSlide(const SdPage* pPage);
+ void UpdateIndices(const sal_Int32 nFirstIndex);
};
} // end of namespace ::sd::slidesorter::model
diff --git a/sd/source/ui/slidesorter/inc/model/SlsEnumeration.hxx b/sd/source/ui/slidesorter/inc/model/SlsEnumeration.hxx
index cc67149eb174..08d9c1c4c68f 100644
--- a/sd/source/ui/slidesorter/inc/model/SlsEnumeration.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlsEnumeration.hxx
@@ -22,13 +22,12 @@
#include <memory>
-namespace sd::slidesorter::model {
-
+namespace sd::slidesorter::model
+{
/** Interface to generic enumerations. Designed to operate on shared
pointers. Therefore GetNextElement() returns T and not T&.
*/
-template <class T>
-class Enumeration
+template <class T> class Enumeration
{
public:
virtual ~Enumeration() {}
@@ -38,7 +37,7 @@ public:
*/
virtual T GetNextElement() = 0;
virtual void Rewind() = 0;
- virtual ::std::unique_ptr<Enumeration<T> > Clone() = 0;
+ virtual ::std::unique_ptr<Enumeration<T>> Clone() = 0;
};
} // end of namespace ::sd::slidesorter::model
diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx
index a1992fd24d16..7747df8ee4fe 100644
--- a/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlsPageEnumeration.hxx
@@ -26,8 +26,8 @@
#include <functional>
#include <memory>
-namespace sd::slidesorter::model {
-
+namespace sd::slidesorter::model
+{
class SlideSorterModel;
/** Public class of page enumerations that delegates its calls to an
@@ -37,8 +37,7 @@ class SlideSorterModel;
The PageEnumerationProvider has methods for creating different types
of page enumerations.
*/
-class PageEnumeration
- : public Enumeration<SharedPageDescriptor>
+class PageEnumeration : public Enumeration<SharedPageDescriptor>
{
public:
/** Create a new page enumeration that enumerates a subset of the pages
@@ -50,22 +49,20 @@ public:
enumeration. Pages for which rPredicate returns <FALSE/> are
exclude.
*/
- typedef ::std::function<bool (const SharedPageDescriptor&)> PagePredicate;
- static PageEnumeration Create (
- const SlideSorterModel& rModel,
- const PagePredicate& rPredicate);
+ typedef ::std::function<bool(const SharedPageDescriptor&)> PagePredicate;
+ static PageEnumeration Create(const SlideSorterModel& rModel, const PagePredicate& rPredicate);
/** This copy constructor creates a copy of the given enumeration.
*/
- PageEnumeration (const PageEnumeration& rEnumeration);
+ PageEnumeration(const PageEnumeration& rEnumeration);
virtual ~PageEnumeration() override;
/** Create and return an exact copy of the called object.
*/
- virtual ::std::unique_ptr<Enumeration<SharedPageDescriptor> > Clone() override;
+ virtual ::std::unique_ptr<Enumeration<SharedPageDescriptor>> Clone() override;
- PageEnumeration& operator= (const PageEnumeration& rEnumeration);
+ PageEnumeration& operator=(const PageEnumeration& rEnumeration);
/** Return <TRUE/> when the enumeration has more elements, i.e. it is
save to call GetNextElement() at least one more time.
@@ -86,13 +83,12 @@ public:
private:
/// Implementation object.
- ::std::unique_ptr<Enumeration<SharedPageDescriptor> > mpImpl;
+ ::std::unique_ptr<Enumeration<SharedPageDescriptor>> mpImpl;
/** This constructor expects an implementation object that holds
the predicate that filters the pages.
*/
- PageEnumeration (::std::unique_ptr<Enumeration<SharedPageDescriptor> > && pImpl);
-
+ PageEnumeration(::std::unique_ptr<Enumeration<SharedPageDescriptor>>&& pImpl);
};
} // end of namespace ::sd::slidesorter::model
diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageEnumerationProvider.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageEnumerationProvider.hxx
index 1118e45885ce..8e52a59f2736 100644
--- a/sd/source/ui/slidesorter/inc/model/SlsPageEnumerationProvider.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlsPageEnumerationProvider.hxx
@@ -22,8 +22,8 @@
#include <model/SlsPageEnumeration.hxx>
-namespace sd::slidesorter::model {
-
+namespace sd::slidesorter::model
+{
class SlideSorterModel;
/** Collection of methods that create enumeration of slides.
@@ -34,17 +34,17 @@ public:
/** The returned enumeration of slides iterates over all slides of the
given model.
*/
- static PageEnumeration CreateAllPagesEnumeration (const SlideSorterModel& rModel);
+ static PageEnumeration CreateAllPagesEnumeration(const SlideSorterModel& rModel);
/** The returned enumeration of slides iterates over the currently
selected slides of the given model.
*/
- static PageEnumeration CreateSelectedPagesEnumeration (const SlideSorterModel& rModel);
+ static PageEnumeration CreateSelectedPagesEnumeration(const SlideSorterModel& rModel);
/** The returned enumeration of slides iterates over the slides
(partially) inside the visible area.
*/
- static PageEnumeration CreateVisiblePagesEnumeration (const SlideSorterModel& rModel);
+ static PageEnumeration CreateVisiblePagesEnumeration(const SlideSorterModel& rModel);
};
} // end of namespace ::sd::slidesorter::model
diff --git a/sd/source/ui/slidesorter/inc/model/SlsSharedPageDescriptor.hxx b/sd/source/ui/slidesorter/inc/model/SlsSharedPageDescriptor.hxx
index 3f2b2a65da69..d763eecbb6d4 100644
--- a/sd/source/ui/slidesorter/inc/model/SlsSharedPageDescriptor.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlsSharedPageDescriptor.hxx
@@ -22,8 +22,8 @@
#include <memory>
-namespace sd::slidesorter::model {
-
+namespace sd::slidesorter::model
+{
class PageDescriptor;
typedef std::shared_ptr<PageDescriptor> SharedPageDescriptor;
diff --git a/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx b/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx
index d205a5154c63..ae17ba8dbc13 100644
--- a/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlsVisualState.hxx
@@ -23,8 +23,8 @@
#include <sal/types.h>
#include <tools/gen.hxx>
-namespace sd::slidesorter::model {
-
+namespace sd::slidesorter::model
+{
/** This class gives access to values related to the visualization of page
objects. This includes animation state when blending from one state to
another.
@@ -32,11 +32,11 @@ namespace sd::slidesorter::model {
class VisualState
{
public:
- VisualState (const sal_Int32 nPageId);
+ VisualState(const sal_Int32 nPageId);
~VisualState();
- const Point& GetLocationOffset() const { return maLocationOffset;}
- void SetLocationOffset (const Point& rPoint);
+ const Point& GetLocationOffset() const { return maLocationOffset; }
+ void SetLocationOffset(const Point& rPoint);
sal_Int32 mnPageId; // For debugging
diff --git a/sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx b/sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx
index 15a93168406e..45977b03915f 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsInsertAnimator.hxx
@@ -23,8 +23,8 @@
#include <controller/SlsAnimator.hxx>
#include <memory>
-namespace sd::slidesorter::view {
-
+namespace sd::slidesorter::view
+{
class InsertPosition;
/** Animate the positions of page objects to make room at the insert
@@ -33,14 +33,14 @@ class InsertPosition;
class InsertAnimator
{
public:
- explicit InsertAnimator (SlideSorter& rSlideSorter);
+ explicit InsertAnimator(SlideSorter& rSlideSorter);
InsertAnimator(const InsertAnimator&) = delete;
InsertAnimator& operator=(const InsertAnimator&) = delete;
/** Set the position at which we have to make room for the display of an
icon.
*/
- void SetInsertPosition (const InsertPosition& rInsertPosition);
+ void SetInsertPosition(const InsertPosition& rInsertPosition);
/** Restore the normal position of all page objects.
@param eMode
@@ -48,7 +48,7 @@ public:
normal positions of all slides (AM_Animated) or to restore the
normal positions immediately (AM_Immediate).
*/
- void Reset (const controller::Animator::AnimationMode eMode);
+ void Reset(const controller::Animator::AnimationMode eMode);
private:
class Implementation;
diff --git a/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx b/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx
index ef699af7e51b..ef1c11b337f8 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsToolTip.hxx
@@ -24,10 +24,13 @@
#include <rtl/ustring.hxx>
#include <vcl/timer.hxx>
-namespace sd::slidesorter { class SlideSorter; }
-
-namespace sd::slidesorter::view {
+namespace sd::slidesorter
+{
+class SlideSorter;
+}
+namespace sd::slidesorter::view
+{
/** Manage the display of tool tips. The tool tip text changes when the
mouse is moved from slide to slide or from button to button.
After the mouse enters a slide the first display of the tool tip is
@@ -37,7 +40,7 @@ namespace sd::slidesorter::view {
class ToolTip
{
public:
- ToolTip (SlideSorter& rSlideSorter);
+ ToolTip(SlideSorter& rSlideSorter);
~ToolTip();
/** Set a new page. This modifies the default help text. After a page
@@ -46,7 +49,7 @@ public:
@param rpPage
When this is empty then the tool tip is hidden.
*/
- void SetPage (const model::SharedPageDescriptor& rpPage);
+ void SetPage(const model::SharedPageDescriptor& rpPage);
/** Hide the tool tip.
@return
diff --git a/sd/source/ui/slidesorter/model/SlsVisualState.cxx b/sd/source/ui/slidesorter/model/SlsVisualState.cxx
index 9662b5d32945..b342e1aeee22 100644
--- a/sd/source/ui/slidesorter/model/SlsVisualState.cxx
+++ b/sd/source/ui/slidesorter/model/SlsVisualState.cxx
@@ -19,19 +19,17 @@
#include <model/SlsVisualState.hxx>
-namespace sd::slidesorter::model {
-
-VisualState::VisualState (const sal_Int32 nPageId)
- : mnPageId(nPageId),
- maLocationOffset(0,0)
+namespace sd::slidesorter::model
{
-}
-
-VisualState::~VisualState()
+VisualState::VisualState(const sal_Int32 nPageId)
+ : mnPageId(nPageId)
+ , maLocationOffset(0, 0)
{
}
-void VisualState::SetLocationOffset (const Point& rOffset)
+VisualState::~VisualState() {}
+
+void VisualState::SetLocationOffset(const Point& rOffset)
{
if (maLocationOffset != rOffset)
{
diff --git a/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx b/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx
index f668d62e6a82..45520a994c5a 100644
--- a/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx
+++ b/sd/source/ui/slidesorter/view/SlsViewCacheContext.hxx
@@ -23,32 +23,38 @@
#include <cache/SlsCacheContext.hxx>
#include <model/SlsSharedPageDescriptor.hxx>
-namespace sd::slidesorter::model { class SlideSorterModel; }
-namespace sd::slidesorter { class SlideSorter; }
-
-namespace sd::slidesorter::view {
+namespace sd::slidesorter::model
+{
+class SlideSorterModel;
+}
+namespace sd::slidesorter
+{
+class SlideSorter;
+}
+namespace sd::slidesorter::view
+{
/** The cache context for the SlideSorter as used by Draw and Impress. See
the base class for documentation of the individual methods.
*/
class ViewCacheContext : public cache::CacheContext
{
public:
- explicit ViewCacheContext (SlideSorter& rSlideSorter);
+ explicit ViewCacheContext(SlideSorter& rSlideSorter);
virtual ~ViewCacheContext() override;
- virtual void NotifyPreviewCreation (cache::CacheKey aKey) override;
+ virtual void NotifyPreviewCreation(cache::CacheKey aKey) override;
virtual bool IsIdle() override;
- virtual bool IsVisible (cache::CacheKey aKey) override;
- virtual const SdrPage* GetPage (cache::CacheKey aKey) override;
- virtual std::shared_ptr<std::vector<cache::CacheKey> > GetEntryList (bool bVisible) override;
- virtual sal_Int32 GetPriority (cache::CacheKey aKey) override;
+ virtual bool IsVisible(cache::CacheKey aKey) override;
+ virtual const SdrPage* GetPage(cache::CacheKey aKey) override;
+ virtual std::shared_ptr<std::vector<cache::CacheKey>> GetEntryList(bool bVisible) override;
+ virtual sal_Int32 GetPriority(cache::CacheKey aKey) override;
virtual css::uno::Reference<css::uno::XInterface> GetModel() override;
private:
model::SlideSorterModel& mrModel;
SlideSorter& mrSlideSorter;
- model::SharedPageDescriptor GetDescriptor (cache::CacheKey aKey);
+ model::SharedPageDescriptor GetDescriptor(cache::CacheKey aKey);
};
} // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/tools/AsynchronousCall.cxx b/sd/source/ui/tools/AsynchronousCall.cxx
index dcf8126eb587..d7c7220ea5d6 100644
--- a/sd/source/ui/tools/AsynchronousCall.cxx
+++ b/sd/source/ui/tools/AsynchronousCall.cxx
@@ -20,13 +20,13 @@
#include <memory>
#include <tools/AsynchronousCall.hxx>
-namespace sd::tools {
-
+namespace sd::tools
+{
AsynchronousCall::AsynchronousCall()
- : maTimer(),
- mpFunction()
+ : maTimer()
+ , mpFunction()
{
- maTimer.SetInvokeHandler( LINK(this,AsynchronousCall,TimerCallback) );
+ maTimer.SetInvokeHandler(LINK(this, AsynchronousCall, TimerCallback));
}
AsynchronousCall::~AsynchronousCall()
@@ -35,14 +35,14 @@ AsynchronousCall::~AsynchronousCall()
maTimer.Stop();
}
-void AsynchronousCall::Post (const AsynchronousFunction& rFunction)
+void AsynchronousCall::Post(const AsynchronousFunction& rFunction)
{
mpFunction.reset(new AsynchronousFunction(rFunction));
maTimer.SetTimeout(10);
maTimer.Start();
}
-IMPL_LINK(AsynchronousCall,TimerCallback,Timer*,pTimer,void)
+IMPL_LINK(AsynchronousCall, TimerCallback, Timer*, pTimer, void)
{
if (pTimer == &maTimer)
{
diff --git a/sd/source/ui/tools/IconCache.cxx b/sd/source/ui/tools/IconCache.cxx
index 514e513a1b42..0ce80922b8ce 100644
--- a/sd/source/ui/tools/IconCache.cxx
+++ b/sd/source/ui/tools/IconCache.cxx
@@ -25,8 +25,8 @@
#include <osl/getglobalmutex.hxx>
#include <unordered_map>
-namespace sd {
-
+namespace sd
+{
//===== IconCache::Implementation =============================================
class IconCache::Implementation
@@ -70,11 +70,11 @@ IconCache& IconCache::Instance()
if (Implementation::s_pIconCache == nullptr)
{
::osl::GetGlobalMutex aMutexFunctor;
- ::osl::MutexGuard aGuard (aMutexFunctor());
+ ::osl::MutexGuard aGuard(aMutexFunctor());
if (Implementation::s_pIconCache == nullptr)
{
- IconCache* pCache = new IconCache ();
- SdGlobalResourceContainer::Instance().AddResource (
+ IconCache* pCache = new IconCache();
+ SdGlobalResourceContainer::Instance().AddResource(
::std::unique_ptr<SdGlobalResource>(pCache));
OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
Implementation::s_pIconCache = pCache;
@@ -85,18 +85,14 @@ IconCache& IconCache::Instance()
OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
}
- DBG_ASSERT(Implementation::s_pIconCache != nullptr,
- "IconCache::Instance(): instance is NULL");
+ DBG_ASSERT(Implementation::s_pIconCache != nullptr, "IconCache::Instance(): instance is NULL");
return *Implementation::s_pIconCache;
}
-Image IconCache::GetIcon(const OUString& rResourceId)
-{
- return mpImpl->GetIcon(rResourceId);
-}
+Image IconCache::GetIcon(const OUString& rResourceId) { return mpImpl->GetIcon(rResourceId); }
IconCache::IconCache()
- : mpImpl (new Implementation)
+ : mpImpl(new Implementation)
{
}
diff --git a/sd/source/ui/uitest/uiobject.cxx b/sd/source/ui/uitest/uiobject.cxx
index e3215ab35af2..54e5b586df7b 100644
--- a/sd/source/ui/uitest/uiobject.cxx
+++ b/sd/source/ui/uitest/uiobject.cxx
@@ -16,8 +16,8 @@
#include <svx/uiobject.hxx>
-namespace {
-
+namespace
+{
class ImpressSdrObject : public SdrUIObject
{
public:
@@ -39,7 +39,7 @@ sd::DrawViewShell* getViewShell(const VclPtr<sd::Window>& xWindow)
return pViewShell;
}
-OUString getObjectName(SdrObject const * pObject)
+OUString getObjectName(SdrObject const* pObject)
{
if (pObject->GetName().isEmpty())
return "Unnamed Drawinglayer object " + OUString::number(pObject->GetOrdNum());
@@ -64,24 +64,19 @@ SdrObject* getObject(const VclPtr<sd::Window>& xWindow, const OUString& rName)
return nullptr;
}
-
-
}
-ImpressSdrObject::ImpressSdrObject(const VclPtr<sd::Window>& xImpressWin, const OUString& rName):
- mxWindow(xImpressWin),
- maName(rName)
+ImpressSdrObject::ImpressSdrObject(const VclPtr<sd::Window>& xImpressWin, const OUString& rName)
+ : mxWindow(xImpressWin)
+ , maName(rName)
{
}
-SdrObject* ImpressSdrObject::get_object()
-{
- return getObject(mxWindow, maName);
-}
+SdrObject* ImpressSdrObject::get_object() { return getObject(mxWindow, maName); }
-ImpressWindowUIObject::ImpressWindowUIObject(const VclPtr<sd::Window>& xWindow):
- WindowUIObject(xWindow),
- mxWindow(xWindow)
+ImpressWindowUIObject::ImpressWindowUIObject(const VclPtr<sd::Window>& xWindow)
+ : WindowUIObject(xWindow)
+ , mxWindow(xWindow)
{
}
@@ -96,8 +91,7 @@ StringMap ImpressWindowUIObject::get_state()
return aMap;
}
-void ImpressWindowUIObject::execute(const OUString& rAction,
- const StringMap& rParameters)
+void ImpressWindowUIObject::execute(const OUString& rAction, const StringMap& rParameters)
{
if (rAction == "SET")
{
@@ -161,10 +155,7 @@ std::set<OUString> ImpressWindowUIObject::get_children() const
return aRet;
}
-OUString ImpressWindowUIObject::get_name() const
-{
- return "ImpressWindowUIObject";
-}
+OUString ImpressWindowUIObject::get_name() const { return "ImpressWindowUIObject"; }
std::unique_ptr<UIObject> ImpressWindowUIObject::create(vcl::Window* pWindow)
{
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.hxx b/sd/source/ui/unoidl/UnoDocumentSettings.hxx
index 5e6c813eb0cf..ebf436862c7d 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.hxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.hxx
@@ -22,13 +22,17 @@
#include <com/sun/star/uno/Reference.hxx>
-namespace com::sun::star::uno { class XInterface; }
+namespace com::sun::star::uno
+{
+class XInterface;
+}
class SdXImpressDocument;
namespace sd
{
- css::uno::Reference< css::uno::XInterface > DocumentSettings_createInstance( SdXImpressDocument* pDoc ) throw();
+css::uno::Reference<css::uno::XInterface>
+DocumentSettings_createInstance(SdXImpressDocument* pDoc) throw();
}
#endif
diff --git a/sd/source/ui/unoidl/unopool.hxx b/sd/source/ui/unoidl/unopool.hxx
index fb71522dec3e..f7279e9b911d 100644
--- a/sd/source/ui/unoidl/unopool.hxx
+++ b/sd/source/ui/unoidl/unopool.hxx
@@ -25,8 +25,7 @@
#include <com/sun/star/uno/Reference.hxx>
#include <drawdoc.hxx>
-css::uno::Reference<css::uno::XInterface> SdUnoCreatePool(
- SdDrawDocument * pDrawModel);
+css::uno::Reference<css::uno::XInterface> SdUnoCreatePool(SdDrawDocument* pDrawModel);
#endif
diff --git a/sd/source/ui/view/GraphicViewShellBase.cxx b/sd/source/ui/view/GraphicViewShellBase.cxx
index 5a9076a7fa48..eab3a5c02fd3 100644
--- a/sd/source/ui/view/GraphicViewShellBase.cxx
+++ b/sd/source/ui/view/GraphicViewShellBase.cxx
@@ -28,42 +28,33 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/viewsh.hxx>
-namespace sd {
-
-
+namespace sd
+{
// We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
// new GraphicViewShellBase object has been constructed.
SfxViewFactory* GraphicViewShellBase::pFactory;
-SfxViewShell* GraphicViewShellBase::CreateInstance (
- SfxViewFrame *pFrame, SfxViewShell *pOldView)
+SfxViewShell* GraphicViewShellBase::CreateInstance(SfxViewFrame* pFrame, SfxViewShell* pOldView)
{
GraphicViewShellBase* pBase = new GraphicViewShellBase(pFrame, pOldView);
pBase->LateInit(framework::FrameworkHelper::msDrawViewURL);
return pBase;
}
-void GraphicViewShellBase::RegisterFactory( SfxInterfaceId nPrio )
+void GraphicViewShellBase::RegisterFactory(SfxInterfaceId nPrio)
{
- pFactory = new SfxViewFactory(&CreateInstance,nPrio,"Default");
+ pFactory = new SfxViewFactory(&CreateInstance, nPrio, "Default");
InitFactory();
}
-void GraphicViewShellBase::InitFactory()
-{
- SFX_VIEW_REGISTRATION(GraphicDocShell);
-}
+void GraphicViewShellBase::InitFactory() { SFX_VIEW_REGISTRATION(GraphicDocShell); }
-GraphicViewShellBase::GraphicViewShellBase (
- SfxViewFrame* _pFrame,
- SfxViewShell* pOldShell)
- : ViewShellBase (_pFrame, pOldShell)
+GraphicViewShellBase::GraphicViewShellBase(SfxViewFrame* _pFrame, SfxViewShell* pOldShell)
+ : ViewShellBase(_pFrame, pOldShell)
{
}
-GraphicViewShellBase::~GraphicViewShellBase()
-{
-}
+GraphicViewShellBase::~GraphicViewShellBase() {}
-void GraphicViewShellBase::Execute (SfxRequest& rRequest)
+void GraphicViewShellBase::Execute(SfxRequest& rRequest)
{
sal_uInt16 nSlotId = rRequest.GetSlot();
@@ -86,16 +77,14 @@ void GraphicViewShellBase::Execute (SfxRequest& rRequest)
case SID_LEFT_PANE_IMPRESS:
default:
// The remaining requests are forwarded to our base class.
- ViewShellBase::Execute (rRequest);
+ ViewShellBase::Execute(rRequest);
break;
}
-
}
void GraphicViewShellBase::InitializeFramework()
{
- css::uno::Reference<css::frame::XController>
- xController (GetController());
+ css::uno::Reference<css::frame::XController> xController(GetController());
sd::framework::DrawModule::Initialize(xController);
}
diff --git a/sd/source/ui/view/ViewShellHint.cxx b/sd/source/ui/view/ViewShellHint.cxx
index ab3b7456946e..6605ee9232c2 100644
--- a/sd/source/ui/view/ViewShellHint.cxx
+++ b/sd/source/ui/view/ViewShellHint.cxx
@@ -19,11 +19,11 @@
#include <ViewShellHint.hxx>
-namespace sd {
-
-ViewShellHint::ViewShellHint (HintId eHintId)
- : SfxHint(),
- meHintId(eHintId)
+namespace sd
+{
+ViewShellHint::ViewShellHint(HintId eHintId)
+ : SfxHint()
+ , meHintId(eHintId)
{
}
diff --git a/sd/source/ui/view/clview.cxx b/sd/source/ui/view/clview.cxx
index 58b12cb37e52..9f11839da232 100644
--- a/sd/source/ui/view/clview.cxx
+++ b/sd/source/ui/view/clview.cxx
@@ -20,8 +20,8 @@
#include <ClientView.hxx>
#include <drawview.hxx>
-namespace sd {
-
+namespace sd
+{
class DrawDocShell;
class DrawViewShell;
@@ -29,16 +29,12 @@ class DrawViewShell;
* ClientView is used for DrawDocShell::Draw()
*/
-ClientView::ClientView(
- DrawDocShell* pDocSh,
- OutputDevice* pOutDev)
- : DrawView (pDocSh, pOutDev, nullptr)
+ClientView::ClientView(DrawDocShell* pDocSh, OutputDevice* pOutDev)
+ : DrawView(pDocSh, pOutDev, nullptr)
{
}
-ClientView::~ClientView()
-{
-}
+ClientView::~ClientView() {}
/**
* If View should not Invalidate() the windows, this method has
diff --git a/sd/source/ui/view/drvwshrg.cxx b/sd/source/ui/view/drvwshrg.cxx
index f82911d26f09..82e0e88ae74e 100644
--- a/sd/source/ui/view/drvwshrg.cxx
+++ b/sd/source/ui/view/drvwshrg.cxx
@@ -46,8 +46,8 @@ using namespace sd;
#define ShellClass_GraphicViewShell
#include <sdgslots.hxx>
-namespace sd {
-
+namespace sd
+{
/**
* Declare SFX-Slotmap and Standardinterface
*/
@@ -73,10 +73,10 @@ void DrawViewShell::InitInterface_Impl()
#if HAVE_FEATURE_AVMEDIA
GetStaticInterface()->RegisterChildWindow(::avmedia::MediaPlayer::GetChildWindowId());
#endif
- GetStaticInterface()->RegisterChildWindow(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
+ GetStaticInterface()->RegisterChildWindow(
+ ::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
}
-
// SdGraphicViewShell
SFX_IMPL_INTERFACE(GraphicViewShell, SfxShell)
@@ -98,10 +98,10 @@ void GraphicViewShell::InitInterface_Impl()
#if HAVE_FEATURE_AVMEDIA
GetStaticInterface()->RegisterChildWindow(::avmedia::MediaPlayer::GetChildWindowId());
#endif
- GetStaticInterface()->RegisterChildWindow(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
+ GetStaticInterface()->RegisterChildWindow(
+ ::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
}
-
} // end of namespace sd
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/view/zoomlist.cxx b/sd/source/ui/view/zoomlist.cxx
index 2d09926c2558..86a3de63bcaf 100644
--- a/sd/source/ui/view/zoomlist.cxx
+++ b/sd/source/ui/view/zoomlist.cxx
@@ -25,13 +25,13 @@
#include <ViewShell.hxx>
-namespace sd {
-
-#define MAX_ENTRIES 10
+namespace sd
+{
+#define MAX_ENTRIES 10
ZoomList::ZoomList(ViewShell* pViewShell)
-: mpViewShell (pViewShell)
-, mnCurPos(0)
+ : mpViewShell(pViewShell)
+ , mnCurPos(0)
{
}
@@ -46,14 +46,14 @@ void ZoomList::InsertZoomRect(const ::tools::Rectangle& rRect)
else
mnCurPos++;
- maRectangles.insert(maRectangles.begin()+mnCurPos,rRect);
+ maRectangles.insert(maRectangles.begin() + mnCurPos, rRect);
SfxBindings& rBindings = mpViewShell->GetViewFrame()->GetBindings();
- rBindings.Invalidate( SID_ZOOM_NEXT );
- rBindings.Invalidate( SID_ZOOM_PREV );
+ rBindings.Invalidate(SID_ZOOM_NEXT);
+ rBindings.Invalidate(SID_ZOOM_PREV);
}
-::tools::Rectangle const & ZoomList::GetNextZoomRect()
+::tools::Rectangle const& ZoomList::GetNextZoomRect()
{
mnCurPos++;
size_t nRectCount = maRectangles.size();
@@ -62,20 +62,20 @@ void ZoomList::InsertZoomRect(const ::tools::Rectangle& rRect)
mnCurPos = nRectCount - 1;
SfxBindings& rBindings = mpViewShell->GetViewFrame()->GetBindings();
- rBindings.Invalidate( SID_ZOOM_NEXT );
- rBindings.Invalidate( SID_ZOOM_PREV );
+ rBindings.Invalidate(SID_ZOOM_NEXT);
+ rBindings.Invalidate(SID_ZOOM_PREV);
return maRectangles[mnCurPos];
}
-::tools::Rectangle const & ZoomList::GetPreviousZoomRect()
+::tools::Rectangle const& ZoomList::GetPreviousZoomRect()
{
if (mnCurPos > 0)
mnCurPos--;
SfxBindings& rBindings = mpViewShell->GetViewFrame()->GetBindings();
- rBindings.Invalidate( SID_ZOOM_NEXT );
- rBindings.Invalidate( SID_ZOOM_PREV );
+ rBindings.Invalidate(SID_ZOOM_NEXT);
+ rBindings.Invalidate(SID_ZOOM_PREV);
return maRectangles[mnCurPos];
}
@@ -87,10 +87,7 @@ bool ZoomList::IsNextPossible() const
return nRectCount > 0 && mnCurPos < nRectCount - 1;
}
-bool ZoomList::IsPreviousPossible() const
-{
- return mnCurPos > 0;
-}
+bool ZoomList::IsPreviousPossible() const { return mnCurPos > 0; }
} // end of namespace sd