summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/editeng/editeng.cxx2
-rw-r--r--editeng/source/editeng/impedit.hxx1
-rw-r--r--editeng/source/editeng/impedit3.cxx26
-rw-r--r--include/tools/gen.hxx3
-rw-r--r--slideshow/Library_OGLTrans.mk1
-rw-r--r--vcl/CppunitTest_vcl_animation.mk1
6 files changed, 7 insertions, 27 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 19ed11229645..9e6696cd5546 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -217,7 +217,7 @@ void EditEngine::Draw( OutputDevice& rOutDev, const Point& rStartPos, Degree10 n
if ( IsEffectivelyVertical() )
{
aStartPos.AdjustX(GetPaperSize().Width() );
- aStartPos = Rotate( aStartPos, nOrientation, rStartPos );
+ rStartPos.RotateAround(aStartPos, nOrientation);
}
pImpEditEngine->Paint(rOutDev, aBigRect, aStartPos, false, nOrientation);
if( rOutDev.GetConnectMetaFile() )
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index b59d934beadf..815c42328ba8 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -1360,7 +1360,6 @@ inline vcl::Cursor* ImpEditView::GetCursor()
void ConvertItem( std::unique_ptr<SfxPoolItem>& rPoolItem, MapUnit eSourceUnit, MapUnit eDestUnit );
void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const MapUnit* pSourceUnit = nullptr, const MapUnit* pDestUnit = nullptr );
AsianCompressionFlags GetCharTypeForCompression( sal_Unicode cChar );
-Point Rotate( const Point& rPoint, Degree10 nOrientation, const Point& rOrigin );
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index ba7c2ed04ae3..dff400a5517d 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -114,28 +114,6 @@ struct TabInfo
}
-Point Rotate( const Point& rPoint, Degree10 nOrientation, const Point& rOrigin )
-{
- double nRealOrientation = toRadians(nOrientation);
- double nCos = cos( nRealOrientation );
- double nSin = sin( nRealOrientation );
-
- Point aRotatedPos;
- Point aTranslatedPos( rPoint );
-
- // Translation
- aTranslatedPos -= rOrigin;
-
- // Rotation...
- aRotatedPos.setX( static_cast<tools::Long>( nCos*aTranslatedPos.X() + nSin*aTranslatedPos.Y() ) );
- aRotatedPos.setY( static_cast<tools::Long>(- ( nSin*aTranslatedPos.X() - nCos*aTranslatedPos.Y() )) );
- aTranslatedPos = aRotatedPos;
-
- // Translation...
- aTranslatedPos += rOrigin;
- return aTranslatedPos;
-}
-
AsianCompressionFlags GetCharTypeForCompression( sal_Unicode cChar )
{
switch ( cChar )
@@ -231,8 +209,8 @@ static void lcl_DrawRedLines( OutputDevice& rOutDev,
if (nOrientation)
{
- aPoint1 = Rotate(aPoint1, nOrientation, rOrigin);
- aPoint2 = Rotate(aPoint2, nOrientation, rOrigin);
+ rOrigin.RotateAround(aPoint1, nOrientation);
+ rOrigin.RotateAround(aPoint2, nOrientation);
}
{
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 11d26b0372f2..c6372d7c92dc 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -74,7 +74,7 @@ inline bool equal(Pair const & p1, Pair const & p2)
// Point
class Size;
-class SAL_WARN_UNUSED UNLESS_MERGELIBS(SAL_DLLPUBLIC_EXPORT) Point final : protected Pair
+class SAL_WARN_UNUSED TOOLS_DLLPUBLIC Point final : protected Pair
{
public:
constexpr Point() {}
@@ -88,6 +88,7 @@ public:
tools::Long AdjustX( tools::Long nHorzMove ) { mnA += nHorzMove; return mnA; }
tools::Long AdjustY( tools::Long nVertMove ) { mnB += nVertMove; return mnB; }
+ // Rotate parameter point using This as origin; store result back into parameter point
void RotateAround( tools::Long& rX, tools::Long& rY, Degree10 nOrientation ) const;
void RotateAround( Point&, Degree10 nOrientation ) const;
diff --git a/slideshow/Library_OGLTrans.mk b/slideshow/Library_OGLTrans.mk
index d059dc1813d6..85051483df66 100644
--- a/slideshow/Library_OGLTrans.mk
+++ b/slideshow/Library_OGLTrans.mk
@@ -28,6 +28,7 @@ $(eval $(call gb_Library_use_libraries,OGLTrans,\
cppu \
cppuhelper \
sal \
+ tl \
vcl \
))
diff --git a/vcl/CppunitTest_vcl_animation.mk b/vcl/CppunitTest_vcl_animation.mk
index 3881005e6d4b..e64d908fa839 100644
--- a/vcl/CppunitTest_vcl_animation.mk
+++ b/vcl/CppunitTest_vcl_animation.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,vcl_animation, \
$(eval $(call gb_CppunitTest_use_libraries,vcl_animation, \
test \
+ tl \
unotest \
vcl \
))