This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new 4e007b9d0c Cleanup
4e007b9d0c is described below
commit 4e007b9d0c24063a03864180ae5a35a0d455c4b7
Author: mseidel <[email protected]>
AuthorDate: Sun Mar 23 21:17:53 2025 +0100
Cleanup
---
.../source/primitive2d/invertprimitive2d.cxx | 17 +++-----
.../source/primitive2d/pagepreviewprimitive2d.cxx | 6 ---
.../source/primitive2d/wallpaperprimitive2d.cxx | 45 ++++++++++------------
.../source/sdr/contact/viewcontactofsdrpage.cxx | 15 ++------
4 files changed, 29 insertions(+), 54 deletions(-)
diff --git a/main/drawinglayer/source/primitive2d/invertprimitive2d.cxx
b/main/drawinglayer/source/primitive2d/invertprimitive2d.cxx
index 5122f93c3d..a4cb882534 100644
--- a/main/drawinglayer/source/primitive2d/invertprimitive2d.cxx
+++ b/main/drawinglayer/source/primitive2d/invertprimitive2d.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,32 +7,26 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_drawinglayer.hxx"
#include <drawinglayer/primitive2d/invertprimitive2d.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
-//////////////////////////////////////////////////////////////////////////////
-
using namespace com::sun::star;
-//////////////////////////////////////////////////////////////////////////////
-
namespace drawinglayer
{
namespace primitive2d
@@ -49,5 +43,4 @@ namespace drawinglayer
} // end of namespace primitive2d
} // end of namespace drawinglayer
-//////////////////////////////////////////////////////////////////////////////
-// eof
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
b/main/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
index 8a265cbf0b..4415111f48 100644
--- a/main/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
+++ b/main/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_drawinglayer.hxx"
@@ -32,12 +30,8 @@
#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
-//////////////////////////////////////////////////////////////////////////////
-
using namespace com::sun::star;
-//////////////////////////////////////////////////////////////////////////////
-
namespace drawinglayer
{
namespace primitive2d
diff --git a/main/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
b/main/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
index 369569dcb0..b65f0be28f 100644
--- a/main/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
+++ b/main/drawinglayer/source/primitive2d/wallpaperprimitive2d.cxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,20 +7,18 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_drawinglayer.hxx"
@@ -34,8 +32,6 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <vcl/graph.hxx>
-//////////////////////////////////////////////////////////////////////////////
-
namespace drawinglayer
{
namespace primitive2d
@@ -47,7 +43,7 @@ namespace drawinglayer
if(!getLocalObjectRange().isEmpty() &&
!getBitmapEx().IsEmpty())
{
// get bitmap PIXEL size
- const Size& rPixelSize =
getBitmapEx().GetSizePixel();
+ const Size& rPixelSize =
getBitmapEx().GetSizePixel();
if(rPixelSize.Width() > 0 &&
rPixelSize.Height() > 0)
{
@@ -55,12 +51,12 @@ namespace drawinglayer
{
// shortcut for scale; use
simple BitmapPrimitive2D
basegfx::B2DHomMatrix
aObjectTransform;
-
+
aObjectTransform.set(0, 0,
getLocalObjectRange().getWidth());
aObjectTransform.set(1, 1,
getLocalObjectRange().getHeight());
aObjectTransform.set(0, 2,
getLocalObjectRange().getMinX());
aObjectTransform.set(1, 2,
getLocalObjectRange().getMinY());
-
+
Primitive2DReference xReference(
new BitmapPrimitive2D(
getBitmapEx(),
@@ -75,8 +71,8 @@ namespace drawinglayer
aInverseViewTransformation.invert();
basegfx::B2DVector
aLogicSize(rPixelSize.Width(), rPixelSize.Height());
aLogicSize =
aInverseViewTransformation * aLogicSize;
-
- // apply laout
+
+ // apply layout
basegfx::B2DPoint
aTargetTopLeft(getLocalObjectRange().getMinimum());
bool bUseTargetTopLeft(true);
bool bNeedsClipping(false);
@@ -154,18 +150,18 @@ namespace drawinglayer
// create aligned,
single BitmapPrimitive2D
basegfx::B2DHomMatrix
aObjectTransform;
-
+
aObjectTransform.set(0,
0, aTargetRange.getWidth());
aObjectTransform.set(1,
1, aTargetRange.getHeight());
aObjectTransform.set(0,
2, aTargetRange.getMinX());
aObjectTransform.set(1,
2, aTargetRange.getMinY());
-
+
Primitive2DReference
xReference(
new
BitmapPrimitive2D(
getBitmapEx(),
aObjectTransform));
aRetval =
Primitive2DSequence(&xReference, 1);
-
+
// clip when not
completely inside object range
bNeedsClipping =
!getLocalObjectRange().isInside(aTargetRange);
}
@@ -192,10 +188,10 @@ namespace drawinglayer
// create
ObjectTransform
const
basegfx::B2DHomMatrix aObjectTransform(
-
basegfx::tools::createScaleTranslateB2DHomMatrix(
- getLocalObjectRange().getRange(),
- getLocalObjectRange().getMinimum()));
-
+
basegfx::tools::createScaleTranslateB2DHomMatrix(
+
getLocalObjectRange().getRange(),
+
getLocalObjectRange().getMinimum()));
+
// create
FillBitmapPrimitive
const
drawinglayer::primitive2d::Primitive2DReference xFillBitmap(
new
drawinglayer::primitive2d::FillGraphicPrimitive2D(
@@ -211,7 +207,7 @@ namespace drawinglayer
{
// embed to clipping;
this is necessary for tiled fills
const
basegfx::B2DPolyPolygon aPolyPolygon(
-
basegfx::tools::createPolygonFromRect(getLocalObjectRange()));
+
basegfx::tools::createPolygonFromRect(getLocalObjectRange()));
const
drawinglayer::primitive2d::Primitive2DReference xClippedFill(
new
drawinglayer::primitive2d::MaskPrimitive2D(
aPolyPolygon,
@@ -224,7 +220,7 @@ namespace drawinglayer
return aRetval;
}
-
+
WallpaperBitmapPrimitive2D::WallpaperBitmapPrimitive2D(
const basegfx::B2DRange& rObjectRange,
const BitmapEx& rBitmapEx,
@@ -249,7 +245,7 @@ namespace drawinglayer
return false;
}
-
+
basegfx::B2DRange WallpaperBitmapPrimitive2D::getB2DRange(const
geometry::ViewInformation2D& /*rViewInformation*/) const
{
return getLocalObjectRange();
@@ -260,5 +256,4 @@ namespace drawinglayer
} // end of namespace primitive2d
} // end of namespace drawinglayer
-//////////////////////////////////////////////////////////////////////////////
-// eof
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/svx/source/sdr/contact/viewcontactofsdrpage.cxx
b/main/svx/source/sdr/contact/viewcontactofsdrpage.cxx
index 7ac18d0359..98b10097ba 100644
--- a/main/svx/source/sdr/contact/viewcontactofsdrpage.cxx
+++ b/main/svx/source/sdr/contact/viewcontactofsdrpage.cxx
@@ -19,8 +19,6 @@
*
*************************************************************/
-
-
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
#include <svx/sdr/contact/viewcontactofsdrpage.hxx>
@@ -46,12 +44,8 @@
#include <drawinglayer/primitive2d/discreteshadowprimitive2d.hxx>
#include <drawinglayer/attribute/sdrfillattribute.hxx>
-//////////////////////////////////////////////////////////////////////////////
-
#define PAPER_SHADOW(SIZE) (SIZE >> 8)
-//////////////////////////////////////////////////////////////////////////////
-
namespace sdr
{
namespace contact
@@ -131,15 +125,15 @@ namespace sdr
drawinglayer::primitive2d::Primitive2DSequence
ViewContactOfPageShadow::createViewIndependentPrimitive2DSequence() const
{
- static bool bUseOldPageShadow(true);
+ static bool bUseNoPageShadow(true);
const SdrPage& rPage = getPage();
basegfx::B2DHomMatrix aPageMatrix;
aPageMatrix.set(0, 0, (double)rPage.GetWdt());
aPageMatrix.set(1, 1, (double)rPage.GetHgt());
- if(bUseOldPageShadow)
+ if(bUseNoPageShadow) // TODO: Code cleanup
{
- // create page shadow polygon
+ // create page border polygon
// const double fPageBorderFactor(1.0 / 256.0);
basegfx::B2DPolygon aPageShadowPolygon;
//
aPageShadowPolygon.append(basegfx::B2DPoint(1.0, fPageBorderFactor));
@@ -721,5 +715,4 @@ namespace sdr
} // end of namespace contact
} // end of namespace sdr
-//////////////////////////////////////////////////////////////////////////////
-// eof
+/* vim: set noet sw=4 ts=4: */