summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTomaž Vajngerl <quikee@gmail.com>2013-04-21 14:02:49 +0200
committerTomaž Vajngerl <quikee@gmail.com>2013-04-21 21:55:46 +0200
commit75f60bff0811b521b39c3d5cddc35e06556ab25e (patch)
tree9c285b1bc0fed875f7bfcdcd9c68be1e86533219 /sw
parent6c7e476ae6b6ff56b81ff19ef7dd0e8a9083a257 (diff)
Add rotation for PNG and GIF to GraphicNativeRotation.
Rotation for PNG and GIF format perform by exporting and importing of the Graphic. This is a "fallback" way to perform graphic rotation and the easiest to do for lossless raster formats. Change-Id: I31efad9106b5cfbd1d7c6c5063726c455d05f934
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/uiview/view2.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 3cf7c4acb953..b48e4033f4a4 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -177,9 +177,7 @@ static void lcl_SetAllTextToDefaultLanguage( SwWrtShell &rWrtSh, sal_uInt16 nWhi
}
}
-/*---------------------------------------------------------------------------
- Beschreibung: String fuer die Seitenanzeige in der Statusbar basteln.
- ----------------------------------------------------------------------------*/
+/* Create string for showing of page in statusbar */
String SwView::GetPageStr( sal_uInt16 nPg, sal_uInt16 nLogPg,
const String& rDisplay )
{
@@ -220,16 +218,17 @@ int SwView::InsertGraphic( const String &rPath, const String &rFilter,
if( GRFILTER_OK == nRes )
{
GraphicNativeMetadata aMetadata;
- if (aMetadata.Read(aGrf))
+ if (aMetadata.read(aGrf))
{
- if (aMetadata.GetRotation() != 0)
+ sal_uInt16 aRotation = aMetadata.getRotation();
+ if (aRotation != 0)
{
OUString aMessage("This image is rotated. Would you like LibreOffice to rotate it into standard orientation?");
QueryBox aQueryBox(GetWindow(), WB_YES_NO | WB_DEF_YES, aMessage);
if (aQueryBox.Execute() == RET_YES)
{
GraphicNativeTransform aTransform(aGrf);
- aTransform.Rotate(aMetadata.GetRotation());
+ aTransform.rotate( aRotation );
}
}
}