summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@novell.com>2011-04-28 00:12:58 +0200
committerThorsten Behrens <tbehrens@novell.com>2011-04-28 00:12:58 +0200
commitf51c3f66b1034c9f15171678d1239c25d64341ba (patch)
tree438eb4b3d4da31d276dcb227da6afce76e165f00 /fpicker
parentb8502c8251b0760f1bf03c968974f1fe3f288ae2 (diff)
parent86e7ed8c72184b7a04b836848743979aa3f5fd3d (diff)
Merge commit 'ooo/DEV300_m106' into integration/dev300_m106
Conflicts: avmedia/source/gstreamer/gstframegrabber.cxx avmedia/source/gstreamer/gstplayer.cxx avmedia/source/gstreamer/gstplayer.hxx basic/inc/basic/sbxdef.hxx basic/source/classes/sbxmod.cxx basic/source/comp/makefile.mk basic/source/comp/sbcomp.cxx basic/source/inc/namecont.hxx basic/source/inc/scriptcont.hxx basic/source/runtime/methods.cxx basic/source/runtime/runtime.cxx basic/source/runtime/stdobj.cxx basic/source/runtime/step1.cxx basic/source/uno/namecont.cxx basic/util/makefile.mk connectivity/source/commontools/predicateinput.cxx connectivity/source/drivers/dbase/DNoException.cxx connectivity/source/drivers/dbase/DTable.cxx connectivity/source/drivers/file/fcomp.cxx connectivity/source/drivers/jdbc/JConnection.cxx connectivity/source/drivers/odbcbase/OResultSet.cxx connectivity/source/drivers/odbcbase/OStatement.cxx connectivity/source/parse/sqlnode.cxx desktop/source/app/app.cxx drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx drawinglayer/source/processor2d/vclprocessor2d.cxx formula/inc/formula/token.hxx formula/source/core/api/token.cxx fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx fpicker/source/win32/filepicker/platform_vista.h framework/source/helper/persistentwindowstate.cxx framework/source/uielement/menubarmanager.cxx oovbaapi/ooo/vba/XFoundFiles.idl oovbaapi/ooo/vba/excel/XApplication.idl oovbaapi/ooo/vba/msforms/XCheckBox.idl oovbaapi/ooo/vba/msforms/XComboBox.idl oovbaapi/ooo/vba/msforms/XControl.idl oovbaapi/ooo/vba/msforms/XGroupBox.idl oovbaapi/ooo/vba/msforms/XLabel.idl oovbaapi/ooo/vba/msforms/XListBox.idl oovbaapi/ooo/vba/msforms/XNewFont.idl oovbaapi/ooo/vba/msforms/XRadioButton.idl oovbaapi/ooo/vba/msforms/XTextBox.idl oovbaapi/ooo/vba/msforms/XToggleButton.idl scripting/source/dlgprov/dlgevtatt.cxx sfx2/source/control/unoctitm.cxx sfx2/source/doc/objstor.cxx sfx2/source/doc/objxtor.cxx svx/inc/svx/svdograf.hxx svx/source/form/fmpage.cxx svx/source/form/fmpgeimp.cxx svx/source/svdraw/svdedtv.cxx svx/source/svdraw/svdfmtf.cxx svx/source/svdraw/svdograf.cxx svx/source/svdraw/svdouno.cxx svx/source/xml/xmlgrhlp.cxx uui/source/iahndl-ssl.cxx vbahelper/Library_msforms.mk vbahelper/Library_vbahelper.mk vbahelper/inc/vbahelper/vbahelper.hxx vbahelper/prj/build.lst vbahelper/source/msforms/vbacombobox.cxx vbahelper/source/msforms/vbacontrol.cxx vbahelper/source/msforms/vbacontrols.cxx vbahelper/source/msforms/vbaframe.cxx vbahelper/source/msforms/vbaframe.hxx vbahelper/source/msforms/vbalabel.cxx vbahelper/source/msforms/vbalabel.hxx vbahelper/source/msforms/vbalistbox.cxx vbahelper/source/msforms/vbalistbox.hxx vbahelper/source/msforms/vbamultipage.cxx vbahelper/source/msforms/vbatogglebutton.cxx vbahelper/source/msforms/vbauserform.cxx vbahelper/source/vbahelper/vbacommandbar.cxx vbahelper/source/vbahelper/vbacommandbarcontrol.cxx vbahelper/source/vbahelper/vbacommandbarcontrols.hxx vbahelper/source/vbahelper/vbahelper.cxx vbahelper/source/vbahelper/vbawindowbase.cxx xmloff/source/meta/xmlmetai.cxx xmloff/source/style/PageMasterExportPropMapper.cxx xmloff/source/style/PageMasterStyleMap.cxx xmloff/source/text/txtexppr.cxx xmloff/source/text/txtprmap.cxx
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx2
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePicker.cxx16
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx52
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx53
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx12
-rw-r--r--fpicker/source/win32/filepicker/WinFileOpenImpl.cxx33
-rw-r--r--fpicker/source/win32/filepicker/platform_vista.h1
-rw-r--r--fpicker/source/win32/filepicker/previewadapter.cxx2
8 files changed, 107 insertions, 64 deletions
diff --git a/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx b/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
index a03e6f3fe23c..2414a6ff1229 100644
--- a/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
+++ b/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
@@ -67,6 +67,8 @@ class IVistaFilePickerInternalNotify
public:
virtual void onAutoExtensionChanged (bool bChecked) = 0;
+
+ virtual bool onFileTypeChanged( UINT nTypeIndex ) = 0;
};
}}}
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index 83b040f7edff..edb40f2e099b 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
@@ -225,7 +225,7 @@ void SAL_CALL VistaFilePicker::setTitle(const ::rtl::OUString& sTitle)
//-----------------------------------------------------------------------------------------
void SAL_CALL VistaFilePicker::appendFilter(const ::rtl::OUString& sTitle ,
- const ::rtl::OUString& sFilter)
+ const ::rtl::OUString& sFilter)
throw(css::lang::IllegalArgumentException,
css::uno::RuntimeException )
{
@@ -264,17 +264,15 @@ void SAL_CALL VistaFilePicker::setCurrentFilter(const ::rtl::OUString& sTitle)
//-----------------------------------------------------------------------------------------
void SAL_CALL VistaFilePicker::appendFilterGroup(const ::rtl::OUString& /*sGroupTitle*/,
- const css::uno::Sequence< css::beans::StringPair >& lFilters )
+ const css::uno::Sequence< css::beans::StringPair >& rFilters )
throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException )
{
- ::sal_Int32 c = lFilters.getLength();
- ::sal_Int32 i = 0;
- for (i=0; i<c; ++i)
- {
- const css::beans::StringPair& rFilter = lFilters[i];
- appendFilter(rFilter.First, rFilter.Second);
- }
+ RequestRef rRequest(new Request());
+ rRequest->setRequest (VistaFilePickerImpl::E_APPEND_FILTERGROUP);
+ rRequest->setArgument(PROP_FILTER_GROUP, rFilters);
+
+ m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED);
}
//-----------------------------------------------------------------------------------------
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
index 541d1a166687..a0aa8ad0b8cf 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
@@ -264,33 +264,16 @@ STDMETHODIMP VistaFilePickerEventHandler::OnShareViolation(IFileDialog*
}
//-----------------------------------------------------------------------------------------
-STDMETHODIMP VistaFilePickerEventHandler::OnTypeChange(IFileDialog* /*pDialog*/)
+STDMETHODIMP VistaFilePickerEventHandler::OnTypeChange(IFileDialog* pDialog)
{
- /*
- IFileDialogCustomize *iCustomize;
- pDialog->QueryInterface(IID_IFileDialogCustomize, (void**)(&iCustomize));
+ UINT nFileTypeIndex;
+ HRESULT hResult = pDialog->GetFileTypeIndex( &nFileTypeIndex );
- BOOL bValue = FALSE;
- HRESULT hResult = iCustomize->GetCheckButtonState( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, &bValue);
-
- if ( bValue )
+ if ( hResult == S_OK )
{
- UINT nIndex;
-
- pDialog->GetFileTypeIndex( &nIndex );
-
- LPCWSTR lpFilterExt = lFilters[nIndex].pszSpec;
-
- lpFilterExt = wcschr( lpFilterExt, '.' );
- if ( lpFilterExt )
- lpFilterExt++;
- pDialog->SetDefaultExtension( lpFilterExt );
+ if ( m_pInternalNotify->onFileTypeChanged( nFileTypeIndex ))
+ impl_sendEvent(E_CONTROL_STATE_CHANGED, css::ui::dialogs::CommonFilePickerElementIds::LISTBOX_FILTER);
}
- return S_OK;
-
- */
-
- impl_sendEvent(E_CONTROL_STATE_CHANGED, css::ui::dialogs::CommonFilePickerElementIds::LISTBOX_FILTER);
return S_OK;
}
@@ -329,32 +312,9 @@ STDMETHODIMP VistaFilePickerEventHandler::OnCheckButtonToggled(IFileDialogCustom
DWORD nIDCtl ,
BOOL bChecked )
{
- /*
- if (nIDCtl == css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION)
- {
- LPCWSTR lpFilterExt = 0;
- if ( bChecked )
- {
- UINT nIndex;
- if (m_pDialog)
- {
- m_pDialog->GetFileTypeIndex( &nIndex );
- lpFilterExt = lFilters[nIndex].pszSpec;
- lpFilterExt = wcschr( lpFilterExt, '.' );
- if ( lpFilterExt )
- lpFilterExt++;
- }
- }
-
- if (m_pDialog)
- m_pDialog->SetDefaultExtension( lpFilterExt );
- }
- */
-
if (nIDCtl == css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION)
m_pInternalNotify->onAutoExtensionChanged(bChecked);
-
impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl));
return S_OK;
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
index 1c48976a9951..6cc0d522b920 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
@@ -35,6 +35,7 @@
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/ControlActions.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+#include <com/sun/star/beans/StringPair.hpp>
#include <comphelper/sequenceasvector.hxx>
#include <osl/file.hxx>
#include <osl/mutex.hxx>
@@ -43,6 +44,8 @@
#endif
#include "..\misc\WinImplHelper.hxx"
+#include <Shlguid.h>
+
inline bool is_current_process_window(HWND hwnd)
{
DWORD pid;
@@ -200,6 +203,10 @@ void VistaFilePickerImpl::doRequest(const RequestRef& rRequest)
impl_sta_appendFilter(rRequest);
break;
+ case E_APPEND_FILTERGROUP :
+ impl_sta_appendFilterGroup(rRequest);
+ break;
+
case E_SET_CURRENT_FILTER :
impl_sta_setCurrentFilter(rRequest);
break;
@@ -332,6 +339,28 @@ void VistaFilePickerImpl::impl_sta_appendFilter(const RequestRef& rRequest)
}
//-------------------------------------------------------------------------------
+void VistaFilePickerImpl::impl_sta_appendFilterGroup(const RequestRef& rRequest)
+{
+ const css::uno::Sequence< css::beans::StringPair > aFilterGroup =
+ rRequest->getArgumentOrDefault(PROP_FILTER_GROUP, css::uno::Sequence< css::beans::StringPair >());
+
+ // SYNCHRONIZED->
+ ::rtl::OUString aEmpty;
+ ::osl::ResettableMutexGuard aLock(m_aMutex);
+
+ if ( m_lFilters.numFilter() > 0 && aFilterGroup.getLength() > 0 )
+ m_lFilters.addFilter( STRING_SEPARATOR, aEmpty, sal_True );
+
+ ::sal_Int32 c = aFilterGroup.getLength();
+ ::sal_Int32 i = 0;
+ for (i=0; i<c; ++i)
+ {
+ const css::beans::StringPair& rFilter = aFilterGroup[i];
+ m_lFilters.addFilter(rFilter.First, rFilter.Second);
+ }
+}
+
+//-------------------------------------------------------------------------------
void VistaFilePickerImpl::impl_sta_setCurrentFilter(const RequestRef& rRequest)
{
const ::rtl::OUString sTitle = rRequest->getArgumentOrDefault(PROP_FILTER_TITLE, ::rtl::OUString());
@@ -942,7 +971,7 @@ void VistaFilePickerImpl::impl_sta_ShowDialogModal(const RequestRef& rRequest)
return;
impl_sta_getSelectedFiles(rRequest);
- rRequest->setArgument(PROP_DIALOG_SHOW_RESULT, (::sal_Bool)sal_True);
+ rRequest->setArgument(PROP_DIALOG_SHOW_RESULT, sal_True);
}
//-------------------------------------------------------------------------------
@@ -1180,6 +1209,23 @@ void VistaFilePickerImpl::impl_SetDefaultExtension( const rtl::OUString& current
}
}
+static void impl_refreshFileDialog( TFileDialog iDialog )
+{
+ if ( SUCCEEDED(iDialog->SetFileName(L"")) &&
+ SUCCEEDED(iDialog->SetFileName(L"*.*")) )
+ {
+ IOleWindow* iOleWindow;
+ if (SUCCEEDED(iDialog->QueryInterface(IID_PPV_ARGS(&iOleWindow))))
+ {
+ HWND hwnd;
+ if (SUCCEEDED(iOleWindow->GetWindow(&hwnd)))
+ {
+ PostMessage(hwnd, WM_COMMAND, IDOK, 0);
+ }
+ iOleWindow->Release();
+ }
+ }
+}
//-------------------------------------------------------------------------------
void VistaFilePickerImpl::onAutoExtensionChanged (bool bChecked)
@@ -1208,6 +1254,11 @@ void VistaFilePickerImpl::onAutoExtensionChanged (bool bChecked)
iDialog->SetDefaultExtension( pExt );
}
+bool VistaFilePickerImpl::onFileTypeChanged( UINT /*nTypeIndex*/ )
+{
+ return true;
+}
+
} // namespace vista
} // namespace win32
} // namespace fpicker
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
index 1149c9657f22..14bf9fd8bfe0 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
@@ -105,12 +105,14 @@ static const ::rtl::OUString PROP_TEMPLATE_DESCR(RTL_CONSTASCII_USTRINGPARAM("te
static const ::rtl::OUString PROP_FILTER_TITLE(RTL_CONSTASCII_USTRINGPARAM("filter_title" )); // [OUString]
static const ::rtl::OUString PROP_FILTER_VALUE(RTL_CONSTASCII_USTRINGPARAM("filter_value" )); // [OUString]
static const ::rtl::OUString PROP_FORCE(RTL_CONSTASCII_USTRINGPARAM("force" )); // [sal_Bool]
+static const ::rtl::OUString PROP_FILTER_GROUP(RTL_CONSTASCII_USTRINGPARAM("filter-group" )); // [seq< css:beans::StringPair >] contains a group of filters
static const ::rtl::OUString PROP_CONTROL_ID(RTL_CONSTASCII_USTRINGPARAM("control_id" )); // [sal_Int16]
static const ::rtl::OUString PROP_CONTROL_ACTION(RTL_CONSTASCII_USTRINGPARAM("control_action" )); // [sal_Int16]
static const ::rtl::OUString PROP_CONTROL_VALUE(RTL_CONSTASCII_USTRINGPARAM("control_value" )); // [Any]
static const ::rtl::OUString PROP_CONTROL_LABEL(RTL_CONSTASCII_USTRINGPARAM("control_label" )); // [OUString]
static const ::rtl::OUString PROP_CONTROL_ENABLE(RTL_CONSTASCII_USTRINGPARAM("control_enable" )); // [sal_Bool] true=ON, false=OFF
+static const ::rtl::OUString STRING_SEPARATOR(RTL_CONSTASCII_USTRINGPARAM("------------------------------------------" ));
//-----------------------------------------------------------------------------
/** native implementation of the file picker on Vista and upcoming windows versions.
@@ -150,7 +152,8 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
E_GET_CONTROL_VALUE,
E_SET_CONTROL_LABEL,
E_GET_CONTROL_LABEL,
- E_ENABLE_CONTROL
+ E_ENABLE_CONTROL,
+ E_APPEND_FILTERGROUP
};
public:
@@ -170,7 +173,10 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
virtual void after();
//---------------------------------------------------------------------
+ // IVistaFilePickerInternalNotify
+ //---------------------------------------------------------------------
virtual void onAutoExtensionChanged (bool bChecked);
+ virtual bool onFileTypeChanged( UINT nTypeIndex );
private:
@@ -187,6 +193,10 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
void impl_sta_appendFilter(const RequestRef& rRequest);
//---------------------------------------------------------------------
+ /// implementation of request E_APPEND_FILTERGROUP
+ void impl_sta_appendFilterGroup(const RequestRef& rRequest);
+
+ //---------------------------------------------------------------------
/// implementation of request E_SET_CURRENT_FILTER
void impl_sta_setCurrentFilter(const RequestRef& rRequest);
diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
index 7b0db4a451d9..6d8423910949 100644
--- a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
+++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
@@ -315,11 +315,24 @@ void SAL_CALL CWinFileOpenImpl::appendFilterGroup(const rtl::OUString& sGroupTit
// XExtendedFilePicker
//=================================================================================================================
+// #i90917: Due to a different feature set for the system-dependent file pickers
+// it's possible that generic code (e.g. sfx2) provides control ids
+// (see ExtendedFilePickerElementIds::LISTBOX_FILTER_SELECTOR) which are NOT
+// available on all platforms. This filter function should filter out control ids
+// which are only available on KDE/GTK file pickers.
+static bool filterControlCommand( sal_Int16 nControlId )
+{
+ if ( nControlId == LISTBOX_FILTER_SELECTOR )
+ return true;
+ return false;
+}
+
void SAL_CALL CWinFileOpenImpl::setValue(sal_Int16 aControlId, sal_Int16 aControlAction, const uno::Any& aValue)
throw(uno::RuntimeException)
{
OSL_ASSERT(m_FilePickerState);
- m_FilePickerState->setValue(aControlId, aControlAction, aValue);
+ if ( !filterControlCommand( aControlId ))
+ m_FilePickerState->setValue(aControlId, aControlAction, aValue);
}
//-----------------------------------------------------------------------------------------
@@ -331,7 +344,10 @@ uno::Any SAL_CALL CWinFileOpenImpl::getValue(sal_Int16 aControlId, sal_Int16 aCo
throw(uno::RuntimeException)
{
OSL_ASSERT(m_FilePickerState);
- return m_FilePickerState->getValue(aControlId, aControlAction);
+ if ( !filterControlCommand( aControlId ))
+ return m_FilePickerState->getValue(aControlId, aControlAction);
+ else
+ return uno::Any();
}
//-----------------------------------------------------------------------------------------
@@ -342,7 +358,8 @@ void SAL_CALL CWinFileOpenImpl::enableControl(sal_Int16 ControlID, sal_Bool bEna
throw(uno::RuntimeException)
{
OSL_ASSERT(m_FilePickerState);
- m_FilePickerState->enableControl(ControlID, bEnable);
+ if ( !filterControlCommand( ControlID ))
+ m_FilePickerState->enableControl(ControlID, bEnable);
}
//-----------------------------------------------------------------------------------------
@@ -352,7 +369,9 @@ void SAL_CALL CWinFileOpenImpl::enableControl(sal_Int16 ControlID, sal_Bool bEna
void SAL_CALL CWinFileOpenImpl::setLabel( sal_Int16 aControlId, const rtl::OUString& aLabel )
throw (uno::RuntimeException)
{
- m_FilePickerState->setLabel(aControlId, aLabel);
+ OSL_ASSERT(m_FilePickerState);
+ if ( !filterControlCommand( aControlId ))
+ m_FilePickerState->setLabel(aControlId, aLabel);
}
//-----------------------------------------------------------------------------------------
@@ -362,7 +381,11 @@ void SAL_CALL CWinFileOpenImpl::setLabel( sal_Int16 aControlId, const rtl::OUStr
rtl::OUString SAL_CALL CWinFileOpenImpl::getLabel( sal_Int16 aControlId )
throw (uno::RuntimeException)
{
- return m_FilePickerState->getLabel(aControlId);
+ OSL_ASSERT(m_FilePickerState);
+ if ( !filterControlCommand( aControlId ))
+ return m_FilePickerState->getLabel(aControlId);
+ else
+ return rtl::OUString();
}
//-----------------------------------------------------------------------------------------
diff --git a/fpicker/source/win32/filepicker/platform_vista.h b/fpicker/source/win32/filepicker/platform_vista.h
index c6fd8688bbd7..a17f817163cd 100644
--- a/fpicker/source/win32/filepicker/platform_vista.h
+++ b/fpicker/source/win32/filepicker/platform_vista.h
@@ -48,7 +48,6 @@
#pragma warning(pop)
#endif
-
#if defined _M_IX86
#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
diff --git a/fpicker/source/win32/filepicker/previewadapter.cxx b/fpicker/source/win32/filepicker/previewadapter.cxx
index 7f4ee5d05d79..994a8ee6538e 100644
--- a/fpicker/source/win32/filepicker/previewadapter.cxx
+++ b/fpicker/source/win32/filepicker/previewadapter.cxx
@@ -307,7 +307,7 @@ void SAL_CALL CPreviewAdapterImpl::rearrangeLayout()
// style bit of the FileOpen dialog must be set after that
// message
LONG lStyle = GetWindowLong(prvwnd,GWL_STYLE);
- sal_Bool bIsVisible = (sal_Bool)(lStyle & WS_VISIBLE);
+ bool bIsVisible = ((lStyle & WS_VISIBLE) != 0);
int cx = 0;