summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-10-20 07:27:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-21 08:13:05 +0200
commit0fb58a1ff168ae122e9c8993a3136658e3b0e3f0 (patch)
tree908983b02f466e0a49599edc70aaa1baaa240371 /sw/source/uibase
parentb84afd2188d6993c91081885dc24664bd3f1cc73 (diff)
new tools::Degree10 strong typedef
partly to flush some use of "long" out the codebase, but also to make it obvious which units are being used for angle values. Change-Id: I1dc22494ca42c4677a63f685d5903f2b89886dc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104548 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx4
-rw-r--r--sw/source/uibase/shells/basesh.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx4
-rw-r--r--sw/source/uibase/uiview/viewstat.cxx2
4 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index b41601be1ea5..da8c13e04caa 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -406,8 +406,8 @@ namespace
if ( !aMetadata.read(aGraphic) )
return;
- sal_uInt16 aRotation = aMetadata.getRotation();
- if (aRotation != 0)
+ Degree10 aRotation = aMetadata.getRotation();
+ if (aRotation)
{
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/queryrotateintostandarddialog.ui"));
std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("QueryRotateIntoStandardOrientationDialog"));
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index b0ba28e53074..e0af002ba981 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2246,7 +2246,7 @@ void SwBaseShell::GetTextFontCtrlState( SfxItemSet& rSet )
}
bool bVertical = rSh.IsInVerticalText();
- aFont.SetOrientation(bVertical ? 2700 : 0);
+ aFont.SetOrientation(Degree10(bVertical ? 2700 : 0));
aFont.SetVertical(bVertical);
GetView().GetEditWin().SetInputContext( InputContext( aFont, InputContextFlags::Text |
InputContextFlags::ExtText ) );
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index b0e133d92403..ff12532203b6 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -241,8 +241,8 @@ ErrCode SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter,
GraphicNativeMetadata aMetadata;
if ( aMetadata.read(aGraphic) )
{
- const sal_uInt16 aRotation = aMetadata.getRotation();
- if (aRotation != 0)
+ const Degree10 aRotation = aMetadata.getRotation();
+ if (aRotation)
{
GraphicNativeTransform aTransform( aGraphic );
aTransform.rotate( aRotation );
diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx
index 5849365ea243..904af3e672a4 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -456,7 +456,7 @@ void SwView::GetState(SfxItemSet &rSet)
{
SfxImageItem aImageItem(nWhich);
if(m_pWrtShell->IsInVerticalText())
- aImageItem.SetRotation( 2700 );
+ aImageItem.SetRotation( Degree10(2700) );
if(m_pWrtShell->IsInRightToLeftText())
aImageItem.SetMirrored( true );
rSet.Put(aImageItem);