summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-03 08:39:03 +0200
committerNoel Grandin <noel@peralex.com>2016-05-04 12:39:40 +0200
commit58a32075ca4f457f570af75aef368dd6c389aca7 (patch)
treee437dcbdeb248b4316cb8a9281d1543419853f6d /fpicker
parent7d47700972d267fe7c5270c5dadd45a523a2baec (diff)
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/win32/misc/WinImplHelper.cxx21
1 files changed, 5 insertions, 16 deletions
diff --git a/fpicker/source/win32/misc/WinImplHelper.cxx b/fpicker/source/win32/misc/WinImplHelper.cxx
index 84c51419d919..d4156bca3888 100644
--- a/fpicker/source/win32/misc/WinImplHelper.cxx
+++ b/fpicker/source/win32/misc/WinImplHelper.cxx
@@ -264,10 +264,7 @@ Any SAL_CALL ListboxGetItems( HWND hwnd )
}
}
- Any aAny;
- aAny <<= aItemList;
-
- return aAny;
+ return Any(aItemList);
}
@@ -277,10 +274,7 @@ Any SAL_CALL ListboxGetSelectedItem( HWND hwnd )
LRESULT idxItem = SendMessageW( hwnd, CB_GETCURSEL, 0, 0 );
- Any aAny;
- aAny <<= ListboxGetString( hwnd, idxItem );
-
- return aAny;
+ return Any( ListboxGetString( hwnd, idxItem ) );
}
@@ -290,10 +284,7 @@ Any SAL_CALL ListboxGetSelectedItemIndex( HWND hwnd )
LRESULT idxItem = SendMessageW( hwnd, CB_GETCURSEL, 0, 0 );
- Any aAny;
- aAny <<= static_cast< sal_Int32 >( idxItem );
-
- return aAny;
+ return Any( static_cast< sal_Int32 >( idxItem ) );
}
@@ -302,10 +293,8 @@ Any SAL_CALL CheckboxGetState( HWND hwnd )
OSL_ASSERT( IsWindow( hwnd ) );
LRESULT lChkState = SendMessageW( hwnd, BM_GETCHECK, 0, 0 );
- sal_Bool bChkState = (lChkState == BST_CHECKED) ? sal_True : sal_False;
- Any aAny;
- aAny.setValue( &bChkState, cppu::UnoType<sal_Bool>::get());
- return aAny;
+ bool bChkState = (lChkState == BST_CHECKED);
+ return Any(bChkState);
}