summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/inc/pch/precompiled_fpicker.cxx2
-rw-r--r--fpicker/inc/pch/precompiled_fpicker.hxx2
-rw-r--r--fpicker/source/aqua/AquaFilePickerDelegate.hxx2
-rw-r--r--fpicker/source/aqua/CFStringUtilities.cxx2
-rw-r--r--fpicker/source/aqua/CFStringUtilities.hxx2
-rw-r--r--fpicker/source/aqua/ControlHelper.cxx166
-rw-r--r--fpicker/source/aqua/ControlHelper.hxx26
-rw-r--r--fpicker/source/aqua/FPServiceInfo.hxx2
-rw-r--r--fpicker/source/aqua/FPentry.cxx2
-rw-r--r--fpicker/source/aqua/FilterHelper.cxx4
-rw-r--r--fpicker/source/aqua/FilterHelper.hxx2
-rw-r--r--fpicker/source/aqua/NSString_OOoAdditions.hxx2
-rw-r--r--fpicker/source/aqua/NSURL_OOoAdditions.hxx2
-rw-r--r--fpicker/source/aqua/SalAquaConstants.h2
-rw-r--r--fpicker/source/aqua/SalAquaFilePicker.cxx70
-rw-r--r--fpicker/source/aqua/SalAquaFilePicker.hxx16
-rw-r--r--fpicker/source/aqua/SalAquaFolderPicker.cxx12
-rw-r--r--fpicker/source/aqua/SalAquaFolderPicker.hxx2
-rw-r--r--fpicker/source/aqua/SalAquaPicker.cxx18
-rw-r--r--fpicker/source/aqua/SalAquaPicker.hxx6
-rw-r--r--fpicker/source/aqua/resourceprovider.cxx2
-rw-r--r--fpicker/source/aqua/resourceprovider.hxx2
-rw-r--r--fpicker/source/generic/fpicker.cxx2
-rw-r--r--fpicker/source/office/OfficeControlAccess.cxx120
-rw-r--r--fpicker/source/office/OfficeControlAccess.hxx32
-rw-r--r--fpicker/source/office/OfficeFilePicker.cxx42
-rw-r--r--fpicker/source/office/OfficeFilePicker.hxx94
-rw-r--r--fpicker/source/office/OfficeFilePicker.src2
-rw-r--r--fpicker/source/office/OfficeFolderPicker.cxx2
-rw-r--r--fpicker/source/office/OfficeFolderPicker.hxx26
-rw-r--r--fpicker/source/office/asyncfilepicker.cxx14
-rw-r--r--fpicker/source/office/asyncfilepicker.hxx14
-rw-r--r--fpicker/source/office/commonpicker.cxx36
-rw-r--r--fpicker/source/office/commonpicker.hxx58
-rw-r--r--fpicker/source/office/fpinteraction.cxx4
-rw-r--r--fpicker/source/office/fpinteraction.hxx8
-rw-r--r--fpicker/source/office/fps_office.cxx2
-rw-r--r--fpicker/source/office/fpsmartcontent.cxx2
-rw-r--r--fpicker/source/office/fpsmartcontent.hxx6
-rw-r--r--fpicker/source/office/iodlg.cxx140
-rw-r--r--fpicker/source/office/iodlg.hrc78
-rw-r--r--fpicker/source/office/iodlg.hxx180
-rw-r--r--fpicker/source/office/iodlg.src2
-rw-r--r--fpicker/source/office/iodlgimp.cxx32
-rw-r--r--fpicker/source/office/iodlgimp.hxx166
-rw-r--r--fpicker/source/office/pickercallbacks.hxx10
-rw-r--r--fpicker/source/unx/gnome/FPServiceInfo.hxx6
-rw-r--r--fpicker/source/unx/gnome/FPentry.cxx42
-rw-r--r--fpicker/source/unx/gnome/SalGtkFilePicker.cxx166
-rw-r--r--fpicker/source/unx/gnome/SalGtkFilePicker.hxx92
-rw-r--r--fpicker/source/unx/gnome/SalGtkFolderPicker.cxx14
-rw-r--r--fpicker/source/unx/gnome/SalGtkFolderPicker.hxx30
-rw-r--r--fpicker/source/unx/gnome/SalGtkPicker.cxx20
-rw-r--r--fpicker/source/unx/gnome/SalGtkPicker.hxx10
-rw-r--r--fpicker/source/unx/gnome/eventnotification.hxx4
-rw-r--r--fpicker/source/unx/gnome/fps_gnome.xml104
-rw-r--r--fpicker/source/unx/gnome/resourceprovider.cxx26
-rw-r--r--fpicker/source/unx/gnome/resourceprovider.hxx2
-rw-r--r--fpicker/source/unx/kde/makefile.mk6
-rw-r--r--fpicker/source/unx/kde4/FPServiceInfo.hxx6
-rw-r--r--fpicker/source/unx/kde4/KDE4FPEntry.cxx14
-rw-r--r--fpicker/source/unx/kde4/KDE4FilePicker.cxx106
-rw-r--r--fpicker/source/unx/kde4/KDE4FilePicker.hxx30
-rw-r--r--fpicker/source/unx/kde4/fps_kde4.xml8
-rw-r--r--fpicker/source/win32/filepicker/FPServiceInfo.hxx8
-rw-r--r--fpicker/source/win32/filepicker/FPentry.cxx46
-rw-r--r--fpicker/source/win32/filepicker/FileOpenDlg.cxx224
-rw-r--r--fpicker/source/win32/filepicker/FileOpenDlg.hxx72
-rw-r--r--fpicker/source/win32/filepicker/FilePicker.cxx198
-rw-r--r--fpicker/source/win32/filepicker/FilePicker.hxx78
-rw-r--r--fpicker/source/win32/filepicker/FilterContainer.cxx36
-rw-r--r--fpicker/source/win32/filepicker/FilterContainer.hxx26
-rw-r--r--fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx4
-rw-r--r--fpicker/source/win32/filepicker/PreviewCtrl.cxx206
-rw-r--r--fpicker/source/win32/filepicker/PreviewCtrl.hxx70
-rw-r--r--fpicker/source/win32/filepicker/SolarMutex.cxx2
-rw-r--r--fpicker/source/win32/filepicker/SolarMutex.hxx2
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePicker.cxx100
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePicker.hxx70
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx58
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx64
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx176
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx80
-rw-r--r--fpicker/source/win32/filepicker/WinFileOpenImpl.cxx368
-rw-r--r--fpicker/source/win32/filepicker/WinFileOpenImpl.hxx112
-rw-r--r--fpicker/source/win32/filepicker/asynceventnotifier.cxx86
-rw-r--r--fpicker/source/win32/filepicker/asynceventnotifier.hxx22
-rw-r--r--fpicker/source/win32/filepicker/asyncrequests.cxx8
-rw-r--r--fpicker/source/win32/filepicker/asyncrequests.hxx58
-rw-r--r--fpicker/source/win32/filepicker/comptr.hxx54
-rw-r--r--fpicker/source/win32/filepicker/controlaccess.cxx48
-rw-r--r--fpicker/source/win32/filepicker/controlaccess.hxx10
-rw-r--r--fpicker/source/win32/filepicker/controlcommand.cxx30
-rw-r--r--fpicker/source/win32/filepicker/controlcommand.hxx22
-rw-r--r--fpicker/source/win32/filepicker/controlcommandrequest.hxx8
-rw-r--r--fpicker/source/win32/filepicker/controlcommandresult.hxx2
-rw-r--r--fpicker/source/win32/filepicker/customcontrol.cxx10
-rw-r--r--fpicker/source/win32/filepicker/customcontrol.hxx8
-rw-r--r--fpicker/source/win32/filepicker/customcontrolcontainer.cxx20
-rw-r--r--fpicker/source/win32/filepicker/customcontrolcontainer.hxx8
-rw-r--r--fpicker/source/win32/filepicker/customcontrolfactory.cxx14
-rw-r--r--fpicker/source/win32/filepicker/customcontrolfactory.hxx4
-rw-r--r--fpicker/source/win32/filepicker/dialogcustomcontrols.cxx46
-rw-r--r--fpicker/source/win32/filepicker/dialogcustomcontrols.hxx28
-rw-r--r--fpicker/source/win32/filepicker/dibpreview.cxx26
-rw-r--r--fpicker/source/win32/filepicker/dibpreview.hxx24
-rw-r--r--fpicker/source/win32/filepicker/eventnotification.hxx4
-rw-r--r--fpicker/source/win32/filepicker/filepickereventnotification.cxx6
-rw-r--r--fpicker/source/win32/filepicker/filepickereventnotification.hxx6
-rw-r--r--fpicker/source/win32/filepicker/filepickerstate.cxx130
-rw-r--r--fpicker/source/win32/filepicker/filepickerstate.hxx12
-rw-r--r--fpicker/source/win32/filepicker/fps.xml66
-rw-r--r--fpicker/source/win32/filepicker/getfilenamewrapper.cxx46
-rw-r--r--fpicker/source/win32/filepicker/getfilenamewrapper.hxx6
-rw-r--r--fpicker/source/win32/filepicker/helppopupwindow.cxx168
-rw-r--r--fpicker/source/win32/filepicker/helppopupwindow.hxx16
-rw-r--r--fpicker/source/win32/filepicker/platform_vista.h2
-rw-r--r--fpicker/source/win32/filepicker/platform_xp.h2
-rw-r--r--fpicker/source/win32/filepicker/previewadapter.cxx156
-rw-r--r--fpicker/source/win32/filepicker/previewadapter.hxx18
-rw-r--r--fpicker/source/win32/filepicker/previewbase.cxx4
-rw-r--r--fpicker/source/win32/filepicker/previewbase.hxx18
-rw-r--r--fpicker/source/win32/filepicker/propmap.hxx20
-rw-r--r--fpicker/source/win32/filepicker/resource.h2
-rw-r--r--fpicker/source/win32/filepicker/shared.hxx8
-rw-r--r--fpicker/source/win32/filepicker/vistatypes.h2
-rw-r--r--fpicker/source/win32/filepicker/workbench/Test_fps.cxx94
-rw-r--r--fpicker/source/win32/folderpicker/FOPServiceInfo.hxx8
-rw-r--r--fpicker/source/win32/folderpicker/FolderPicker.cxx14
-rw-r--r--fpicker/source/win32/folderpicker/FolderPicker.hxx50
-rw-r--r--fpicker/source/win32/folderpicker/FopEvtDisp.hxx4
-rw-r--r--fpicker/source/win32/folderpicker/Fopentry.cxx40
-rw-r--r--fpicker/source/win32/folderpicker/MtaFop.cxx326
-rw-r--r--fpicker/source/win32/folderpicker/MtaFop.hxx44
-rw-r--r--fpicker/source/win32/folderpicker/WinFOPImpl.cxx44
-rw-r--r--fpicker/source/win32/folderpicker/WinFOPImpl.hxx18
-rw-r--r--fpicker/source/win32/folderpicker/fop.xml50
-rw-r--r--fpicker/source/win32/folderpicker/workbench/Test_fops.cxx36
-rw-r--r--fpicker/source/win32/misc/AutoBuffer.cxx30
-rw-r--r--fpicker/source/win32/misc/AutoBuffer.hxx16
-rw-r--r--fpicker/source/win32/misc/WinImplHelper.cxx144
-rw-r--r--fpicker/source/win32/misc/WinImplHelper.hxx16
-rw-r--r--fpicker/source/win32/misc/resourceprovider.cxx16
-rw-r--r--fpicker/source/win32/misc/resourceprovider.hxx2
-rw-r--r--fpicker/test/svdem.cxx32
145 files changed, 3157 insertions, 3159 deletions
diff --git a/fpicker/inc/pch/precompiled_fpicker.cxx b/fpicker/inc/pch/precompiled_fpicker.cxx
index b9e46626be11..01ecffffe744 100644
--- a/fpicker/inc/pch/precompiled_fpicker.cxx
+++ b/fpicker/inc/pch/precompiled_fpicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/inc/pch/precompiled_fpicker.hxx b/fpicker/inc/pch/precompiled_fpicker.hxx
index 7ce2239423e0..98d92fffdf00 100644
--- a/fpicker/inc/pch/precompiled_fpicker.hxx
+++ b/fpicker/inc/pch/precompiled_fpicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/aqua/AquaFilePickerDelegate.hxx b/fpicker/source/aqua/AquaFilePickerDelegate.hxx
index 4ae6eecb04c9..b7bea762afb2 100644
--- a/fpicker/source/aqua/AquaFilePickerDelegate.hxx
+++ b/fpicker/source/aqua/AquaFilePickerDelegate.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/aqua/CFStringUtilities.cxx b/fpicker/source/aqua/CFStringUtilities.cxx
index 7d9293d7a1f1..06fa7fc94962 100644
--- a/fpicker/source/aqua/CFStringUtilities.cxx
+++ b/fpicker/source/aqua/CFStringUtilities.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/aqua/CFStringUtilities.hxx b/fpicker/source/aqua/CFStringUtilities.hxx
index 578782b5567c..09f3dadcd266 100644
--- a/fpicker/source/aqua/CFStringUtilities.hxx
+++ b/fpicker/source/aqua/CFStringUtilities.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/aqua/ControlHelper.cxx b/fpicker/source/aqua/ControlHelper.cxx
index 15b01c88db95..67725c19ecf2 100644
--- a/fpicker/source/aqua/ControlHelper.cxx
+++ b/fpicker/source/aqua/ControlHelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -79,7 +79,7 @@ ControlHelper::ControlHelper()
ControlHelper::~ControlHelper()
{
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
-
+
NSAutoreleasePool *pool = [NSAutoreleasePool new];
if (NULL != m_pUserPane) {
@@ -104,7 +104,7 @@ ControlHelper::~ControlHelper()
if (m_pFilterControl != NULL) {
[m_pFilterControl setTarget:nil];
}
-
+
[pool release];
DBG_PRINT_EXIT(CLASS_NAME, __func__);
@@ -176,7 +176,7 @@ void ControlHelper::enableControl( const sal_Int16 nControlId, const sal_Bool bE
DBG_PRINT_EXIT(CLASS_NAME, __func__);
return;
}
-
+
NSControl* pControl = getControl(nControlId);
if( pControl != nil ) {
@@ -227,18 +227,18 @@ void ControlHelper::setLabel( sal_Int16 nControlId, const NSString* aLabel )
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "controlId", nControlId, "label", aLabel);
SolarMutexGuard aGuard;
-
+
NSAutoreleasePool *pool = [NSAutoreleasePool new];
NSControl* pControl = getControl(nControlId);
-
+
if (nil != pControl) {
if ([pControl class] == [NSPopUpButton class]) {
NSString *sOldName = m_aMapListLabels[pControl];
if (sOldName != NULL && sOldName != aLabel) {
[sOldName release];
}
-
+
m_aMapListLabels[pControl] = [aLabel retain];
} else if ([pControl class] == [NSButton class]) {
[[pControl cell] setTitle:aLabel];
@@ -248,7 +248,7 @@ void ControlHelper::setLabel( sal_Int16 nControlId, const NSString* aLabel )
}
layoutControls();
-
+
[pool release];
DBG_PRINT_EXIT(CLASS_NAME, __func__);
@@ -318,50 +318,50 @@ uno::Any ControlHelper::getValue( sal_Int16 nControlId, sal_Int16 nControlAction
void ControlHelper::createUserPane()
{
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
-
+
if (m_bUserPaneNeeded == false) {
OSL_TRACE("no user pane needed");
DBG_PRINT_EXIT(CLASS_NAME, __func__);
return;
}
-
+
if (nil != m_pUserPane) {
OSL_TRACE("user pane already exists");
DBG_PRINT_EXIT(CLASS_NAME, __func__);
return;
}
-
+
if (m_bIsFilterControlNeeded == true && m_pFilterControl == nil) {
createFilterControl();
}
-
+
NSRect minRect = NSMakeRect(0,0,300,33);
m_pUserPane = [[NSView alloc] initWithFrame:minRect];
int currentHeight = kAquaSpaceBoxFrameViewDiffTop + kAquaSpaceBoxFrameViewDiffBottom;
int currentWidth = 300;
-
+
BOOL bPopupControlPresent = NO;
BOOL bButtonControlPresent = NO;
-
+
int nCheckboxMaxWidth = 0;
int nPopupMaxWidth = 0;
int nPopupLabelMaxWidth = 0;
-
+
for (::std::list<NSControl*>::iterator child = m_aActiveControls.begin(); child != m_aActiveControls.end(); child++) {
OSL_TRACE("currentHeight: %d", currentHeight);
-
+
NSControl* pControl = *child;
-
+
//let the control calculate its size
[pControl sizeToFit];
-
+
NSRect frame = [pControl frame];
OSL_TRACE("frame for control %s is {%f, %f, %f, %f}", [[pControl description] UTF8String], frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
-
+
int nControlHeight = frame.size.height;
int nControlWidth = frame.size.width;
-
+
// Note: controls are grouped by kind, first all popup menus, then checkboxes
if ([pControl class] == [NSPopUpButton class]) {
if (bPopupControlPresent == YES) {
@@ -371,78 +371,78 @@ void ControlHelper::createUserPane()
else if (child != m_aActiveControls.begin()){
currentHeight += kAquaSpaceBetweenControls;
}
-
+
bPopupControlPresent = YES;
-
+
// we have to add the label text width
NSString *label = m_aMapListLabels[pControl];
-
+
NSTextField *textField = createLabelWithString(label);
[textField sizeToFit];
m_aMapListLabelFields[(NSPopUpButton*)pControl] = textField;
[m_pUserPane addSubview:textField];
-
+
NSRect tfRect = [textField frame];
OSL_TRACE("frame for textfield %s is {%f, %f, %f, %f}", [[textField description] UTF8String], tfRect.origin.x, tfRect.origin.y, tfRect.size.width, tfRect.size.height);
-
+
int tfWidth = tfRect.size.width;
-
+
if (nPopupLabelMaxWidth < tfWidth) {
nPopupLabelMaxWidth = tfWidth;
}
-
+
frame.origin.x += (kAquaSpaceBetweenControls - kAquaSpaceLabelFrameBoundsDiffH - kAquaSpacePopupMenuFrameBoundsDiffLeft) + tfWidth;
-
+
if (nControlWidth < POPUP_WIDTH_MIN) {
nControlWidth = POPUP_WIDTH_MIN;
frame.size.width = nControlWidth;
[pControl setFrame:frame];
}
-
+
if (nControlWidth > POPUP_WIDTH_MAX) {
nControlWidth = POPUP_WIDTH_MAX;
frame.size.width = nControlWidth;
[pControl setFrame:frame];
}
-
+
//set the max size
if (nPopupMaxWidth < nControlWidth) {
nPopupMaxWidth = nControlWidth;
}
-
+
nControlWidth += tfWidth + kAquaSpaceBetweenControls - kAquaSpaceLabelFrameBoundsDiffH - kAquaSpacePopupMenuFrameBoundsDiffLeft;
if (nControlHeight < kAquaPopupButtonDefaultHeight) {
//maybe the popup has no menu item yet, so set a default height
nControlHeight = kAquaPopupButtonDefaultHeight;
}
-
+
nControlHeight -= kAquaSpacePopupMenuFrameBoundsDiffV;
}
else if ([pControl class] == [NSButton class]) {
if (child != m_aActiveControls.begin()){
currentHeight += kAquaSpaceBetweenControls;
}
-
+
if (nCheckboxMaxWidth < nControlWidth) {
nCheckboxMaxWidth = nControlWidth;
}
-
+
bButtonControlPresent = YES;
nControlWidth -= 2 * kAquaSpaceSwitchButtonFrameBoundsDiff;
nControlHeight -= 2 * kAquaSpaceSwitchButtonFrameBoundsDiff;
}
-
+
// if ((nControlWidth + 2 * kAquaSpaceInsideGroupH) > currentWidth) {
// currentWidth = nControlWidth + 2 * kAquaSpaceInsideGroupH;
// }
-
+
currentHeight += nControlHeight;
-
+
[m_pUserPane addSubview:pControl];
}
-
+
OSL_TRACE("height after adding all controls: %d", currentHeight);
-
+
if (bPopupControlPresent && bButtonControlPresent)
{
//after a popup button (array) and before a different kind of control we need some extra space instead of the standard
@@ -450,20 +450,20 @@ void ControlHelper::createUserPane()
currentHeight += kAquaSpaceAfterPopupButtonsV;
OSL_TRACE("popup extra space added, currentHeight: %d", currentHeight);
}
-
+
int nLongestPopupWidth = nPopupMaxWidth + nPopupLabelMaxWidth + kAquaSpaceBetweenControls - kAquaSpacePopupMenuFrameBoundsDiffLeft - kAquaSpaceLabelFrameBoundsDiffH;
-
+
currentWidth = nLongestPopupWidth > nCheckboxMaxWidth ? nLongestPopupWidth : nCheckboxMaxWidth;
OSL_TRACE("longest control width: %d", currentWidth);
-
+
currentWidth += 2* kAquaSpaceInsideGroupH;
if (currentWidth < minRect.size.width)
currentWidth = minRect.size.width;
-
+
if (currentHeight < minRect.size.height)
currentHeight = minRect.size.height;
-
+
NSRect upRect = NSMakeRect(0, 0, currentWidth, currentHeight );
OSL_TRACE("setting user pane rect to {%f, %f, %f, %f}",upRect.origin.x, upRect.origin.y, upRect.size.width, upRect.size.height);
@@ -489,7 +489,7 @@ void ControlHelper::createControls()
int elementName = getControlElementName([NSPopUpButton class], i);
NSString* sLabel = aResProvider.getResString(elementName);
-
+
m_pListControls[i] = [NSPopUpButton new];
#define MAP_LIST_( elem ) \
@@ -518,31 +518,31 @@ void ControlHelper::createControls()
NSButton *button = [NSButton new];
[button setTitle:sLabel];
-
+
[button setButtonType:NSSwitchButton];
-
+
[button setState:NSOffState];
-
+
if (i == AUTOEXTENSION) {
[button setTarget:m_pDelegate];
[button setAction:@selector(autoextensionChanged:)];
}
-
+
m_pToggles[i] = button;
-
+
m_aActiveControls.push_back(m_pToggles[i]);
} else {
m_pToggles[i] = nil;
}
}
-
+
//preview is always on with Mac OS X
NSControl *pPreviewBox = m_pToggles[PREVIEW];
if (pPreviewBox != nil) {
[pPreviewBox setEnabled:NO];
[(NSButton*)pPreviewBox setState:NSOnState];
}
-
+
DBG_PRINT_EXIT(CLASS_NAME, __func__);
}
@@ -597,7 +597,7 @@ void ControlHelper::HandleSetListValue(const NSControl* pControl, const sal_Int1
DBG_PRINT_EXIT(CLASS_NAME, __func__);
return;
}
-
+
NSPopUpButton *pButton = (NSPopUpButton*)pControl;
NSMenu *rMenu = [pButton menu];
if (nil == rMenu) {
@@ -686,7 +686,7 @@ uno::Any ControlHelper::HandleGetListValue(const NSControl* pControl, const sal_
DBG_PRINT_EXIT(CLASS_NAME, __func__);
return aAny;
}
-
+
NSPopUpButton *pButton = (NSPopUpButton*)pControl;
NSMenu *rMenu = [pButton menu];
if (nil == rMenu) {
@@ -804,7 +804,7 @@ case ExtendedFilePickerElementIds::LISTBOX_##elem##_LABEL: \
void ControlHelper::layoutControls()
{
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
-
+
SolarMutexGuard aGuard;
if (nil == m_pUserPane) {
@@ -812,32 +812,32 @@ void ControlHelper::layoutControls()
DBG_PRINT_EXIT(CLASS_NAME, __func__);
return;
}
-
+
if (m_bIsUserPaneLaidOut == true) {
OSL_TRACE("user pane already laid out");
DBG_PRINT_EXIT(CLASS_NAME, __func__);
return;
}
-
+
NSRect userPaneRect = [m_pUserPane frame];
OSL_TRACE("userPane frame: {%f, %f, %f, %f}",userPaneRect.origin.x, userPaneRect.origin.y, userPaneRect.size.width, userPaneRect.size.height);
-
+
int nUsableWidth = userPaneRect.size.width;
-
+
//NOTE: NSView's coordinate system starts in the lower left hand corner but we start adding controls from the top,
// so we subtract from the vertical position as we make our way down the pane.
int currenttop = userPaneRect.size.height;
int nCheckboxMaxWidth = 0;
int nPopupMaxWidth = 0;
int nPopupLabelMaxWidth = 0;
-
+
//first loop to determine max sizes
for (::std::list<NSControl*>::iterator child = m_aActiveControls.begin(); child != m_aActiveControls.end(); child++) {
NSControl* pControl = *child;
-
+
NSRect controlRect = [pControl frame];
int nControlWidth = controlRect.size.width;
-
+
Class aSubType = [pControl class];
if (aSubType == [NSPopUpButton class]) {
if (nPopupMaxWidth < nControlWidth) {
@@ -855,34 +855,34 @@ void ControlHelper::layoutControls()
}
}
}
-
+
int nLongestPopupWidth = nPopupMaxWidth + nPopupLabelMaxWidth + kAquaSpaceBetweenControls - kAquaSpacePopupMenuFrameBoundsDiffLeft - kAquaSpaceLabelFrameBoundsDiffH;
OSL_TRACE("longest popup width: %d", nLongestPopupWidth);
NSControl* previousControl = nil;
-
+
int nDistBetweenControls = 0;
-
+
for (::std::list<NSControl*>::iterator child = m_aActiveControls.begin(); child != m_aActiveControls.end(); child++) {
NSControl* pControl = *child;
-
+
//get the control's bounds
NSRect controlRect = [pControl frame];
int nControlHeight = controlRect.size.height;
int nControlWidth = controlRect.size.width;
-
+
//subtract the height from the current vertical position, because the control's bounds origin rect will be its lower left hand corner
currenttop -= nControlHeight;
Class aSubType = [pControl class];
-
+
//add space between the previous control and this control according to Apple's HIG
nDistBetweenControls = getVerticalDistance(previousControl, pControl);
OSL_TRACE("vertical distance: %d", nDistBetweenControls);
currenttop -= nDistBetweenControls;
-
+
previousControl = pControl;
-
+
if (aSubType == [NSPopUpButton class]) {
//move vertically up some pixels to space the controls between their real (visual) bounds
currenttop += kAquaSpacePopupMenuFrameBoundsDiffTop;//from top
@@ -935,12 +935,12 @@ void ControlHelper::createFilterControl() {
NSString* sLabel = aResProvider.getResString(CommonFilePickerElementIds::LISTBOX_FILTER_LABEL);
m_pFilterControl = [NSPopUpButton new];
-
+
[m_pFilterControl setAction:@selector(filterSelectedAtIndex:)];
[m_pFilterControl setTarget:m_pDelegate];
-
+
NSMenu *menu = [m_pFilterControl menu];
-
+
for (NSStringList::iterator iter = m_pFilterHelper->getFilterNames()->begin(); iter != m_pFilterHelper->getFilterNames()->end(); iter++) {
NSString *filterName = *iter;
OSL_TRACE("adding filter name: %s", [filterName UTF8String]);
@@ -951,11 +951,11 @@ void ControlHelper::createFilterControl() {
[m_pFilterControl addItemWithTitle:filterName];
}
}
-
+
// always add the filter as first item
m_aActiveControls.push_front(m_pFilterControl);
m_aMapListLabels[m_pFilterControl] = [sLabel retain];
-
+
DBG_PRINT_EXIT(CLASS_NAME, __func__);
}
@@ -968,7 +968,7 @@ NSTextField* ControlHelper::createLabelWithString(const NSString* labelString) {
[textField setDrawsBackground:NO];
[textField setBordered:NO];
[[textField cell] setTitle:labelString];
-
+
DBG_PRINT_EXIT(CLASS_NAME, __func__);
return textField;
}
@@ -984,7 +984,7 @@ int ControlHelper::getVerticalDistance(const NSControl* first, const NSControl*
else {
Class firstClass = [first class];
Class secondClass = [second class];
-
+
if (firstClass == [NSPopUpButton class]) {
if (secondClass == [NSPopUpButton class]) {
return kAquaSpaceBetweenPopupMenus;
@@ -993,7 +993,7 @@ int ControlHelper::getVerticalDistance(const NSControl* first, const NSControl*
return kAquaSpaceAfterPopupButtonsV;
}
}
-
+
return kAquaSpaceBetweenControls;
}
}
@@ -1001,21 +1001,21 @@ int ControlHelper::getVerticalDistance(const NSControl* first, const NSControl*
void ControlHelper::updateFilterUI()
{
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
-
+
if (m_bIsFilterControlNeeded == false || m_pFilterHelper == NULL) {
OSL_TRACE("no filter control needed or no filter helper present");
DBG_PRINT_EXIT(CLASS_NAME, __func__);
return;
}
-
+
int index = m_pFilterHelper->getCurrentFilterIndex();
-
+
if (m_pFilterControl == nil) {
createFilterControl();
}
-
+
[m_pFilterControl selectItemAtIndex:index];
-
+
DBG_PRINT_EXIT(CLASS_NAME, __func__);
}
diff --git a/fpicker/source/aqua/ControlHelper.hxx b/fpicker/source/aqua/ControlHelper.hxx
index fa5ebc0bc0a6..b2037471a516 100644
--- a/fpicker/source/aqua/ControlHelper.hxx
+++ b/fpicker/source/aqua/ControlHelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -115,7 +115,7 @@ public:
m_bUserPaneNeeded = true;
}
}
-
+
inline void setFilterHelper(FilterHelper* pFilterHelper) {
m_pFilterHelper = pFilterHelper;
}
@@ -123,7 +123,7 @@ public:
inline void setFilePickerDelegate(AquaFilePickerDelegate* pDelegate) {
m_pDelegate = pDelegate;
}
-
+
inline bool isAutoExtensionEnabled() {
return ([((NSButton*) m_pToggles[AUTOEXTENSION]) state] == NSOnState);
}
@@ -132,13 +132,13 @@ private:
//------------------------------------------------------------------------------------
// private member variables
//------------------------------------------------------------------------------------
-
+
/** the native view object */
NSView* m_pUserPane;
/** the checkbox controls */
NSControl* m_pToggles[ TOGGLE_LAST ];
-
+
/** the visibility flags for the checkboxes */
bool m_bToggleVisibility[TOGGLE_LAST];
@@ -147,13 +147,13 @@ private:
/** the popup menu controls (except for the filter control) */
NSControl* m_pListControls[ LIST_LAST ];
-
+
/** a map to store a control's label text */
::std::map<NSControl *, NSString *> m_aMapListLabels;
-
+
/** a map to store a popup menu's label text field */
::std::map<NSPopUpButton *, NSTextField *> m_aMapListLabelFields;
-
+
/** the visibility flags for the popup menus */
bool m_bListVisibility[ LIST_LAST ];
@@ -162,16 +162,16 @@ private:
/** indicates if the user pane was laid out already */
bool m_bIsUserPaneLaidOut;
-
+
/** indicates if a filter control is needed */
bool m_bIsFilterControlNeeded;
-
+
/** a list with all actively used controls */
::std::list<NSControl*> m_aActiveControls;
-
+
/** the filter helper */
FilterHelper *m_pFilterHelper;
-
+
/** the save or open panel's delegate */
AquaFilePickerDelegate *m_pDelegate;
@@ -185,7 +185,7 @@ private:
void createFilterControl();
void createUserPane();
NSTextField* createLabelWithString(const NSString* label);
-
+
int getControlElementName(const Class clazz, const int nControlId) const;
NSControl* getControl( const sal_Int16 nControlId ) const;
static int getVerticalDistance(const NSControl* first, const NSControl* second);
diff --git a/fpicker/source/aqua/FPServiceInfo.hxx b/fpicker/source/aqua/FPServiceInfo.hxx
index c3cb6b841b44..57de03afa79f 100644
--- a/fpicker/source/aqua/FPServiceInfo.hxx
+++ b/fpicker/source/aqua/FPServiceInfo.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/aqua/FPentry.cxx b/fpicker/source/aqua/FPentry.cxx
index f1b1e4cde76d..f25037a8a3bb 100644
--- a/fpicker/source/aqua/FPentry.cxx
+++ b/fpicker/source/aqua/FPentry.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/aqua/FilterHelper.cxx b/fpicker/source/aqua/FilterHelper.cxx
index b85e7ab8448b..33d0769ca774 100644
--- a/fpicker/source/aqua/FilterHelper.cxx
+++ b/fpicker/source/aqua/FilterHelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -426,7 +426,7 @@ sal_Bool FilterHelper::filenameMatchesFilter(NSString* sFilename)
}
}
}
-
+
// might be an alias
NSString* pResolved = resolveAlias( sFilename );
if( pResolved )
diff --git a/fpicker/source/aqua/FilterHelper.hxx b/fpicker/source/aqua/FilterHelper.hxx
index 8e8bcc4b6cf7..e4e6cb7bc1f6 100644
--- a/fpicker/source/aqua/FilterHelper.hxx
+++ b/fpicker/source/aqua/FilterHelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/aqua/NSString_OOoAdditions.hxx b/fpicker/source/aqua/NSString_OOoAdditions.hxx
index 65551d15f17e..a3f141bbe1ef 100644
--- a/fpicker/source/aqua/NSString_OOoAdditions.hxx
+++ b/fpicker/source/aqua/NSString_OOoAdditions.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/aqua/NSURL_OOoAdditions.hxx b/fpicker/source/aqua/NSURL_OOoAdditions.hxx
index b5ef549ea51b..5198db846630 100644
--- a/fpicker/source/aqua/NSURL_OOoAdditions.hxx
+++ b/fpicker/source/aqua/NSURL_OOoAdditions.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/aqua/SalAquaConstants.h b/fpicker/source/aqua/SalAquaConstants.h
index 7a1ecd353abe..30db99b9af5a 100644
--- a/fpicker/source/aqua/SalAquaConstants.h
+++ b/fpicker/source/aqua/SalAquaConstants.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/aqua/SalAquaFilePicker.cxx b/fpicker/source/aqua/SalAquaFilePicker.cxx
index e05fe4fb8dc9..f48f174c7485 100644
--- a/fpicker/source/aqua/SalAquaFilePicker.cxx
+++ b/fpicker/source/aqua/SalAquaFilePicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -113,10 +113,10 @@ cppu::WeakComponentImplHelper8<XFilterManager, XFilterGroupManager, XFilePickerC
, m_pFilterHelper( NULL )
{
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
-
+
m_pDelegate = [[AquaFilePickerDelegate alloc] initWithFilePicker:this];
m_pControlHelper->setFilePickerDelegate(m_pDelegate);
-
+
DBG_PRINT_EXIT(CLASS_NAME, __func__);
}
@@ -126,7 +126,7 @@ SalAquaFilePicker::~SalAquaFilePicker()
if (NULL != m_pFilterHelper)
delete m_pFilterHelper;
-
+
[m_pDelegate release];
DBG_PRINT_EXIT(CLASS_NAME, __func__);
@@ -183,8 +183,8 @@ sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException )
sal_Int16 retVal = 0;
implInitialize();
-
- // if m_pDialog is nil after initialization, something must have gone wrong before
+
+ // if m_pDialog is nil after initialization, something must have gone wrong before
// or there was no initialization (see issue http://www.openoffice.org/issues/show_bug.cgi?id=100214)
if (m_pDialog == nil) {
//throw uno::RuntimeException(rtl::OUString::createFromAscii("The dialog was not properly initialized!"), static_cast< XFilePicker* >( this ));
@@ -226,9 +226,9 @@ sal_Int16 SAL_CALL SalAquaFilePicker::execute() throw( uno::RuntimeException )
//Set the delegate to be notified of certain events
[m_pDialog setDelegate:m_pDelegate];
-
+
int nStatus = runandwaitforresult();
-
+
[m_pDialog setDelegate:nil];
switch( nStatus )
@@ -310,7 +310,7 @@ rtl::OUString SAL_CALL SalAquaFilePicker::getDisplayDirectory() throw( uno::Runt
uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getFiles() throw( uno::RuntimeException )
{
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
-
+
SolarMutexGuard aGuard;
// OSL_TRACE("starting work");
@@ -326,12 +326,12 @@ uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getFiles() throw( uno::
else if (m_nDialogType == NAVIGATIONSERVICES_SAVE) {
files = [NSArray arrayWithObjects:[m_pDialog URL], nil];
}
-
+
long nFiles = [files count];
OSL_TRACE("# of items: %d", nFiles);
-
+
uno::Sequence< rtl::OUString > aSelectedFiles(nFiles > 1 ? nFiles + 1 : nFiles);
-
+
for(int nIndex = 0; nIndex < nFiles; nIndex += 1)
{
NSURL *url = [files objectAtIndex:nIndex];
@@ -342,7 +342,7 @@ uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getFiles() throw( uno::
info = FILENAME;
}
OUString sFileOrDirURL = [url OUStringForInfo:info];
-
+
//get the directory information, only on the first file processed
if (nIndex == 0) {
OUString sDirectoryURL = [url OUStringForInfo:PATHWITHOUTLASTCOMPONENT];
@@ -351,10 +351,10 @@ uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getFiles() throw( uno::
aSelectedFiles[0] = OUString(sDirectoryURL);
}
}
-
+
short nSequenceIndex = nFiles > 1 ? nIndex + 1 : nIndex;
aSelectedFiles[nSequenceIndex] = sFileOrDirURL;
-
+
OSL_TRACE("Returned file in getFiles: \"%s\".", OUStringToOString(sFileOrDirURL, RTL_TEXTENCODING_UTF8).getStr());
}
@@ -393,9 +393,9 @@ throw( lang::IllegalArgumentException, uno::RuntimeException )
ensureFilterHelper();
m_pFilterHelper->setCurrentFilter(aTitle);
updateFilterUI();
-
+
updateSaveFileNameExtension();
-
+
DBG_PRINT_EXIT(CLASS_NAME, __func__);
}
@@ -440,11 +440,11 @@ throw( uno::RuntimeException )
SolarMutexGuard aGuard;
m_pControlHelper->setValue(nControlId, nControlAction, rValue);
-
+
if (nControlId == ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION && m_nDialogType == NAVIGATIONSERVICES_SAVE) {
updateSaveFileNameExtension();
}
-
+
DBG_PRINT_EXIT(CLASS_NAME, __func__);
}
@@ -452,9 +452,9 @@ uno::Any SAL_CALL SalAquaFilePicker::getValue( sal_Int16 nControlId, sal_Int16 n
throw( uno::RuntimeException )
{
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
-
+
uno::Any aValue = m_pControlHelper->getValue(nControlId, nControlAction);
-
+
DBG_PRINT_EXIT(CLASS_NAME, __func__);
return aValue;
}
@@ -572,7 +572,7 @@ throw( uno::Exception, uno::RuntimeException )
}
m_pControlHelper->initialize(templateId);
-
+
implInitialize();
DBG_PRINT_EXIT(CLASS_NAME, __func__);
@@ -670,28 +670,28 @@ throw( uno::RuntimeException )
void SAL_CALL SalAquaFilePicker::fileSelectionChanged( FilePickerEvent aEvent )
{
OSL_TRACE( "file selection changed");
- if (m_xListener.is())
+ if (m_xListener.is())
m_xListener->fileSelectionChanged( aEvent );
}
void SAL_CALL SalAquaFilePicker::directoryChanged( FilePickerEvent aEvent )
{
OSL_TRACE("directory changed");
- if (m_xListener.is())
+ if (m_xListener.is())
m_xListener->directoryChanged( aEvent );
}
void SAL_CALL SalAquaFilePicker::controlStateChanged( FilePickerEvent aEvent )
{
OSL_TRACE("control state changed");
- if (m_xListener.is())
+ if (m_xListener.is())
m_xListener->controlStateChanged( aEvent );
}
void SAL_CALL SalAquaFilePicker::dialogSizeChanged()
{
OSL_TRACE("dialog size changed");
- if (m_xListener.is())
+ if (m_xListener.is())
m_xListener->dialogSizeChanged();
}
@@ -758,10 +758,10 @@ void SalAquaFilePicker::updateSaveFileNameExtension() {
if (m_nDialogType != NAVIGATIONSERVICES_SAVE) {
return;
}
-
- // we need to set this here again because initial setting does
+
+ // we need to set this here again because initial setting does
//[m_pDialog setExtensionHidden:YES];
-
+
SolarMutexGuard aGuard;
if (m_pControlHelper->isAutoExtensionEnabled() == false) {
@@ -777,9 +777,9 @@ void SalAquaFilePicker::updateSaveFileNameExtension() {
rtl::OUString suffix = (*(aStringList.begin())).copy(1);
NSString *requiredFileType = [NSString stringWithOUString:suffix];
-
+
[m_pDialog setRequiredFileType:requiredFileType];
-
+
OSL_TRACE("disallowing other file types");
[m_pDialog setAllowsOtherFileTypes:NO];
}
@@ -789,17 +789,17 @@ void SalAquaFilePicker::updateSaveFileNameExtension() {
void SalAquaFilePicker::filterControlChanged() {
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
-
+
if (m_pDialog == nil) {
return;
}
-
+
SolarMutexGuard aGuard;
updateSaveFileNameExtension();
-
+
[m_pDialog validateVisibleColumns];
-
+
FilePickerEvent evt;
evt.ElementId = LISTBOX_FILTER;
controlStateChanged( evt );
diff --git a/fpicker/source/aqua/SalAquaFilePicker.hxx b/fpicker/source/aqua/SalAquaFilePicker.hxx
index a9a7564da2b4..26b1ffeaa020 100644
--- a/fpicker/source/aqua/SalAquaFilePicker.hxx
+++ b/fpicker/source/aqua/SalAquaFilePicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -91,14 +91,14 @@ public:
throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL removeFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
throw( ::com::sun::star::uno::RuntimeException );
-
+
//------------------------------------------------------------------------------------
// XExecutableDialog functions
//------------------------------------------------------------------------------------
-
+
virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle )
throw( ::com::sun::star::uno::RuntimeException );
-
+
virtual sal_Int16 SAL_CALL execute( )
throw( ::com::sun::star::uno::RuntimeException );
@@ -205,11 +205,11 @@ public:
// rtl::OUString SAL_CALL helpRequested( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent ) const;
void SAL_CALL controlStateChanged( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent );
void SAL_CALL dialogSizeChanged( );
-
+
inline AquaFilePickerDelegate * getDelegate() {
return m_pDelegate;
}
-
+
inline rtl::OUString getSaveFileName() {
return m_sSaveFileName;
}
@@ -237,13 +237,13 @@ private:
void updateSaveFileNameExtension();
public:
-
+
virtual ~SalAquaFilePicker();
void filterControlChanged();
void implInitialize();
-
+
};
#endif // _SALAQUAFILEPICKER_HXX_
diff --git a/fpicker/source/aqua/SalAquaFolderPicker.cxx b/fpicker/source/aqua/SalAquaFolderPicker.cxx
index 115bc1afe50c..de229cd3bd96 100644
--- a/fpicker/source/aqua/SalAquaFolderPicker.cxx
+++ b/fpicker/source/aqua/SalAquaFolderPicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -184,16 +184,16 @@ rtl::OUString SAL_CALL SalAquaFolderPicker::getDirectory() throw( uno::RuntimeEx
if (m_nDialogType == NAVIGATIONSERVICES_DIRECTORY) {
files = [(NSOpenPanel*)m_pDialog URLs];
}
-
+
long nFiles = [files count];
OSL_TRACE("# of items: %d", nFiles);
-
+
if (nFiles < 1) {
throw uno::RuntimeException(rtl::OUString::createFromAscii("no directory selected"), static_cast< XFolderPicker* >( this ));
}
-
+
rtl::OUString aDirectory;
-
+
NSURL *url = [files objectAtIndex:0];
OSL_TRACE("handling %s", [[url description] UTF8String]);
@@ -211,7 +211,7 @@ void SAL_CALL SalAquaFolderPicker::setDescription( const rtl::OUString& rDescrip
throw( uno::RuntimeException )
{
DBG_PRINT_ENTRY(CLASS_NAME, __func__, "description", rDescription);
-
+
[m_pDialog setMessage:[NSString stringWithOUString:rDescription]];
DBG_PRINT_EXIT(CLASS_NAME, __func__);
diff --git a/fpicker/source/aqua/SalAquaFolderPicker.hxx b/fpicker/source/aqua/SalAquaFolderPicker.hxx
index 8cd643e24029..8922f77d7bc7 100644
--- a/fpicker/source/aqua/SalAquaFolderPicker.hxx
+++ b/fpicker/source/aqua/SalAquaFolderPicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/aqua/SalAquaPicker.cxx b/fpicker/source/aqua/SalAquaPicker.cxx
index 43962a30d3d5..c970b357407c 100644
--- a/fpicker/source/aqua/SalAquaPicker.cxx
+++ b/fpicker/source/aqua/SalAquaPicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -75,7 +75,7 @@ SalAquaPicker::SalAquaPicker()
SalAquaPicker::~SalAquaPicker()
{
DBG_PRINT_ENTRY(CLASS_NAME, __func__);
-
+
SolarMutexGuard aGuard;
NSAutoreleasePool *pool = [NSAutoreleasePool new];
@@ -119,7 +119,7 @@ void SAL_CALL SalAquaPicker::implInitialize()
* here but unfortunately this
* a) only works when the dialog is already displayed because it seems to act on the corresponding checkbox (that we don't show but that doesn't matter)
* b) Mac OS X saves this setting on an application-based level which means that the last state is always being restored again when the app runs for the next time
- *
+ *
* So the only reliable way seems to be using the NSUserDefaults object because that is where that value is stored and
* to just overwrite it if it has the wrong value.
*/
@@ -142,10 +142,10 @@ void SAL_CALL SalAquaPicker::implInitialize()
OSL_TRACE("m_nDialogType is UNKNOWN: %d", m_nDialogType);
break;
}
-
+
if (m_pDialog == nil) {
OSL_TRACE("An error occurred while creating the dialog!");
- }
+ }
else {
[(NSOpenPanel*)m_pDialog setCanCreateDirectories:YES];
//Retain the dialog instance or it will go away immediately
@@ -167,14 +167,14 @@ int SalAquaPicker::run()
//this is the case e.g. for the folder picker at this stage
implInitialize();
}
-
+
NSView *userPane = m_pControlHelper->getUserPane();
if (userPane != NULL) {
[m_pDialog setAccessoryView:userPane];
}
int retVal = 0;
-
+
NSString *startDirectory;
if (m_sDisplayDirectory.getLength() > 0) {
NSString *temp = [NSString stringWithOUString:m_sDisplayDirectory];
@@ -200,14 +200,14 @@ int SalAquaPicker::run()
default:
break;
}
-
+
if (retVal == NSFileHandlingPanelOKButton) {
NSString* pDir = [m_pDialog directory];
if (pDir) {
implsetDisplayDirectory([[NSURL fileURLWithPath:pDir] OUStringForInfo:FULLPATH]);
}
}
-
+
DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal);
[pool release];
diff --git a/fpicker/source/aqua/SalAquaPicker.hxx b/fpicker/source/aqua/SalAquaPicker.hxx
index 001dac2d7d92..e39709abb604 100644
--- a/fpicker/source/aqua/SalAquaPicker.hxx
+++ b/fpicker/source/aqua/SalAquaPicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,13 +59,13 @@ public:
int run();
int runandwaitforresult();
-
+
inline rtl::OUString getDisplayDirectory() { return m_sDisplayDirectory; }
inline ControlHelper* getControlHelper() const {
return m_pControlHelper;
}
-
+
protected:
rtl::OUString m_sDisplayDirectory;
diff --git a/fpicker/source/aqua/resourceprovider.cxx b/fpicker/source/aqua/resourceprovider.cxx
index 2d5c4595f886..7c6b651d30be 100644
--- a/fpicker/source/aqua/resourceprovider.cxx
+++ b/fpicker/source/aqua/resourceprovider.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/aqua/resourceprovider.hxx b/fpicker/source/aqua/resourceprovider.hxx
index 6300def58f07..fb0007ba1280 100644
--- a/fpicker/source/aqua/resourceprovider.hxx
+++ b/fpicker/source/aqua/resourceprovider.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/generic/fpicker.cxx b/fpicker/source/generic/fpicker.cxx
index 0f207a3fe57b..cf2251faf610 100644
--- a/fpicker/source/generic/fpicker.cxx
+++ b/fpicker/source/generic/fpicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx
index f8bec371a898..c107252e639c 100644
--- a/fpicker/source/office/OfficeControlAccess.cxx
+++ b/fpicker/source/office/OfficeControlAccess.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,61 +59,61 @@ namespace svt
namespace
{
// ----------------------------------------------------------------
- #define PROPERTY_FLAG_TEXT 0x00000001
- #define PROPERTY_FLAG_ENDBALED 0x00000002
- #define PROPERTY_FLAG_VISIBLE 0x00000004
- #define PROPERTY_FLAG_HELPURL 0x00000008
- #define PROPERTY_FLAG_LISTITEMS 0x00000010
- #define PROPERTY_FLAG_SELECTEDITEM 0x00000020
- #define PROPERTY_FLAG_SELECTEDITEMINDEX 0x00000040
- #define PROPERTY_FLAG_CHECKED 0x00000080
+ #define PROPERTY_FLAG_TEXT 0x00000001
+ #define PROPERTY_FLAG_ENDBALED 0x00000002
+ #define PROPERTY_FLAG_VISIBLE 0x00000004
+ #define PROPERTY_FLAG_HELPURL 0x00000008
+ #define PROPERTY_FLAG_LISTITEMS 0x00000010
+ #define PROPERTY_FLAG_SELECTEDITEM 0x00000020
+ #define PROPERTY_FLAG_SELECTEDITEMINDEX 0x00000040
+ #define PROPERTY_FLAG_CHECKED 0x00000080
// ----------------------------------------------------------------
// ................................................................
struct ControlDescription
{
- const sal_Char* pControlName;
- sal_Int16 nControlId;
- sal_Int32 nPropertyFlags;
+ const sal_Char* pControlName;
+ sal_Int16 nControlId;
+ sal_Int32 nPropertyFlags;
};
// ................................................................
typedef const ControlDescription* ControlDescIterator;
- typedef ::std::pair< ControlDescIterator, ControlDescIterator > ControlDescRange;
+ typedef ::std::pair< ControlDescIterator, ControlDescIterator > ControlDescRange;
// ......................................................................
- #define PROPERTY_FLAGS_COMMON ( PROPERTY_FLAG_ENDBALED | PROPERTY_FLAG_VISIBLE | PROPERTY_FLAG_HELPURL )
- #define PROPERTY_FLAGS_LISTBOX ( PROPERTY_FLAG_LISTITEMS | PROPERTY_FLAG_SELECTEDITEM | PROPERTY_FLAG_SELECTEDITEMINDEX )
- #define PROPERTY_FLAGS_CHECKBOX ( PROPERTY_FLAG_CHECKED | PROPERTY_FLAG_TEXT )
+ #define PROPERTY_FLAGS_COMMON ( PROPERTY_FLAG_ENDBALED | PROPERTY_FLAG_VISIBLE | PROPERTY_FLAG_HELPURL )
+ #define PROPERTY_FLAGS_LISTBOX ( PROPERTY_FLAG_LISTITEMS | PROPERTY_FLAG_SELECTEDITEM | PROPERTY_FLAG_SELECTEDITEMINDEX )
+ #define PROPERTY_FLAGS_CHECKBOX ( PROPERTY_FLAG_CHECKED | PROPERTY_FLAG_TEXT )
// Note: this array MUST be sorted by name!
static const ControlDescription aDescriptions[] = {
- { "AutoExtensionBox", CHECKBOX_AUTOEXTENSION, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX },
- { "CancelButton", PUSHBUTTON_CANCEL, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
- { "CurrentFolderText", FIXEDTEXT_CURRENTFOLDER, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
- { "DefaultLocationButton", TOOLBOXBUTOON_DEFAULT_LOCATION, PROPERTY_FLAGS_COMMON },
- { "FileURLEdit", EDIT_FILEURL, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
- { "FileURLEditLabel", EDIT_FILEURL_LABEL, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
- { "FileView", CONTROL_FILEVIEW, PROPERTY_FLAGS_COMMON },
- { "FilterList", LISTBOX_FILTER, PROPERTY_FLAGS_COMMON },
- { "FilterListLabel", LISTBOX_FILTER_LABEL, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
- { "FilterOptionsBox", CHECKBOX_FILTEROPTIONS, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX },
- { "HelpButton", PUSHBUTTON_HELP, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
- { "ImageTemplateList", LISTBOX_IMAGE_TEMPLATE, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_LISTBOX },
- { "ImageTemplateListLabel", LISTBOX_IMAGE_TEMPLATE_LABEL, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
- { "LevelUpButton", TOOLBOXBUTOON_LEVEL_UP, PROPERTY_FLAGS_COMMON },
- { "LinkBox", CHECKBOX_LINK, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX },
- { "NewFolderButton", TOOLBOXBUTOON_NEW_FOLDER, PROPERTY_FLAGS_COMMON },
- { "OkButton", PUSHBUTTON_OK , PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
- { "PasswordBox", CHECKBOX_PASSWORD, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX },
- { "PlayButton", PUSHBUTTON_PLAY, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
- { "PreviewBox", CHECKBOX_PREVIEW, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX },
- { "ReadOnlyBox", CHECKBOX_READONLY, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX },
- { "SelectionBox", CHECKBOX_SELECTION, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX },
- { "TemplateList", LISTBOX_TEMPLATE, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_LISTBOX },
- { "TemplateListLabel", LISTBOX_TEMPLATE_LABEL, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
- { "VersionList", LISTBOX_VERSION, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_LISTBOX },
- { "VersionListLabel", LISTBOX_VERSION_LABEL, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT }
+ { "AutoExtensionBox", CHECKBOX_AUTOEXTENSION, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX },
+ { "CancelButton", PUSHBUTTON_CANCEL, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
+ { "CurrentFolderText", FIXEDTEXT_CURRENTFOLDER, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
+ { "DefaultLocationButton", TOOLBOXBUTOON_DEFAULT_LOCATION, PROPERTY_FLAGS_COMMON },
+ { "FileURLEdit", EDIT_FILEURL, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
+ { "FileURLEditLabel", EDIT_FILEURL_LABEL, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
+ { "FileView", CONTROL_FILEVIEW, PROPERTY_FLAGS_COMMON },
+ { "FilterList", LISTBOX_FILTER, PROPERTY_FLAGS_COMMON },
+ { "FilterListLabel", LISTBOX_FILTER_LABEL, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
+ { "FilterOptionsBox", CHECKBOX_FILTEROPTIONS, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX },
+ { "HelpButton", PUSHBUTTON_HELP, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
+ { "ImageTemplateList", LISTBOX_IMAGE_TEMPLATE, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_LISTBOX },
+ { "ImageTemplateListLabel", LISTBOX_IMAGE_TEMPLATE_LABEL, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
+ { "LevelUpButton", TOOLBOXBUTOON_LEVEL_UP, PROPERTY_FLAGS_COMMON },
+ { "LinkBox", CHECKBOX_LINK, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX },
+ { "NewFolderButton", TOOLBOXBUTOON_NEW_FOLDER, PROPERTY_FLAGS_COMMON },
+ { "OkButton", PUSHBUTTON_OK , PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
+ { "PasswordBox", CHECKBOX_PASSWORD, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX },
+ { "PlayButton", PUSHBUTTON_PLAY, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
+ { "PreviewBox", CHECKBOX_PREVIEW, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX },
+ { "ReadOnlyBox", CHECKBOX_READONLY, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX },
+ { "SelectionBox", CHECKBOX_SELECTION, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_CHECKBOX },
+ { "TemplateList", LISTBOX_TEMPLATE, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_LISTBOX },
+ { "TemplateListLabel", LISTBOX_TEMPLATE_LABEL, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT },
+ { "VersionList", LISTBOX_VERSION, PROPERTY_FLAGS_COMMON | PROPERTY_FLAGS_LISTBOX },
+ { "VersionListLabel", LISTBOX_VERSION_LABEL, PROPERTY_FLAGS_COMMON | PROPERTY_FLAG_TEXT }
};
// ................................................................
@@ -149,21 +149,21 @@ namespace svt
struct ControlProperty
{
const sal_Char* pPropertyName;
- sal_Int16 nPropertyId;
+ sal_Int16 nPropertyId;
};
typedef const ControlProperty* ControlPropertyIterator;
// ................................................................
static const ControlProperty aProperties[] = {
- { "Text", PROPERTY_FLAG_TEXT },
- { "Enabled", PROPERTY_FLAG_ENDBALED },
- { "Visible", PROPERTY_FLAG_VISIBLE },
- { "HelpURL", PROPERTY_FLAG_HELPURL },
- { "ListItems", PROPERTY_FLAG_LISTITEMS },
- { "SelectedItem", PROPERTY_FLAG_SELECTEDITEM },
- { "SelectedItemIndex", PROPERTY_FLAG_SELECTEDITEMINDEX },
- { "Checked", PROPERTY_FLAG_CHECKED }
+ { "Text", PROPERTY_FLAG_TEXT },
+ { "Enabled", PROPERTY_FLAG_ENDBALED },
+ { "Visible", PROPERTY_FLAG_VISIBLE },
+ { "HelpURL", PROPERTY_FLAG_HELPURL },
+ { "ListItems", PROPERTY_FLAG_LISTITEMS },
+ { "SelectedItem", PROPERTY_FLAG_SELECTEDITEM },
+ { "SelectedItemIndex", PROPERTY_FLAG_SELECTEDITEMINDEX },
+ { "Checked", PROPERTY_FLAG_CHECKED }
};
// ................................................................
@@ -175,7 +175,7 @@ namespace svt
// ................................................................
struct ControlPropertyLookup
{
- ::rtl::OUString m_sLookup;
+ ::rtl::OUString m_sLookup;
ControlPropertyLookup( const ::rtl::OUString& _rLookup ) : m_sLookup( _rLookup ) { }
sal_Bool operator()( const ControlProperty& _rProp )
@@ -222,7 +222,7 @@ namespace svt
}
//---------------------------------------------------------------------
- ::rtl::OUString OControlAccess::getHelpURL( Window* _pControl, sal_Bool _bFileView )
+ ::rtl::OUString OControlAccess::getHelpURL( Window* _pControl, sal_Bool _bFileView )
{
sal_Int32 nHelpId = _pControl->GetHelpId();
if ( _bFileView )
@@ -236,7 +236,7 @@ namespace svt
}
// --------------------------------------------------------------------------
- Any OControlAccess::getControlProperty( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty )
+ Any OControlAccess::getControlProperty( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty )
{
// look up the control
sal_Int16 nControlId = -1;
@@ -634,16 +634,16 @@ namespace svt
static_cast< ListBox* >( _pControl )->Clear();
// add the new ones
- const ::rtl::OUString* pItems = aItems.getConstArray();
- const ::rtl::OUString* pItemsEnd = aItems.getConstArray() + aItems.getLength();
- for ( const ::rtl::OUString* pItem = pItems;
+ const ::rtl::OUString* pItems = aItems.getConstArray();
+ const ::rtl::OUString* pItemsEnd = aItems.getConstArray() + aItems.getLength();
+ for ( const ::rtl::OUString* pItem = pItems;
pItem != pItemsEnd;
++pItem
)
{
static_cast< ListBox* >( _pControl )->InsertEntry( *pItem );
}
-
+
}
else if ( !_bIgnoreIllegalArgument )
{
@@ -709,7 +709,7 @@ namespace svt
}
//-----------------------------------------------------------------------------
- Any OControlAccess::implGetControlProperty( Control* _pControl, sal_Int16 _nProperty ) const
+ Any OControlAccess::implGetControlProperty( Control* _pControl, sal_Int16 _nProperty ) const
{
DBG_ASSERT( _pControl, "OControlAccess::implGetControlProperty: invalid argument, this will crash!" );
@@ -786,7 +786,7 @@ namespace svt
}
//.........................................................................
-} // namespace svt
+} // namespace svt
//.........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/office/OfficeControlAccess.hxx b/fpicker/source/office/OfficeControlAccess.hxx
index 44bd416f60c1..5341d9529d35 100644
--- a/fpicker/source/office/OfficeControlAccess.hxx
+++ b/fpicker/source/office/OfficeControlAccess.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,35 +50,35 @@ namespace svt
}
// --------------------------------------------------------------------
- /** implements the XControlAccess, XControlInformation and XFilePickerControlAccess for the file picker
+ /** implements the XControlAccess, XControlInformation and XFilePickerControlAccess for the file picker
*/
class OControlAccess
{
- IFilePickerController* m_pFilePickerController;
- SvtFileView* m_pFileView;
+ IFilePickerController* m_pFilePickerController;
+ SvtFileView* m_pFileView;
public:
OControlAccess( IFilePickerController* _pController, SvtFileView* _pFileView );
// XControlAccess implementation
void setControlProperty( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty, const ::com::sun::star::uno::Any& _rValue );
- ::com::sun::star::uno::Any getControlProperty( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty );
+ ::com::sun::star::uno::Any getControlProperty( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty );
// XControlInformation implementation
- ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedControls( );
- ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedControlProperties( const ::rtl::OUString& _rControlName );
- sal_Bool isControlSupported( const ::rtl::OUString& _rControlName );
- sal_Bool isControlPropertySupported( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty );
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedControls( );
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedControlProperties( const ::rtl::OUString& _rControlName );
+ sal_Bool isControlSupported( const ::rtl::OUString& _rControlName );
+ sal_Bool isControlPropertySupported( const ::rtl::OUString& _rControlName, const ::rtl::OUString& _rControlProperty );
// XFilePickerControlAccess
- void setValue( sal_Int16 _nId, sal_Int16 _nCtrlAction, const ::com::sun::star::uno::Any& _rValue );
+ void setValue( sal_Int16 _nId, sal_Int16 _nCtrlAction, const ::com::sun::star::uno::Any& _rValue );
::com::sun::star::uno::Any getValue( sal_Int16 _nId, sal_Int16 _nCtrlAction ) const;
- void setLabel( sal_Int16 _nId, const ::rtl::OUString& _rValue );
+ void setLabel( sal_Int16 _nId, const ::rtl::OUString& _rValue );
::rtl::OUString getLabel( sal_Int16 _nId ) const;
void enableControl( sal_Int16 _nId, sal_Bool _bEnable );
- static void setHelpURL( Window* _pControl, const ::rtl::OUString& _rURL, sal_Bool _bFileView );
- static ::rtl::OUString getHelpURL( Window* _pControl, sal_Bool _bFileView );
+ static void setHelpURL( Window* _pControl, const ::rtl::OUString& _rURL, sal_Bool _bFileView );
+ static ::rtl::OUString getHelpURL( Window* _pControl, sal_Bool _bFileView );
private:
/** implements the various methods for setting properties on controls
@@ -95,7 +95,7 @@ namespace svt
@param _bIgnoreIllegalArgument
if <FALSE/>, an exception will be thrown if the given value is of improper type
*/
- void implSetControlProperty(
+ void implSetControlProperty(
sal_Int16 _nControlId,
Control* _pControl, sal_Int16 _nProperty, const ::com::sun::star::uno::Any& _rValue,
sal_Bool _bIgnoreIllegalArgument = sal_True );
@@ -112,14 +112,14 @@ namespace svt
See PROPERTY_FLAG_*
@return
*/
- ::com::sun::star::uno::Any implGetControlProperty( Control* _pControl, sal_Int16 _nProperty ) const;
+ ::com::sun::star::uno::Any implGetControlProperty( Control* _pControl, sal_Int16 _nProperty ) const;
void implDoListboxAction( ListBox* _pListbox, sal_Int16 _nCtrlAction, const ::com::sun::star::uno::Any& _rValue );
};
//.........................................................................
-} // namespace svt
+} // namespace svt
//.........................................................................
#endif // SVTOOLS_CONTROLACCESS_HXX
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index a5ea04e122bf..c75245b8456e 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -83,10 +83,10 @@ using namespace ::utl;
struct FilterEntry
{
protected:
- ::rtl::OUString m_sTitle;
- ::rtl::OUString m_sFilter;
+ ::rtl::OUString m_sTitle;
+ ::rtl::OUString m_sFilter;
- UnoFilterList m_aSubFilters;
+ UnoFilterList m_aSubFilters;
public:
FilterEntry( const ::rtl::OUString& _rTitle, const ::rtl::OUString& _rFilter )
@@ -97,21 +97,21 @@ public:
FilterEntry( const ::rtl::OUString& _rTitle, const UnoFilterList& _rSubFilters );
- ::rtl::OUString getTitle() const { return m_sTitle; }
- ::rtl::OUString getFilter() const { return m_sFilter; }
+ ::rtl::OUString getTitle() const { return m_sTitle; }
+ ::rtl::OUString getFilter() const { return m_sFilter; }
/// determines if the filter has sub filter (i.e., the filter is a filter group in real)
- sal_Bool hasSubFilters( ) const;
+ sal_Bool hasSubFilters( ) const;
/** retrieves the filters belonging to the entry
@return
the number of sub filters
*/
- sal_Int32 getSubFilters( UnoFilterList& _rSubFilterList );
+ sal_Int32 getSubFilters( UnoFilterList& _rSubFilterList );
// helpers for iterating the sub filters
- const UnoFilterEntry* beginSubFilters() const { return m_aSubFilters.getConstArray(); }
- const UnoFilterEntry* endSubFilters() const { return m_aSubFilters.getConstArray() + m_aSubFilters.getLength(); }
+ const UnoFilterEntry* beginSubFilters() const { return m_aSubFilters.getConstArray(); }
+ const UnoFilterEntry* endSubFilters() const { return m_aSubFilters.getConstArray() + m_aSubFilters.getLength(); }
};
//=====================================================================
@@ -140,10 +140,10 @@ sal_Int32 FilterEntry::getSubFilters( UnoFilterList& _rSubFilterList )
struct ElementEntry_Impl
{
- sal_Int16 m_nElementID;
- sal_Int16 m_nControlAction;
- Any m_aValue;
- rtl::OUString m_aLabel;
+ sal_Int16 m_nElementID;
+ sal_Int16 m_nControlAction;
+ Any m_aValue;
+ rtl::OUString m_aLabel;
sal_Bool m_bEnabled : 1;
sal_Bool m_bHasValue : 1;
@@ -451,10 +451,10 @@ void SvtFilePicker::ensureFilterList( const ::rtl::OUString& _rInitialCurrentFil
//------------------------------------------------------------------------------------
SvtFilePicker::SvtFilePicker( const Reference < XMultiServiceFactory >& xFactory )
:OCommonPicker( xFactory )
- ,m_pFilterList ( NULL )
- ,m_pElemList ( NULL )
- ,m_bMultiSelection ( sal_False )
- ,m_nServiceType ( TemplateDescription::FILEOPEN_SIMPLE )
+ ,m_pFilterList ( NULL )
+ ,m_pElemList ( NULL )
+ ,m_bMultiSelection ( sal_False )
+ ,m_nServiceType ( TemplateDescription::FILEOPEN_SIMPLE )
{
}
@@ -490,8 +490,8 @@ sal_Int16 SvtFilePicker::implExecutePicker( )
//------------------------------------------------------------------------------------
SvtFileDialog* SvtFilePicker::implCreateDialog( Window* _pParent )
{
- WinBits nExtraBits;
- WinBits nBits = getWinBits( nExtraBits );
+ WinBits nExtraBits;
+ WinBits nBits = getWinBits( nExtraBits );
SvtFileDialog* dialog = new SvtFileDialog( _pParent, nBits, nExtraBits );
@@ -970,7 +970,7 @@ sal_Bool SAL_CALL SvtFilePicker::getShowState() throw ( RuntimeException )
// XFilterGroupManager functions
//------------------------------------------------------------------------------------
-void SAL_CALL SvtFilePicker::appendFilterGroup( const ::rtl::OUString& sGroupTitle,
+void SAL_CALL SvtFilePicker::appendFilterGroup( const ::rtl::OUString& sGroupTitle,
const Sequence< StringPair >& aFilters )
throw ( IllegalArgumentException, RuntimeException )
{
diff --git a/fpicker/source/office/OfficeFilePicker.hxx b/fpicker/source/office/OfficeFilePicker.hxx
index 360e497090b0..ebea3196ed5e 100644
--- a/fpicker/source/office/OfficeFilePicker.hxx
+++ b/fpicker/source/office/OfficeFilePicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,43 +52,43 @@ class Dialog;
struct FilterEntry;
struct ElementEntry_Impl;
-typedef ::std::list< FilterEntry > FilterList; // can be maintained more effectively
-typedef ::std::list < ElementEntry_Impl > ElementList;
+typedef ::std::list< FilterEntry > FilterList; // can be maintained more effectively
+typedef ::std::list < ElementEntry_Impl > ElementList;
-typedef ::com::sun::star::beans::StringPair UnoFilterEntry;
-typedef ::com::sun::star::uno::Sequence< UnoFilterEntry > UnoFilterList; // can be transported more effectively
-typedef ::com::sun::star::uno::Sequence< ::rtl::OUString > OUStringList; // can be transported more effectively
+typedef ::com::sun::star::beans::StringPair UnoFilterEntry;
+typedef ::com::sun::star::uno::Sequence< UnoFilterEntry > UnoFilterList; // can be transported more effectively
+typedef ::com::sun::star::uno::Sequence< ::rtl::OUString > OUStringList; // can be transported more effectively
// class SvtFilePicker ---------------------------------------------------
-typedef ::cppu::ImplHelper7 < ::com::sun::star::ui::dialogs::XFilePickerControlAccess
- , ::com::sun::star::ui::dialogs::XFilePickerNotifier
- , ::com::sun::star::ui::dialogs::XFilePreview
- , ::com::sun::star::ui::dialogs::XFilterManager
- , ::com::sun::star::ui::dialogs::XFilterGroupManager
- , ::com::sun::star::lang::XServiceInfo
+typedef ::cppu::ImplHelper7 < ::com::sun::star::ui::dialogs::XFilePickerControlAccess
+ , ::com::sun::star::ui::dialogs::XFilePickerNotifier
+ , ::com::sun::star::ui::dialogs::XFilePreview
+ , ::com::sun::star::ui::dialogs::XFilterManager
+ , ::com::sun::star::ui::dialogs::XFilterGroupManager
+ , ::com::sun::star::lang::XServiceInfo
, ::com::sun::star::ui::dialogs::XAsynchronousExecutableDialog
- > SvtFilePicker_Base;
+ > SvtFilePicker_Base;
-class SvtFilePicker :public SvtFilePicker_Base
+class SvtFilePicker :public SvtFilePicker_Base
,public ::svt::OCommonPicker
,public ::svt::IFilePickerListener
{
private:
- FilterList* m_pFilterList;
- ElementList* m_pElemList;
+ FilterList* m_pFilterList;
+ ElementList* m_pElemList;
- sal_Bool m_bMultiSelection;
+ sal_Bool m_bMultiSelection;
sal_Int16 m_nServiceType;
- ::rtl::OUString m_aDefaultName;
- ::rtl::OUString m_aCurrentFilter;
+ ::rtl::OUString m_aDefaultName;
+ ::rtl::OUString m_aCurrentFilter;
// #97148# --------------
- ::rtl::OUString m_aOldDisplayDirectory;
- ::rtl::OUString m_aOldHideDirectory;
+ ::rtl::OUString m_aOldDisplayDirectory;
+ ::rtl::OUString m_aOldHideDirectory;
- ::rtl::OUString m_aStandardDir;
- OUStringList m_aBlackList;
+ ::rtl::OUString m_aStandardDir;
+ OUStringList m_aBlackList;
::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >
m_xListener;
@@ -125,21 +125,21 @@ public:
// XFilePicker functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL setMultiSelectionMode( sal_Bool bMode ) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setDefaultName( const ::rtl::OUString& aName ) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& aDirectory ) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getDisplayDirectory() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setMultiSelectionMode( sal_Bool bMode ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setDefaultName( const ::rtl::OUString& aName ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& aDirectory ) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getDisplayDirectory() throw( ::com::sun::star::uno::RuntimeException );
virtual com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getFiles() throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XFilePickerControlAccess functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL setValue( sal_Int16 ElementID, sal_Int16 ControlAction, const com::sun::star::uno::Any& value ) throw( ::com::sun::star::uno::RuntimeException );
- virtual com::sun::star::uno::Any SAL_CALL getValue( sal_Int16 ElementID, sal_Int16 ControlAction ) throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setLabel( sal_Int16 ElementID, const ::rtl::OUString& aValue ) throw ( ::com::sun::star::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getLabel( sal_Int16 ElementID ) throw ( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL enableControl( sal_Int16 ElementID, sal_Bool bEnable ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setValue( sal_Int16 ElementID, sal_Int16 ControlAction, const com::sun::star::uno::Any& value ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual com::sun::star::uno::Any SAL_CALL getValue( sal_Int16 ElementID, sal_Int16 ControlAction ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setLabel( sal_Int16 ElementID, const ::rtl::OUString& aValue ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getLabel( sal_Int16 ElementID ) throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL enableControl( sal_Int16 ElementID, sal_Bool bEnable ) throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XFilePickerNotifier functions
@@ -164,35 +164,35 @@ public:
// XFilterManager functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL appendFilter( const ::rtl::OUString& aTitle, const ::rtl::OUString& aFilter ) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setCurrentFilter( const ::rtl::OUString& aTitle ) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getCurrentFilter() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL appendFilter( const ::rtl::OUString& aTitle, const ::rtl::OUString& aFilter ) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setCurrentFilter( const ::rtl::OUString& aTitle ) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getCurrentFilter() throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XFilterGroupManager functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL appendFilterGroup( const ::rtl::OUString& sGroupTitle, const com::sun::star::uno::Sequence< com::sun::star::beans::StringPair >& aFilters ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL appendFilterGroup( const ::rtl::OUString& sGroupTitle, const com::sun::star::uno::Sequence< com::sun::star::beans::StringPair >& aFilters ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
//------------------------------------------------------------------------------------
// XInitialization functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL initialize( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments ) throw ( com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL initialize( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments ) throw ( com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XServiceInfo functions
//------------------------------------------------------------------------------------
/* XServiceInfo */
- virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException );
virtual com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
/* Helper for XServiceInfo */
static com::sun::star::uno::Sequence< ::rtl::OUString >
impl_getStaticSupportedServiceNames();
- static ::rtl::OUString impl_getStaticImplementationName();
+ static ::rtl::OUString impl_getStaticImplementationName();
/* Helper for registry */
static ::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL impl_createInstance (
@@ -203,22 +203,22 @@ protected:
//------------------------------------------------------------------------------------
// OCommonPicker overridables
//------------------------------------------------------------------------------------
- virtual SvtFileDialog* implCreateDialog( Window* _pParent );
- virtual sal_Int16 implExecutePicker( );
- virtual sal_Bool implHandleInitializationArgument(
+ virtual SvtFileDialog* implCreateDialog( Window* _pParent );
+ virtual sal_Int16 implExecutePicker( );
+ virtual sal_Bool implHandleInitializationArgument(
const ::rtl::OUString& _rName,
const ::com::sun::star::uno::Any& _rValue
)
SAL_THROW( ( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException ) );
private:
- WinBits getWinBits( WinBits& rExtraBits );
- virtual void notify( sal_Int16 _nEventId, sal_Int16 _nControlId );
+ WinBits getWinBits( WinBits& rExtraBits );
+ virtual void notify( sal_Int16 _nEventId, sal_Int16 _nControlId );
sal_Bool FilterNameExists( const ::rtl::OUString& rTitle );
- sal_Bool FilterNameExists( const UnoFilterList& _rGroupedFilters );
+ sal_Bool FilterNameExists( const UnoFilterList& _rGroupedFilters );
- void ensureFilterList( const ::rtl::OUString& _rInitialCurrentFilter );
+ void ensureFilterList( const ::rtl::OUString& _rInitialCurrentFilter );
void prepareExecute( );
diff --git a/fpicker/source/office/OfficeFilePicker.src b/fpicker/source/office/OfficeFilePicker.src
index 8fbbc35a40e5..a527e5165fa0 100644
--- a/fpicker/source/office/OfficeFilePicker.src
+++ b/fpicker/source/office/OfficeFilePicker.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/office/OfficeFolderPicker.cxx b/fpicker/source/office/OfficeFolderPicker.cxx
index 0077ce45bab4..f6133f5e99c3 100644
--- a/fpicker/source/office/OfficeFolderPicker.cxx
+++ b/fpicker/source/office/OfficeFolderPicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/office/OfficeFolderPicker.hxx b/fpicker/source/office/OfficeFolderPicker.hxx
index 273f971edb5a..c60c9987226f 100644
--- a/fpicker/source/office/OfficeFolderPicker.hxx
+++ b/fpicker/source/office/OfficeFolderPicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,16 +41,16 @@ class Dialog;
// class SvtFolderPicker ---------------------------------------------------
-typedef ::cppu::ImplHelper3 < ::com::sun::star::ui::dialogs::XFolderPicker
+typedef ::cppu::ImplHelper3 < ::com::sun::star::ui::dialogs::XFolderPicker
, ::com::sun::star::ui::dialogs::XAsynchronousExecutableDialog
- , ::com::sun::star::lang::XServiceInfo
- > SvtFolderPicker_Base;
+ , ::com::sun::star::lang::XServiceInfo
+ > SvtFolderPicker_Base;
-class SvtFolderPicker :public SvtFolderPicker_Base
+class SvtFolderPicker :public SvtFolderPicker_Base
,public ::svt::OCommonPicker
{
private:
- ::rtl::OUString m_aDescription;
+ ::rtl::OUString m_aDescription;
::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XDialogClosedListener >
m_xListener;
@@ -76,9 +76,9 @@ public:
// XFolderPicker functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& aDirectory ) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getDisplayDirectory() throw( ::com::sun::star::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getDirectory() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& aDirectory ) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getDisplayDirectory() throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getDirectory() throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL setDescription( const ::rtl::OUString& aDescription ) throw ( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
@@ -98,8 +98,8 @@ public:
//------------------------------------------------------------------------------------
/* XServiceInfo */
- virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException );
virtual com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
@@ -116,8 +116,8 @@ protected:
//------------------------------------------------------------------------------------
// OCommonPicker overridables
//------------------------------------------------------------------------------------
- virtual SvtFileDialog* implCreateDialog( Window* _pParent );
- virtual sal_Int16 implExecutePicker( );
+ virtual SvtFileDialog* implCreateDialog( Window* _pParent );
+ virtual sal_Int16 implExecutePicker( );
};
#endif // INCLUDED_SVT_FOLDERPICKER_HXX
diff --git a/fpicker/source/office/asyncfilepicker.cxx b/fpicker/source/office/asyncfilepicker.cxx
index 330eaebe26b2..26888c76e395 100644
--- a/fpicker/source/office/asyncfilepicker.cxx
+++ b/fpicker/source/office/asyncfilepicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,7 +69,7 @@ namespace svt
{
return osl_incrementInterlockedCount( &m_refCount );
}
-
+
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL AsyncPickerAction::release()
{
@@ -93,11 +93,11 @@ namespace svt
}
//--------------------------------------------------------------------
- void AsyncPickerAction::execute(
- const String& _rURL,
- const String& _rFilter,
- sal_Int32 _nMinTimeout,
- sal_Int32 _nMaxTimeout,
+ void AsyncPickerAction::execute(
+ const String& _rURL,
+ const String& _rFilter,
+ sal_Int32 _nMinTimeout,
+ sal_Int32 _nMaxTimeout,
const OUStringList& rBlackList )
{
DBG_TESTSOLARMUTEX();
diff --git a/fpicker/source/office/asyncfilepicker.hxx b/fpicker/source/office/asyncfilepicker.hxx
index 4ec9be11ec31..81a403ac2727 100644
--- a/fpicker/source/office/asyncfilepicker.hxx
+++ b/fpicker/source/office/asyncfilepicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,13 +41,13 @@
class SvtFileView;
class SvtFileDialog;
-typedef ::com::sun::star::uno::Sequence< ::rtl::OUString > OUStringList;
+typedef ::com::sun::star::uno::Sequence< ::rtl::OUString > OUStringList;
//........................................................................
namespace svt
{
//........................................................................
-
+
//====================================================================
//= AsyncPickerAction
@@ -86,10 +86,10 @@ namespace svt
If smaller than or equal to <arg>_nMinTimeout</arg>, it will be corrected to
<arg>_nMinTimeout</arg> + 30000.
*/
- void execute(
- const String& _rURL,
- const String& _rFilter,
- sal_Int32 _nMinTimeout,
+ void execute(
+ const String& _rURL,
+ const String& _rFilter,
+ sal_Int32 _nMinTimeout,
sal_Int32 _nMaxTimeout,
const OUStringList& rBlackList = OUStringList() );
diff --git a/fpicker/source/office/commonpicker.cxx b/fpicker/source/office/commonpicker.cxx
index ea5d284d6084..73a915203e3c 100644
--- a/fpicker/source/office/commonpicker.cxx
+++ b/fpicker/source/office/commonpicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -45,8 +45,8 @@ namespace svt
{
//.........................................................................
-#define PROPERTY_ID_HELPURL 1
-#define PROPERTY_ID_WINDOW 2
+#define PROPERTY_ID_HELPURL 1
+#define PROPERTY_ID_WINDOW 2
// using --------------------------------------------------------------
@@ -160,7 +160,7 @@ namespace svt
{
stopWindowListening();
- if ( !bDialogDying ) // it's the parent which is dying -> delete the dialog
+ if ( !bDialogDying ) // it's the parent which is dying -> delete the dialog
delete m_pDlg;
m_pDlg = NULL;
@@ -221,7 +221,7 @@ namespace svt
{
// synchronize the help id of the dialog with out help URL property
if ( m_sHelpURL.getLength() )
- { // somebody already set the help URL while we had no dialog yet
+ { // somebody already set the help URL while we had no dialog yet
OControlAccess::setHelpURL( m_pDlg, m_sHelpURL, sal_False );
}
else
@@ -432,15 +432,15 @@ namespace svt
checkAlive();
::rtl::OUString sSettingName;
- Any aSettingValue;
+ Any aSettingValue;
- PropertyValue aPropArg;
- NamedValue aPairArg;
+ PropertyValue aPropArg;
+ NamedValue aPairArg;
- const Any* pArguments = _rArguments.getConstArray();
- const Any* pArgumentsEnd = _rArguments.getConstArray() + _rArguments.getLength();
- for ( const Any* pArgument = pArguments;
+ const Any* pArguments = _rArguments.getConstArray();
+ const Any* pArgumentsEnd = _rArguments.getConstArray() + _rArguments.getLength();
+ for ( const Any* pArgument = pArguments;
pArgument != pArgumentsEnd;
++pArgument
)
@@ -461,13 +461,13 @@ namespace svt
sSettingName = aPairArg.Name;
aSettingValue = aPairArg.Value;
-
+
}
else
{
DBG_ERROR(
- ( ::rtl::OString( "OCommonPicker::initialize: unknown argument type at position " )
- += ::rtl::OString::valueOf( (sal_Int32)( pArguments - _rArguments.getConstArray() ) )
+ ( ::rtl::OString( "OCommonPicker::initialize: unknown argument type at position " )
+ += ::rtl::OString::valueOf( (sal_Int32)( pArguments - _rArguments.getConstArray() ) )
).getStr()
);
continue;
@@ -478,9 +478,9 @@ namespace svt
#endif
implHandleInitializationArgument( sSettingName, aSettingValue );
DBG_ASSERT( bKnownSetting,
- ( ::rtl::OString( "OCommonPicker::initialize: unknown argument \"" )
- += ::rtl::OString( sSettingName.getStr(), sSettingName.getLength(), osl_getThreadTextEncoding() )
- += ::rtl::OString( "\"!" )
+ ( ::rtl::OString( "OCommonPicker::initialize: unknown argument \"" )
+ += ::rtl::OString( sSettingName.getStr(), sSettingName.getLength(), osl_getThreadTextEncoding() )
+ += ::rtl::OString( "\"!" )
).getStr()
);
}
@@ -502,7 +502,7 @@ namespace svt
}
//.........................................................................
-} // namespace svt
+} // namespace svt
//.........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/office/commonpicker.hxx b/fpicker/source/office/commonpicker.hxx
index 6422019affa5..062496460ba4 100644
--- a/fpicker/source/office/commonpicker.hxx
+++ b/fpicker/source/office/commonpicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,12 +56,12 @@ namespace svt
{
//.........................................................................
- typedef ::cppu::WeakComponentImplHelper5 < ::com::sun::star::ui::dialogs::XControlAccess
- , ::com::sun::star::ui::dialogs::XControlInformation
- , ::com::sun::star::lang::XEventListener
- , ::com::sun::star::util::XCancellable
- , ::com::sun::star::lang::XInitialization
- > OCommonPicker_Base;
+ typedef ::cppu::WeakComponentImplHelper5 < ::com::sun::star::ui::dialogs::XControlAccess
+ , ::com::sun::star::ui::dialogs::XControlInformation
+ , ::com::sun::star::lang::XEventListener
+ , ::com::sun::star::util::XCancellable
+ , ::com::sun::star::lang::XInitialization
+ > OCommonPicker_Base;
/** implements common functionality for the 2 UNO picker components
*/
class OCommonPicker
@@ -71,31 +71,31 @@ namespace svt
,public ::comphelper::OPropertyArrayUsageHelper< OCommonPicker >
{
private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
// <properties>
- ::rtl::OUString m_sHelpURL;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xWindow;
+ ::rtl::OUString m_sHelpURL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xWindow;
// </properties>
- SvtFileDialog* m_pDlg;
- sal_uInt32 m_nCancelEvent;
- sal_Bool m_bExecuting;
+ SvtFileDialog* m_pDlg;
+ sal_uInt32 m_nCancelEvent;
+ sal_Bool m_bExecuting;
- ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xDialogParent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xDialogParent;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xWindowListenerAdapter;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xParentListenerAdapter;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xWindowListenerAdapter;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xParentListenerAdapter;
protected:
- ::rtl::OUString m_aTitle;
- ::rtl::OUString m_aDisplayDirectory;
+ ::rtl::OUString m_aTitle;
+ ::rtl::OUString m_aDisplayDirectory;
protected:
- inline SvtFileDialog* getDialog() { return m_pDlg; }
+ inline SvtFileDialog* getDialog() { return m_pDlg; }
- inline const ::cppu::OBroadcastHelper& GetBroadcastHelper() const { return OCommonPicker_Base::rBHelper; }
- inline ::cppu::OBroadcastHelper& GetBroadcastHelper() { return OCommonPicker_Base::rBHelper; }
+ inline const ::cppu::OBroadcastHelper& GetBroadcastHelper() const { return OCommonPicker_Base::rBHelper; }
+ inline ::cppu::OBroadcastHelper& GetBroadcastHelper() { return OCommonPicker_Base::rBHelper; }
public:
OCommonPicker( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory );
@@ -106,8 +106,8 @@ namespace svt
// overridables
// will be called with locked SolarMutex
- virtual SvtFileDialog* implCreateDialog( Window* _pParent ) = 0;
- virtual sal_Int16 implExecutePicker( ) = 0;
+ virtual SvtFileDialog* implCreateDialog( Window* _pParent ) = 0;
+ virtual sal_Int16 implExecutePicker( ) = 0;
// do NOT override XExecutableDialog::execute! We need to do some stuff there ourself ...
protected:
@@ -149,8 +149,8 @@ namespace svt
//------------------------------------------------------------------------------------
// XExecutableDialog functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL setTitle( const ::rtl::OUString& _rTitle ) throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Int16 SAL_CALL execute() throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setTitle( const ::rtl::OUString& _rTitle ) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Int16 SAL_CALL execute() throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XControlAccess functions
@@ -185,25 +185,25 @@ namespace svt
void prepareDialog();
protected:
- sal_Bool createPicker();
+ sal_Bool createPicker();
/** handle a single argument from the XInitialization::initialize method
@return <TRUE/> if the argument could be handled
*/
- virtual sal_Bool implHandleInitializationArgument(
+ virtual sal_Bool implHandleInitializationArgument(
const ::rtl::OUString& _rName,
const ::com::sun::star::uno::Any& _rValue
)
SAL_THROW( ( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException ) );
private:
- void stopWindowListening();
+ void stopWindowListening();
DECL_LINK( OnCancelPicker, void* );
};
//.........................................................................
-} // namespace svt
+} // namespace svt
//.........................................................................
#endif // SVTOOLS_COMMONPICKER_HXX
diff --git a/fpicker/source/office/fpinteraction.cxx b/fpicker/source/office/fpinteraction.cxx
index 4f5d906737af..3975524c2510 100644
--- a/fpicker/source/office/fpinteraction.cxx
+++ b/fpicker/source/office/fpinteraction.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -165,7 +165,7 @@ namespace svt
}
//........................................................................
-} // namespace svt
+} // namespace svt
//........................................................................
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/office/fpinteraction.hxx b/fpicker/source/office/fpinteraction.hxx
index 88a2590384cf..d078210c551d 100644
--- a/fpicker/source/office/fpinteraction.hxx
+++ b/fpicker/source/office/fpinteraction.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,8 +40,8 @@ namespace svt
//====================================================================
//= OFilePickerInteractionHandler
//====================================================================
- typedef ::cppu::WeakImplHelper1 < ::com::sun::star::task::XInteractionHandler
- > OFilePickerInteractionHandler_Base;
+ typedef ::cppu::WeakImplHelper1 < ::com::sun::star::task::XInteractionHandler
+ > OFilePickerInteractionHandler_Base;
/** a InteractionHandler implementation which extends another handler with some customizability
*/
@@ -86,7 +86,7 @@ namespace svt
};
//........................................................................
-} // namespace svt
+} // namespace svt
//........................................................................
#endif // SVTOOLS_FILEPICKER_INTERACTION_HXX
diff --git a/fpicker/source/office/fps_office.cxx b/fpicker/source/office/fps_office.cxx
index 77160e4a8253..fb4bf48fb272 100644
--- a/fpicker/source/office/fps_office.cxx
+++ b/fpicker/source/office/fps_office.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx
index 2c37710d1061..630cadec4832 100644
--- a/fpicker/source/office/fpsmartcontent.cxx
+++ b/fpicker/source/office/fpsmartcontent.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/office/fpsmartcontent.hxx b/fpicker/source/office/fpsmartcontent.hxx
index e16c288678b1..fc83eec98bc1 100644
--- a/fpicker/source/office/fpsmartcontent.hxx
+++ b/fpicker/source/office/fpsmartcontent.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -101,12 +101,12 @@ namespace svt
*/
::svt::OFilePickerInteractionHandler* getOwnInteractionHandler() const;
- /** describes different types of interaction handlers
+ /** describes different types of interaction handlers
*/
enum InteractionHandlerType
{
IHT_NONE,
- IHT_OWN,
+ IHT_OWN,
IHT_DEFAULT
};
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index ef54e5662ea7..149a963b2e41 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -117,17 +117,17 @@ using namespace ExtendedFilePickerElementIds;
using namespace CommonFilePickerElementIds;
using namespace InternalFilePickerElementIds;
-#define IODLG_CONFIGNAME String(RTL_CONSTASCII_USTRINGPARAM("FileDialog"))
-#define IMPGRF_CONFIGNAME String(RTL_CONSTASCII_USTRINGPARAM("ImportGraphicDialog"))
+#define IODLG_CONFIGNAME String(RTL_CONSTASCII_USTRINGPARAM("FileDialog"))
+#define IMPGRF_CONFIGNAME String(RTL_CONSTASCII_USTRINGPARAM("ImportGraphicDialog"))
#define GET_DECODED_NAME(aObj) \
aObj.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET )
// Zeit die beim Traveln in der Filterbox gewartet wird,
// bis in der Browsebox gefiltert wird ( in ms ).
-#define TRAVELFILTER_TIMEOUT 750
+#define TRAVELFILTER_TIMEOUT 750
-#define WIDTH_ADDITION 15
+#define WIDTH_ADDITION 15
// functions -------------------------------------------------------------
@@ -160,8 +160,8 @@ namespace
#ifdef DBG_UTIL
String sSelectedDisplayName;
- DBG_ASSERT( ( _pImpl->GetSelectedFilterEntry( sSelectedDisplayName ) == _pImpl->GetCurFilter() )
- && ( sSelectedDisplayName == _pImpl->GetCurFilterDisplayName() ),
+ DBG_ASSERT( ( _pImpl->GetSelectedFilterEntry( sSelectedDisplayName ) == _pImpl->GetCurFilter() )
+ && ( sSelectedDisplayName == _pImpl->GetCurFilterDisplayName() ),
"restoreCurrentFilter: inconsistence!" );
#endif
return _pImpl->m_bNeedDelayedFilterExecute;
@@ -400,9 +400,9 @@ namespace
struct ControlChain_Impl
{
- Window* _pControl;
+ Window* _pControl;
ControlChain_Impl* _pNext;
- BOOL _bHasOwnerShip;
+ BOOL _bHasOwnerShip;
ControlChain_Impl( Window* pControl, ControlChain_Impl* pNext );
~ControlChain_Impl();
@@ -899,8 +899,8 @@ sal_Bool SvtFileDialog::createNewUserFilter( const String& _rNewFilter, sal_Bool
if ( STRING_NOTFOUND != nSepPos )
{
String sUserExt = sUserFilter.Copy( nSepPos + 1 );
- if ( ( STRING_NOTFOUND == sUserExt.Search( '*' ) )
- && ( STRING_NOTFOUND == sUserExt.Search( '?' ) )
+ if ( ( STRING_NOTFOUND == sUserExt.Search( '*' ) )
+ && ( STRING_NOTFOUND == sUserExt.Search( '?' ) )
)
bUseCurFilterExt = sal_False;
}
@@ -918,10 +918,10 @@ sal_Bool SvtFileDialog::createNewUserFilter( const String& _rNewFilter, sal_Bool
}
//-----------------------------------------------------------------------------
-#define FLT_NONEMPTY 0x0001
-#define FLT_CHANGED 0x0002
-#define FLT_USERFILTER 0x0004
-#define FLT_ALLFILESFILTER 0x0008
+#define FLT_NONEMPTY 0x0001
+#define FLT_CHANGED 0x0002
+#define FLT_USERFILTER 0x0004
+#define FLT_ALLFILESFILTER 0x0008
//-----------------------------------------------------------------------------
sal_uInt16 SvtFileDialog::adjustFilter( const String& _rFilter )
@@ -963,7 +963,7 @@ sal_uInt16 SvtFileDialog::adjustFilter( const String& _rFilter )
#else
if ( createNewUserFilter( _rFilter, sal_False ) )
#endif
- { // it's the "all files" filter
+ { // it's the "all files" filter
nReturn |= FLT_ALLFILESFILTER;
#ifdef AUTOSELECT_USERFILTER
@@ -975,7 +975,7 @@ sal_uInt16 SvtFileDialog::adjustFilter( const String& _rFilter )
_pImp->SetCurFilter( _pImp->GetSelectedFilterEntry( sAllFilesFilter ) );
}
else
- _pImp->SetNoFilterListSelection( ); // there is no "all files" entry
+ _pImp->SetNoFilterListSelection( ); // there is no "all files" entry
#endif // AUTOSELECT_USERFILTER
}
#ifdef AUTOSELECT_USERFILTER
@@ -1023,7 +1023,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
{
// if an entry is selected in the view ....
if ( pThis->_pFileView->GetSelectionCount() )
- { // -> use this one. This will allow us to step down this folder
+ { // -> use this one. This will allow us to step down this folder
// #i8928# - 2002-12-20 - fs@openoffice.org
aFileName = pThis->_pFileView->GetCurrentURL();
}
@@ -1033,7 +1033,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
{
if ( pThis->_pImp->_eMode == FILEDLG_MODE_OPEN && pThis->_pImp->_pEdFileName->IsTravelSelect() )
// OpenHdl called from URLBox; travelling through the list of URLs should not cause an opening
- return 0; // MBA->PB: seems to be called never ?!
+ return 0; // MBA->PB: seems to be called never ?!
// get the URL from from the edit field ( if not empty )
if ( pThis->_pImp->_pEdFileName->GetText().Len() )
@@ -1082,7 +1082,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
// if the dialog was opened to select a folder, the last selected folder should be selected
if( pThis->_pImp->_eDlgType == FILEDLG_TYPE_PATHDLG )
{
- aFileName = pThis->_pImp->_pFtCurrentPath->GetText();
+ aFileName = pThis->_pImp->_pFtCurrentPath->GetText();
nLen = aFileName.Len();
}
else
@@ -1169,10 +1169,10 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
}
if ( !bIsFolder // no existent folder
- && pThis->_pImp->_pCbAutoExtension // auto extension is enabled in general
- && pThis->_pImp->_pCbAutoExtension->IsChecked() // auto extension is really to be used
- && pThis->GetDefaultExt().Len() // there is a default extension
- && pThis->GetDefaultExt() != '*' // the default extension is not "all"
+ && pThis->_pImp->_pCbAutoExtension // auto extension is enabled in general
+ && pThis->_pImp->_pCbAutoExtension->IsChecked() // auto extension is really to be used
+ && pThis->GetDefaultExt().Len() // there is a default extension
+ && pThis->GetDefaultExt() != '*' // the default extension is not "all"
&& !( FILEDLG_MODE_SAVE == pThis->_pImp->_eMode // we're saving a file
&& pThis->_pFileView->GetSelectionCount() // there is a selected file in the file view -> it will later on
) // (in SvtFileDialog::GetPathList) be taken as file to save to
@@ -1290,7 +1290,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
String sInvalidFile( aFileObj.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
if ( INET_PROT_FILE == aFileObj.GetProtocol() )
- { // if it's a file URL, transform the URL into system notation
+ { // if it's a file URL, transform the URL into system notation
::rtl::OUString sURL( sInvalidFile );
::rtl::OUString sSystem;
osl_getSystemPathFromFileURL( sURL.pData, &sSystem.pData );
@@ -1350,7 +1350,7 @@ IMPL_STATIC_LINK( SvtFileDialog, FilterSelectHdl_Impl, ListBox*, pBox )
String sSelectedFilterDisplayName;
SvtFileDialogFilter_Impl* pSelectedFilter = pThis->_pImp->GetSelectedFilterEntry( sSelectedFilterDisplayName );
if ( !pSelectedFilter )
- { // there is no current selection. This happens if for instance the user selects a group separator using
+ { // there is no current selection. This happens if for instance the user selects a group separator using
// the keyboard, and then presses enter: When the selection happens, we immediately deselect the entry,
// so in this situation there is no current selection.
if ( restoreCurrentFilter( pThis->_pImp ) )
@@ -1359,7 +1359,7 @@ IMPL_STATIC_LINK( SvtFileDialog, FilterSelectHdl_Impl, ListBox*, pBox )
else
{
if ( pSelectedFilter->isGroupSeparator() )
- { // group separators can't be selected
+ { // group separators can't be selected
// return to the previously selected entry
if ( pThis->_pImp->IsFilterListTravelSelect() )
{
@@ -1376,8 +1376,8 @@ IMPL_STATIC_LINK( SvtFileDialog, FilterSelectHdl_Impl, ListBox*, pBox )
pThis->ExecuteFilter();
}
}
- else if ( ( pSelectedFilter != pThis->_pImp->GetCurFilter() )
- || pThis->_pImp->_pUserFilter
+ else if ( ( pSelectedFilter != pThis->_pImp->GetCurFilter() )
+ || pThis->_pImp->_pUserFilter
)
{
// Store the old filter for the auto extension handling
@@ -1441,14 +1441,14 @@ IMPL_STATIC_LINK( SvtFileDialog, FileNameModifiedHdl_Impl, void*, EMPTYARG )
SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl
(
const String& _rFilter,
- sal_Bool _bMultiExt,/* TRUE - auch Filter mit mehreren Endungen
+ sal_Bool _bMultiExt,/* TRUE - auch Filter mit mehreren Endungen
beruecksichtigen
FALSE - keine ...
*/
sal_Bool& _rFilterChanged
)
-/* [Beschreibung]
+/* [Beschreibung]
Die Methode sucht in den eingef"ugten Filtern nach der
spezifizierten Endung.
@@ -1511,7 +1511,7 @@ void SvtFileDialog::ExecuteFilter()
void SvtFileDialog::OpenMultiSelection_Impl()
-/* [Beschreibung]
+/* [Beschreibung]
OpenHandler f"ur MultiSelektion
*/
@@ -1746,7 +1746,7 @@ IMPL_LINK( SvtFileDialog, PlayButtonHdl_Impl, PushButton*, EMPTYARG )
long SvtFileDialog::Notify( NotifyEvent& rNEvt )
-/* [Beschreibung]
+/* [Beschreibung]
Die Methode wird gerufen, <BACKSPACE> abzufangen.
*/
@@ -1771,15 +1771,15 @@ long SvtFileDialog::Notify( NotifyEvent& rNEvt )
nRet = 1;
}
}
-// else if ( rKeyCode.IsMod1() && ( KEY_C == nCode || KEY_V == nCode || KEY_X == nCode ) )
-// {
+// else if ( rKeyCode.IsMod1() && ( KEY_C == nCode || KEY_V == nCode || KEY_X == nCode ) )
+// {
/* (mhu)
String aVerb = KEY_C == nCode ? UniString(RTL_CONSTASCII_USTRINGPARAM(SVT_MENUPART_VERB_COPY)) :
( KEY_V == nCode ? UniString(RTL_CONSTASCII_USTRINGPARAM(SVT_MENUPART_VERB_PASTE)) : UniString(RTL_CONSTASCII_USTRINGPARAM(SVT_MENUPART_VERB_CUT)) );
-//(dv) if ( !CntPopupMenu::DoVerbCommand( aVerb, _pFileView->GetView() ) )
-//(dv) Sound::Beep();
+//(dv) if ( !CntPopupMenu::DoVerbCommand( aVerb, _pFileView->GetView() ) )
+//(dv) Sound::Beep();
*/
-// }
+// }
}
return nRet ? nRet : ModalDialog::Notify( rNEvt );
}
@@ -1796,7 +1796,7 @@ long SvtFileDialog::OK()
class SvtDefModalDialogParent_Impl
{
private:
- Window* _pOld;
+ Window* _pOld;
public:
SvtDefModalDialogParent_Impl( Window *pNew ) :
@@ -1852,7 +1852,7 @@ bool implIsInvalid( const String & rURL )
{
SmartContent aContent( rURL );
aContent.enableOwnInteractionHandler( ::svt::OFilePickerInteractionHandler::E_DOESNOTEXIST );
- aContent.isFolder(); // do this _before_ asking isInvalid! Otherwise result might be wrong.
+ aContent.isFolder(); // do this _before_ asking isInvalid! Otherwise result might be wrong.
return aContent.isInvalid();
}
@@ -1870,11 +1870,11 @@ String SvtFileDialog::implGetInitialURL( const String& _rPath, const String& _rF
// is it a valid folder?
m_aContent.bindTo( aURLParser.GetMainURL( INetURLObject::NO_DECODE ) );
- sal_Bool bIsFolder = m_aContent.isFolder( ); // do this _before_ asking isInvalid!
+ sal_Bool bIsFolder = m_aContent.isFolder( ); // do this _before_ asking isInvalid!
sal_Bool bIsInvalid = m_aContent.isInvalid();
if ( bIsInvalid && m_bHasFilename && !aURLParser.hasFinalSlash() )
- { // check if the parent folder exists
+ { // check if the parent folder exists
// #108429# - 2003-03-26 - fs@openoffice.org
INetURLObject aParent( aURLParser );
aParent.removeSegment( );
@@ -2253,7 +2253,7 @@ short SvtFileDialog::PrepareExecute()
FilterSelect();
// Zustand der Steuerelemente anpassen.
-// EndListeningAll();
+// EndListeningAll();
ViewHdl_Impl( this, NULL );
OpenURL_Impl( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
@@ -2335,7 +2335,7 @@ void SvtFileDialog::FilterSelect()
void SvtFileDialog::SetStandardDir( const String& rStdDir )
-/* [Beschreibung]
+/* [Beschreibung]
Die Methode setzt den Pfad f"ur den Standardknopf.
*/
@@ -2362,7 +2362,7 @@ const ::com::sun::star::uno::Sequence< ::rtl::OUString >& SvtFileDialog::GetBlac
const String& SvtFileDialog::GetStandardDir() const
-/* [Beschreibung]
+/* [Beschreibung]
Diese Methode gibt den eingestellten Standardpfad zur"uck.
*/
@@ -2417,8 +2417,8 @@ void SvtFileDialog::AddFilterGroup( const String& _rFilter, const Sequence< Stri
DBG_ASSERT( !IsInExecute(), "SvtFileDialog::AddFilter: currently executing!" );
implAddFilter( _rFilter, String() );
- const StringPair* pSubFilters = _rFilters.getConstArray();
- const StringPair* pSubFiltersEnd = pSubFilters + _rFilters.getLength();
+ const StringPair* pSubFilters = _rFilters.getConstArray();
+ const StringPair* pSubFiltersEnd = pSubFilters + _rFilters.getLength();
for ( ; pSubFilters != pSubFiltersEnd; ++pSubFilters )
implAddFilter( pSubFilters->First, pSubFilters->Second );
}
@@ -2514,9 +2514,9 @@ void SvtFileDialog::InitSize()
SvStringsDtor* SvtFileDialog::GetPathList() const
{
- SvStringsDtor* pList = new SvStringsDtor;
- ULONG nCount = _pFileView->GetSelectionCount();
- SvLBoxEntry* pEntry = nCount ? _pFileView->FirstSelected() : NULL;
+ SvStringsDtor* pList = new SvStringsDtor;
+ ULONG nCount = _pFileView->GetSelectionCount();
+ SvLBoxEntry* pEntry = nCount ? _pFileView->FirstSelected() : NULL;
if ( ! pEntry )
{
@@ -2839,9 +2839,9 @@ Control* SvtFileDialog::getControl( sal_Int16 _nControlId, sal_Bool _bLabelContr
break;
case EDIT_FILEURL:
- pReturn = _bLabelControl
- ? static_cast< Control* >( _pImp->_pFtFileName )
- : static_cast< Control* >( _pImp->_pEdFileName );
+ pReturn = _bLabelControl
+ ? static_cast< Control* >( _pImp->_pFtFileName )
+ : static_cast< Control* >( _pImp->_pEdFileName );
break;
case EDIT_FILEURL_LABEL:
@@ -2889,21 +2889,21 @@ Control* SvtFileDialog::getControl( sal_Int16 _nControlId, sal_Bool _bLabelContr
break;
case LISTBOX_VERSION:
- pReturn = _bLabelControl
- ? static_cast< Control* >( _pImp->_pFtFileVersion )
- : static_cast< Control* >( _pImp->_pLbFileVersion );
+ pReturn = _bLabelControl
+ ? static_cast< Control* >( _pImp->_pFtFileVersion )
+ : static_cast< Control* >( _pImp->_pLbFileVersion );
break;
case LISTBOX_TEMPLATE:
- pReturn = _bLabelControl
- ? static_cast< Control* >( _pImp->_pFtTemplates )
- : static_cast< Control* >( _pImp->_pLbTemplates );
+ pReturn = _bLabelControl
+ ? static_cast< Control* >( _pImp->_pFtTemplates )
+ : static_cast< Control* >( _pImp->_pLbTemplates );
break;
case LISTBOX_IMAGE_TEMPLATE:
- pReturn = _bLabelControl
- ? static_cast< Control* >( _pImp->_pFtImageTemplates )
- : static_cast< Control* >( _pImp->_pLbImageTemplates );
+ pReturn = _bLabelControl
+ ? static_cast< Control* >( _pImp->_pFtImageTemplates )
+ : static_cast< Control* >( _pImp->_pLbImageTemplates );
break;
case LISTBOX_VERSION_LABEL:
@@ -3048,7 +3048,7 @@ void SvtFileDialog::AddControls_Impl( )
if ( _nExtraBits & SFX_EXTRA_SHOWVERSIONS )
{
- _pImp->_pFtFileVersion = new FixedText( this, SvtResId( FT_EXPLORERFILE_SHARED_LISTBOX ) );
+ _pImp->_pFtFileVersion = new FixedText( this, SvtResId( FT_EXPLORERFILE_SHARED_LISTBOX ) );
_pImp->_pFtFileVersion->SetText( SvtResId( STR_SVT_FILEPICKER_VERSION ) );
_pImp->_pLbFileVersion = new ListBox( this, SvtResId( LB_EXPLORERFILE_SHARED_LISTBOX ) );
@@ -3239,8 +3239,8 @@ BOOL SvtFileDialog::AddControl( Window* pControl, BOOL bNewLine )
long nTextWidth = pControl->GetTextWidth( pControl->GetText() );
aSize.Width() = nTextWidth + WIDTH_ADDITION;
- // PushButton: Mindestbreite 50 logische Einheiten,
- // H"ohe immer 14 logische Einheiten
+ // PushButton: Mindestbreite 50 logische Einheiten,
+ // H"ohe immer 14 logische Einheiten
if ( aDefSiz.Width() > aSize.Width() )
aSize.Width() = aDefSiz.Width();
aSize.Height() = aDefSiz.Height();
@@ -3422,11 +3422,11 @@ QueryFolderNameDialog::QueryFolderNameDialog
) :
ModalDialog( _pParent, SvtResId( DLG_SVT_QUERYFOLDERNAME ) ),
- aNameText ( this, SvtResId( FT_SVT_QUERYFOLDERNAME_DLG_NAME ) ),
- aNameEdit ( this, SvtResId( ED_SVT_QUERYFOLDERNAME_DLG_NAME ) ),
- aNameLine ( this, SvtResId( FL_SVT_QUERYFOLDERNAME_DLG_NAME ) ),
- aOKBtn ( this, SvtResId( BT_SVT_QUERYFOLDERNAME_DLG_OK ) ),
- aCancelBtn ( this, SvtResId( BT_SVT_QUERYFOLDERNAME_DLG_CANCEL ) )
+ aNameText ( this, SvtResId( FT_SVT_QUERYFOLDERNAME_DLG_NAME ) ),
+ aNameEdit ( this, SvtResId( ED_SVT_QUERYFOLDERNAME_DLG_NAME ) ),
+ aNameLine ( this, SvtResId( FL_SVT_QUERYFOLDERNAME_DLG_NAME ) ),
+ aOKBtn ( this, SvtResId( BT_SVT_QUERYFOLDERNAME_DLG_OK ) ),
+ aCancelBtn ( this, SvtResId( BT_SVT_QUERYFOLDERNAME_DLG_CANCEL ) )
{
FreeResource();
SetText( rTitle );
diff --git a/fpicker/source/office/iodlg.hrc b/fpicker/source/office/iodlg.hrc
index 15f5121b0965..f28cb9092569 100644
--- a/fpicker/source/office/iodlg.hrc
+++ b/fpicker/source/office/iodlg.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,43 +34,43 @@
// ModalDialog DLG_SVT_EXPLORERFILE
-#define FT_EXPLORERFILE_CURRENTPATH 10
-#define BTN_EXPLORERFILE_NEWFOLDER 11
-#define BTN_EXPLORERFILE_LISTVIEW 12
-#define BTN_EXPLORERFILE_DETAILSVIEW 13
-#define BTN_EXPLORERFILE_UP 14
-#define BTN_EXPLORERFILE_STANDARD 15
-#define BTN_EXPLORERFILE_OPEN 16
-#define BTN_EXPLORERFILE_CANCEL 17
-#define BTN_EXPLORERFILE_HELP 18
-
-#define IMG_FILEDLG_BTN_UP 10
-#define IMG_FILEDLG_BTN_STD 11
+#define FT_EXPLORERFILE_CURRENTPATH 10
+#define BTN_EXPLORERFILE_NEWFOLDER 11
+#define BTN_EXPLORERFILE_LISTVIEW 12
+#define BTN_EXPLORERFILE_DETAILSVIEW 13
+#define BTN_EXPLORERFILE_UP 14
+#define BTN_EXPLORERFILE_STANDARD 15
+#define BTN_EXPLORERFILE_OPEN 16
+#define BTN_EXPLORERFILE_CANCEL 17
+#define BTN_EXPLORERFILE_HELP 18
+
+#define IMG_FILEDLG_BTN_UP 10
+#define IMG_FILEDLG_BTN_STD 11
#define IMG_FILEDLG_CREATEFOLDER 14
-#define CTL_EXPLORERFILE_FILELIST 20
+#define CTL_EXPLORERFILE_FILELIST 20
-#define FT_EXPLORERFILE_FILENAME 30
-#define ED_EXPLORERFILE_FILENAME 31
-#define FT_EXPLORERFILE_SHARED_LISTBOX 32
-#define LB_EXPLORERFILE_SHARED_LISTBOX 33
-#define FT_EXPLORERFILE_FILETYPE 34
-#define LB_EXPLORERFILE_FILETYPE 35
+#define FT_EXPLORERFILE_FILENAME 30
+#define ED_EXPLORERFILE_FILENAME 31
+#define FT_EXPLORERFILE_SHARED_LISTBOX 32
+#define LB_EXPLORERFILE_SHARED_LISTBOX 33
+#define FT_EXPLORERFILE_FILETYPE 34
+#define LB_EXPLORERFILE_FILETYPE 35
-#define CB_EXPLORERFILE_READONLY 40
-#define CB_EXPLORERFILE_PASSWORD 41
-#define CB_AUTO_EXTENSION 42
-#define CB_OPTIONS 43
+#define CB_EXPLORERFILE_READONLY 40
+#define CB_EXPLORERFILE_PASSWORD 41
+#define CB_AUTO_EXTENSION 42
+#define CB_OPTIONS 43
// -----------------------------------------------
#define STR_EXPLORERFILE_OPEN 1
#define STR_EXPLORERFILE_SAVE 2
-#define STR_EXPLORERFILE_BUTTONSAVE 3
-#define STR_PATHNAME 4
-#define STR_PATHSELECT 5
-#define STR_BUTTONSELECT 6
-#define STR_ACTUALVERSION 7
+#define STR_EXPLORERFILE_BUTTONSAVE 3
+#define STR_PATHNAME 4
+#define STR_PATHSELECT 5
+#define STR_BUTTONSELECT 6
+#define STR_ACTUALVERSION 7
// DLG_SVT_QUERYFOLDERNAME -----------------------
@@ -92,16 +92,16 @@
#define HID_FILEDLG_USE_PASSWD (HID_SFX_START + 31)
#define HID_FILEDLG_READ_ONLY (HID_SFX_START + 32)
-#define HID_FILEDLG_AUTOCOMPLETEBOX (HID_SFX_START + 218)
-#define HID_FILEDLG_SAVE_BTN (HID_SFX_START + 219)
-#define HID_FILEDLG_SAVE_FILENAME (HID_SFX_START + 220)
-#define HID_FILEDLG_SAVE_FILETYPE (HID_SFX_START + 221)
-#define HID_FILEDLG_INSERT_BTN (HID_SFX_START + 222)
-#define HID_FILEDLG_PATH_BTN (HID_SFX_START + 223)
-#define HID_FILEDLG_PATH_FILENAME (HID_SFX_START + 224)
-#define HID_FILEDLG_FOLDER_BTN (HID_SFX_START + 225)
-#define HID_FILEDLG_FOLDER_FILENAME (HID_SFX_START + 226)
-#define HID_FILEDLG_SRCHFOLDER_BTN (HID_SFX_START + 227)
+#define HID_FILEDLG_AUTOCOMPLETEBOX (HID_SFX_START + 218)
+#define HID_FILEDLG_SAVE_BTN (HID_SFX_START + 219)
+#define HID_FILEDLG_SAVE_FILENAME (HID_SFX_START + 220)
+#define HID_FILEDLG_SAVE_FILETYPE (HID_SFX_START + 221)
+#define HID_FILEDLG_INSERT_BTN (HID_SFX_START + 222)
+#define HID_FILEDLG_PATH_BTN (HID_SFX_START + 223)
+#define HID_FILEDLG_PATH_FILENAME (HID_SFX_START + 224)
+#define HID_FILEDLG_FOLDER_BTN (HID_SFX_START + 225)
+#define HID_FILEDLG_FOLDER_FILENAME (HID_SFX_START + 226)
+#define HID_FILEDLG_SRCHFOLDER_BTN (HID_SFX_START + 227)
#endif
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index 25b519601f6c..0bc19f0196b8 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -61,15 +61,15 @@ class SvtFileDialogFilter_Impl;
//*****************************************************************************
-#define SFXWB_INSERT ( 0x04000000L | WB_OPEN )
-#define SFXWB_PASSWORD WB_PASSWORD
-#define SFXWB_READONLY WB_READONLY
-#define SFXWB_PATHDIALOG WB_PATH
-#define SFXWB_CLASSPATH ( 0x08000000L | SFXWB_PATHDIALOG )
-#define SFXWB_SHOWALLFOLDER 0x10000000L // alle Ordner auch Mail/News/...
-#define SFXWB_MULTISELECTION 0x20000000L // Multiselection an
+#define SFXWB_INSERT ( 0x04000000L | WB_OPEN )
+#define SFXWB_PASSWORD WB_PASSWORD
+#define SFXWB_READONLY WB_READONLY
+#define SFXWB_PATHDIALOG WB_PATH
+#define SFXWB_CLASSPATH ( 0x08000000L | SFXWB_PATHDIALOG )
+#define SFXWB_SHOWALLFOLDER 0x10000000L // alle Ordner auch Mail/News/...
+#define SFXWB_MULTISELECTION 0x20000000L // Multiselection an
#define SFXWB_NOREMOTE 0x40000000L
-#define SFXWB_SHOWVERSIONS 0x80000000L // Versionsauswahl anzeigen
+#define SFXWB_SHOWVERSIONS 0x80000000L // Versionsauswahl anzeigen
#define SFX_EXTRA_AUTOEXTENSION 0x00000001L
#define SFX_EXTRA_FILTEROPTIONS 0x00000002L
@@ -81,9 +81,9 @@ class SvtFileDialogFilter_Impl;
#define SFX_EXTRA_SELECTION 0x00000080L
#define SFX_EXTRA_IMAGE_TEMPLATE 0x00000100L
-#define RET_MANAGER 100
+#define RET_MANAGER 100
-#define FILEDIALOG_FILTER_ALL "*.*"
+#define FILEDIALOG_FILTER_ALL "*.*"
//*****************************************************************************
// SvtFileDialog
@@ -94,23 +94,23 @@ class SvtFileDialog : public ModalDialog, public ::svt::IFilePickerController
{
private:
// originally from VclFileDialog
- ControlChain_Impl* _pUserControls;
+ ControlChain_Impl* _pUserControls;
- CheckBox* _pCbReadOnly;
+ CheckBox* _pCbReadOnly;
CheckBox* _pCbLinkBox;
CheckBox* _pCbPreviewBox;
CheckBox* _pCbSelection;
PushButton* _pPbPlay;
Window* _pPrevWin;
FixedBitmap* _pPrevBmp;
- SvtFileView* _pFileView;
- ::svt::IFilePickerListener* _pFileNotifier;
- SvtExpFileDlg_Impl* _pImp;
- WinBits _nExtraBits;
- BOOL _bIsInExecute : 1;
+ SvtFileView* _pFileView;
+ ::svt::IFilePickerListener* _pFileNotifier;
+ SvtExpFileDlg_Impl* _pImp;
+ WinBits _nExtraBits;
+ BOOL _bIsInExecute : 1;
- ImageList m_aImages;
- ::svt::SmartContent m_aContent;
+ ImageList m_aImages;
+ ::svt::SmartContent m_aContent;
::svt::RestrictedPaths m_aURLFilter;
::std::set< Control* > m_aDisabledControls;
@@ -122,7 +122,7 @@ private:
::com::sun::star::ui::dialogs::XDialogClosedListener >
m_xListener;
bool m_bInExecuteAsync;
- bool m_bHasFilename;
+ bool m_bHasFilename;
DECL_STATIC_LINK( SvtFileDialog, FilterSelectHdl_Impl, ListBox* );
DECL_STATIC_LINK( SvtFileDialog, NewFolderHdl_Impl, PushButton* );
@@ -132,7 +132,7 @@ private:
DECL_STATIC_LINK( SvtFileDialog, FileNameGetFocusHdl_Impl, void* );
DECL_STATIC_LINK( SvtFileDialog, FileNameModifiedHdl_Impl, void* );
- void Init_Impl( WinBits nBits );
+ void Init_Impl( WinBits nBits );
/** find a filter with the given wildcard
@param _rFilter
the wildcard pattern to look for in the filter list
@@ -143,12 +143,12 @@ private:
@return
the filter which has been found
*/
- SvtFileDialogFilter_Impl* FindFilter_Impl( const String& _rFilter,
+ SvtFileDialogFilter_Impl* FindFilter_Impl( const String& _rFilter,
sal_Bool _bMultiExt,
sal_Bool& _rFilterChanged
);
- void ExecuteFilter();
- void OpenMultiSelection_Impl();
+ void ExecuteFilter();
+ void OpenMultiSelection_Impl();
void AddControls_Impl( );
DECL_LINK( SelectHdl_Impl, SvTabListBox* );
@@ -162,22 +162,22 @@ private:
// entfernt einen Filter mit Wildcards aus dem Path und gibt in zurueck
BOOL IsolateFilterFromPath_Impl( String& rPath, String& rFilter );
- void implArrangeControls();
- void implUpdateImages( );
+ void implArrangeControls();
+ void implUpdateImages( );
protected:
- virtual long Notify( NotifyEvent& rNEvt );
- void EnableInternet( BOOL bInternet );
+ virtual long Notify( NotifyEvent& rNEvt );
+ void EnableInternet( BOOL bInternet );
// originally from VclFileDialog
- Link _aOKHdl;
- Link _aFileSelectHdl;
- Link _aFilterSelectHdl;
+ Link _aOKHdl;
+ Link _aFileSelectHdl;
+ Link _aFilterSelectHdl;
- String _aPath;
- String _aDefExt;
+ String _aPath;
+ String _aDefExt;
- void ReleaseOwnerShip( Window* pUserControl );
+ void ReleaseOwnerShip( Window* pUserControl );
/** enables or disables the complete UI of the file picker, with only offering a
cancel button
@@ -203,45 +203,45 @@ public:
SvtFileDialog( Window* _pParent, WinBits nBits );
~SvtFileDialog();
- virtual long OK();
- virtual short Execute();
+ virtual long OK();
+ virtual short Execute();
virtual void StartExecuteModal( const Link& rEndDialogHdl );
- void FileSelect();
- void FilterSelect();
-
- void SetBlackList( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList );
+ void FileSelect();
+ void FilterSelect();
+
+ void SetBlackList( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList );
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& GetBlackList() const;
- void SetStandardDir( const String& rStdDir );
- const String& GetStandardDir() const;
- SvStringsDtor* GetPathList() const; // bei MultiSelektion
+ void SetStandardDir( const String& rStdDir );
+ const String& GetStandardDir() const;
+ SvStringsDtor* GetPathList() const; // bei MultiSelektion
- void AddFilter( const String& rFilter,
+ void AddFilter( const String& rFilter,
const String& rType );
- void AddFilterGroup(
+ void AddFilterGroup(
const String& _rFilter,
const com::sun::star::uno::Sequence< com::sun::star::beans::StringPair >& rFilters );
- void SetCurFilter( const String& rFilter );
- String GetCurFilter() const;
- USHORT GetFilterCount() const;
- const String& GetFilterName( USHORT nPos ) const;
+ void SetCurFilter( const String& rFilter );
+ String GetCurFilter() const;
+ USHORT GetFilterCount() const;
+ const String& GetFilterName( USHORT nPos ) const;
- virtual void Resize();
- virtual void DataChanged( const DataChangedEvent& _rDCEvt );
+ virtual void Resize();
+ virtual void DataChanged( const DataChangedEvent& _rDCEvt );
- void PrevLevel_Impl();
- void OpenURL_Impl( const String& rURL );
+ void PrevLevel_Impl();
+ void OpenURL_Impl( const String& rURL );
- inline SvtFileView* GetView() const;
+ inline SvtFileView* GetView() const;
- void DisableSaveLastDirectory();
+ void DisableSaveLastDirectory();
void InitSize();
- void UpdateControls( const String& rURL );
+ void UpdateControls( const String& rURL );
void EnableAutocompletion( BOOL _bEnable = TRUE );
- void SetFileCallback( ::svt::IFilePickerListener *pNotifier ) { _pFileNotifier = pNotifier; }
+ void SetFileCallback( ::svt::IFilePickerListener *pNotifier ) { _pFileNotifier = pNotifier; }
sal_Int32 getTargetColorDepth();
sal_Int32 getAvailableWidth();
@@ -249,10 +249,10 @@ public:
void setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& rImage );
sal_Bool setShowState( sal_Bool bShowState );
sal_Bool getShowState();
- sal_Bool isAutoExtensionEnabled();
+ sal_Bool isAutoExtensionEnabled();
- String getCurrentFileText( ) const;
- void setCurrentFileText( const String& _rText, bool _bSelectAll = false );
+ String getCurrentFileText( ) const;
+ void setCurrentFileText( const String& _rText, bool _bSelectAll = false );
void onAsyncOperationStarted();
void onAsyncOperationFinished();
@@ -264,28 +264,28 @@ public:
}
// originally from VclFileDialog
- virtual BOOL AddControl( Window* pControl, BOOL bNewLine = FALSE );
+ virtual BOOL AddControl( Window* pControl, BOOL bNewLine = FALSE );
// inline
- inline void SetPath( const String& rNewURL );
+ inline void SetPath( const String& rNewURL );
inline void SetHasFilename( bool bHasFilename );
- inline const String& GetPath() const;
- inline void SetDefaultExt( const String& rExt );
- inline void EraseDefaultExt( xub_StrLen _nIndex = 0 );
- inline const String& GetDefaultExt() const;
- inline void SetOKHdl( const Link& rLink );
- inline const Link& GetOKHdl() const;
- inline void SetFileSelectHdl( const Link& rLink );
- inline const Link& GetFileSelectHdl() const;
- inline void SetFilterSelectHdl( const Link& rLink );
- inline const Link& GetFilterSelectHdl() const;
-
- inline Image GetButtonImage( sal_uInt16 _nButtonId ) const { return m_aImages.GetImage( _nButtonId ); }
-
- sal_Bool ContentIsFolder( const rtl::OUString& rURL ) { return m_aContent.isFolder( rURL ) && m_aContent.isValid(); }
- sal_Bool ContentHasParentFolder( const rtl::OUString& rURL );
- sal_Bool ContentCanMakeFolder( const rtl::OUString& rURL );
- sal_Bool ContentGetTitle( const rtl::OUString& rURL, String& rTitle );
+ inline const String& GetPath() const;
+ inline void SetDefaultExt( const String& rExt );
+ inline void EraseDefaultExt( xub_StrLen _nIndex = 0 );
+ inline const String& GetDefaultExt() const;
+ inline void SetOKHdl( const Link& rLink );
+ inline const Link& GetOKHdl() const;
+ inline void SetFileSelectHdl( const Link& rLink );
+ inline const Link& GetFileSelectHdl() const;
+ inline void SetFilterSelectHdl( const Link& rLink );
+ inline const Link& GetFilterSelectHdl() const;
+
+ inline Image GetButtonImage( sal_uInt16 _nButtonId ) const { return m_aImages.GetImage( _nButtonId ); }
+
+ sal_Bool ContentIsFolder( const rtl::OUString& rURL ) { return m_aContent.isFolder( rURL ) && m_aContent.isValid(); }
+ sal_Bool ContentHasParentFolder( const rtl::OUString& rURL );
+ sal_Bool ContentCanMakeFolder( const rtl::OUString& rURL );
+ sal_Bool ContentGetTitle( const rtl::OUString& rURL, String& rTitle );
/** updates the sizes of the listboxes in the bottom area of the dialog, and of their labels,
according to the space occupied by the current label texts
@@ -305,7 +305,7 @@ public:
inline bool isUrlAllowed( const String& _rURL ) const { return m_aURLFilter.isUrlAllowed( _rURL ); }
private:
- SvtFileDialogFilter_Impl* implAddFilter( const String& _rFilter, const String& _rType );
+ SvtFileDialogFilter_Impl* implAddFilter( const String& _rFilter, const String& _rType );
/** updates _pUserFilter with a new filter
<p>No checks for necessity are made.</p>
@@ -321,16 +321,16 @@ private:
</p>
@return <TRUE/> if the new filter is "*.*"
*/
- sal_Bool createNewUserFilter( const String& _rNewFilter, sal_Bool _bAllowUserDefExt );
+ sal_Bool createNewUserFilter( const String& _rNewFilter, sal_Bool _bAllowUserDefExt );
- sal_uInt16 adjustFilter( const String& _rFilter );
+ sal_uInt16 adjustFilter( const String& _rFilter );
// IFilePickerController, needed by OControlAccess
virtual Control* getControl( sal_Int16 _nControlId, sal_Bool _bLabelControl = sal_False ) const;
virtual void enableControl( sal_Int16 _nControlId, sal_Bool _bEnable );
virtual String getCurFilter( ) const;
- String implGetInitialURL( const String& _rPath, const String& _rFallback );
+ String implGetInitialURL( const String& _rPath, const String& _rFallback );
/// initializes the special URL lists, such as our favourites and our restricted paths
void implInitializeSpecialURLLists( );
@@ -347,7 +347,7 @@ private:
The function checks if the specified filename already contains one of
the valid extensions of the specified filter. If not the filter default
extension is appended to the filename.
-
+
@param _rFileName the filename which is checked and extended if necessary.
@param _rFilterDefaultExtension the default extension of the used filter.
@param _rFilterExtensions a list of one or more valid filter extensions
@@ -462,11 +462,11 @@ inline SvtFileView* SvtFileDialog::GetView() const
class SvtFilePicker;
-#define FILE_SELECTION_CHANGED 1
-#define DIRECTORY_CHANGED 2
-#define HELP_REQUESTED 3
-#define CTRL_STATE_CHANGED 4
-#define DIALOG_SIZE_CHANGED 5
+#define FILE_SELECTION_CHANGED 1
+#define DIRECTORY_CHANGED 2
+#define HELP_REQUESTED 3
+#define CTRL_STATE_CHANGED 4
+#define DIALOG_SIZE_CHANGED 5
#endif // #ifndef _IODLG_HXX
diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src
index a7c19cb601d2..413f91c5c806 100644
--- a/fpicker/source/office/iodlg.src
+++ b/fpicker/source/office/iodlg.src
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index 86d1387c9ca6..6b630af9e326 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -64,8 +64,8 @@ using namespace ::com::sun::star::lang;
using namespace ::utl;
// some stuff for easier changes for SvtViewOptions
-static const sal_Char* pViewOptDataName = "dialog data";
-#define VIEWOPT_DATANAME ::rtl::OUString::createFromAscii( pViewOptDataName )
+static const sal_Char* pViewOptDataName = "dialog data";
+#define VIEWOPT_DATANAME ::rtl::OUString::createFromAscii( pViewOptDataName )
static inline void SetViewOptUserItem( SvtViewOptions& rOpt, const String& rData )
{
@@ -84,7 +84,7 @@ static inline String GetViewOptUserItem( const SvtViewOptions& rOpt )
// defines f"ur den Style der BrowseBox
-#define STYLE_MULTI_SELECTION \
+#define STYLE_MULTI_SELECTION \
CNTVIEWSTYLE_NODE_BUTTONS | \
CNTVIEWSTYLE_NODE_BUTTONS_AT_ROOT | \
CNTVIEWSTYLE_SHOW_MESSAGES | \
@@ -94,10 +94,10 @@ static inline String GetViewOptUserItem( const SvtViewOptions& rOpt )
CNTVIEWSTYLE_DEFAULT_APPEARANCE | \
CNTVIEWSTYLE_SORT_BY_FOLDER
-#define STYLE_SINGLE_SELECTION \
+#define STYLE_SINGLE_SELECTION \
STYLE_MULTI_SELECTION | CNTVIEWSTYLE_SINGLE_SELECTION
-#define BOOL_NOT_INITIALIZE ((sal_Bool)2)
+#define BOOL_NOT_INITIALIZE ((sal_Bool)2)
//*****************************************************************************
// ResMgrHolder / SvtSimpleResId
@@ -199,7 +199,7 @@ void SvtFileDialogURLSelector::Activate()
//-----------------------------------------------------------------------------
SvtUpButton_Impl::SvtUpButton_Impl( SvtFileDialog* pParent, const ResId& rResId )
:SvtFileDialogURLSelector( pParent, rResId, IMG_FILEDLG_BTN_UP )
- ,_pURLs ( NULL )
+ ,_pURLs ( NULL )
{
}
@@ -357,7 +357,7 @@ void SvtTravelButton_Impl::Click()
// SvtExpFileDlg_Impl
//*****************************************************************************
-SvtExpFileDlg_Impl::SvtExpFileDlg_Impl( WinBits ) :
+SvtExpFileDlg_Impl::SvtExpFileDlg_Impl( WinBits ) :
_pLbFilter ( NULL ),
_pCurFilter ( NULL ),
@@ -367,23 +367,23 @@ SvtExpFileDlg_Impl::SvtExpFileDlg_Impl( WinBits ) :
_pEdFileName ( NULL ),
_pFtFileVersion ( NULL ),
_pLbFileVersion ( NULL ),
- _pFtTemplates ( NULL ),
- _pLbTemplates ( NULL ),
- _pFtImageTemplates ( NULL ),
- _pLbImageTemplates ( NULL ),
+ _pFtTemplates ( NULL ),
+ _pLbTemplates ( NULL ),
+ _pFtImageTemplates ( NULL ),
+ _pLbImageTemplates ( NULL ),
_pFtFileType ( NULL ),
_pBtnFileOpen ( NULL ),
_pBtnCancel ( NULL ),
- _pBtnHelp ( NULL ),
+ _pBtnHelp ( NULL ),
_pBtnUp ( NULL ),
_pBtnNewFolder ( NULL ),
_pBtnStandard ( NULL ),
_pCbPassword ( NULL ),
_pFtCurrentPath ( NULL ),
_pCbAutoExtension ( NULL ),
- _pCbOptions ( NULL ),
+ _pCbOptions ( NULL ),
_nState ( FILEDLG_STATE_REMOTE ),
- _nStyle ( 0 ),
+ _nStyle ( 0 ),
_bDoubleClick ( sal_False ),
m_bNeedDelayedFilterExecute ( sal_False ),
_pDefaultFilter ( NULL ),
@@ -455,7 +455,7 @@ void SvtExpFileDlg_Impl::SetCurFilter( SvtFileDialogFilter_Impl* pFilter, const
{
DBG_ASSERT( pFilter, "SvtExpFileDlg_Impl::SetCurFilter: invalid filter!" );
DBG_ASSERT( ( rDisplayName == pFilter->GetName() )
- || ( rDisplayName == lcl_DecoratedFilter( pFilter->GetName() ) ),
+ || ( rDisplayName == lcl_DecoratedFilter( pFilter->GetName() ) ),
"SvtExpFileDlg_Impl::SetCurFilter: arguments are inconsistent!" );
_pCurFilter = pFilter;
diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx
index 9b1be54d4c50..87a6276b11a0 100644
--- a/fpicker/source/office/iodlgimp.hxx
+++ b/fpicker/source/office/iodlgimp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,16 +49,16 @@ class SvUShorts;
//*****************************************************************************
-#define FILEDIALOG_DEF_EXTSEP ';'
-#define FILEDIALOG_DEF_WILDCARD '*'
-#define FILEDIALOG_DEF_IMAGEBORDER 10
-#define FILEDIALOG_DEF_TIMEOUT 250
+#define FILEDIALOG_DEF_EXTSEP ';'
+#define FILEDIALOG_DEF_WILDCARD '*'
+#define FILEDIALOG_DEF_IMAGEBORDER 10
+#define FILEDIALOG_DEF_TIMEOUT 250
//*****************************************************************************
// SvtFileDialogFilter_Impl
//*****************************************************************************
-/* [Beschreibung]
+/* [Beschreibung]
Instanzen dieser Klasse repr"asentieren einen Filter
*/
@@ -66,18 +66,18 @@ class SvUShorts;
class SvtFileDialogFilter_Impl
{
private:
- String m_aName; // name of the entry
- String m_aType; // filter wildcard - if empty, the entry marks a group
+ String m_aName; // name of the entry
+ String m_aType; // filter wildcard - if empty, the entry marks a group
public:
SvtFileDialogFilter_Impl( const String& rName, const String& rType );
~SvtFileDialogFilter_Impl();
- const String& GetName() const { return m_aName; }
- const String& GetType() const { return m_aType; }
+ const String& GetName() const { return m_aName; }
+ const String& GetType() const { return m_aType; }
const String GetExtension() const { return m_aType.Copy( 2 ); }
- sal_Bool isGroupSeparator() const { return 0 == m_aType.Len(); }
+ sal_Bool isGroupSeparator() const { return 0 == m_aType.Len(); }
};
//*****************************************************************************
@@ -112,8 +112,8 @@ enum SvtFileDlgType
class SvtFileDialogURLSelector : public MenuButton
{
private:
- SvtFileDialog* m_pParent;
- PopupMenu* m_pMenu;
+ SvtFileDialog* m_pParent;
+ PopupMenu* m_pMenu;
protected:
inline SvtFileDialog* GetDialogParent() { return m_pParent; }
@@ -127,7 +127,7 @@ protected:
SvtFileDialogURLSelector( SvtFileDialog* _pParent, const ResId& _rResId, sal_uInt16 _nButtonId );
~SvtFileDialogURLSelector();
- virtual void Activate();
+ virtual void Activate();
};
//*****************************************************************************
@@ -137,16 +137,16 @@ protected:
class SvtUpButton_Impl : public SvtFileDialogURLSelector
{
private:
- SvStringsDtor* _pURLs;
+ SvStringsDtor* _pURLs;
public:
SvtUpButton_Impl( SvtFileDialog* pParent, const ResId& rResId );
~SvtUpButton_Impl();
protected:
- virtual void FillURLMenu( PopupMenu* _pMenu );
- virtual void Select();
- virtual void Click();
+ virtual void FillURLMenu( PopupMenu* _pMenu );
+ virtual void Select();
+ virtual void Click();
};
//*****************************************************************************
@@ -165,9 +165,9 @@ public:
void SetFavouriteLocations( const ::std::vector< String >& _rLocations );
protected:
- virtual void FillURLMenu( PopupMenu* _pMenu );
- virtual void Select();
- virtual void Click();
+ virtual void FillURLMenu( PopupMenu* _pMenu );
+ virtual void Select();
+ virtual void Click();
};
//*****************************************************************************
@@ -189,104 +189,104 @@ private:
DECL_STATIC_LINK( SvtExpFileDlg_Impl, UnClickHdl, Button* );
private:
- ListBox* _pLbFilter;
-
- const SvtFileDialogFilter_Impl* _pCurFilter;
- String m_sCurrentFilterDisplayName; // may differ from _pCurFilter->GetName in case it is a cached entry
+ ListBox* _pLbFilter;
+ const SvtFileDialogFilter_Impl* _pCurFilter;
+ String m_sCurrentFilterDisplayName; // may differ from _pCurFilter->GetName in case it is a cached entry
+
::com::sun::star::uno::Sequence< ::rtl::OUString > _aBlackList;
public:
- SvtFileDialogFilterList_Impl* _pFilter;
- SvtFileDialogFilter_Impl* _pUserFilter;
+ SvtFileDialogFilterList_Impl* _pFilter;
+ SvtFileDialogFilter_Impl* _pUserFilter;
- FixedText* _pFtFileName;
- SvtURLBox* _pEdFileName;
+ FixedText* _pFtFileName;
+ SvtURLBox* _pEdFileName;
- FixedText* _pFtFileVersion;
- ListBox* _pLbFileVersion;
+ FixedText* _pFtFileVersion;
+ ListBox* _pLbFileVersion;
- FixedText* _pFtTemplates;
- ListBox* _pLbTemplates;
+ FixedText* _pFtTemplates;
+ ListBox* _pLbTemplates;
- FixedText* _pFtImageTemplates;
- ListBox* _pLbImageTemplates;
+ FixedText* _pFtImageTemplates;
+ ListBox* _pLbImageTemplates;
- FixedText* _pFtFileType;
- PushButton* _pBtnFileOpen;
- PushButton* _pBtnCancel;
- HelpButton* _pBtnHelp;
- SvtUpButton_Impl* _pBtnUp;
- ImageButton* _pBtnNewFolder;
- SvtTravelButton_Impl* _pBtnStandard;
- CheckBox* _pCbPassword;
- FixedText* _pFtCurrentPath;
- CheckBox* _pCbAutoExtension;
- CheckBox* _pCbOptions;
+ FixedText* _pFtFileType;
+ PushButton* _pBtnFileOpen;
+ PushButton* _pBtnCancel;
+ HelpButton* _pBtnHelp;
+ SvtUpButton_Impl* _pBtnUp;
+ ImageButton* _pBtnNewFolder;
+ SvtTravelButton_Impl* _pBtnStandard;
+ CheckBox* _pCbPassword;
+ FixedText* _pFtCurrentPath;
+ CheckBox* _pCbAutoExtension;
+ CheckBox* _pCbOptions;
- SvtFileDlgMode _eMode;
- SvtFileDlgType _eDlgType;
- SvtFileDlgState _nState;
- WinBits _nStyle;
+ SvtFileDlgMode _eMode;
+ SvtFileDlgType _eDlgType;
+ SvtFileDlgState _nState;
+ WinBits _nStyle;
- String _aStdDir;
+ String _aStdDir;
// beim traveln der Filterbox erst Zeitversetzt filtern
- Timer _aFilterTimer;
+ Timer _aFilterTimer;
// Zeigt der OpenHdl_Imp(), ob das Open durch einen Doppelclick ausgel"ost wurde
- sal_Bool _bDoubleClick;
- sal_Bool m_bNeedDelayedFilterExecute;
+ sal_Bool _bDoubleClick;
+ sal_Bool m_bNeedDelayedFilterExecute;
// Liste mit den 5 zuletzt genutzten Filtern
// Defaultfilter fuer <Alle> oder <Alle ...>
- const SvtFileDialogFilter_Impl* _pDefaultFilter;
+ const SvtFileDialogFilter_Impl* _pDefaultFilter;
// Multiselektion?
- sal_Bool _bMultiSelection;
+ sal_Bool _bMultiSelection;
// Fixgr"ossen f"ur Resize merken
- long _nFixDeltaHeight;
- Size _a6Size;
- Size _aDlgSize;
- String _aIniKey;
+ long _nFixDeltaHeight;
+ Size _a6Size;
+ Size _aDlgSize;
+ String _aIniKey;
- sal_Bool _bFolderHasOpened;
+ sal_Bool _bFolderHasOpened;
SvtExpFileDlg_Impl( WinBits nBits );
~SvtExpFileDlg_Impl();
- inline void SetBlackList( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList ) { _aBlackList = rBlackList; }
+ inline void SetBlackList( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList ) { _aBlackList = rBlackList; }
inline const ::com::sun::star::uno::Sequence< ::rtl::OUString >& GetBlackList() const { return _aBlackList; }
- void SetStandardDir( const String& _rDir );
- inline const String& GetStandardDir() const { return _aStdDir; }
- inline void DisableFilterBoxAutoWidth() { _pLbFilter->EnableDDAutoWidth( FALSE ); }
+ void SetStandardDir( const String& _rDir );
+ inline const String& GetStandardDir() const { return _aStdDir; }
+ inline void DisableFilterBoxAutoWidth() { _pLbFilter->EnableDDAutoWidth( FALSE ); }
// ------------------------------------------
// access to the filter listbox only as Control* - we want to maintain the entries/userdata ourself
- Control* GetFilterListControl() { return _pLbFilter; }
- const Control* GetFilterListControl() const { return _pLbFilter; }
- void CreateFilterListControl( Window* _pParent, const ResId& _rId );
- inline void SetFilterListSelectHdl( const Link& _rHandler );
+ Control* GetFilterListControl() { return _pLbFilter; }
+ const Control* GetFilterListControl() const { return _pLbFilter; }
+ void CreateFilterListControl( Window* _pParent, const ResId& _rId );
+ inline void SetFilterListSelectHdl( const Link& _rHandler );
// inits the listbox for the filters from the filter list (_pFilter)
- void ClearFilterList( );
- void InitFilterList( );
- inline sal_Bool HasFilterListEntry( const String& _rFilterName );
- inline void SelectFilterListEntry( const String& _rFilterName );
- inline void SetNoFilterListSelection( );
- void InsertFilterListEntry( const SvtFileDialogFilter_Impl* _pFilterDesc );
+ void ClearFilterList( );
+ void InitFilterList( );
+ inline sal_Bool HasFilterListEntry( const String& _rFilterName );
+ inline void SelectFilterListEntry( const String& _rFilterName );
+ inline void SetNoFilterListSelection( );
+ void InsertFilterListEntry( const SvtFileDialogFilter_Impl* _pFilterDesc );
// _pFilterDesc must already have been added to _pFilter
- inline SvtFileDialogFilter_Impl* GetSelectedFilterEntry( String& /* [out] */ _rDisplayName ) const;
- inline sal_Bool IsFilterListTravelSelect() const;
+ inline SvtFileDialogFilter_Impl* GetSelectedFilterEntry( String& /* [out] */ _rDisplayName ) const;
+ inline sal_Bool IsFilterListTravelSelect() const;
// ------------------------------------------
// access to the current filter via methods only - need to care for consistency between _pCurFilter and m_sCurrentFilterDisplayName
- inline const SvtFileDialogFilter_Impl* GetCurFilter( ) const;
- inline const String& GetCurFilterDisplayName() const;
- void SetCurFilter( SvtFileDialogFilter_Impl* _pFilter, const String& _rDisplayName );
- inline void SetCurFilter( SvtFileDialogFilter_Impl* _pFilter );
+ inline const SvtFileDialogFilter_Impl* GetCurFilter( ) const;
+ inline const String& GetCurFilterDisplayName() const;
+ void SetCurFilter( SvtFileDialogFilter_Impl* _pFilter, const String& _rDisplayName );
+ inline void SetCurFilter( SvtFileDialogFilter_Impl* _pFilter );
};
inline void SvtExpFileDlg_Impl::SetFilterListSelectHdl( const Link& _rHandler )
@@ -304,7 +304,7 @@ inline void SvtExpFileDlg_Impl::SelectFilterListEntry( const String& _rFilterNam
_pLbFilter->SelectEntry( _rFilterName );
}
-inline void SvtExpFileDlg_Impl::SetNoFilterListSelection( )
+inline void SvtExpFileDlg_Impl::SetNoFilterListSelection( )
{
_pLbFilter->SetNoSelection( );
}
@@ -330,7 +330,7 @@ inline const String& SvtExpFileDlg_Impl::GetCurFilterDisplayName() const
return m_sCurrentFilterDisplayName;
}
-inline void SvtExpFileDlg_Impl::SetCurFilter( SvtFileDialogFilter_Impl* pFilter )
+inline void SvtExpFileDlg_Impl::SetCurFilter( SvtFileDialogFilter_Impl* pFilter )
{
SetCurFilter( pFilter, pFilter->GetName() );
}
diff --git a/fpicker/source/office/pickercallbacks.hxx b/fpicker/source/office/pickercallbacks.hxx
index 2140fe5c716d..f5c0430b76f9 100644
--- a/fpicker/source/office/pickercallbacks.hxx
+++ b/fpicker/source/office/pickercallbacks.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,20 +43,20 @@ namespace svt
class IFilePickerController
{
public:
- virtual Control* getControl( sal_Int16 _nControlId, sal_Bool _bLabelControl = sal_False ) const = 0;
+ virtual Control* getControl( sal_Int16 _nControlId, sal_Bool _bLabelControl = sal_False ) const = 0;
virtual void enableControl( sal_Int16 _nControlId, sal_Bool _bEnable ) = 0;
- virtual String getCurFilter( ) const = 0;
+ virtual String getCurFilter( ) const = 0;
};
// --------------------------------------------------------------------
class IFilePickerListener
{
public:
- virtual void notify( sal_Int16 _nEventId, sal_Int16 _nControlId ) = 0;
+ virtual void notify( sal_Int16 _nEventId, sal_Int16 _nControlId ) = 0;
};
//.........................................................................
-} // namespace svt
+} // namespace svt
//.........................................................................
#endif // SVTOOLS_PICKER_CALLBACKS_HXX
diff --git a/fpicker/source/unx/gnome/FPServiceInfo.hxx b/fpicker/source/unx/gnome/FPServiceInfo.hxx
index c0352af2b25d..f8d7b7e1e0a0 100644
--- a/fpicker/source/unx/gnome/FPServiceInfo.hxx
+++ b/fpicker/source/unx/gnome/FPServiceInfo.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,14 +37,14 @@
#define FILE_PICKER_SERVICE_NAME "com.sun.star.ui.dialogs.GtkFilePicker"
#define FOLDER_PICKER_SERVICE_NAME "com.sun.star.ui.dialogs.GtkFolderPicker"
-// the implementation names
+// the implementation names
#define FILE_PICKER_IMPL_NAME "com.sun.star.ui.dialogs.SalGtkFilePicker"
#define FOLDER_PICKER_IMPL_NAME "com.sun.star.ui.dialogs.SalGtkFolderPicker"
// the registry key names
// a key under which this service will be registered,
// Format: -> "/ImplName/UNO/SERVICES/ServiceName"
-// <Implementation-Name></UNO/SERVICES/><Service-Name>
+// <Implementation-Name></UNO/SERVICES/><Service-Name>
#define FILE_PICKER_REGKEY_NAME "/com.sun.star.ui.dialogs.SalGtkFilePicker/UNO/SERVICES/com.sun.star.ui.dialogs.GtkFilePicker"
#define FOLDER_PICKER_REGKEY_NAME "/com.sun.star.ui.dialogs.SalGtkFolderPicker/UNO/SERVICES/com.sun.star.ui.dialogs.GtkFolderPicker"
diff --git a/fpicker/source/unx/gnome/FPentry.cxx b/fpicker/source/unx/gnome/FPentry.cxx
index 3c852ceecbbe..1a5708890a4d 100644
--- a/fpicker/source/unx/gnome/FPentry.cxx
+++ b/fpicker/source/unx/gnome/FPentry.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,7 +36,7 @@
#endif
//----------------------------------------------
-// includes of other projects
+// includes of other projects
//----------------------------------------------
#include <cppuhelper/factory.hxx>
#include <com/sun/star/container/XSet.hpp>
@@ -66,22 +66,22 @@ using ::com::sun::star::ui::dialogs::XFilePicker2;
using ::com::sun::star::ui::dialogs::XFolderPicker;
//------------------------------------------------
-//
+//
//------------------------------------------------
-static Reference< XInterface > SAL_CALL createFileInstance(
+static Reference< XInterface > SAL_CALL createFileInstance(
const Reference< XMultiServiceFactory >& rServiceManager )
{
- return Reference< XInterface >(
- static_cast< XFilePicker2* >(
+ return Reference< XInterface >(
+ static_cast< XFilePicker2* >(
new SalGtkFilePicker( rServiceManager ) ) );
}
-static Reference< XInterface > SAL_CALL createFolderInstance(
+static Reference< XInterface > SAL_CALL createFolderInstance(
const Reference< XMultiServiceFactory >& rServiceManager )
{
- return Reference< XInterface >(
- static_cast< XFolderPicker* >(
+ return Reference< XInterface >(
+ static_cast< XFolderPicker* >(
new SalGtkFolderPicker( rServiceManager ) ) );
}
@@ -89,7 +89,7 @@ static Reference< XInterface > SAL_CALL createFolderInstance(
// the three uno functions that will be exported
//------------------------------------------------
-extern "C"
+extern "C"
{
//------------------------------------------------
@@ -114,13 +114,13 @@ sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistr
{
try
{
- Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
+ Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
pXNewKey->createKey( OUString::createFromAscii( FILE_PICKER_REGKEY_NAME ) );
pXNewKey->createKey( OUString::createFromAscii( FOLDER_PICKER_REGKEY_NAME ) );
}
catch( InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "InvalidRegistryException caught" );
+ {
+ OSL_ENSURE( sal_False, "InvalidRegistryException caught" );
bRetVal = sal_False;
}
}
@@ -132,7 +132,7 @@ sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistr
//
//------------------------------------------------
-void* SAL_CALL component_getFactory(
+void* SAL_CALL component_getFactory(
const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ )
{
void* pRet = 0;
@@ -140,8 +140,8 @@ void* SAL_CALL component_getFactory(
if( pSrvManager )
{
if (
- /* crude gtkplug check */ !g_type_from_name( "GdkDisplay" ) ||
- /* old version */ !( gtk_major_version >= 2 && gtk_minor_version >= 4 )
+ /* crude gtkplug check */ !g_type_from_name( "GdkDisplay" ) ||
+ /* old version */ !( gtk_major_version >= 2 && gtk_minor_version >= 4 )
)
{
return 0;
@@ -152,9 +152,9 @@ void* SAL_CALL component_getFactory(
if (0 == rtl_str_compare(pImplName, FILE_PICKER_IMPL_NAME))
{
Sequence< OUString > aSNS( 1 );
- aSNS.getArray( )[0] =
+ aSNS.getArray( )[0] =
OUString::createFromAscii(FILE_PICKER_SERVICE_NAME);
-
+
xFactory = createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
OUString::createFromAscii( pImplName ),
@@ -164,9 +164,9 @@ void* SAL_CALL component_getFactory(
else if (0 == rtl_str_compare(pImplName, FOLDER_PICKER_IMPL_NAME))
{
Sequence< OUString > aSNS( 1 );
- aSNS.getArray( )[0] =
+ aSNS.getArray( )[0] =
OUString::createFromAscii(FOLDER_PICKER_SERVICE_NAME);
-
+
xFactory = createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
OUString::createFromAscii( pImplName ),
@@ -178,7 +178,7 @@ void* SAL_CALL component_getFactory(
{
xFactory->acquire();
pRet = xFactory.get();
- }
+ }
}
return pRet;
diff --git a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
index 4f588b15f44b..6a8579898a1f 100644
--- a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -82,10 +82,10 @@ using namespace ::com::sun::star::uno;
namespace
{
- // controling event notifications
+ // controling event notifications
const bool STARTUP_SUSPENDED = true;
const bool STARTUP_ALIVE = false;
-
+
uno::Sequence<rtl::OUString> SAL_CALL FilePicker_getSupportedServiceNames()
{
uno::Sequence<rtl::OUString> aRet(3);
@@ -132,7 +132,7 @@ void SalGtkFilePicker::InitialMapping()
gtk_widget_set_size_request (m_pPreview, -1, -1);
}
-SalGtkFilePicker::SalGtkFilePicker( const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr ) :
+SalGtkFilePicker::SalGtkFilePicker( const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr ) :
SalGtkPicker(xServiceMgr),
cppu::WeakComponentImplHelper10<
XFilterManager,
@@ -143,12 +143,12 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference<lang::XMultiServiceFact
XFilePicker2,
lang::XInitialization,
util::XCancellable,
- lang::XEventListener,
+ lang::XEventListener,
lang::XServiceInfo>( m_rbHelperMtx ),
m_xServiceMgr( xServiceMgr ),
m_pFilterList( NULL ),
m_pVBox ( NULL ),
- mnHID_FolderChange( 0 ),
+ mnHID_FolderChange( 0 ),
mnHID_SelectionChange( 0 ),
bVersionWidthUnset( false ),
mbPreviewState( sal_False ),
@@ -255,7 +255,7 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference<lang::XMultiServiceFact
setLabel( LISTBOX_##elem##_LABEL, aLabel ); \
break
- switch( i )
+ switch( i )
{
LABEL_LIST( VERSION );
LABEL_LIST( TEMPLATE );
@@ -308,7 +308,7 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference<lang::XMultiServiceFact
m_pFilterView = gtk_tree_view_new_with_model (GTK_TREE_MODEL(m_pFilterStore));
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(m_pFilterView), false);
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW(m_pFilterView), true);
-
+
GtkTreeViewColumn *column;
GtkCellRenderer *cell;
@@ -338,7 +338,7 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference<lang::XMultiServiceFact
G_CALLBACK( filter_changed_cb ), this);
g_signal_connect( G_OBJECT( m_pFilterExpander ), "activate",
G_CALLBACK( expander_changed_cb ), this);
- g_signal_connect (G_OBJECT( m_pDialog ), "map",
+ g_signal_connect (G_OBJECT( m_pDialog ), "map",
G_CALLBACK (dialog_mapped_cb), this);
gtk_widget_show( m_pVBox );
@@ -388,19 +388,19 @@ void SAL_CALL SalGtkFilePicker::disposing( const lang::EventObject& aEvent ) thr
// FilePicker Event functions
//-----------------------------------------------------------------------------------------
-void SAL_CALL SalGtkFilePicker::fileSelectionChanged( FilePickerEvent aEvent )
+void SAL_CALL SalGtkFilePicker::fileSelectionChanged( FilePickerEvent aEvent )
{
OSL_TRACE( "file selection changed");
if (m_xListener.is()) m_xListener->fileSelectionChanged( aEvent );
}
-void SAL_CALL SalGtkFilePicker::directoryChanged( FilePickerEvent aEvent )
+void SAL_CALL SalGtkFilePicker::directoryChanged( FilePickerEvent aEvent )
{
OSL_TRACE("directory changed");
if (m_xListener.is()) m_xListener->directoryChanged( aEvent );
}
-void SAL_CALL SalGtkFilePicker::controlStateChanged( FilePickerEvent aEvent )
+void SAL_CALL SalGtkFilePicker::controlStateChanged( FilePickerEvent aEvent )
{
OSL_TRACE("control state changed");
if (m_xListener.is()) m_xListener->controlStateChanged( aEvent );
@@ -414,7 +414,7 @@ rtl::OUString SAL_CALL SalGtkFilePicker::helpRequested( FilePickerEvent aEvent )
{
rtl::OUString aHelpText;
- ::cppu::OInterfaceContainerHelper* pICHelper =
+ ::cppu::OInterfaceContainerHelper* pICHelper =
rBHelper.getContainer( getCppuType( ( uno::Reference<XFilePickerListener> * )0 ) );
if( pICHelper )
@@ -426,8 +426,8 @@ rtl::OUString SAL_CALL SalGtkFilePicker::helpRequested( FilePickerEvent aEvent )
try
{
/*
- if there are multiple listeners responding
- to this notification the next response
+ if there are multiple listeners responding
+ to this notification the next response
overwrittes the one before if it is not empty
*/
@@ -441,7 +441,7 @@ rtl::OUString SAL_CALL SalGtkFilePicker::helpRequested( FilePickerEvent aEvent )
aHelpText = aTempString;
}
- }
+ }
catch( uno::RuntimeException& )
{
OSL_ENSURE( false, "RuntimeException during event dispatching" );
@@ -457,10 +457,10 @@ rtl::OUString SAL_CALL SalGtkFilePicker::helpRequested( FilePickerEvent aEvent )
struct FilterEntry
{
protected:
- ::rtl::OUString m_sTitle;
- ::rtl::OUString m_sFilter;
+ ::rtl::OUString m_sTitle;
+ ::rtl::OUString m_sFilter;
- UnoFilterList m_aSubFilters;
+ UnoFilterList m_aSubFilters;
public:
FilterEntry( const ::rtl::OUString& _rTitle, const ::rtl::OUString& _rFilter )
@@ -471,21 +471,21 @@ public:
FilterEntry( const ::rtl::OUString& _rTitle, const UnoFilterList& _rSubFilters );
- ::rtl::OUString getTitle() const { return m_sTitle; }
- ::rtl::OUString getFilter() const { return m_sFilter; }
+ ::rtl::OUString getTitle() const { return m_sTitle; }
+ ::rtl::OUString getFilter() const { return m_sFilter; }
/// determines if the filter has sub filter (i.e., the filter is a filter group in real)
- sal_Bool hasSubFilters( ) const;
+ sal_Bool hasSubFilters( ) const;
/** retrieves the filters belonging to the entry
@return
the number of sub filters
*/
- sal_Int32 getSubFilters( UnoFilterList& _rSubFilterList );
+ sal_Int32 getSubFilters( UnoFilterList& _rSubFilterList );
// helpers for iterating the sub filters
- const UnoFilterEntry* beginSubFilters() const { return m_aSubFilters.getConstArray(); }
- const UnoFilterEntry* endSubFilters() const { return m_aSubFilters.getConstArray() + m_aSubFilters.getLength(); }
+ const UnoFilterEntry* beginSubFilters() const { return m_aSubFilters.getConstArray(); }
+ const UnoFilterEntry* endSubFilters() const { return m_aSubFilters.getConstArray() + m_aSubFilters.getLength(); }
};
//=====================================================================
@@ -541,7 +541,7 @@ shrinkFilterName( const rtl::OUString &rFilterName, bool bAllowNoStar = false )
int nBracketEnd = -1;
const sal_Unicode *pStr = rFilterName;
OUString aRealName = rFilterName;
-
+
for( i = aRealName.getLength() - 1; i > 0; i-- )
{
if( pStr[i] == ')' )
@@ -571,7 +571,7 @@ dialog_remove_buttons( GtkDialog *pDialog )
g_return_if_fail( GTK_IS_DIALOG( pDialog ) );
- GList *pChildren =
+ GList *pChildren =
gtk_container_get_children( GTK_CONTAINER( pDialog->action_area ) );
for( GList *p = pChildren; p; p = p->next )
@@ -644,7 +644,7 @@ sal_Bool SalGtkFilePicker::FilterNameExists( const UnoFilterList& _rGroupedFilte
const UnoFilterEntry* pStart = _rGroupedFilters.getConstArray();
const UnoFilterEntry* pEnd = pStart + _rGroupedFilters.getLength();
for( ; pStart != pEnd; ++pStart )
- if( m_pFilterList->end() != ::std::find_if(
+ if( m_pFilterList->end() != ::std::find_if(
m_pFilterList->begin(),
m_pFilterList->end(),
FilterTitleMatch( pStart->First ) ) )
@@ -671,10 +671,10 @@ void SalGtkFilePicker::ensureFilterList( const ::rtl::OUString& _rInitialCurrent
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL SalGtkFilePicker::appendFilter( const rtl::OUString& aTitle, const rtl::OUString& aFilter )
+void SAL_CALL SalGtkFilePicker::appendFilter( const rtl::OUString& aTitle, const rtl::OUString& aFilter )
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
@@ -690,31 +690,31 @@ void SAL_CALL SalGtkFilePicker::appendFilter( const rtl::OUString& aTitle, const
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL SalGtkFilePicker::setCurrentFilter( const rtl::OUString& aTitle )
+void SAL_CALL SalGtkFilePicker::setCurrentFilter( const rtl::OUString& aTitle )
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
- OSL_TRACE( "Setting current filter to %s\n",
+ OSL_TRACE( "Setting current filter to %s\n",
OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 ).getStr() );
if( aTitle != m_aCurrentFilter )
{
m_aCurrentFilter = aTitle;
SetCurFilter( m_aCurrentFilter );
- OSL_TRACE( "REALLY Setting current filter to %s\n",
+ OSL_TRACE( "REALLY Setting current filter to %s\n",
OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 ).getStr() );
}
-
+
// TODO m_pImpl->setCurrentFilter( aTitle );
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
void SalGtkFilePicker::updateCurrentFilterFromName(const gchar* filtername)
@@ -736,7 +736,7 @@ void SalGtkFilePicker::UpdateFilterfromUI()
// Update the filtername from the users selection if they have had a chance to do so.
// If the user explicitly sets a type then use that, if not then take the implicit type
// from the filter of the files glob on which he is currently searching
- if (!mnHID_FolderChange || !mnHID_SelectionChange)
+ if (!mnHID_FolderChange || !mnHID_SelectionChange)
return;
GdkThreadLock aLock;
@@ -768,9 +768,9 @@ rtl::OUString SAL_CALL SalGtkFilePicker::getCurrentFilter() throw( uno::RuntimeE
UpdateFilterfromUI();
- OSL_TRACE( "Returning current filter of %s\n",
+ OSL_TRACE( "Returning current filter of %s\n",
OUStringToOString( m_aCurrentFilter, RTL_TEXTENCODING_UTF8 ).getStr() );
-
+
return m_aCurrentFilter;
}
@@ -778,7 +778,7 @@ rtl::OUString SAL_CALL SalGtkFilePicker::getCurrentFilter() throw( uno::RuntimeE
// XFilterGroupManager functions
//-----------------------------------------------------------------------------------------
-void SAL_CALL SalGtkFilePicker::appendFilterGroup( const rtl::OUString& /*sGroupTitle*/, const uno::Sequence<beans::StringPair>& aFilters )
+void SAL_CALL SalGtkFilePicker::appendFilterGroup( const rtl::OUString& /*sGroupTitle*/, const uno::Sequence<beans::StringPair>& aFilters )
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
@@ -817,7 +817,7 @@ void SAL_CALL SalGtkFilePicker::setMultiSelectionMode( sal_Bool bMode ) throw( u
gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER(m_pDialog), bMode );
}
-void SAL_CALL SalGtkFilePicker::setDefaultName( const rtl::OUString& aName )
+void SAL_CALL SalGtkFilePicker::setDefaultName( const rtl::OUString& aName )
throw( uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
@@ -832,7 +832,7 @@ void SAL_CALL SalGtkFilePicker::setDefaultName( const rtl::OUString& aName )
gtk_file_chooser_set_current_name( GTK_FILE_CHOOSER( m_pDialog ), aStr.getStr() );
}
-void SAL_CALL SalGtkFilePicker::setDisplayDirectory( const rtl::OUString& rDirectory )
+void SAL_CALL SalGtkFilePicker::setDisplayDirectory( const rtl::OUString& rDirectory )
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
implsetDisplayDirectory(rDirectory);
@@ -862,7 +862,7 @@ uno::Sequence<rtl::OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw
GdkThreadLock aLock;
GSList* pPathList = gtk_file_chooser_get_uris( GTK_FILE_CHOOSER(m_pDialog) );
-
+
int nCount = g_slist_length( pPathList );
int nIndex = 0;
OSL_TRACE( "GETFILES called %d files\n", nCount );
@@ -870,7 +870,7 @@ uno::Sequence<rtl::OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw
// get the current action setting
GtkFileChooserAction eAction = gtk_file_chooser_get_action(
GTK_FILE_CHOOSER( m_pDialog ));
-
+
uno::Sequence< rtl::OUString > aSelectedFiles(nCount);
// Convert to OOo
@@ -943,17 +943,17 @@ uno::Sequence<rtl::OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw
sFilterName = m_aInitialFilter;
}
- OSL_TRACE( "2: current filter is %s\n",
+ OSL_TRACE( "2: current filter is %s\n",
OUStringToOString( sFilterName, RTL_TEXTENCODING_UTF8 ).getStr() );
- FilterList::iterator aListIter = ::std::find_if(
+ FilterList::iterator aListIter = ::std::find_if(
m_pFilterList->begin(), m_pFilterList->end(), FilterTitleMatch(sFilterName) );
OUString aFilter;
if (aListIter != m_pFilterList->end())
aFilter = aListIter->getFilter();
- OSL_TRACE( "turned into %s\n",
+ OSL_TRACE( "turned into %s\n",
OUStringToOString( aFilter, RTL_TEXTENCODING_UTF8 ).getStr() );
nTokenIndex = 0;
@@ -962,7 +962,7 @@ uno::Sequence<rtl::OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw
do
{
sToken = aFilter.getToken( 0, '.', nTokenIndex );
-
+
if ( sToken.lastIndexOf( ';' ) != -1 )
{
sal_Int32 nZero = 0;
@@ -1017,11 +1017,11 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException )
SetFilters();
- mnHID_FolderChange =
+ mnHID_FolderChange =
g_signal_connect( GTK_FILE_CHOOSER( m_pDialog ), "current-folder-changed",
G_CALLBACK( folder_changed_cb ), ( gpointer )this );
- mnHID_SelectionChange =
+ mnHID_SelectionChange =
g_signal_connect( GTK_FILE_CHOOSER( m_pDialog ), "selection-changed",
G_CALLBACK( selection_changed_cb ), ( gpointer )this );
@@ -1050,8 +1050,8 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException )
{
CResourceProvider aResProvider;
GtkWidget *dlg;
-
- dlg = gtk_message_dialog_new( NULL,
+
+ dlg = gtk_message_dialog_new( NULL,
GTK_DIALOG_MODAL,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO,
@@ -1062,14 +1062,14 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException )
gtk_window_set_title( GTK_WINDOW( dlg ),
OUStringToOString(aResProvider.getResString(FILE_PICKER_TITLE_SAVE ),
RTL_TEXTENCODING_UTF8 ).getStr() );
-
+
RunDialog* pAnotherDialog = new RunDialog(dlg, xToolkit);
uno::Reference < awt::XTopWindowListener > xAnotherLifeCycle(pAnotherDialog);
btn = pAnotherDialog->run();
gtk_widget_destroy( dlg );
}
-
+
if( btn == GTK_RESPONSE_YES )
retVal = ExecutableDialogResults::OK;
}
@@ -1082,7 +1082,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException )
retVal = ExecutableDialogResults::CANCEL;
break;
- case 1: //PLAY
+ case 1: //PLAY
{
FilePickerEvent evt;
evt.ElementId = PUSHBUTTON_PLAY;
@@ -1097,12 +1097,12 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException )
break;
}
}
-
+
if (mnHID_FolderChange)
g_signal_handler_disconnect(GTK_FILE_CHOOSER( m_pDialog ), mnHID_FolderChange);
if (mnHID_SelectionChange)
g_signal_handler_disconnect(GTK_FILE_CHOOSER( m_pDialog ), mnHID_SelectionChange);
-
+
return retVal;
}
@@ -1201,7 +1201,7 @@ void SalGtkFilePicker::HandleSetListValue(GtkComboBox *pWidget, sal_Int16 nContr
sal_Int32 nItemCount = aStringList.getLength();
for (sal_Int32 i = 0; i < nItemCount; ++i)
{
- gtk_combo_box_append_text(pWidget,
+ gtk_combo_box_append_text(pWidget,
rtl::OUStringToOString(aStringList[i], RTL_TEXTENCODING_UTF8).getStr());
if (!bVersionWidthUnset)
{
@@ -1224,7 +1224,7 @@ void SalGtkFilePicker::HandleSetListValue(GtkComboBox *pWidget, sal_Int16 nContr
gint nItems = 0;
do
{
- nItems =
+ nItems =
gtk_tree_model_iter_n_children(
gtk_combo_box_get_model(pWidget), NULL);
for (gint nI = 0; nI < nItems; ++nI)
@@ -1262,7 +1262,7 @@ uno::Any SalGtkFilePicker::HandleGetListValue(GtkComboBox *pWidget, sal_Int16 nC
case ControlActions::GET_ITEMS:
{
Sequence< OUString > aItemList;
-
+
GtkTreeModel *pTree = gtk_combo_box_get_model(pWidget);
GtkTreeIter iter;
if (gtk_tree_model_get_iter_first(pTree, &iter))
@@ -1274,7 +1274,7 @@ uno::Any SalGtkFilePicker::HandleGetListValue(GtkComboBox *pWidget, sal_Int16 nC
for (sal_Int32 i=0; i < nSize; ++i)
{
gchar *item;
- gtk_tree_model_get(gtk_combo_box_get_model(pWidget),
+ gtk_tree_model_get(gtk_combo_box_get_model(pWidget),
&iter, 0, &item, -1);
aItemList[i] = OUString(item, strlen(item), RTL_TEXTENCODING_UTF8);
g_free(item);
@@ -1290,7 +1290,7 @@ uno::Any SalGtkFilePicker::HandleGetListValue(GtkComboBox *pWidget, sal_Int16 nC
if (gtk_combo_box_get_active_iter(pWidget, &iter))
{
gchar *item;
- gtk_tree_model_get(gtk_combo_box_get_model(pWidget),
+ gtk_tree_model_get(gtk_combo_box_get_model(pWidget),
&iter, 0, &item, -1);
OUString sItem(item, strlen(item), RTL_TEXTENCODING_UTF8);
aAny <<= sItem;
@@ -1311,7 +1311,7 @@ uno::Any SalGtkFilePicker::HandleGetListValue(GtkComboBox *pWidget, sal_Int16 nC
return aAny;
}
-void SAL_CALL SalGtkFilePicker::setValue( sal_Int16 nControlId, sal_Int16 nControlAction, const uno::Any& rValue )
+void SAL_CALL SalGtkFilePicker::setValue( sal_Int16 nControlId, sal_Int16 nControlAction, const uno::Any& rValue )
throw( uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
@@ -1334,12 +1334,12 @@ void SAL_CALL SalGtkFilePicker::setValue( sal_Int16 nControlId, sal_Int16 nContr
HandleSetListValue(GTK_COMBO_BOX(pWidget), nControlAction, rValue);
else
{
- OSL_TRACE("Can't set value on button / list %d %d\n",
+ OSL_TRACE("Can't set value on button / list %d %d\n",
nControlId, nControlAction);
}
}
-uno::Any SAL_CALL SalGtkFilePicker::getValue( sal_Int16 nControlId, sal_Int16 nControlAction )
+uno::Any SAL_CALL SalGtkFilePicker::getValue( sal_Int16 nControlId, sal_Int16 nControlAction )
throw( uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
@@ -1358,13 +1358,13 @@ uno::Any SAL_CALL SalGtkFilePicker::getValue( sal_Int16 nControlId, sal_Int16 nC
else if( tType == GTK_TYPE_COMBO_BOX )
aRetval = HandleGetListValue(GTK_COMBO_BOX(pWidget), nControlAction);
else
- OSL_TRACE("Can't get value on button / list %d %d\n",
+ OSL_TRACE("Can't get value on button / list %d %d\n",
nControlId, nControlAction );
return aRetval;
}
-void SAL_CALL SalGtkFilePicker::enableControl( sal_Int16 nControlId, sal_Bool bEnable )
+void SAL_CALL SalGtkFilePicker::enableControl( sal_Int16 nControlId, sal_Bool bEnable )
throw( uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
@@ -1392,7 +1392,7 @@ throw( uno::RuntimeException )
OSL_TRACE("enable unknown control %d\n", nControlId );
}
-void SAL_CALL SalGtkFilePicker::setLabel( sal_Int16 nControlId, const ::rtl::OUString& rLabel )
+void SAL_CALL SalGtkFilePicker::setLabel( sal_Int16 nControlId, const ::rtl::OUString& rLabel )
throw( uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
@@ -1484,7 +1484,7 @@ sal_Int32 SAL_CALL SalGtkFilePicker::getAvailableHeight() throw( uno::RuntimeExc
return m_PreviewImageHeight;
}
-void SAL_CALL SalGtkFilePicker::setImage( sal_Int16 /*aImageFormat*/, const uno::Any& /*aImage*/ )
+void SAL_CALL SalGtkFilePicker::setImage( sal_Int16 /*aImageFormat*/, const uno::Any& /*aImage*/ )
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
@@ -1575,7 +1575,7 @@ void SalGtkFilePicker::update_preview_cb( GtkFileChooser *file_chooser, SalGtkFi
pobjFP->m_PreviewImageHeight, NULL );
have_preview = ( pixbuf != NULL );
-
+
gtk_image_set_from_pixbuf( GTK_IMAGE( preview ), pixbuf );
if( pixbuf )
gdk_pixbuf_unref( pixbuf );
@@ -1633,7 +1633,7 @@ sal_Bool SAL_CALL SalGtkFilePicker::getShowState() throw( uno::RuntimeException
// XInitialization
//------------------------------------------------------------------------------------
-void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArguments )
+void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArguments )
throw( uno::Exception, uno::RuntimeException )
{
// parameter checking
@@ -1642,7 +1642,7 @@ void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArgu
throw lang::IllegalArgumentException(
rtl::OUString::createFromAscii( "no arguments" ),
static_cast<XFilePicker2*>( this ), 1 );
-
+
aAny = aArguments[0];
if( ( aAny.getValueType() != ::getCppuType( ( sal_Int16* )0 ) ) &&
@@ -1709,7 +1709,7 @@ void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArgu
mbListVisibility[IMAGE_TEMPLATE] = true;
// TODO
break;
- case FILEOPEN_PLAY:
+ case FILEOPEN_PLAY:
eAction = GTK_FILE_CHOOSER_ACTION_OPEN;
first_button_text = GTK_STOCK_OPEN;
mbButtonVisibility[PLAY] = true;
@@ -1805,24 +1805,24 @@ void SAL_CALL SalGtkFilePicker::cancel() throw( uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
- // TODO m_pImpl->cancel();
+ // TODO m_pImpl->cancel();
}
// -------------------------------------------------
// XServiceInfo
// -------------------------------------------------
-rtl::OUString SAL_CALL SalGtkFilePicker::getImplementationName()
+rtl::OUString SAL_CALL SalGtkFilePicker::getImplementationName()
throw( uno::RuntimeException )
{
return rtl::OUString::createFromAscii( FILE_PICKER_IMPL_NAME );
}
// -------------------------------------------------
-// XServiceInfo
+// XServiceInfo
// -------------------------------------------------
-sal_Bool SAL_CALL SalGtkFilePicker::supportsService( const rtl::OUString& ServiceName )
+sal_Bool SAL_CALL SalGtkFilePicker::supportsService( const rtl::OUString& ServiceName )
throw( uno::RuntimeException )
{
uno::Sequence <rtl::OUString> SupportedServicesNames = FilePicker_getSupportedServiceNames();
@@ -1835,10 +1835,10 @@ sal_Bool SAL_CALL SalGtkFilePicker::supportsService( const rtl::OUString& Servic
}
// -------------------------------------------------
-// XServiceInfo
+// XServiceInfo
// -------------------------------------------------
-uno::Sequence<rtl::OUString> SAL_CALL SalGtkFilePicker::getSupportedServiceNames()
+uno::Sequence<rtl::OUString> SAL_CALL SalGtkFilePicker::getSupportedServiceNames()
throw( uno::RuntimeException )
{
return FilePicker_getSupportedServiceNames();
@@ -1936,7 +1936,7 @@ GtkFileFilter* SalGtkFilePicker::implAddFilter( const OUString& rFilter, const O
aTokens += OUString::createFromAscii(",");
aTokens = aTokens += aToken;
gtk_file_filter_add_custom (filter, GTK_FILE_FILTER_URI,
- case_insensitive_filter,
+ case_insensitive_filter,
g_strdup( rtl::OUStringToOString( aToken, RTL_TEXTENCODING_UTF8 ) ),
(GDestroyNotify) g_free );
@@ -1945,8 +1945,8 @@ GtkFileFilter* SalGtkFilePicker::implAddFilter( const OUString& rFilter, const O
#ifdef DEBUG
else
{
- g_warning( "Duff filter token '%s'\n",
- (const sal_Char *) rtl::OUStringToOString(
+ g_warning( "Duff filter token '%s'\n",
+ (const sal_Char *) rtl::OUStringToOString(
rType.getToken( 0, ';', nIndex ), RTL_TEXTENCODING_UTF8 ) );
}
#endif
@@ -1974,7 +1974,7 @@ void SalGtkFilePicker::implAddFilterGroup( const OUString& /*_rFilter*/, const S
{
// Gtk+ has no filter group concept I think so ...
// implAddFilter( _rFilter, String() );
- const StringPair* pSubFilters = _rFilters.getConstArray();
+ const StringPair* pSubFilters = _rFilters.getConstArray();
const StringPair* pSubFiltersEnd = pSubFilters + _rFilters.getLength();
for( ; pSubFilters != pSubFiltersEnd; ++pSubFilters )
implAddFilter( pSubFilters->First, pSubFilters->Second );
diff --git a/fpicker/source/unx/gnome/SalGtkFilePicker.hxx b/fpicker/source/unx/gnome/SalGtkFilePicker.hxx
index b7faf522e550..5c52d9aaad8b 100644
--- a/fpicker/source/unx/gnome/SalGtkFilePicker.hxx
+++ b/fpicker/source/unx/gnome/SalGtkFilePicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,7 +30,7 @@
#define _SALGTKFILEPICKER_HXX_
//_______________________________________________________________________________________________________________________
-// includes of other projects
+// includes of other projects
//_______________________________________________________________________________________________________________________
#include <cppuhelper/compbase10.hxx>
@@ -63,17 +63,17 @@ using namespace rtl;
struct FilterEntry;
struct ElementEntry_Impl;
-typedef ::std::list < FilterEntry > FilterList;
-typedef ::std::list < ElementEntry_Impl > ElementList;
-typedef ::com::sun::star::beans::StringPair UnoFilterEntry;
-typedef ::com::sun::star::uno::Sequence< UnoFilterEntry > UnoFilterList; // can be transported more effectively
+typedef ::std::list < FilterEntry > FilterList;
+typedef ::std::list < ElementEntry_Impl > ElementList;
+typedef ::com::sun::star::beans::StringPair UnoFilterEntry;
+typedef ::com::sun::star::uno::Sequence< UnoFilterEntry > UnoFilterList; // can be transported more effectively
//----------------------------------------------------------
-// class declaration
+// class declaration
//----------------------------------------------------------
-class SalGtkFilePicker :
+class SalGtkFilePicker :
public SalGtkPicker,
public cppu::WeakComponentImplHelper10<
::com::sun::star::ui::dialogs::XFilterManager,
@@ -85,7 +85,7 @@ class SalGtkFilePicker :
::com::sun::star::lang::XInitialization,
::com::sun::star::util::XCancellable,
::com::sun::star::lang::XEventListener,
- ::com::sun::star::lang::XServiceInfo >
+ ::com::sun::star::lang::XServiceInfo >
{
public:
@@ -95,40 +95,40 @@ class SalGtkFilePicker :
//------------------------------------------------------------------------------------
// XFilePickerNotifier
//------------------------------------------------------------------------------------
-
- virtual void SAL_CALL addFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
+
+ virtual void SAL_CALL addFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
+ virtual void SAL_CALL removeFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XExecutableDialog functions
//------------------------------------------------------------------------------------
-
- virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle )
+
+ virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle )
throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Int16 SAL_CALL execute( )
+ virtual sal_Int16 SAL_CALL execute( )
throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XFilePicker functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL setMultiSelectionMode( sal_Bool bMode )
+ virtual void SAL_CALL setMultiSelectionMode( sal_Bool bMode )
throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setDefaultName( const ::rtl::OUString& aName )
+ virtual void SAL_CALL setDefaultName( const ::rtl::OUString& aName )
throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& aDirectory )
- throw( com::sun::star::lang::IllegalArgumentException,
+ virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& aDirectory )
+ throw( com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getDisplayDirectory( )
+ virtual ::rtl::OUString SAL_CALL getDisplayDirectory( )
throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getFiles( )
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getFiles( )
throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
@@ -137,7 +137,7 @@ class SalGtkFilePicker :
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSelectedFiles()
throw (::com::sun::star::uno::RuntimeException);
-
+
//------------------------------------------------------------------------------------
// XFilterManager functions
//------------------------------------------------------------------------------------
@@ -145,36 +145,36 @@ class SalGtkFilePicker :
virtual void SAL_CALL appendFilter( const ::rtl::OUString& aTitle, const ::rtl::OUString& aFilter )
throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setCurrentFilter( const ::rtl::OUString& aTitle )
+ virtual void SAL_CALL setCurrentFilter( const ::rtl::OUString& aTitle )
throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getCurrentFilter( )
+ virtual ::rtl::OUString SAL_CALL getCurrentFilter( )
throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XFilterGroupManager functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL appendFilterGroup( const ::rtl::OUString& sGroupTitle, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair >& aFilters )
+ virtual void SAL_CALL appendFilterGroup( const ::rtl::OUString& sGroupTitle, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair >& aFilters )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
//------------------------------------------------------------------------------------
// XFilePickerControlAccess functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL setValue( sal_Int16 nControlId, sal_Int16 nControlAction, const ::com::sun::star::uno::Any& aValue )
+ virtual void SAL_CALL setValue( sal_Int16 nControlId, sal_Int16 nControlAction, const ::com::sun::star::uno::Any& aValue )
throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getValue( sal_Int16 aControlId, sal_Int16 aControlAction )
+ virtual ::com::sun::star::uno::Any SAL_CALL getValue( sal_Int16 aControlId, sal_Int16 aControlAction )
throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL enableControl( sal_Int16 nControlId, sal_Bool bEnable )
+ virtual void SAL_CALL enableControl( sal_Int16 nControlId, sal_Bool bEnable )
throw(::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setLabel( sal_Int16 nControlId, const ::rtl::OUString& aLabel )
+ virtual void SAL_CALL setLabel( sal_Int16 nControlId, const ::rtl::OUString& aLabel )
throw (::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getLabel( sal_Int16 nControlId )
+ virtual ::rtl::OUString SAL_CALL getLabel( sal_Int16 nControlId )
throw (::com::sun::star::uno::RuntimeException);
//------------------------------------------------
@@ -193,7 +193,7 @@ class SalGtkFilePicker :
virtual sal_Int32 SAL_CALL getAvailableHeight( )
throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage )
+ virtual void SAL_CALL setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL setShowState( sal_Bool bShowState )
@@ -221,26 +221,26 @@ class SalGtkFilePicker :
//------------------------------------------------
using cppu::WeakComponentImplHelperBase::disposing;
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent )
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent )
throw(::com::sun::star::uno::RuntimeException);
//------------------------------------------------
// XServiceInfo
- //------------------------------------------------
+ //------------------------------------------------
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
+ virtual ::rtl::OUString SAL_CALL getImplementationName( )
throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
throw(::com::sun::star::uno::RuntimeException);
//------------------------------------------------------------------------------------
// FilePicker Event functions
//------------------------------------------------------------------------------------
-
+
void SAL_CALL fileSelectionChanged( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent );
void SAL_CALL directoryChanged( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent );
rtl::OUString SAL_CALL helpRequested( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent ) const;
@@ -248,7 +248,7 @@ class SalGtkFilePicker :
private:
// prevent copy and assignment
- SalGtkFilePicker( const SalGtkFilePicker& );
+ SalGtkFilePicker( const SalGtkFilePicker& );
SalGtkFilePicker& operator=( const SalGtkFilePicker& );
sal_Bool FilterNameExists( const ::rtl::OUString& rTitle );
@@ -270,7 +270,7 @@ class SalGtkFilePicker :
GtkWidget *m_pFilterView;
GtkListStore *m_pFilterStore;
- enum {
+ enum {
AUTOEXTENSION,
PASSWORD,
FILTEROPTIONS,
@@ -294,7 +294,7 @@ class SalGtkFilePicker :
GtkWidget *m_pButtons[ BUTTON_LAST ];
- enum {
+ enum {
VERSION,
TEMPLATE,
IMAGE_TEMPLATE,
@@ -310,8 +310,8 @@ class SalGtkFilePicker :
gulong mnHID_FolderChange;
gulong mnHID_SelectionChange;
- ::rtl::OUString m_aCurrentFilter;
- ::rtl::OUString m_aInitialFilter;
+ ::rtl::OUString m_aCurrentFilter;
+ ::rtl::OUString m_aInitialFilter;
bool bVersionWidthUnset;
sal_Bool mbPreviewState;
@@ -320,7 +320,7 @@ class SalGtkFilePicker :
GtkFileFilter* m_pPseudoFilter;
sal_Int32 m_PreviewImageWidth;
sal_Int32 m_PreviewImageHeight;
-
+
GtkWidget *getWidget( sal_Int16 nControlId, GType *pType = NULL);
void SetCurFilter( const OUString& rFilter );
@@ -335,7 +335,7 @@ class SalGtkFilePicker :
void unselect_type();
void InitialMapping();
- void HandleSetListValue(GtkComboBox *pWidget, sal_Int16 nControlAction,
+ void HandleSetListValue(GtkComboBox *pWidget, sal_Int16 nControlAction,
const ::com::sun::star::uno::Any& rValue);
::com::sun::star::uno::Any HandleGetListValue(GtkComboBox *pWidget, sal_Int16 nControlAction) const;
@@ -347,10 +347,10 @@ class SalGtkFilePicker :
static void selection_changed_cb (GtkFileChooser *file_chooser, SalGtkFilePicker *pobjFP);
static void update_preview_cb (GtkFileChooser *file_chooser, SalGtkFilePicker *pobjFP);
static void dialog_mapped_cb(GtkWidget *widget, SalGtkFilePicker *pobjFP);
- public:
+ public:
virtual ~SalGtkFilePicker();
-};
+};
#endif // _SALGTKFILEPICKER_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx b/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx
index dba73a512ce8..caeb1e8c361e 100644
--- a/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -211,24 +211,24 @@ void SAL_CALL SalGtkFolderPicker::cancel() throw( uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
- // TODO m_pImpl->cancel();
+ // TODO m_pImpl->cancel();
}
// -------------------------------------------------
// XServiceInfo
// -------------------------------------------------
-rtl::OUString SAL_CALL SalGtkFolderPicker::getImplementationName()
+rtl::OUString SAL_CALL SalGtkFolderPicker::getImplementationName()
throw( uno::RuntimeException )
{
return rtl::OUString::createFromAscii( FOLDER_PICKER_IMPL_NAME );
}
// -------------------------------------------------
-// XServiceInfo
+// XServiceInfo
// -------------------------------------------------
-sal_Bool SAL_CALL SalGtkFolderPicker::supportsService( const rtl::OUString& ServiceName )
+sal_Bool SAL_CALL SalGtkFolderPicker::supportsService( const rtl::OUString& ServiceName )
throw( uno::RuntimeException )
{
uno::Sequence <rtl::OUString> SupportedServicesNames = FolderPicker_getSupportedServiceNames();
@@ -241,10 +241,10 @@ sal_Bool SAL_CALL SalGtkFolderPicker::supportsService( const rtl::OUString& Serv
}
// -------------------------------------------------
-// XServiceInfo
+// XServiceInfo
// -------------------------------------------------
-uno::Sequence<rtl::OUString> SAL_CALL SalGtkFolderPicker::getSupportedServiceNames()
+uno::Sequence<rtl::OUString> SAL_CALL SalGtkFolderPicker::getSupportedServiceNames()
throw( uno::RuntimeException )
{
return FolderPicker_getSupportedServiceNames();
diff --git a/fpicker/source/unx/gnome/SalGtkFolderPicker.hxx b/fpicker/source/unx/gnome/SalGtkFolderPicker.hxx
index 5110ea86a0f6..170447bf7a75 100644
--- a/fpicker/source/unx/gnome/SalGtkFolderPicker.hxx
+++ b/fpicker/source/unx/gnome/SalGtkFolderPicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,7 +30,7 @@
#define _SALGTKFOLDERPICKER_HXX_
//_______________________________________________________________________________________________________________________
-// includes of other projects
+// includes of other projects
//_______________________________________________________________________________________________________________________
#include <cppuhelper/implbase3.hxx>
@@ -44,13 +44,13 @@
#include <list>
//----------------------------------------------------------
-// class declaration
+// class declaration
//----------------------------------------------------------
-class SalGtkFolderPicker :
+class SalGtkFolderPicker :
public SalGtkPicker,
public cppu::WeakImplHelper3<
- ::com::sun::star::ui::dialogs::XFolderPicker,
+ ::com::sun::star::ui::dialogs::XFolderPicker,
::com::sun::star::lang::XServiceInfo,
::com::sun::star::util::XCancellable >
{
@@ -62,11 +62,11 @@ class SalGtkFolderPicker :
//------------------------------------------------------------------------------------
// XExecutableDialog functions
//------------------------------------------------------------------------------------
-
- virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle )
+
+ virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle )
throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Int16 SAL_CALL execute( )
+ virtual sal_Int16 SAL_CALL execute( )
throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
@@ -88,15 +88,15 @@ class SalGtkFolderPicker :
//------------------------------------------------
// XServiceInfo
- //------------------------------------------------
+ //------------------------------------------------
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
+ virtual ::rtl::OUString SAL_CALL getImplementationName( )
throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
throw(::com::sun::star::uno::RuntimeException);
//------------------------------------------------
@@ -110,17 +110,17 @@ class SalGtkFolderPicker :
// XEventListener
//------------------------------------------------
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent )
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent )
throw(::com::sun::star::uno::RuntimeException);
private:
// prevent copy and assignment
- SalGtkFolderPicker( const SalGtkFolderPicker& );
+ SalGtkFolderPicker( const SalGtkFolderPicker& );
SalGtkFolderPicker& operator=( const SalGtkFolderPicker& );
private:
// to instanciate own services
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr;
-};
+};
#endif // _SALGTKFOLDERPICKER_HXX_
diff --git a/fpicker/source/unx/gnome/SalGtkPicker.cxx b/fpicker/source/unx/gnome/SalGtkPicker.cxx
index 70b99fcd543b..ceea7444ce74 100644
--- a/fpicker/source/unx/gnome/SalGtkPicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkPicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -83,7 +83,7 @@ rtl::OUString SalGtkPicker::uritounicode(const gchar* pIn)
gchar *pEncodedFileName = g_filename_from_uri(pIn, NULL, NULL);
if ( pEncodedFileName )
{
- rtl::OUString sEncoded(pEncodedFileName, strlen(pEncodedFileName),
+ rtl::OUString sEncoded(pEncodedFileName, strlen(pEncodedFileName),
osl_getThreadTextEncoding());
INetURLObject aCurrentURL(sEncoded, INetURLObject::FSYS_UNX);
aCurrentURL.SetHost(aURL.GetHost());
@@ -193,18 +193,18 @@ void RunDialog::cancel()
gtk_widget_hide( mpDialog );
}
-gint RunDialog::run()
-{
+gint RunDialog::run()
+{
if (mxToolkit.is())
mxToolkit->addTopWindowListener(this);
GdkThreadLock aLock;
- gint nStatus = gtk_dialog_run( GTK_DIALOG( mpDialog ) );
+ gint nStatus = gtk_dialog_run( GTK_DIALOG( mpDialog ) );
if (mxToolkit.is())
mxToolkit->removeTopWindowListener(this);
- if (nStatus != 1) //PLAY
+ if (nStatus != 1) //PLAY
gtk_widget_hide( mpDialog );
return nStatus;
@@ -259,7 +259,7 @@ SalGtkPicker::~SalGtkPicker()
}
}
-void SAL_CALL SalGtkPicker::implsetDisplayDirectory( const rtl::OUString& aDirectory )
+void SAL_CALL SalGtkPicker::implsetDisplayDirectory( const rtl::OUString& aDirectory )
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
@@ -279,10 +279,10 @@ void SAL_CALL SalGtkPicker::implsetDisplayDirectory( const rtl::OUString& aDirec
rtl::OUString SAL_CALL SalGtkPicker::implgetDisplayDirectory() throw( uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
-
+
GdkThreadLock aLock;
- gchar* pCurrentFolder =
+ gchar* pCurrentFolder =
gtk_file_chooser_get_current_folder_uri( GTK_FILE_CHOOSER( m_pDialog ) );
::rtl::OUString aCurrentFolderName = uritounicode(pCurrentFolder);
g_free( pCurrentFolder );
@@ -293,7 +293,7 @@ rtl::OUString SAL_CALL SalGtkPicker::implgetDisplayDirectory() throw( uno::Runti
void SAL_CALL SalGtkPicker::implsetTitle( const rtl::OUString& aTitle ) throw( uno::RuntimeException )
{
OSL_ASSERT( m_pDialog != NULL );
-
+
::rtl::OString aWindowTitle = OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 );
GdkThreadLock aLock;
diff --git a/fpicker/source/unx/gnome/SalGtkPicker.hxx b/fpicker/source/unx/gnome/SalGtkPicker.hxx
index 7b6a2e4850f7..889790dae773 100644
--- a/fpicker/source/unx/gnome/SalGtkPicker.hxx
+++ b/fpicker/source/unx/gnome/SalGtkPicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,7 +30,7 @@
#define _SALGTKFPICKER_HXX_
//_____________________________________________________________________________
-// includes of other projects
+// includes of other projects
//_____________________________________________________________________________
#include <osl/mutex.hxx>
@@ -48,7 +48,7 @@
#include <gdk/gdkkeysyms.h>
//----------------------------------------------------------
-// class declaration
+// class declaration
//----------------------------------------------------------
class SalGtkPicker
@@ -60,7 +60,7 @@ class SalGtkPicker
osl::Mutex m_rbHelperMtx;
GtkWidget *m_pDialog;
protected:
- virtual void SAL_CALL implsetTitle( const ::rtl::OUString& aTitle )
+ virtual void SAL_CALL implsetTitle( const ::rtl::OUString& aTitle )
throw( ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL implsetDisplayDirectory( const rtl::OUString& rDirectory )
@@ -82,7 +82,7 @@ public:
//Run the Gtk Dialog. Watch for any "new windows" created while we're
//executing and consider that a CANCEL event to avoid e.g. "file cannot be opened"
//modal dialogs and this one getting locked if some other API call causes this
-//to happen while we're opened waiting for user input, e.g.
+//to happen while we're opened waiting for user input, e.g.
//https://bugzilla.redhat.com/show_bug.cgi?id=441108
class RunDialog :
public cppu::WeakComponentImplHelper1< ::com::sun::star::awt::XTopWindowListener >
diff --git a/fpicker/source/unx/gnome/eventnotification.hxx b/fpicker/source/unx/gnome/eventnotification.hxx
index 3866ca59946f..f0cefd679465 100644
--- a/fpicker/source/unx/gnome/eventnotification.hxx
+++ b/fpicker/source/unx/gnome/eventnotification.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@
// notification, because there are
// two types of filepicker notifications
// with and without parameter
-// this is an application of the
+// this is an application of the
// "command" pattern see GoF
//-----------------------------------
diff --git a/fpicker/source/unx/gnome/fps_gnome.xml b/fpicker/source/unx/gnome/fps_gnome.xml
index d4dd4f9231d6..c4d320c6dd22 100644
--- a/fpicker/source/unx/gnome/fps_gnome.xml
+++ b/fpicker/source/unx/gnome/fps_gnome.xml
@@ -4,76 +4,76 @@
<module-name>fps</module-name>
<component-description>
<author> Jan Holesovsky </author>
- <name> com.sun.star.comp.ui.dialogs.FilePicker </name>
+ <name> com.sun.star.comp.ui.dialogs.FilePicker </name>
<description>
The Gnome implementation of the FilePicker service.
</description>
<loader-name>com.sun.star.loader.SharedLibrary</loader-name>
- <language> c++ </language>
+ <language> c++ </language>
<status value="beta"/>
- <supported-service> com.sun.star.ui.dialogs.FilePicker </supported-service>
+ <supported-service> com.sun.star.ui.dialogs.FilePicker </supported-service>
<service-dependency>...</service-dependency>
- <type> com.sun.star.ui.dialogs.XExecutableDialog </type>
- <type> com.sun.star.ui.dialogs.XFilePicker </type>
- <type> com.sun.star.ui.dialogs.XFilterManager </type>
- <type> com.sun.star.ui.dialogs.XFilterGroupManager </type>
- <type> com.sun.star.ui.dialogs.XFilePickerListener </type>
- <type> com.sun.star.ui.dialogs.ExecutableDialogException </type>
- <type> com.sun.star.ui.dialogs.XFilePickerNotifier </type>
- <type> com.sun.star.ui.dialogs.XFilePickerControlAccess </type>
+ <type> com.sun.star.ui.dialogs.XExecutableDialog </type>
+ <type> com.sun.star.ui.dialogs.XFilePicker </type>
+ <type> com.sun.star.ui.dialogs.XFilterManager </type>
+ <type> com.sun.star.ui.dialogs.XFilterGroupManager </type>
+ <type> com.sun.star.ui.dialogs.XFilePickerListener </type>
+ <type> com.sun.star.ui.dialogs.ExecutableDialogException </type>
+ <type> com.sun.star.ui.dialogs.XFilePickerNotifier </type>
+ <type> com.sun.star.ui.dialogs.XFilePickerControlAccess </type>
<type> com.sun.star.ui.dialogs.XFilePreview </type>
<type> com.sun.star.ui.dialogs.ExtendedFilePickerElementIds </type>
- <type> com.sun.star.ui.dialogs.ExecutableDialogResults </type>
- <type> com.sun.star.ui.dialogs.FilePickerEvent </type>
+ <type> com.sun.star.ui.dialogs.ExecutableDialogResults </type>
+ <type> com.sun.star.ui.dialogs.FilePickerEvent </type>
<type> com.sun.star.ui.dialogs.CommonFilePickerElementIds </type>
<type> com.sun.star.ui.dialogs.ListboxControlActions </type>
- <type> com.sun.star.ui.dialogs.TemplateDescription </type>
- <type> com.sun.star.ui.dialogs.FilePreviewImageFormats </type>
- <type> com.sun.star.util.XCancellable </type>
- <type> com.sun.star.lang.XComponent </type>
- <type> com.sun.star.lang.XMultiServiceFactory </type>
- <type> com.sun.star.lang.XSingleServiceFactory </type>
- <type> com.sun.star.lang.XServiceInfo </type>
- <type> com.sun.star.lang.XTypeProvider </type>
- <type> com.sun.star.lang.IllegalArgumentException </type>
- <type> com.sun.star.uno.TypeClass </type>
- <type> com.sun.star.uno.XWeak </type>
- <type> com.sun.star.uno.XAggregation </type>
- <type> com.sun.star.registry.XRegistryKey </type>
- <type> com.sun.star.container.XSet </type>
+ <type> com.sun.star.ui.dialogs.TemplateDescription </type>
+ <type> com.sun.star.ui.dialogs.FilePreviewImageFormats </type>
+ <type> com.sun.star.util.XCancellable </type>
+ <type> com.sun.star.lang.XComponent </type>
+ <type> com.sun.star.lang.XMultiServiceFactory </type>
+ <type> com.sun.star.lang.XSingleServiceFactory </type>
+ <type> com.sun.star.lang.XServiceInfo </type>
+ <type> com.sun.star.lang.XTypeProvider </type>
+ <type> com.sun.star.lang.IllegalArgumentException </type>
+ <type> com.sun.star.uno.TypeClass </type>
+ <type> com.sun.star.uno.XWeak </type>
+ <type> com.sun.star.uno.XAggregation </type>
+ <type> com.sun.star.registry.XRegistryKey </type>
+ <type> com.sun.star.container.XSet </type>
</component-description>
<component-description>
<author> Caolan McNamara </author>
- <name> com.sun.star.comp.ui.dialogs.FolderPicker </name>
+ <name> com.sun.star.comp.ui.dialogs.FolderPicker </name>
<description>
The Gnome implementation of the FolderPicker service.
</description>
<loader-name>com.sun.star.loader.SharedLibrary</loader-name>
- <language> c++ </language>
+ <language> c++ </language>
<status value="beta"/>
- <supported-service> com.sun.star.ui.dialogs.FolderPicker </supported-service>
+ <supported-service> com.sun.star.ui.dialogs.FolderPicker </supported-service>
<service-dependency>...</service-dependency>
- <type> com.sun.star.ui.dialogs.XExecutableDialog </type>
- <type> com.sun.star.ui.dialogs.XFolderPicker </type>
- <type> com.sun.star.ui.dialogs.ExecutableDialogException </type>
- <type> com.sun.star.ui.dialogs.ExecutableDialogResults </type>
- <type> com.sun.star.util.XCancellable </type>
- <type> com.sun.star.lang.XComponent </type>
- <type> com.sun.star.lang.XMultiServiceFactory </type>
- <type> com.sun.star.lang.XSingleServiceFactory </type>
- <type> com.sun.star.lang.XServiceInfo </type>
- <type> com.sun.star.lang.XTypeProvider </type>
- <type> com.sun.star.lang.IllegalArgumentException </type>
- <type> com.sun.star.uno.TypeClass </type>
- <type> com.sun.star.uno.XWeak </type>
- <type> com.sun.star.uno.XAggregation </type>
- <type> com.sun.star.registry.XRegistryKey </type>
- <type> com.sun.star.container.XSet </type>
+ <type> com.sun.star.ui.dialogs.XExecutableDialog </type>
+ <type> com.sun.star.ui.dialogs.XFolderPicker </type>
+ <type> com.sun.star.ui.dialogs.ExecutableDialogException </type>
+ <type> com.sun.star.ui.dialogs.ExecutableDialogResults </type>
+ <type> com.sun.star.util.XCancellable </type>
+ <type> com.sun.star.lang.XComponent </type>
+ <type> com.sun.star.lang.XMultiServiceFactory </type>
+ <type> com.sun.star.lang.XSingleServiceFactory </type>
+ <type> com.sun.star.lang.XServiceInfo </type>
+ <type> com.sun.star.lang.XTypeProvider </type>
+ <type> com.sun.star.lang.IllegalArgumentException </type>
+ <type> com.sun.star.uno.TypeClass </type>
+ <type> com.sun.star.uno.XWeak </type>
+ <type> com.sun.star.uno.XAggregation </type>
+ <type> com.sun.star.registry.XRegistryKey </type>
+ <type> com.sun.star.container.XSet </type>
</component-description>
- <project-build-dependency> cppuhelper </project-build-dependency>
- <project-build-dependency> cppu </project-build-dependency>
- <project-build-dependency> sal </project-build-dependency>
- <runtime-module-dependency> cppuhelper </runtime-module-dependency>
- <runtime-module-dependency> cppu2 </runtime-module-dependency>
- <runtime-module-dependency> sal2 </runtime-module-dependency>
+ <project-build-dependency> cppuhelper </project-build-dependency>
+ <project-build-dependency> cppu </project-build-dependency>
+ <project-build-dependency> sal </project-build-dependency>
+ <runtime-module-dependency> cppuhelper </runtime-module-dependency>
+ <runtime-module-dependency> cppu2 </runtime-module-dependency>
+ <runtime-module-dependency> sal2 </runtime-module-dependency>
</module-description>
diff --git a/fpicker/source/unx/gnome/resourceprovider.cxx b/fpicker/source/unx/gnome/resourceprovider.cxx
index 2fe687937103..86daf325d6f1 100644
--- a/fpicker/source/unx/gnome/resourceprovider.cxx
+++ b/fpicker/source/unx/gnome/resourceprovider.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,14 +53,14 @@ using namespace ::com::sun::star::ui::dialogs::ExtendedFilePickerElementIds;
using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds;
//------------------------------------------------------------
-//
+//
//------------------------------------------------------------
static const char* RES_NAME = "fps_office";
static const char* OTHER_RES_NAME = "svt";
//------------------------------------------------------------
-// we have to translate control ids to resource ids
+// we have to translate control ids to resource ids
//------------------------------------------------------------
struct _Entry
@@ -102,7 +102,7 @@ const sal_Int32 OTHER_SIZE_TABLE = sizeof( OtherCtrlIdToResIdTable ) / sizeof( _
//------------------------------------------------------------
sal_Int16 CtrlIdToResId( sal_Int32 aControlId )
-{
+{
sal_Int16 aResId = -1;
for ( sal_Int32 i = 0; i < SIZE_TABLE; i++ )
@@ -112,13 +112,13 @@ sal_Int16 CtrlIdToResId( sal_Int32 aControlId )
aResId = CtrlIdToResIdTable[i].resId;
break;
}
- }
-
+ }
+
return aResId;
}
sal_Int16 OtherCtrlIdToResId( sal_Int32 aControlId )
-{
+{
sal_Int16 aResId = -1;
for ( sal_Int32 i = 0; i < OTHER_SIZE_TABLE; i++ )
@@ -128,8 +128,8 @@ sal_Int16 OtherCtrlIdToResId( sal_Int32 aControlId )
aResId = OtherCtrlIdToResIdTable[i].resId;
break;
}
- }
-
+ }
+
return aResId;
}
@@ -146,7 +146,7 @@ public:
//-------------------------------------
CResourceProvider_Impl( )
- {
+ {
m_ResMgr = ResMgr::CreateResMgr( RES_NAME );
m_OtherResMgr = ResMgr::CreateResMgr( OTHER_RES_NAME );
}
@@ -160,7 +160,7 @@ public:
delete m_ResMgr;
delete m_OtherResMgr;
}
-
+
//-------------------------------------
//
//-------------------------------------
@@ -173,7 +173,7 @@ public:
try
{
OSL_ASSERT( m_ResMgr && m_OtherResMgr );
-
+
// translate the control id to a resource id
sal_Int16 aResId = CtrlIdToResId( aId );
if ( aResId > -1 )
@@ -185,7 +185,7 @@ public:
aResString = String( ResId( aResId, *m_OtherResMgr ) );
}
if ( aResId > -1 )
- aResOUString = OUString( aResString );
+ aResOUString = OUString( aResString );
}
catch(...)
{
diff --git a/fpicker/source/unx/gnome/resourceprovider.hxx b/fpicker/source/unx/gnome/resourceprovider.hxx
index 5bbbbfd68e7e..7315bb267644 100644
--- a/fpicker/source/unx/gnome/resourceprovider.hxx
+++ b/fpicker/source/unx/gnome/resourceprovider.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/unx/kde/makefile.mk b/fpicker/source/unx/kde/makefile.mk
index dcb16d9f232f..b6a8a7ca7c7d 100644
--- a/fpicker/source/unx/kde/makefile.mk
+++ b/fpicker/source/unx/kde/makefile.mk
@@ -61,10 +61,8 @@ SLOFILES =\
APP1TARGET=$(TARGET)
APP1OBJS=$(SLOFILES)
APP1RPATH=BRAND
-APP1STDLIBS=\
- $(SALLIB) \
- $(KDE_LIBS) -lkio -lX11
-
+APP1LINKFLAGS=$(KDE_LIBS) -lkio -lX11
+APP1STDLIBS=$(SALLIB)
.ENDIF # "$(GUIBASE)" != "unx" || "$(ENABLE_KDE)" != "TRUE"
diff --git a/fpicker/source/unx/kde4/FPServiceInfo.hxx b/fpicker/source/unx/kde4/FPServiceInfo.hxx
index 6dfb50e5d1ef..2f265f812cac 100644
--- a/fpicker/source/unx/kde4/FPServiceInfo.hxx
+++ b/fpicker/source/unx/kde4/FPServiceInfo.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,13 +31,13 @@
// the service names
#define FILE_PICKER_SERVICE_NAME "com.sun.star.ui.dialogs.KDE4FilePicker"
-// the implementation names
+// the implementation names
#define FILE_PICKER_IMPL_NAME "com.sun.star.ui.dialogs.KDE4FilePicker"
// the registry key names
// a key under which this service will be registered,
// Format: -> "/ImplName/UNO/SERVICES/ServiceName"
-// <Implementation-Name></UNO/SERVICES/><Service-Name>
+// <Implementation-Name></UNO/SERVICES/><Service-Name>
#define FILE_PICKER_REGKEY_NAME "/com.sun.star.ui.dialogs.KDE4FilePickerImpl/UNO/SERVICES/com.sun.star.ui.dialogs.KDE4FilePicker"
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/unx/kde4/KDE4FPEntry.cxx b/fpicker/source/unx/kde4/KDE4FPEntry.cxx
index f59a8e59637a..a51502c7eabc 100644
--- a/fpicker/source/unx/kde4/KDE4FPEntry.cxx
+++ b/fpicker/source/unx/kde4/KDE4FPEntry.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,7 +49,7 @@ static Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiS
}
// the three uno functions that will be exported
-extern "C"
+extern "C"
{
void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** )
{
@@ -64,12 +64,12 @@ extern "C"
{
try
{
- Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
+ Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
pXNewKey->createKey( OUString::createFromAscii( FILE_PICKER_REGKEY_NAME ) );
}
catch( InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "InvalidRegistryException caught" );
+ {
+ OSL_ENSURE( sal_False, "InvalidRegistryException caught" );
bRetVal = sal_False;
}
}
@@ -84,7 +84,7 @@ extern "C"
if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, FILE_PICKER_IMPL_NAME ) ) )
{
Sequence< OUString > aSNS( 1 );
- aSNS.getArray( )[0] = OUString::createFromAscii( FILE_PICKER_SERVICE_NAME );
+ aSNS.getArray( )[0] = OUString::createFromAscii( FILE_PICKER_SERVICE_NAME );
Reference< XSingleServiceFactory > xFactory ( createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
@@ -95,7 +95,7 @@ extern "C"
{
xFactory->acquire();
pRet = xFactory.get();
- }
+ }
}
return pRet;
diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index 9670a5defd33..cef3d39221e8 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -92,7 +92,7 @@ using namespace ::com::sun::star::uno;
namespace
{
- // controling event notifications
+ // controling event notifications
const bool STARTUP_SUSPENDED = true;
const bool STARTUP_ALIVE = false;
@@ -122,25 +122,25 @@ QString toQString(const rtl::OUString& s)
//////////////////////////////////////////////////////////////////////////
KDE4FilePicker::KDE4FilePicker( const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr )
- : cppu::WeakComponentImplHelper8<
- XFilterManager,
+ : cppu::WeakComponentImplHelper8<
+ XFilterManager,
XFilterGroupManager,
XFilePickerControlAccess,
XFilePickerNotifier,
// TODO XFilePreview,
lang::XInitialization,
util::XCancellable,
- lang::XEventListener,
+ lang::XEventListener,
lang::XServiceInfo>( _helperMutex ),
m_xServiceMgr( xServiceMgr ),
_resMgr( CREATEVERSIONRESMGR( fps_office ) )
{
_extraControls = new QWidget();
_layout = new QGridLayout(_extraControls);
-
+
_dialog = new KFileDialog(KUrl("~"), QString(""), 0, _extraControls);
_dialog->setMode(KFile::File | KFile::LocalOnly);
-
+
//default mode
_dialog->setOperationMode(KFileDialog::Opening);
}
@@ -184,7 +184,7 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
KWindowSystem::setMainWindow( _dialog, pSysData->aWindow); // unx only
}
}
-
+
_dialog->clearFilter();
_dialog->setFilter(_filter);
_dialog->filterWidget()->setEditable(false);
@@ -208,7 +208,7 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
Application::AcquireSolarMutex( mutexrelease );
if( result == KFileDialog::Accepted)
return ExecutableDialogResults::OK;
-
+
return ExecutableDialogResults::CANCEL;
}
@@ -247,13 +247,13 @@ uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles()
{
QStringList rawFiles = _dialog->selectedFiles();
QStringList files;
-
- // Workaround for the double click selection KDE4 bug
+
+ // Workaround for the double click selection KDE4 bug
// kde file picker returns the file and directories for selectedFiles()
// when a file is double clicked
// make a true list of files
const QString dir = KUrl(rawFiles[0]).directory();
-
+
bool singleFile = true;
if (rawFiles.size() > 1)
{
@@ -263,7 +263,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles()
//oo WANTS only one entry in the final list
files.append(dir);
}
-
+
for (USHORT i = 0; i < rawFiles.size(); ++i)
{
// if the raw file is not the base directory (see above kde bug)
@@ -271,13 +271,13 @@ uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles()
if ((dir + "/") != ( rawFiles[i]))
{
QString filename = KUrl(rawFiles[i]).fileName();
-
+
if (singleFile)
filename.prepend(dir + "/");
files.append(filename);
}
}
-
+
// add all files and leading directory to outgoing OO sequence
uno::Sequence< ::rtl::OUString > seq(files.size());
for (int i = 0; i < files.size(); ++i)
@@ -286,7 +286,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles()
osl_getFileURLFromSystemPath(aFile.pData, &aURL.pData );
seq[i] = aURL;
}
-
+
return seq;
}
@@ -295,17 +295,17 @@ void SAL_CALL KDE4FilePicker::appendFilter( const ::rtl::OUString &title, const
{
QString t = toQString(title);
QString f = toQString(filter);
-
+
if (!_filter.isNull())
_filter.append("\n");
-
+
// '/' need to be escaped else they are assumed to be mime types by kfiledialog
//see the docs
t.replace("/", "\\/");
-
+
// openoffice gives us filters separated by ';' qt dialogs just want space separated
f.replace(";", " ");
-
+
_filter.append(QString("%1|%2").arg(f).arg(t));
}
@@ -325,11 +325,11 @@ rtl::OUString SAL_CALL KDE4FilePicker::getCurrentFilter()
QString filter = _dialog->filterWidget()->currentText();
filter = filter.mid( filter.indexOf( '|' ) + 1 ); // convert from the pattern|description format if needed
filter.replace( "\\/", "/" );
-
+
//default if not found
if (filter.isNull())
filter = "ODF Text Document (.odt)";
-
+
return toOUString(filter);
}
@@ -338,16 +338,16 @@ void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString& , const un
{
if (!_filter.isNull())
_filter.append(QString("\n"));
-
+
const USHORT length = filters.getLength();
for (USHORT i = 0; i < length; ++i)
{
beans::StringPair aPair = filters[i];
-
+
_filter.append(QString("%1|%2").arg(
toQString(aPair.Second).replace(";", " ")).arg(
toQString(aPair.First).replace("/","\\/")));
-
+
if (i != length - 1)
_filter.append('\n');
}
@@ -357,7 +357,7 @@ void SAL_CALL KDE4FilePicker::setValue( sal_Int16 controlId, sal_Int16, const un
throw( uno::RuntimeException )
{
QWidget* widget = _customWidgets[controlId];
-
+
if (widget)
{
switch (controlId)
@@ -394,9 +394,9 @@ uno::Any SAL_CALL KDE4FilePicker::getValue( sal_Int16 controlId, sal_Int16 )
throw( uno::RuntimeException )
{
uno::Any res(false);
-
+
QWidget* widget = _customWidgets[controlId];
-
+
if (widget)
{
switch (controlId)
@@ -428,7 +428,7 @@ uno::Any SAL_CALL KDE4FilePicker::getValue( sal_Int16 controlId, sal_Int16 )
break;
}
}
-
+
return res;
}
@@ -436,7 +436,7 @@ void SAL_CALL KDE4FilePicker::enableControl( sal_Int16 controlId, sal_Bool enabl
throw( uno::RuntimeException )
{
QWidget* widget = _customWidgets[controlId];
-
+
if (widget)
{
widget->setEnabled(enable);
@@ -447,7 +447,7 @@ void SAL_CALL KDE4FilePicker::setLabel( sal_Int16 controlId, const ::rtl::OUStri
throw( uno::RuntimeException )
{
QWidget* widget = _customWidgets[controlId];
-
+
if (widget)
{
switch (controlId)
@@ -477,12 +477,12 @@ void SAL_CALL KDE4FilePicker::setLabel( sal_Int16 controlId, const ::rtl::OUStri
}
}
-rtl::OUString SAL_CALL KDE4FilePicker::getLabel(sal_Int16 controlId)
+rtl::OUString SAL_CALL KDE4FilePicker::getLabel(sal_Int16 controlId)
throw ( uno::RuntimeException )
{
QWidget* widget = _customWidgets[controlId];
QString label;
-
+
if (widget)
{
switch (controlId)
@@ -517,7 +517,7 @@ void KDE4FilePicker::addCustomControl(sal_Int16 controlId)
{
QWidget* widget = 0;
sal_Int32 resId = -1;
-
+
switch (controlId)
{
case ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION:
@@ -559,7 +559,7 @@ void KDE4FilePicker::addCustomControl(sal_Int16 controlId)
case ExtendedFilePickerElementIds::LISTBOX_FILTER_SELECTOR:
break;
}
-
+
switch (controlId)
{
case ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION:
@@ -571,14 +571,14 @@ void KDE4FilePicker::addCustomControl(sal_Int16 controlId)
case ExtendedFilePickerElementIds::CHECKBOX_SELECTION:
{
QString label;
-
+
if (_resMgr && resId != -1)
{
rtl::OUString s = String(ResId( resId, *_resMgr ));
label = toQString(s);
label.replace("~", "&");
}
-
+
widget = new QCheckBox(label, _extraControls);
// the checkbox is created even for CHECKBOX_AUTOEXTENSION to simplify
// code, but the checkbox is hidden and ignored
@@ -597,7 +597,7 @@ void KDE4FilePicker::addCustomControl(sal_Int16 controlId)
case ExtendedFilePickerElementIds::LISTBOX_FILTER_SELECTOR:
break;
}
-
+
if (widget)
{
_layout->addWidget(widget);
@@ -605,12 +605,12 @@ void KDE4FilePicker::addCustomControl(sal_Int16 controlId)
}
}
-void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
+void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
throw( uno::Exception, uno::RuntimeException )
-{
+{
_filter.clear();
-
- // parameter checking
+
+ // parameter checking
uno::Any arg;
if (args.getLength() == 0)
{
@@ -621,7 +621,7 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
arg = args[0];
- if (( arg.getValueType() != ::getCppuType((sal_Int16*)0)) &&
+ if (( arg.getValueType() != ::getCppuType((sal_Int16*)0)) &&
( arg.getValueType() != ::getCppuType((sal_Int8*)0)))
{
throw lang::IllegalArgumentException(
@@ -631,19 +631,19 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
sal_Int16 templateId = -1;
arg >>= templateId;
-
+
//default is opening
KFileDialog::OperationMode operationMode = KFileDialog::Opening;
-
+
switch ( templateId )
{
case FILEOPEN_SIMPLE:
break;
-
+
case FILESAVE_SIMPLE:
operationMode = KFileDialog::Saving;
break;
-
+
case FILESAVE_AUTOEXTENSION:
operationMode = KFileDialog::Saving;
addCustomControl( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION );
@@ -681,7 +681,7 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
addCustomControl( ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE );
break;
- case FILEOPEN_PLAY:
+ case FILEOPEN_PLAY:
addCustomControl( ExtendedFilePickerElementIds::PUSHBUTTON_PLAY );
break;
@@ -701,7 +701,7 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
static_cast< XFilePicker* >( this ),
1 );
}
-
+
_dialog->setOperationMode(operationMode);
_dialog->setConfirmOverwrite(true);
}
@@ -709,7 +709,7 @@ void SAL_CALL KDE4FilePicker::initialize( const uno::Sequence<uno::Any> &args )
void SAL_CALL KDE4FilePicker::cancel()
throw ( uno::RuntimeException )
{
-
+
}
void SAL_CALL KDE4FilePicker::disposing( const lang::EventObject &rEvent )
@@ -723,13 +723,13 @@ void SAL_CALL KDE4FilePicker::disposing( const lang::EventObject &rEvent )
}
}
-rtl::OUString SAL_CALL KDE4FilePicker::getImplementationName()
+rtl::OUString SAL_CALL KDE4FilePicker::getImplementationName()
throw( uno::RuntimeException )
{
return rtl::OUString::createFromAscii( FILE_PICKER_IMPL_NAME );
}
-sal_Bool SAL_CALL KDE4FilePicker::supportsService( const rtl::OUString& ServiceName )
+sal_Bool SAL_CALL KDE4FilePicker::supportsService( const rtl::OUString& ServiceName )
throw( uno::RuntimeException )
{
uno::Sequence< ::rtl::OUString > SupportedServicesNames = FilePicker_getSupportedServiceNames();
@@ -743,7 +743,7 @@ sal_Bool SAL_CALL KDE4FilePicker::supportsService( const rtl::OUString& ServiceN
return sal_False;
}
-uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getSupportedServiceNames()
+uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getSupportedServiceNames()
throw( uno::RuntimeException )
{
return FilePicker_getSupportedServiceNames();
diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.hxx b/fpicker/source/unx/kde4/KDE4FilePicker.hxx
index edef224c003e..e1b8a15e1bd8 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.hxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,7 +52,7 @@ class QLayout;
class ResMgr;
-class KDE4FilePicker :
+class KDE4FilePicker :
public cppu::WeakComponentImplHelper8<
::com::sun::star::ui::dialogs::XFilterManager,
::com::sun::star::ui::dialogs::XFilterGroupManager,
@@ -62,29 +62,29 @@ class KDE4FilePicker :
::com::sun::star::lang::XInitialization,
::com::sun::star::util::XCancellable,
::com::sun::star::lang::XEventListener,
- ::com::sun::star::lang::XServiceInfo >
+ ::com::sun::star::lang::XServiceInfo >
{
protected:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr; // to instanciate own services
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr; // to instanciate own services
::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener > m_xListener;
-
+
ResMgr *_resMgr;
-
+
//the dialog to display
KFileDialog* _dialog;
-
+
osl::Mutex _helperMutex;
-
+
//running filter string to add to dialog
QString _filter;
-
+
//mapping of SAL control ID's to created custom controls
QHash<sal_Int16, QWidget*> _customWidgets;
-
+
//widget to contain extra custom controls
QWidget* _extraControls;
-
+
//layout for extra custom controls
QLayout* _layout;
@@ -159,12 +159,12 @@ public:
private:
// prevent copy and assignment
- KDE4FilePicker( const KDE4FilePicker& );
+ KDE4FilePicker( const KDE4FilePicker& );
KDE4FilePicker& operator=( const KDE4FilePicker& );
-
+
//add a custom control widget to the file dialog
void addCustomControl(sal_Int16 controlId);
-
-};
+
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/unx/kde4/fps_kde4.xml b/fpicker/source/unx/kde4/fps_kde4.xml
index a12bf894186a..b250c0531afb 100644
--- a/fpicker/source/unx/kde4/fps_kde4.xml
+++ b/fpicker/source/unx/kde4/fps_kde4.xml
@@ -11,7 +11,7 @@
<loader-name>com.sun.star.loader.SharedLibrary</loader-name>
<language> c++ </language>
<status value="beta"/>
- <supported-service> com.sun.star.ui.dialogs.FilePicker </supported-service>
+ <supported-service> com.sun.star.ui.dialogs.FilePicker </supported-service>
<service-dependency>...</service-dependency>
<type> com.sun.star.ui.dialogs.XExecutableDialog </type>
<type> com.sun.star.ui.dialogs.XFilePicker </type>
@@ -23,12 +23,12 @@
<type> com.sun.star.ui.dialogs.XFilePickerControlAccess </type>
<type> com.sun.star.ui.dialogs.XFilePreview </type>
<type> com.sun.star.ui.dialogs.ExtendedFilePickerElementIds </type>
- <type> com.sun.star.ui.dialogs.ExecutableDialogResults </type>
+ <type> com.sun.star.ui.dialogs.ExecutableDialogResults </type>
<type> com.sun.star.ui.dialogs.FilePickerEvent </type>
<type> com.sun.star.ui.dialogs.CommonFilePickerElementIds </type>
<type> com.sun.star.ui.dialogs.ListboxControlActions </type>
- <type> com.sun.star.ui.dialogs.TemplateDescription </type>
- <type> com.sun.star.ui.dialogs.FilePreviewImageFormats </type>
+ <type> com.sun.star.ui.dialogs.TemplateDescription </type>
+ <type> com.sun.star.ui.dialogs.FilePreviewImageFormats </type>
<type> com.sun.star.util.XCancellable </type>
<type> com.sun.star.lang.XComponent </type>
<type> com.sun.star.lang.XMultiServiceFactory </type>
diff --git a/fpicker/source/win32/filepicker/FPServiceInfo.hxx b/fpicker/source/win32/filepicker/FPServiceInfo.hxx
index 33a27f683494..528add7e5af1 100644
--- a/fpicker/source/win32/filepicker/FPServiceInfo.hxx
+++ b/fpicker/source/win32/filepicker/FPServiceInfo.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,7 +34,7 @@
// defines
//------------------------------------------------------------------------
-// the service name is a description of a set of
+// the service name is a description of a set of
// interfaces (is the same as component categories in COM)
#define TMPL95_FILEOPEN_READONLY_VERSION_BOX_ID 1000
@@ -67,12 +67,12 @@
// the service names
#define FILE_PICKER_SERVICE_NAME "com.sun.star.ui.dialogs.SystemFilePicker"
-// the implementation names
+// the implementation names
#define FILE_PICKER_IMPL_NAME "com.sun.star.ui.dialogs.Win32FilePicker"
// the registry key names
// a key under which this service will be registered, Format: -> "/ImplName/UNO/SERVICES/ServiceName"
-// < Implementation-Name ></UNO/SERVICES/>< Service-Name >
+// < Implementation-Name ></UNO/SERVICES/>< Service-Name >
#define FILE_PICKER_REGKEY_NAME "/com.sun.star.ui.dialogs.Win32FilePicker/UNO/SERVICES/com.sun.star.ui.dialogs.SystemFilePicker"
#endif
diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx
index 3adf90836013..68d367a9e09e 100644
--- a/fpicker/source/win32/filepicker/FPentry.cxx
+++ b/fpicker/source/win32/filepicker/FPentry.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,7 +30,7 @@
#include "precompiled_fpicker.hxx"
//----------------------------------------------
-// includes of other projects
+// includes of other projects
//----------------------------------------------
#include <cppuhelper/factory.hxx>
#include <com/sun/star/container/XSet.hpp>
@@ -47,37 +47,37 @@
// namespace directives
//-----------------------------------------------
-using namespace ::rtl ;
-using namespace ::com::sun::star::uno ;
-using namespace ::com::sun::star::container ;
-using namespace ::com::sun::star::lang ;
-using namespace ::com::sun::star::registry ;
-using namespace ::cppu ;
+using namespace ::rtl ;
+using namespace ::com::sun::star::uno ;
+using namespace ::com::sun::star::container ;
+using namespace ::com::sun::star::lang ;
+using namespace ::com::sun::star::registry ;
+using namespace ::cppu ;
using ::com::sun::star::ui::dialogs::XFilePicker;
using ::com::sun::star::ui::dialogs::XFilePicker2;
//------------------------------------------------
-//
+//
//------------------------------------------------
-static Reference< XInterface > SAL_CALL createInstance(
+static Reference< XInterface > SAL_CALL createInstance(
const Reference< XMultiServiceFactory >& rServiceManager )
{
Reference< XInterface > xDlg;
- bool bVistaOrNewer = IsWindowsVistaOrNewer();
+ bool bVistaOrNewer = IsWindowsVistaOrNewer();
if (bVistaOrNewer)
{
OSL_TRACE("use special (vista) system file picker ...");
- xDlg.set(
- static_cast< XFilePicker2* >(
+ xDlg.set(
+ static_cast< XFilePicker2* >(
new ::fpicker::win32::vista::VistaFilePicker( rServiceManager ) ) );
}
else
{
OSL_TRACE("use normal system file picker ...");
- xDlg.set(
- static_cast< XFilePicker2* >(
+ xDlg.set(
+ static_cast< XFilePicker2* >(
new CFilePicker( rServiceManager ) ) );
}
@@ -88,7 +88,7 @@ static Reference< XInterface > SAL_CALL createInstance(
// the three uno functions that will be exported
//------------------------------------------------
-extern "C"
+extern "C"
{
//------------------------------------------------
@@ -113,12 +113,12 @@ sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey )
{
try
{
- Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
+ Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
pXNewKey->createKey( OUString::createFromAscii( FILE_PICKER_REGKEY_NAME ) );
}
catch( InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "InvalidRegistryException caught" );
+ {
+ OSL_ENSURE( sal_False, "InvalidRegistryException caught" );
bRetVal = sal_False;
}
}
@@ -130,7 +130,7 @@ sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey )
//
//------------------------------------------------
-void* SAL_CALL component_getFactory(
+void* SAL_CALL component_getFactory(
const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* )
{
void* pRet = 0;
@@ -138,8 +138,8 @@ void* SAL_CALL component_getFactory(
if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, FILE_PICKER_IMPL_NAME ) ) )
{
Sequence< OUString > aSNS( 1 );
- aSNS.getArray( )[0] = OUString::createFromAscii( FILE_PICKER_SERVICE_NAME );
-
+ aSNS.getArray( )[0] = OUString::createFromAscii( FILE_PICKER_SERVICE_NAME );
+
Reference< XSingleServiceFactory > xFactory ( createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
OUString::createFromAscii( pImplName ),
@@ -149,7 +149,7 @@ void* SAL_CALL component_getFactory(
{
xFactory->acquire();
pRet = xFactory.get();
- }
+ }
}
return pRet;
diff --git a/fpicker/source/win32/filepicker/FileOpenDlg.cxx b/fpicker/source/win32/filepicker/FileOpenDlg.cxx
index 125dd4e41eec..8155cc630fbe 100644
--- a/fpicker/source/win32/filepicker/FileOpenDlg.cxx
+++ b/fpicker/source/win32/filepicker/FileOpenDlg.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,7 +44,7 @@
// constants
//------------------------------------------------------------------------
-namespace /* private */
+namespace /* private */
{
// we choose such large buffers because the size of
// an single line edit field can be up to 32k; if
@@ -61,79 +61,79 @@ namespace /* private */
const size_t MAX_FILTER_BUFF_SIZE = 4096;
const LPTSTR CURRENT_INSTANCE = TEXT("CurrInst");
-
+
//------------------------------------------
// find an appropriate parent window
//------------------------------------------
-
+
inline bool is_current_process_window(HWND hwnd)
{
- DWORD pid;
- GetWindowThreadProcessId(hwnd, &pid);
+ DWORD pid;
+ GetWindowThreadProcessId(hwnd, &pid);
return (pid == GetCurrentProcessId());
}
-
+
HWND choose_parent_window()
{
- HWND hwnd_parent = GetForegroundWindow();
+ HWND hwnd_parent = GetForegroundWindow();
if (!is_current_process_window(hwnd_parent))
hwnd_parent = GetDesktopWindow();
-
+
return hwnd_parent;
}
};
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
-CFileOpenDialog::CFileOpenDialog(
- bool bFileOpenDialog,
- sal_uInt32 dwFlags,
- sal_uInt32 dwTemplateId,
+CFileOpenDialog::CFileOpenDialog(
+ bool bFileOpenDialog,
+ sal_uInt32 dwFlags,
+ sal_uInt32 dwTemplateId,
HINSTANCE hInstance) :
m_hwndFileOpenDlg(0),
m_hwndFileOpenDlgChild(0),
- m_bFileOpenDialog(bFileOpenDialog),
+ m_bFileOpenDialog(bFileOpenDialog),
m_filterBuffer(MAX_FILTER_BUFF_SIZE),
m_fileTitleBuffer(MAX_FILETITLE_BUFF_SIZE),
- m_helperBuffer(MAX_FILENAME_BUFF_SIZE),
- m_fileNameBuffer(MAX_FILENAME_BUFF_SIZE),
+ m_helperBuffer(MAX_FILENAME_BUFF_SIZE),
+ m_fileNameBuffer(MAX_FILENAME_BUFF_SIZE),
m_pfnBaseDlgProc(0)
{
// initialize the OPENFILENAME struct
if (IsWindows2000Platform() || IsWindowsME())
- {
+ {
ZeroMemory(&m_ofn, sizeof(m_ofn));
m_ofn.lStructSize = sizeof(m_ofn);
}
else // OSVER < Win2000
{
- // the size of the OPENFILENAME structure is different
+ // the size of the OPENFILENAME structure is different
// under windows < win2000
ZeroMemory(&m_ofn, _OPENFILENAME_SIZE_VERSION_400);
- m_ofn.lStructSize = _OPENFILENAME_SIZE_VERSION_400;
+ m_ofn.lStructSize = _OPENFILENAME_SIZE_VERSION_400;
}
// 0x02000000 for #97681, sfx will make the entry into
// the recent document list
- m_ofn.Flags |= dwFlags |
+ m_ofn.Flags |= dwFlags |
OFN_EXPLORER |
- OFN_ENABLEHOOK |
- OFN_HIDEREADONLY |
+ OFN_ENABLEHOOK |
+ OFN_HIDEREADONLY |
OFN_PATHMUSTEXIST |
OFN_FILEMUSTEXIST |
OFN_OVERWRITEPROMPT |
OFN_ENABLESIZING |
OFN_DONTADDTORECENT; // 0x02000000 -> OFN_DONTADDTORECENT only available with new platform sdk
-
+
// it is a little hack but how else could
// we get a parent window (using a vcl window?)
m_ofn.hwndOwner = choose_parent_window();
-
+
m_ofn.lpstrFile = reinterpret_cast<LPTSTR>(const_cast<sal_Unicode*>(m_fileNameBuffer.getStr()));
m_ofn.nMaxFile = m_fileNameBuffer.getCapacity();
-
+
m_ofn.lpstrFileTitle = reinterpret_cast<LPTSTR>(const_cast<sal_Unicode*>(m_fileTitleBuffer.getStr()));
m_ofn.nMaxFileTitle = m_fileTitleBuffer.getCapacity();
@@ -151,11 +151,11 @@ CFileOpenDialog::CFileOpenDialog(
}
// set a pointer to myself as ofn parameter
- m_ofn.lCustData = reinterpret_cast<long>(this);
+ m_ofn.lCustData = reinterpret_cast<long>(this);
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CFileOpenDialog::~CFileOpenDialog()
@@ -163,7 +163,7 @@ CFileOpenDialog::~CFileOpenDialog()
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CFileOpenDialog::setTitle(const rtl::OUString& aTitle)
@@ -171,14 +171,14 @@ void SAL_CALL CFileOpenDialog::setTitle(const rtl::OUString& aTitle)
m_dialogTitle = aTitle;
m_ofn.lpstrTitle = reinterpret_cast<LPCTSTR>(m_dialogTitle.getStr());
}
-
+
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void CFileOpenDialog::setFilter(const rtl::OUString& aFilter)
-{
- // Format is like
+{
+ // Format is like
// "*.TXT" or multiple separate by ';' like "*.TXT;*.DOC;*.SXW"
// Do not include spaces in the pattern string
m_filterBuffer.ensureCapacity(aFilter.getLength());
@@ -188,7 +188,7 @@ void CFileOpenDialog::setFilter(const rtl::OUString& aFilter)
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
bool CFileOpenDialog::setFilterIndex(sal_uInt32 aIndex)
@@ -199,16 +199,16 @@ bool CFileOpenDialog::setFilterIndex(sal_uInt32 aIndex)
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_uInt32 CFileOpenDialog::getSelectedFilterIndex() const
{
return m_ofn.nFilterIndex;
}
-
+
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CFileOpenDialog::setDefaultName(const rtl::OUString& aName)
@@ -219,7 +219,7 @@ void SAL_CALL CFileOpenDialog::setDefaultName(const rtl::OUString& aName)
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CFileOpenDialog::setDisplayDirectory(const rtl::OUString& aDirectory)
@@ -229,7 +229,7 @@ void SAL_CALL CFileOpenDialog::setDisplayDirectory(const rtl::OUString& aDirecto
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
rtl::OUString SAL_CALL CFileOpenDialog::getLastDisplayDirectory() const
@@ -238,39 +238,39 @@ rtl::OUString SAL_CALL CFileOpenDialog::getLastDisplayDirectory() const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
rtl::OUString SAL_CALL CFileOpenDialog::getFullFileName() const
-{
- return rtl::OUString(m_fileNameBuffer.getStr(),
+{
+ return rtl::OUString(m_fileNameBuffer.getStr(),
_wcslenex(m_fileNameBuffer.getStr()));
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
rtl::OUString SAL_CALL CFileOpenDialog::getFileName() const
-{
+{
return rtl::OUString(m_fileTitleBuffer);
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
rtl::OUString CFileOpenDialog::getFileExtension()
{
if (m_ofn.nFileExtension)
- return rtl::OUString(m_fileNameBuffer.getStr() + m_ofn.nFileExtension,
+ return rtl::OUString(m_fileNameBuffer.getStr() + m_ofn.nFileExtension,
rtl_ustr_getLength(m_fileNameBuffer.getStr() + m_ofn.nFileExtension));
return rtl::OUString();
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void CFileOpenDialog::setDefaultFileExtension(const rtl::OUString& aExtension)
@@ -280,7 +280,7 @@ void CFileOpenDialog::setDefaultFileExtension(const rtl::OUString& aExtension)
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CFileOpenDialog::setMultiSelectionMode(bool bMode)
@@ -292,7 +292,7 @@ void SAL_CALL CFileOpenDialog::setMultiSelectionMode(bool bMode)
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
bool SAL_CALL CFileOpenDialog::getMultiSelectionMode() const
@@ -301,7 +301,7 @@ bool SAL_CALL CFileOpenDialog::getMultiSelectionMode() const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Int16 SAL_CALL CFileOpenDialog::doModal()
@@ -312,7 +312,7 @@ sal_Int16 SAL_CALL CFileOpenDialog::doModal()
if (preModal())
{
bool bRet;
-
+
if (m_bFileOpenDialog)
bRet = m_GetFileNameWrapper.getOpenFileName(
reinterpret_cast<LPOPENFILENAME>(&m_ofn));
@@ -321,7 +321,7 @@ sal_Int16 SAL_CALL CFileOpenDialog::doModal()
reinterpret_cast<LPOPENFILENAME>(&m_ofn));
nRC = 1;
-
+
if (!bRet)
nRC = (0 == m_GetFileNameWrapper.commDlgExtendedError()) ? 0 : -1;
@@ -333,7 +333,7 @@ sal_Int16 SAL_CALL CFileOpenDialog::doModal()
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_uInt32 SAL_CALL CFileOpenDialog::getLastDialogError() const
@@ -342,7 +342,7 @@ sal_uInt32 SAL_CALL CFileOpenDialog::getLastDialogError() const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
bool SAL_CALL CFileOpenDialog::preModal()
@@ -351,24 +351,24 @@ bool SAL_CALL CFileOpenDialog::preModal()
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CFileOpenDialog::postModal(sal_Int16 nDialogResult)
{
OSL_ASSERT((-1 <= nDialogResult) && (nDialogResult <= 1));
-
+
if (1 == nDialogResult)
{
// Attention: assuming that nFileOffset is always greater 0 because under
// Windows there is always a drive letter or a server in a complete path
// the OPENFILENAME docu never says that nFileOffset can be 0
- m_displayDirectory = rtl::OUString(reinterpret_cast<const sal_Unicode*>(m_ofn.lpstrFile),m_ofn.nFileOffset);
- }
+ m_displayDirectory = rtl::OUString(reinterpret_cast<const sal_Unicode*>(m_ofn.lpstrFile),m_ofn.nFileOffset);
+ }
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
rtl::OUString SAL_CALL CFileOpenDialog::getCurrentFilePath() const
@@ -380,39 +380,39 @@ rtl::OUString SAL_CALL CFileOpenDialog::getCurrentFilePath() const
CDM_GETFILEPATH,
m_helperBuffer.getCapacity(),
reinterpret_cast<LPARAM>(m_helperBuffer.getStr()));
-
+
if (nLen > 0)
{
m_helperBuffer.setLength((nLen * sizeof(sal_Unicode)) - 1);
return rtl::OUString(m_helperBuffer);
- }
+ }
return rtl::OUString();
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
rtl::OUString SAL_CALL CFileOpenDialog::getCurrentFolderPath() const
{
OSL_ASSERT(IsWindow(m_hwndFileOpenDlg));
-
+
LPARAM nLen = SendMessage(
m_hwndFileOpenDlg,
CDM_GETFOLDERPATH,
m_helperBuffer.getCapacity(),
reinterpret_cast<LPARAM>(m_helperBuffer.getStr()));
-
+
if (nLen > 0)
{
m_helperBuffer.setLength((nLen * sizeof(sal_Unicode)) - 1);
return rtl::OUString(m_helperBuffer);
- }
+ }
return rtl::OUString();
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
rtl::OUString SAL_CALL CFileOpenDialog::getCurrentFileName() const
@@ -429,12 +429,12 @@ rtl::OUString SAL_CALL CFileOpenDialog::getCurrentFileName() const
{
m_helperBuffer.setLength((nLen * sizeof(sal_Unicode)) - 1);
return rtl::OUString(m_helperBuffer);
- }
+ }
return rtl::OUString();
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_uInt32 SAL_CALL CFileOpenDialog::onShareViolation(const rtl::OUString&)
@@ -443,7 +443,7 @@ sal_uInt32 SAL_CALL CFileOpenDialog::onShareViolation(const rtl::OUString&)
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_uInt32 SAL_CALL CFileOpenDialog::onFileOk()
@@ -452,7 +452,7 @@ sal_uInt32 SAL_CALL CFileOpenDialog::onFileOk()
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CFileOpenDialog::onSelChanged(HWND)
@@ -460,7 +460,7 @@ void SAL_CALL CFileOpenDialog::onSelChanged(HWND)
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CFileOpenDialog::onHelp()
@@ -468,7 +468,7 @@ void SAL_CALL CFileOpenDialog::onHelp()
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CFileOpenDialog::onInitDone()
@@ -477,7 +477,7 @@ void SAL_CALL CFileOpenDialog::onInitDone()
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CFileOpenDialog::onFolderChanged()
@@ -485,7 +485,7 @@ void SAL_CALL CFileOpenDialog::onFolderChanged()
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CFileOpenDialog::onTypeChanged(sal_uInt32)
@@ -493,7 +493,7 @@ void SAL_CALL CFileOpenDialog::onTypeChanged(sal_uInt32)
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_uInt32 SAL_CALL CFileOpenDialog::onCtrlCommand(HWND, sal_uInt16, sal_uInt16)
@@ -502,7 +502,7 @@ sal_uInt32 SAL_CALL CFileOpenDialog::onCtrlCommand(HWND, sal_uInt16, sal_uInt16)
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_uInt32 SAL_CALL CFileOpenDialog::onWMNotify( HWND, LPOFNOTIFY lpOfNotify )
@@ -511,7 +511,7 @@ sal_uInt32 SAL_CALL CFileOpenDialog::onWMNotify( HWND, LPOFNOTIFY lpOfNotify )
{
case CDN_SHAREVIOLATION:
return onShareViolation(reinterpret_cast<const sal_Unicode*>(lpOfNotify->pszFile));
-
+
case CDN_FILEOK:
return onFileOk();
@@ -541,56 +541,56 @@ sal_uInt32 SAL_CALL CFileOpenDialog::onWMNotify( HWND, LPOFNOTIFY lpOfNotify )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CFileOpenDialog::handleInitDialog(HWND hwndDlg, HWND hwndChild)
{
m_hwndFileOpenDlg = hwndDlg;
m_hwndFileOpenDlgChild = hwndChild;
-
+
OSL_ASSERT(GetParent(hwndChild) == hwndDlg);
- // calling virtual function which the
+ // calling virtual function which the
// client can overload
onInitDialog(hwndDlg);
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
-unsigned int CALLBACK CFileOpenDialog::ofnHookProc(
+unsigned int CALLBACK CFileOpenDialog::ofnHookProc(
HWND hChildDlg, unsigned int uiMsg, WPARAM wParam, LPARAM lParam)
{
HWND hwndDlg = GetParent(hChildDlg);
CFileOpenDialog* pImpl = NULL;
switch( uiMsg )
- {
- case WM_INITDIALOG:
+ {
+ case WM_INITDIALOG:
{
_LPOPENFILENAME lpofn = reinterpret_cast<_LPOPENFILENAME>(lParam);
- pImpl = reinterpret_cast<CFileOpenDialog*>(lpofn->lCustData);
+ pImpl = reinterpret_cast<CFileOpenDialog*>(lpofn->lCustData);
OSL_ASSERT(pImpl);
-
- // subclass the base dialog for WM_NCDESTROY processing
- pImpl->m_pfnBaseDlgProc =
- reinterpret_cast<WNDPROC>(
+
+ // subclass the base dialog for WM_NCDESTROY processing
+ pImpl->m_pfnBaseDlgProc =
+ reinterpret_cast<WNDPROC>(
SetWindowLong(
- hwndDlg,
- GWL_WNDPROC,
- reinterpret_cast<LONG>(CFileOpenDialog::BaseDlgProc)));
- // connect the instance handle to the window
+ hwndDlg,
+ GWL_WNDPROC,
+ reinterpret_cast<LONG>(CFileOpenDialog::BaseDlgProc)));
+ // connect the instance handle to the window
SetProp(hwndDlg, CURRENT_INSTANCE, pImpl);
pImpl->handleInitDialog(hwndDlg, hChildDlg);
}
return 0;
-
+
case WM_NOTIFY:
{
pImpl = getCurrentInstance(hwndDlg);
- return pImpl->onWMNotify(
+ return pImpl->onWMNotify(
hChildDlg, reinterpret_cast<LPOFNOTIFY>(lParam));
}
@@ -599,8 +599,8 @@ unsigned int CALLBACK CFileOpenDialog::ofnHookProc(
pImpl = getCurrentInstance(hwndDlg);
OSL_ASSERT(pImpl);
- return pImpl->onCtrlCommand(
- hChildDlg, LOWORD(wParam), HIWORD(lParam));
+ return pImpl->onCtrlCommand(
+ hChildDlg, LOWORD(wParam), HIWORD(lParam));
}
}
@@ -608,53 +608,53 @@ unsigned int CALLBACK CFileOpenDialog::ofnHookProc(
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
-LRESULT CALLBACK CFileOpenDialog::BaseDlgProc(
+LRESULT CALLBACK CFileOpenDialog::BaseDlgProc(
HWND hWnd, UINT wMessage, WPARAM wParam, LPARAM lParam)
{
CFileOpenDialog* pImpl = 0;
-
+
if (WM_NCDESTROY == wMessage)
{
pImpl = reinterpret_cast<CFileOpenDialog*>(
RemoveProp(hWnd,CURRENT_INSTANCE));
-
- SetWindowLong(hWnd, GWL_WNDPROC,
+
+ SetWindowLong(hWnd, GWL_WNDPROC,
reinterpret_cast<LONG>(pImpl->m_pfnBaseDlgProc));
}
else
{
pImpl = getCurrentInstance(hWnd);
}
-
+
OSL_ASSERT(pImpl);
-
+
return CallWindowProc(
reinterpret_cast<WNDPROC>(pImpl->m_pfnBaseDlgProc),
hWnd,wMessage,wParam,lParam);
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CFileOpenDialog* SAL_CALL CFileOpenDialog::getCurrentInstance(HWND hwnd)
{
OSL_ASSERT(IsWindow( hwnd));
- return reinterpret_cast<CFileOpenDialog*>(
+ return reinterpret_cast<CFileOpenDialog*>(
GetProp(hwnd, CURRENT_INSTANCE));
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CFileOpenDialog::centerPositionToParent() const
{
OSL_PRECOND(IsWindow(m_hwndFileOpenDlg), "no dialog window, call method only after or in onInitDone");
-
+
HWND hwndParent = m_ofn.hwndOwner;
if (!IsWindow(hwndParent))
@@ -667,13 +667,13 @@ void SAL_CALL CFileOpenDialog::centerPositionToParent() const
RECT rcDlg;
GetWindowRect(m_hwndFileOpenDlg, &rcDlg);
-
+
int lDlgW = rcDlg.right - rcDlg.left;
int lDlgH = rcDlg.bottom - rcDlg.top;
int x = (rcPar.left + rcPar.right - lDlgW) / 2;
int y = (rcPar.top + rcPar.bottom - lDlgH) / 2;
-
+
HDC hdc = GetDC(m_hwndFileOpenDlg);
int hResol = GetDeviceCaps(hdc, HORZRES);
@@ -685,7 +685,7 @@ void SAL_CALL CFileOpenDialog::centerPositionToParent() const
x = 0;
else if ((x + lDlgW) > hResol)
x = hResol - lDlgW;
-
+
if (y < 0)
y = 0;
else if ((y + lDlgH) > vResol)
@@ -694,7 +694,7 @@ void SAL_CALL CFileOpenDialog::centerPositionToParent() const
SetWindowPos(
m_hwndFileOpenDlg,
NULL, x, y, 0, 0,
- SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE );
+ SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/filepicker/FileOpenDlg.hxx b/fpicker/source/win32/filepicker/FileOpenDlg.hxx
index a5297e7b07cf..a351a994a6e9 100644
--- a/fpicker/source/win32/filepicker/FileOpenDlg.hxx
+++ b/fpicker/source/win32/filepicker/FileOpenDlg.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -75,7 +75,7 @@ typedef struct _tagOFNA {
LPCSTR lpstrPrompt;
#endif
#if (_WIN32_WINNT >= 0x0500)
- void * pvReserved;
+ void * pvReserved;
DWORD dwReserved;
DWORD FlagsEx;
#endif // (_WIN32_WINNT >= 0x0500)
@@ -132,7 +132,7 @@ typedef _LPOPENFILENAMEA _LPOPENFILENAME;
//-------------------------------------------------------------
// A simple wrapper class around the Win32 GetOpenFileName API.
-// This class is not thread-safe and only one instance at a
+// This class is not thread-safe and only one instance at a
// time is allowed
//-------------------------------------------------------------
@@ -140,15 +140,15 @@ class CFileOpenDialog
{
public:
// ctor
- // bFileOpenDialog idicates if we want a FileOpen or FileSave
+ // bFileOpenDialog idicates if we want a FileOpen or FileSave
// dialog
// dwFlags see OPENFILENAME
// dwTemplateId - an ID for custom templates
// hInstance - an instance handle for the module
// which provides the custom template, unused if dwTemplateId
// is 0
- CFileOpenDialog(
- bool bFileOpenDialog = sal_True,
+ CFileOpenDialog(
+ bool bFileOpenDialog = sal_True,
sal_uInt32 dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
sal_uInt32 dwTemplateId = 0,
HINSTANCE hInstance = 0);
@@ -156,12 +156,12 @@ public:
virtual ~CFileOpenDialog();
virtual void SAL_CALL setTitle(const rtl::OUString& aTitle);
-
+
// to set a filter string using the M$ format
// e.g. FltName\0*.txt;*.rtf\0...\0\0
void SAL_CALL setFilter(const rtl::OUString& aFilter);
- // set the index of the current filter when the
+ // set the index of the current filter when the
// dialog is about to shown, the index starts with 1
// the function succeeded if the given filter index
// is greater than zero and is a valid position
@@ -171,8 +171,8 @@ public:
// get the index of the currently selected filter
// the index of the returned filter starts with 1
sal_uInt32 SAL_CALL getSelectedFilterIndex() const;
-
- // set the name and optional the path of the
+
+ // set the name and optional the path of the
// file that will be initially be shown when
// the dialog will be displayed
virtual void SAL_CALL setDefaultName(const rtl::OUString& aName);
@@ -205,8 +205,8 @@ public:
// returns whether multi-selection mode is enabled or not
bool SAL_CALL getMultiSelectionMode() const;
-
- // shows the dialog, calls preModal before
+
+ // shows the dialog, calls preModal before
// showing the dialog and postModal after
// showing the dialog
// the method returns:
@@ -217,7 +217,7 @@ public:
// returns the last dialog error that occured
sal_uInt32 SAL_CALL getLastDialogError() const;
-
+
// retrievs the currently selected file
// including path and drive information
// can be called only if the dialog is
@@ -253,14 +253,14 @@ protected:
virtual void SAL_CALL onHelp();
// only called back if OFN_EXPLORER is set
- virtual void SAL_CALL onInitDone();
+ virtual void SAL_CALL onInitDone();
virtual void SAL_CALL onFolderChanged();
virtual void SAL_CALL onTypeChanged(sal_uInt32 nFilterIndex);
-
+
virtual void SAL_CALL onInitDialog(HWND hwndDlg) = 0;
virtual sal_uInt32 SAL_CALL onCtrlCommand(HWND hwndDlg, sal_uInt16 ctrlId, sal_uInt16 notifyCode);
-
+
sal_uInt32 SAL_CALL onWMNotify(HWND hwndChild, LPOFNOTIFYW lpOfNotify);
// we use non-virtual functions to do necessary work before
@@ -268,18 +268,18 @@ protected:
void SAL_CALL handleInitDialog(HWND hwndDlg, HWND hwndChild);
protected:
-
- // handle to the window of the
+
+ // handle to the window of the
// FileOpen/FileSave dialog
- // will be set on message
+ // will be set on message
// WM_INITDIALOG, before this
// value is undefined
- HWND m_hwndFileOpenDlg;
- HWND m_hwndFileOpenDlgChild;
+ HWND m_hwndFileOpenDlg;
+ HWND m_hwndFileOpenDlgChild;
- _OPENFILENAME m_ofn;
+ _OPENFILENAME m_ofn;
- // we connect the instance with the dialog window using
+ // we connect the instance with the dialog window using
// SetProp, with this function we can reconnect from
// callback functions to this instance
static CFileOpenDialog* SAL_CALL getCurrentInstance(HWND hwnd);
@@ -288,33 +288,33 @@ protected:
private:
// FileOpen or FileSaveDialog
- bool m_bFileOpenDialog;
- rtl::OUString m_dialogTitle;
- rtl::OUString m_displayDirectory;
- rtl::OUString m_defaultExtension;
-
- mutable rtl::OUStringBuffer m_filterBuffer;
- mutable rtl::OUStringBuffer m_fileTitleBuffer;
- mutable rtl::OUStringBuffer m_helperBuffer;
+ bool m_bFileOpenDialog;
+ rtl::OUString m_dialogTitle;
+ rtl::OUString m_displayDirectory;
+ rtl::OUString m_defaultExtension;
+
+ mutable rtl::OUStringBuffer m_filterBuffer;
+ mutable rtl::OUStringBuffer m_fileTitleBuffer;
+ mutable rtl::OUStringBuffer m_helperBuffer;
mutable rtl::OUStringBuffer m_fileNameBuffer;
CGetFileNameWrapper m_GetFileNameWrapper;
- WNDPROC m_pfnBaseDlgProc;
+ WNDPROC m_pfnBaseDlgProc;
// callback function
- static unsigned int CALLBACK ofnHookProc(
+ static unsigned int CALLBACK ofnHookProc(
HWND hChildDlg, // handle to child dialog box
unsigned int uiMsg, // message identifier
WPARAM wParam, // message parameter
LPARAM lParam // message parameter
);
- // we have to subclass the dialog in order
- // to clean up the window property we are
+ // we have to subclass the dialog in order
+ // to clean up the window property we are
// using to connect the window with a class
// instance in WM_NCDESTROY
- static LRESULT CALLBACK BaseDlgProc(
+ static LRESULT CALLBACK BaseDlgProc(
HWND hWnd, UINT wMessage, WPARAM wParam, LPARAM lParam );
private:
diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx b/fpicker/source/win32/filepicker/FilePicker.cxx
index 2021e8c93794..322c4ae2f2ab 100644
--- a/fpicker/source/win32/filepicker/FilePicker.cxx
+++ b/fpicker/source/win32/filepicker/FilePicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,10 +69,10 @@ using namespace ::com::sun::star::ui::dialogs::TemplateDescription;
namespace
{
- // controling event notifications
+ // controling event notifications
const bool STARTUP_SUSPENDED = true;
const bool STARTUP_ALIVE = false;
-
+
uno::Sequence<rtl::OUString> SAL_CALL FilePicker_getSupportedServiceNames()
{
uno::Sequence<rtl::OUString> aRet(2);
@@ -83,12 +83,12 @@ namespace
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-CFilePicker::CFilePicker( const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr) :
+CFilePicker::CFilePicker( const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr) :
cppu::WeakComponentImplHelper10<
- XFilterManager,
+ XFilterManager,
XFilterGroupManager,
XFilePickerControlAccess,
XFilePickerNotifier,
@@ -96,21 +96,21 @@ CFilePicker::CFilePicker( const uno::Reference<lang::XMultiServiceFactory>& xSer
XFilePicker2,
lang::XInitialization,
util::XCancellable,
- lang::XEventListener,
+ lang::XEventListener,
lang::XServiceInfo>(m_rbHelperMtx),
m_xServiceMgr(xServiceMgr),
m_aAsyncEventNotifier(rBHelper)
-{
+{
HINSTANCE hInstance = GetModuleHandle(FILE_PICKER_DLL_NAME);
OSL_POSTCOND( hInstance, "The name of the service dll must have changed" );
- // create a default FileOpen dialog without any additional ui elements
- m_pImpl = std::auto_ptr< CWinFileOpenImpl >(
- new CWinFileOpenImpl(
+ // create a default FileOpen dialog without any additional ui elements
+ m_pImpl = std::auto_ptr< CWinFileOpenImpl >(
+ new CWinFileOpenImpl(
this,
- true,
- 0,
- 0,
+ true,
+ 0,
+ 0,
hInstance ) );
}
@@ -118,11 +118,11 @@ CFilePicker::CFilePicker( const uno::Reference<lang::XMultiServiceFactory>& xSer
// XFPEventListenerManager
//------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::addFilePickerListener(const uno::Reference<XFilePickerListener>& xListener)
+void SAL_CALL CFilePicker::addFilePickerListener(const uno::Reference<XFilePickerListener>& xListener)
throw(uno::RuntimeException)
{
if ( rBHelper.bDisposed )
- throw lang::DisposedException(
+ throw lang::DisposedException(
rtl::OUString::createFromAscii( "object is already disposed" ),
static_cast< XFilePicker2* >( this ) );
@@ -131,14 +131,14 @@ void SAL_CALL CFilePicker::addFilePickerListener(const uno::Reference<XFilePicke
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::removeFilePickerListener(const uno::Reference<XFilePickerListener>& xListener )
+void SAL_CALL CFilePicker::removeFilePickerListener(const uno::Reference<XFilePickerListener>& xListener )
throw(uno::RuntimeException)
{
if ( rBHelper.bDisposed )
- throw lang::DisposedException(
+ throw lang::DisposedException(
rtl::OUString::createFromAscii( "object is already disposed" ),
static_cast< XFilePicker2* >( this ) );
@@ -158,10 +158,10 @@ void SAL_CALL CFilePicker::disposing(const lang::EventObject& aEvent) throw(uno:
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::fileSelectionChanged(FilePickerEvent aEvent)
+void SAL_CALL CFilePicker::fileSelectionChanged(FilePickerEvent aEvent)
{
aEvent.Source = uno::Reference<uno::XInterface>(static_cast<XFilePickerNotifier*>(this));
m_aAsyncEventNotifier.notifyEvent(
@@ -169,10 +169,10 @@ void SAL_CALL CFilePicker::fileSelectionChanged(FilePickerEvent aEvent)
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::directoryChanged(FilePickerEvent aEvent)
+void SAL_CALL CFilePicker::directoryChanged(FilePickerEvent aEvent)
{
aEvent.Source = uno::Reference<uno::XInterface>(static_cast<XFilePickerNotifier*>(this));
m_aAsyncEventNotifier.notifyEvent(
@@ -180,21 +180,21 @@ void SAL_CALL CFilePicker::directoryChanged(FilePickerEvent aEvent)
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::controlStateChanged(FilePickerEvent aEvent)
-{
+void SAL_CALL CFilePicker::controlStateChanged(FilePickerEvent aEvent)
+{
aEvent.Source = uno::Reference<uno::XInterface>(static_cast<XFilePickerNotifier*>(this));
m_aAsyncEventNotifier.notifyEvent(
new CFilePickerParamEventNotification(&XFilePickerListener::controlStateChanged,aEvent));
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::dialogSizeChanged()
+void SAL_CALL CFilePicker::dialogSizeChanged()
{
m_aAsyncEventNotifier.notifyEvent(
new CFilePickerEventNotification(&XFilePickerListener::dialogSizeChanged));
@@ -208,7 +208,7 @@ rtl::OUString SAL_CALL CFilePicker::helpRequested(FilePickerEvent aEvent) const
{
rtl::OUString aHelpText;
- ::cppu::OInterfaceContainerHelper* pICHelper =
+ ::cppu::OInterfaceContainerHelper* pICHelper =
rBHelper.getContainer( getCppuType((uno::Reference<XFilePickerListener>*)0));
if (pICHelper)
@@ -220,8 +220,8 @@ rtl::OUString SAL_CALL CFilePicker::helpRequested(FilePickerEvent aEvent) const
try
{
/*
- if there are multiple listeners responding
- to this notification the next response
+ if there are multiple listeners responding
+ to this notification the next response
overwrittes the one before if it is not empty
*/
@@ -235,28 +235,28 @@ rtl::OUString SAL_CALL CFilePicker::helpRequested(FilePickerEvent aEvent) const
aHelpText = temp;
}
- }
+ }
catch(uno::RuntimeException&)
{
OSL_ENSURE( false, "RuntimeException during event dispatching" );
}
- }
+ }
}
return aHelpText;
}
//-------------------------------------
-//
+//
//-------------------------------------
-bool CFilePicker::startupEventNotification(bool bStartupSuspended)
+bool CFilePicker::startupEventNotification(bool bStartupSuspended)
{
return m_aAsyncEventNotifier.startup(bStartupSuspended);
}
//-------------------------------------
-//
+//
//-------------------------------------
void CFilePicker::shutdownEventNotification()
@@ -265,7 +265,7 @@ void CFilePicker::shutdownEventNotification()
}
//-------------------------------------
-//
+//
//-------------------------------------
void CFilePicker::suspendEventNotification()
@@ -274,14 +274,14 @@ void CFilePicker::suspendEventNotification()
}
//-------------------------------------
-//
+//
//-------------------------------------
void CFilePicker::resumeEventNotification()
{
m_aAsyncEventNotifier.resume();
}
-
+
//------------------------------------------------------------------------------------
// XFilePicker functions
//------------------------------------------------------------------------------------
@@ -294,7 +294,7 @@ void SAL_CALL CFilePicker::setMultiSelectionMode(sal_Bool bMode) throw(uno::Runt
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
void SAL_CALL CFilePicker::setTitle(const rtl::OUString& aTitle) throw(uno::RuntimeException)
@@ -305,10 +305,10 @@ void SAL_CALL CFilePicker::setTitle(const rtl::OUString& aTitle) throw(uno::Runt
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::appendFilter(const rtl::OUString& aTitle, const rtl::OUString& aFilter)
+void SAL_CALL CFilePicker::appendFilter(const rtl::OUString& aTitle, const rtl::OUString& aFilter)
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
OSL_ASSERT(0 != m_pImpl.get());
@@ -317,10 +317,10 @@ void SAL_CALL CFilePicker::appendFilter(const rtl::OUString& aTitle, const rtl::
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::setCurrentFilter(const rtl::OUString& aTitle)
+void SAL_CALL CFilePicker::setCurrentFilter(const rtl::OUString& aTitle)
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
OSL_ASSERT(0 != m_pImpl.get());
@@ -329,7 +329,7 @@ void SAL_CALL CFilePicker::setCurrentFilter(const rtl::OUString& aTitle)
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
rtl::OUString SAL_CALL CFilePicker::getCurrentFilter() throw(uno::RuntimeException)
@@ -340,10 +340,10 @@ rtl::OUString SAL_CALL CFilePicker::getCurrentFilter() throw(uno::RuntimeExcepti
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::appendFilterGroup(const rtl::OUString& sGroupTitle, const uno::Sequence<beans::StringPair>& aFilters)
+void SAL_CALL CFilePicker::appendFilterGroup(const rtl::OUString& sGroupTitle, const uno::Sequence<beans::StringPair>& aFilters)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
OSL_ASSERT(0 != m_pImpl.get());
@@ -352,10 +352,10 @@ void SAL_CALL CFilePicker::appendFilterGroup(const rtl::OUString& sGroupTitle, c
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::setDefaultName(const rtl::OUString& aName)
+void SAL_CALL CFilePicker::setDefaultName(const rtl::OUString& aName)
throw(uno::RuntimeException)
{
OSL_ASSERT(0 != m_pImpl.get());
@@ -364,10 +364,10 @@ void SAL_CALL CFilePicker::setDefaultName(const rtl::OUString& aName)
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::setDisplayDirectory(const rtl::OUString& aDirectory)
+void SAL_CALL CFilePicker::setDisplayDirectory(const rtl::OUString& aDirectory)
throw(lang::IllegalArgumentException, uno::RuntimeException)
{
OSL_ASSERT(0 != m_pImpl.get());
@@ -376,7 +376,7 @@ void SAL_CALL CFilePicker::setDisplayDirectory(const rtl::OUString& aDirectory)
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
rtl::OUString SAL_CALL CFilePicker::getDisplayDirectory() throw(uno::RuntimeException)
@@ -387,7 +387,7 @@ rtl::OUString SAL_CALL CFilePicker::getDisplayDirectory() throw(uno::RuntimeExce
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
uno::Sequence<rtl::OUString> SAL_CALL CFilePicker::getFiles() throw(uno::RuntimeException)
@@ -398,7 +398,7 @@ uno::Sequence<rtl::OUString> SAL_CALL CFilePicker::getFiles() throw(uno::Runtime
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
uno::Sequence< ::rtl::OUString > SAL_CALL CFilePicker::getSelectedFiles() throw (uno::RuntimeException)
{
@@ -409,7 +409,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL CFilePicker::getSelectedFiles() throw
const ::sal_Int32 c = lSource.getLength();
if (c < 2)
return lSource;
-
+
const ::rtl::OUString sPath = lSource[0];
::comphelper::SequenceAsVector< ::rtl::OUString > lTarget;
::sal_Int32 i = 1;
@@ -425,26 +425,26 @@ uno::Sequence< ::rtl::OUString > SAL_CALL CFilePicker::getSelectedFiles() throw
{
// b) file is relative to given path
::rtl::OUStringBuffer sFull(256);
-
+
sFull.append (sPath);
sFull.appendAscii("/" );
sFull.append (sFile);
-
+
lTarget.push_back(sFull.makeStringAndClear());
}
}
-
+
return lTarget.getAsConstList();
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
sal_Int16 SAL_CALL CFilePicker::execute() throw(uno::RuntimeException)
{
OSL_ASSERT(0 != m_pImpl.get());
-
+
sal_Int16 ret;
if (startupEventNotification(STARTUP_SUSPENDED))
@@ -461,7 +461,7 @@ sal_Int16 SAL_CALL CFilePicker::execute() throw(uno::RuntimeException)
{
OSL_ENSURE(sal_False, "Could not start event notifier thread!");
- throw uno::RuntimeException(
+ throw uno::RuntimeException(
rtl::OUString::createFromAscii("Error executing dialog"),
static_cast<XFilePicker2*>(this));
}
@@ -473,20 +473,20 @@ sal_Int16 SAL_CALL CFilePicker::execute() throw(uno::RuntimeException)
// XFilePicker functions
//------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::setValue(sal_Int16 aControlId, sal_Int16 aControlAction, const uno::Any& aValue)
+void SAL_CALL CFilePicker::setValue(sal_Int16 aControlId, sal_Int16 aControlAction, const uno::Any& aValue)
throw(uno::RuntimeException)
{
OSL_ASSERT(0 != m_pImpl.get());
-
+
osl::MutexGuard aGuard(m_aMutex);
m_pImpl->setValue(aControlId, aControlAction, aValue);
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-uno::Any SAL_CALL CFilePicker::getValue(sal_Int16 aControlId, sal_Int16 aControlAction)
+uno::Any SAL_CALL CFilePicker::getValue(sal_Int16 aControlId, sal_Int16 aControlAction)
throw(uno::RuntimeException)
{
OSL_ASSERT(0 != m_pImpl.get());
@@ -496,10 +496,10 @@ uno::Any SAL_CALL CFilePicker::getValue(sal_Int16 aControlId, sal_Int16 aControl
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::enableControl(sal_Int16 aControlId, sal_Bool bEnable)
+void SAL_CALL CFilePicker::enableControl(sal_Int16 aControlId, sal_Bool bEnable)
throw(uno::RuntimeException)
{
OSL_ASSERT( 0 != m_pImpl.get( ) );
@@ -509,10 +509,10 @@ throw(uno::RuntimeException)
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::setLabel(sal_Int16 aControlId, const ::rtl::OUString& aLabel)
+void SAL_CALL CFilePicker::setLabel(sal_Int16 aControlId, const ::rtl::OUString& aLabel)
throw (uno::RuntimeException)
{
OSL_ASSERT(0 != m_pImpl.get());
@@ -522,10 +522,10 @@ void SAL_CALL CFilePicker::setLabel(sal_Int16 aControlId, const ::rtl::OUString&
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-rtl::OUString SAL_CALL CFilePicker::getLabel(sal_Int16 aControlId)
+rtl::OUString SAL_CALL CFilePicker::getLabel(sal_Int16 aControlId)
throw (uno::RuntimeException)
{
OSL_ASSERT(0 != m_pImpl.get());
@@ -535,7 +535,7 @@ rtl::OUString SAL_CALL CFilePicker::getLabel(sal_Int16 aControlId)
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
uno::Sequence<sal_Int16> SAL_CALL CFilePicker::getSupportedImageFormats() throw (uno::RuntimeException)
@@ -547,7 +547,7 @@ uno::Sequence<sal_Int16> SAL_CALL CFilePicker::getSupportedImageFormats() throw
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
sal_Int32 SAL_CALL CFilePicker::getTargetColorDepth() throw (uno::RuntimeException)
@@ -559,7 +559,7 @@ sal_Int32 SAL_CALL CFilePicker::getTargetColorDepth() throw (uno::RuntimeExcepti
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
sal_Int32 SAL_CALL CFilePicker::getAvailableWidth() throw (uno::RuntimeException)
@@ -571,7 +571,7 @@ sal_Int32 SAL_CALL CFilePicker::getAvailableWidth() throw (uno::RuntimeException
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
sal_Int32 SAL_CALL CFilePicker::getAvailableHeight() throw (uno::RuntimeException)
@@ -583,10 +583,10 @@ sal_Int32 SAL_CALL CFilePicker::getAvailableHeight() throw (uno::RuntimeExceptio
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::setImage(sal_Int16 aImageFormat, const uno::Any& aImage)
+void SAL_CALL CFilePicker::setImage(sal_Int16 aImageFormat, const uno::Any& aImage)
throw (lang::IllegalArgumentException, uno::RuntimeException)
{
OSL_ASSERT(0 != m_pImpl.get());
@@ -596,19 +596,19 @@ void SAL_CALL CFilePicker::setImage(sal_Int16 aImageFormat, const uno::Any& aIma
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
sal_Bool SAL_CALL CFilePicker::setShowState(sal_Bool bShowState) throw (uno::RuntimeException)
{
OSL_ASSERT(0 != m_pImpl.get());
- osl::MutexGuard aGuard(m_aMutex);
+ osl::MutexGuard aGuard(m_aMutex);
return m_pImpl->setShowState(bShowState);
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
sal_Bool SAL_CALL CFilePicker::getShowState() throw (uno::RuntimeException)
@@ -620,19 +620,19 @@ sal_Bool SAL_CALL CFilePicker::getShowState() throw (uno::RuntimeException)
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
-void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments)
+void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments)
throw( uno::Exception, uno::RuntimeException)
{
- // parameter checking
+ // parameter checking
uno::Any aAny;
if ( 0 == aArguments.getLength( ) )
throw lang::IllegalArgumentException(
rtl::OUString::createFromAscii( "no arguments" ),
static_cast<XFilePicker2*>(this), 1);
-
+
aAny = aArguments[0];
if ( (aAny.getValueType() != ::getCppuType((sal_Int16*)0)) &&
@@ -697,7 +697,7 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments)
winResTemplateId = TMPL95_FILEOPEN_LINK_PREVIEW_BOX_ID;
break;
- case FILEOPEN_PLAY:
+ case FILEOPEN_PLAY:
if ( bIsWin2000 )
winResTemplateId = TMPL2000_PLAY_PUSHBUTTON;
else
@@ -732,19 +732,19 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments)
static_cast< XFilePicker2* >( this ),
1 );
}
-
+
HINSTANCE hInstance = GetModuleHandle( FILE_PICKER_DLL_NAME );
OSL_POSTCOND( hInstance, "The name of the service dll must have changed" );
- // create a new impl-class here based on the
+ // create a new impl-class here based on the
// given string, if the given string is empty
// we do nothing
- m_pImpl = std::auto_ptr< CWinFileOpenImpl >(
- new CWinFileOpenImpl(
- this,
- bFileOpenDialog,
- 0,
- winResTemplateId,
+ m_pImpl = std::auto_ptr< CWinFileOpenImpl >(
+ new CWinFileOpenImpl(
+ this,
+ bFileOpenDialog,
+ 0,
+ winResTemplateId,
hInstance ) );
}
@@ -758,24 +758,24 @@ void SAL_CALL CFilePicker::cancel()
OSL_ASSERT(m_pImpl.get());
osl::MutexGuard aGuard(m_aMutex);
- m_pImpl->cancel();
+ m_pImpl->cancel();
}
// -------------------------------------------------
// XServiceInfo
// -------------------------------------------------
-rtl::OUString SAL_CALL CFilePicker::getImplementationName()
+rtl::OUString SAL_CALL CFilePicker::getImplementationName()
throw(uno::RuntimeException)
{
return rtl::OUString::createFromAscii(FILE_PICKER_IMPL_NAME);
}
// -------------------------------------------------
-// XServiceInfo
+// XServiceInfo
// -------------------------------------------------
-sal_Bool SAL_CALL CFilePicker::supportsService(const rtl::OUString& ServiceName)
+sal_Bool SAL_CALL CFilePicker::supportsService(const rtl::OUString& ServiceName)
throw(uno::RuntimeException )
{
uno::Sequence <rtl::OUString> SupportedServicesNames = FilePicker_getSupportedServiceNames();
@@ -788,10 +788,10 @@ sal_Bool SAL_CALL CFilePicker::supportsService(const rtl::OUString& ServiceName)
}
// -------------------------------------------------
-// XServiceInfo
+// XServiceInfo
// -------------------------------------------------
-uno::Sequence<rtl::OUString> SAL_CALL CFilePicker::getSupportedServiceNames()
+uno::Sequence<rtl::OUString> SAL_CALL CFilePicker::getSupportedServiceNames()
throw(uno::RuntimeException)
{
return FilePicker_getSupportedServiceNames();
diff --git a/fpicker/source/win32/filepicker/FilePicker.hxx b/fpicker/source/win32/filepicker/FilePicker.hxx
index cb9722198fb6..6d17d3a478a4 100644
--- a/fpicker/source/win32/filepicker/FilePicker.hxx
+++ b/fpicker/source/win32/filepicker/FilePicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,7 +30,7 @@
#define _FILEPICKER_HXX_
//_______________________________________________________________________________________________________________________
-// includes of other projects
+// includes of other projects
//_______________________________________________________________________________________________________________________
@@ -61,17 +61,17 @@
class CWinFileOpenImpl;
//----------------------------------------------------------
-// class declaration
+// class declaration
//----------------------------------------------------------
class CFilePickerDummy
{
protected:
- osl::Mutex m_aMutex;
- osl::Mutex m_rbHelperMtx;
+ osl::Mutex m_aMutex;
+ osl::Mutex m_rbHelperMtx;
};
-class CFilePicker :
+class CFilePicker :
public CFilePickerDummy,
public cppu::WeakComponentImplHelper10<
::com::sun::star::ui::dialogs::XFilterManager,
@@ -83,7 +83,7 @@ class CFilePicker :
::com::sun::star::lang::XInitialization,
::com::sun::star::util::XCancellable,
::com::sun::star::lang::XEventListener,
- ::com::sun::star::lang::XServiceInfo >
+ ::com::sun::star::lang::XServiceInfo >
{
public:
@@ -94,38 +94,38 @@ public:
// XFilePickerNotifier
//------------------------------------------------------------------------------------
- virtual void SAL_CALL addFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
+ virtual void SAL_CALL addFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
+ virtual void SAL_CALL removeFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XExecutableDialog functions
//------------------------------------------------------------------------------------
-
- virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle )
+
+ virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle )
throw( ::com::sun::star::uno::RuntimeException );
- virtual sal_Int16 SAL_CALL execute( )
+ virtual sal_Int16 SAL_CALL execute( )
throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XFilePicker functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL setMultiSelectionMode( sal_Bool bMode )
+ virtual void SAL_CALL setMultiSelectionMode( sal_Bool bMode )
throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setDefaultName( const ::rtl::OUString& aName )
+ virtual void SAL_CALL setDefaultName( const ::rtl::OUString& aName )
throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& aDirectory )
+ virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& aDirectory )
throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getDisplayDirectory( )
+ virtual ::rtl::OUString SAL_CALL getDisplayDirectory( )
throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getFiles( )
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getFiles( )
throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
@@ -133,7 +133,7 @@ public:
//------------------------------------------------------------------------------------
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSelectedFiles( )
throw (::com::sun::star::uno::RuntimeException);
-
+
//------------------------------------------------------------------------------------
// XFilterManager functions
//------------------------------------------------------------------------------------
@@ -141,36 +141,36 @@ public:
virtual void SAL_CALL appendFilter( const ::rtl::OUString& aTitle, const ::rtl::OUString& aFilter )
throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setCurrentFilter( const ::rtl::OUString& aTitle )
+ virtual void SAL_CALL setCurrentFilter( const ::rtl::OUString& aTitle )
throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getCurrentFilter( )
+ virtual ::rtl::OUString SAL_CALL getCurrentFilter( )
throw( ::com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XFilterGroupManager functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL appendFilterGroup( const ::rtl::OUString& sGroupTitle, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair >& aFilters )
+ virtual void SAL_CALL appendFilterGroup( const ::rtl::OUString& sGroupTitle, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair >& aFilters )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
//------------------------------------------------------------------------------------
// XFilePickerControlAccess functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL setValue( sal_Int16 aControlId, sal_Int16 aControlAction, const ::com::sun::star::uno::Any& aValue )
+ virtual void SAL_CALL setValue( sal_Int16 aControlId, sal_Int16 aControlAction, const ::com::sun::star::uno::Any& aValue )
throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getValue( sal_Int16 aControlId, sal_Int16 aControlAction )
+ virtual ::com::sun::star::uno::Any SAL_CALL getValue( sal_Int16 aControlId, sal_Int16 aControlAction )
throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL enableControl( sal_Int16 aControlId, sal_Bool bEnable )
+ virtual void SAL_CALL enableControl( sal_Int16 aControlId, sal_Bool bEnable )
throw(::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setLabel( sal_Int16 aControlId, const ::rtl::OUString& aLabel )
+ virtual void SAL_CALL setLabel( sal_Int16 aControlId, const ::rtl::OUString& aLabel )
throw (::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getLabel( sal_Int16 aControlId )
+ virtual ::rtl::OUString SAL_CALL getLabel( sal_Int16 aControlId )
throw (::com::sun::star::uno::RuntimeException);
//------------------------------------------------
@@ -209,26 +209,26 @@ public:
// XEventListener
//------------------------------------------------
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent )
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent )
throw(::com::sun::star::uno::RuntimeException);
//------------------------------------------------
// XServiceInfo
- //------------------------------------------------
+ //------------------------------------------------
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
+ virtual ::rtl::OUString SAL_CALL getImplementationName( )
throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
throw(::com::sun::star::uno::RuntimeException);
//------------------------------------------------------------------------------------
// FilePicker Event functions
//------------------------------------------------------------------------------------
-
+
void SAL_CALL fileSelectionChanged( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent );
void SAL_CALL directoryChanged( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent );
rtl::OUString SAL_CALL helpRequested( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent ) const;
@@ -239,20 +239,20 @@ public:
void shutdownEventNotification();
void suspendEventNotification();
void resumeEventNotification();
-
+
private:
// prevent copy and assignment
- CFilePicker( const CFilePicker& );
+ CFilePicker( const CFilePicker& );
CFilePicker& operator=( const CFilePicker& );
using WeakComponentImplHelperBase::disposing;
private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr; // to instanciate own services
- CAsyncEventNotifier m_aAsyncEventNotifier;
- std::auto_ptr<CWinFileOpenImpl> m_pImpl;
-};
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr; // to instanciate own services
+ CAsyncEventNotifier m_aAsyncEventNotifier;
+ std::auto_ptr<CWinFileOpenImpl> m_pImpl;
+};
-#endif
+#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/filepicker/FilterContainer.cxx b/fpicker/source/win32/filepicker/FilterContainer.cxx
index d2de0ac6d74b..2c609c4f9414 100644
--- a/fpicker/source/win32/filepicker/FilterContainer.cxx
+++ b/fpicker/source/win32/filepicker/FilterContainer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -54,7 +54,7 @@ using ::rtl::OUString;
// ctor
//-------------------------------------------------------------------------------------
-CFilterContainer::CFilterContainer( sal_Int32 initSize ) :
+CFilterContainer::CFilterContainer( sal_Int32 initSize ) :
m_vFilters( initSize ),
m_bIterInitialized( sal_False )
{
@@ -64,12 +64,12 @@ CFilterContainer::CFilterContainer( sal_Int32 initSize ) :
// add a name/filter pair
//-----------------------------------------------------------------------------------------
-sal_Bool SAL_CALL CFilterContainer::addFilter(
+sal_Bool SAL_CALL CFilterContainer::addFilter(
const OUString& aName, const OUString& aFilter, sal_Bool bAllowDuplicates )
{
// check if the filter is already in the container
sal_Int32 pos = -1;
-
+
if ( !bAllowDuplicates )
{
pos = getFilterTagPos( aName );
@@ -91,7 +91,7 @@ sal_Bool SAL_CALL CFilterContainer::addFilter(
//-----------------------------------------------------------------------------------------
// delete a filter
// Precondition: the container is not empty
-// there is a filter identified by the given name
+// there is a filter identified by the given name
//-----------------------------------------------------------------------------------------
sal_Bool SAL_CALL CFilterContainer::delFilter( const OUString& aName )
@@ -129,14 +129,14 @@ void SAL_CALL CFilterContainer::empty()
//-----------------------------------------------------------------------------------------
// get a filter by name
// Precondition: the container is not empty
-// there is a filter identified by the name
+// there is a filter identified by the name
//-----------------------------------------------------------------------------------------
sal_Bool SAL_CALL CFilterContainer::getFilter( const OUString& aName, OUString& theFilter ) const
{
OSL_PRECOND( m_vFilters.size() > 0, "Empty filter container" );
- sal_Int32 pos = getFilterTagPos( aName );
+ sal_Int32 pos = getFilterTagPos( aName );
try
{
@@ -153,7 +153,7 @@ sal_Bool SAL_CALL CFilterContainer::getFilter( const OUString& aName, OUString&
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
sal_Bool SAL_CALL CFilterContainer::getFilter( sal_Int32 aIndex, OUString& theFilter ) const
@@ -174,7 +174,7 @@ sal_Bool SAL_CALL CFilterContainer::getFilter( sal_Int32 aIndex, OUString& theFi
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
sal_Int32 SAL_CALL CFilterContainer::getFilterPos( const OUString& aName ) const
@@ -189,14 +189,14 @@ sal_Int32 SAL_CALL CFilterContainer::getFilterPos( const OUString& aName ) const
sal_Int32 SAL_CALL CFilterContainer::getFilterTagPos( const OUString& aName ) const
{
if ( m_vFilters.size( ) > 0 )
- {
+ {
sal_Int32 i = 0;
FILTER_VECTOR_T::const_iterator iter;
FILTER_VECTOR_T::const_iterator iter_end = m_vFilters.end( );
for ( iter = m_vFilters.begin( ); iter != iter_end; ++iter, ++i )
if ( ( *iter ).first.equalsIgnoreAsciiCase( aName ) )
- return i;
+ return i;
}
return -1;
@@ -247,13 +247,13 @@ void SAL_CALL CFilterContainer::setCurrentFilter( const ::rtl::OUString& aName )
//-------------------------------------------------------------------
// calculates the length of a '\0' separated filter, that means
-// length of the name + '\0' + length of the filter string +
+// length of the name + '\0' + length of the filter string +
// a trailing '\0'
//-------------------------------------------------------------------
static sal_uInt32 _getLengthFilter( CFilterContainer::FILTER_ENTRY_T aFilterEntry )
{
- return (
+ return (
aFilterEntry.first.getLength( ) + 1 +
aFilterEntry.second.getLength( ) + 1 );
}
@@ -286,8 +286,8 @@ void _wcsmemcpy( sal_Unicode* pDest, const sal_Unicode* pSrc, sal_uInt32 nLength
}
//-------------------------------------------------------------------
-// a helper trivial helper function to create a filter buffer in the
-// format the Win32 API requires,
+// a helper trivial helper function to create a filter buffer in the
+// format the Win32 API requires,
// e.g. "Text\0*.txt\0Doc\0*.doc;*xls\0\0"
//-------------------------------------------------------------------
@@ -313,11 +313,11 @@ rtl::OUString SAL_CALL makeWinFilterBuffer( CFilterContainer& aFilterContainer )
while( aFilterContainer.getNextFilter( nextFilter ) )
{
- _wcsmemcpy(
- pBuff + memPos,
+ _wcsmemcpy(
+ pBuff + memPos,
nextFilter.first.getStr( ),
nextFilter.first.getLength( ) );
-
+
memPos += nextFilter.first.getLength( ) + 1;
_wcsmemcpy(
diff --git a/fpicker/source/win32/filepicker/FilterContainer.hxx b/fpicker/source/win32/filepicker/FilterContainer.hxx
index 91ee54571418..44e0e15a139e 100644
--- a/fpicker/source/win32/filepicker/FilterContainer.hxx
+++ b/fpicker/source/win32/filepicker/FilterContainer.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,17 +47,17 @@ public:
public:
explicit CFilterContainer( sal_Int32 initSize = 0 );
-
- // add a new filter
+
+ // add a new filter
// returns true if the filter was successfully added
// returns false if duplicates are not allowed and
// the filter is already in the container
- sal_Bool SAL_CALL addFilter(
- const ::rtl::OUString& aName,
+ sal_Bool SAL_CALL addFilter(
+ const ::rtl::OUString& aName,
const ::rtl::OUString& aFilter,
sal_Bool bAllowDuplicates = sal_False );
- // delete the specified filter returns true on
+ // delete the specified filter returns true on
// success and false if the filter was not found
sal_Bool SAL_CALL delFilter( const ::rtl::OUString& aName );
@@ -67,13 +67,13 @@ public:
// clear all entries
void SAL_CALL empty( );
- // retrieve a filter from the container both methods
- // return true on success and false if the specified
+ // retrieve a filter from the container both methods
+ // return true on success and false if the specified
// filter was not found
sal_Bool SAL_CALL getFilter( const ::rtl::OUString& aName, ::rtl::OUString& theFilter ) const;
sal_Bool SAL_CALL getFilter( sal_Int32 aIndex, ::rtl::OUString& theFilter ) const;
- // returns the position of the specified filter or -1
+ // returns the position of the specified filter or -1
// if the filter was not found
sal_Int32 SAL_CALL getFilterPos( const ::rtl::OUString& aName ) const;
@@ -82,21 +82,21 @@ public:
// returns true if another filter has been retrieved
sal_Bool SAL_CALL getNextFilter( FILTER_ENTRY_T& nextFilterEntry );
-
+
// cache current filter
void SAL_CALL setCurrentFilter( const ::rtl::OUString& aName );
-
+
// returns cached current filter
::rtl::OUString SAL_CALL getCurrentFilter() const;
-protected:
+protected:
typedef std::vector< FILTER_ENTRY_T > FILTER_VECTOR_T;
private:
// prevent copy and assignment
CFilterContainer( const CFilterContainer& );
CFilterContainer& SAL_CALL operator=( const CFilterContainer& );
-
+
sal_Int32 SAL_CALL getFilterTagPos( const ::rtl::OUString& aName ) const;
private:
diff --git a/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx b/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
index a03e6f3fe23c..9eb8ee779486 100644
--- a/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
+++ b/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,7 +65,7 @@ namespace vista{
class IVistaFilePickerInternalNotify
{
public:
-
+
virtual void onAutoExtensionChanged (bool bChecked) = 0;
};
diff --git a/fpicker/source/win32/filepicker/PreviewCtrl.cxx b/fpicker/source/win32/filepicker/PreviewCtrl.cxx
index 9dd419d5a19d..82a29ae05df0 100644
--- a/fpicker/source/win32/filepicker/PreviewCtrl.cxx
+++ b/fpicker/source/win32/filepicker/PreviewCtrl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -76,7 +76,7 @@ namespace // private
{
class CPreviewException
{
- // used when registering or creation
+ // used when registering or creation
// of the preview window failed
};
@@ -85,7 +85,7 @@ namespace // private
//------------------------------------------------------------
inline
- sal_Int32 SubDiv( sal_Int32 nNumber, sal_Int32 nMinuend, sal_Int32 nDenominator )
+ sal_Int32 SubDiv( sal_Int32 nNumber, sal_Int32 nMinuend, sal_Int32 nDenominator )
{
return ( static_cast<sal_Int32>( ( nNumber - nMinuend ) / nDenominator ) );
}
@@ -114,7 +114,7 @@ namespace // private
//
//------------------------------------------------------------
- inline
+ inline
sal_uInt32 _getHeightRect( const RECT& aRect )
{
return ( aRect.bottom - aRect.top );
@@ -125,7 +125,7 @@ namespace // private
// displayed centered within the given window
//------------------------------------------------------------
- inline
+ inline
POINT _calcULCorner( HWND hwnd, const CDimension& aPicSize )
{
RECT rect;
@@ -133,7 +133,7 @@ namespace // private
sal_Int32 nWidthWnd = _getWidthRect( rect );
sal_Int32 nHeightWnd = _getHeightRect( rect );
-
+
POINT ulCorner;
ulCorner.x = SubDiv( nWidthWnd, aPicSize.m_cx, 2 );
ulCorner.y = SubDiv( nHeightWnd, aPicSize.m_cy, 2 );
@@ -146,17 +146,17 @@ namespace // private
// arbitrary window
// we expect the width and height to be in pixel
//------------------------------------------------------------
-
+
inline
sal_Bool _pictureSizeFitsWindowSize( HWND hwnd, const CDimension& aPicSize )
{
RECT rect;
GetClientRect( hwnd, &rect );
-
+
sal_Int32 nWidthWnd = _getWidthRect( rect );
sal_Int32 nHeightWnd = _getHeightRect( rect );
- return ( ( ( nWidthWnd - HORZ_BODER_SPACE ) >= aPicSize.m_cx ) &&
+ return ( ( ( nWidthWnd - HORZ_BODER_SPACE ) >= aPicSize.m_cx ) &&
( ( nHeightWnd - VERT_BORDER_SPACE ) >= aPicSize.m_cy ) );
}
@@ -170,13 +170,13 @@ namespace // private
CDimension _scalePictureSize( HWND hwnd, const CDimension& aPicSize )
{
CDimension scaledPicSize = aPicSize;
-
+
if ( !_pictureSizeFitsWindowSize( hwnd, aPicSize ) )
{
RECT rect;
GetClientRect( hwnd, &rect );
-
- // the dimensions of the preview wnd are not equal
+
+ // the dimensions of the preview wnd are not equal
// that's why we equalize it
sal_Int32 nHeightWnd = _getHeightRect( rect ) - VERT_BORDER_SPACE;
sal_Int32 nWidthWnd = nHeightWnd;
@@ -184,14 +184,14 @@ namespace // private
if ( aPicSize.m_cx >= aPicSize.m_cy )
{
scaledPicSize.m_cx = nWidthWnd;
- scaledPicSize.m_cy =
- static_cast< sal_Int32 >(
- aPicSize.m_cy * nWidthWnd / aPicSize.m_cx );
+ scaledPicSize.m_cy =
+ static_cast< sal_Int32 >(
+ aPicSize.m_cy * nWidthWnd / aPicSize.m_cx );
}
else
{
- scaledPicSize.m_cx =
- static_cast< sal_Int32 >(
+ scaledPicSize.m_cx =
+ static_cast< sal_Int32 >(
aPicSize.m_cx * nHeightWnd / aPicSize.m_cy );
scaledPicSize.m_cy = nHeightWnd;
}
@@ -202,24 +202,24 @@ namespace // private
} // end namespace
-
+
//---------------------------------------------------
// to ensure only one instance (singleton)
//---------------------------------------------------
-CFilePreview* CFilePreview::createInstance(
- HWND aParent,
- POINT ulCorner,
- const CDimension& aSize,
- HINSTANCE hInstance,
- sal_Bool bShow,
+CFilePreview* CFilePreview::createInstance(
+ HWND aParent,
+ POINT ulCorner,
+ const CDimension& aSize,
+ HINSTANCE hInstance,
+ sal_Bool bShow,
sal_Bool bEnabled )
{
if ( !s_FilePreviewInst )
{
try
{
- s_FilePreviewInst = new CFilePreview(
+ s_FilePreviewInst = new CFilePreview(
aParent, ulCorner, aSize, hInstance, bShow, bEnabled );
s_SingletonDestroyer.reset( s_FilePreviewInst );
}
@@ -242,41 +242,41 @@ CFilePreview* CFilePreview::createInstance(
//
//---------------------------------------------------
-CFilePreview::CFilePreview(
- HWND aParent,
- POINT ulCorner,
- const CDimension& aSize,
- HINSTANCE hInstance,
- sal_Bool bShow,
- sal_Bool bEnabled ) :
+CFilePreview::CFilePreview(
+ HWND aParent,
+ POINT ulCorner,
+ const CDimension& aSize,
+ HINSTANCE hInstance,
+ sal_Bool bShow,
+ sal_Bool bEnabled ) :
m_hInstance( hInstance ),
m_bEnabled( bEnabled )
{
- // register the preview window class
- WNDCLASSEX wndClsEx;
+ // register the preview window class
+ WNDCLASSEX wndClsEx;
ZeroMemory(&wndClsEx, sizeof(wndClsEx));
wndClsEx.cbSize = sizeof(wndClsEx);
- wndClsEx.style = CS_HREDRAW | CS_VREDRAW;
+ wndClsEx.style = CS_HREDRAW | CS_VREDRAW;
wndClsEx.lpfnWndProc = CFilePreview::WndProc;
wndClsEx.hInstance = m_hInstance;
wndClsEx.hbrBackground = (HBRUSH)( COLOR_INACTIVEBORDER + 1 );
wndClsEx.lpszClassName = PREVIEWWND_CLASS_NAME;
-
+
// register the preview window class
- // !!! Win95 - the window class will be unregistered automaticly
- // if the dll is unloaded
+ // !!! Win95 - the window class will be unregistered automaticly
+ // if the dll is unloaded
// Win2000 - the window class must be unregistered manually
- // if the dll is unloaded
+ // if the dll is unloaded
m_atomPrevWndClass = RegisterClassEx(&wndClsEx);
if ( !m_atomPrevWndClass )
throw CPreviewException( );
-
+
// create the preview window in invisible state
sal_uInt32 dwStyle = bShow ? (WS_CHILD | WS_VISIBLE) : WS_CHILD;
- m_hwnd = CreateWindowEx(
- WS_EX_CLIENTEDGE,
- PREVIEWWND_CLASS_NAME,
+ m_hwnd = CreateWindowEx(
+ WS_EX_CLIENTEDGE,
+ PREVIEWWND_CLASS_NAME,
TEXT(""),
dwStyle,
ulCorner.x,
@@ -284,7 +284,7 @@ CFilePreview::CFilePreview(
aSize.m_cx,
aSize.m_cy,
aParent,
- (HMENU)100, // for child windows this will
+ (HMENU)100, // for child windows this will
// be used as child window identifier
m_hInstance,
0 );
@@ -297,12 +297,12 @@ CFilePreview::CFilePreview(
//---------------------------------------------------
CFilePreview::~CFilePreview( )
-{
+{
// unregister preview window class
- sal_Bool bRet = UnregisterClass(
+ sal_Bool bRet = UnregisterClass(
(LPCTSTR)MAKELONG( m_atomPrevWndClass, 0 ),
m_hInstance );
- OSL_POSTCOND( bRet, "Unregister preview window class failed" );
+ OSL_POSTCOND( bRet, "Unregister preview window class failed" );
}
//---------------------------------------------------
@@ -312,19 +312,19 @@ CFilePreview::~CFilePreview( )
sal_Bool SAL_CALL CFilePreview::setSize( const CDimension& aSize )
{
OSL_PRECOND( IsWindow( m_hwnd ), "Preview window not initialized" );
-
+
// resize the fileopen file listbox
- return SetWindowPos(
- m_hwnd,
- NULL,
- 0,
- 0,
- aSize.m_cx,
- aSize.m_cy,
+ return SetWindowPos(
+ m_hwnd,
+ NULL,
+ 0,
+ 0,
+ aSize.m_cx,
+ aSize.m_cy,
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE );
}
-//---------------------------------------------------
+//---------------------------------------------------
// returns the dimension of the preview
//---------------------------------------------------
@@ -342,7 +342,7 @@ sal_Bool SAL_CALL CFilePreview::getSize( CDimension& theSize ) const
}
//---------------------------------------------------
-// sets the position of the upper left corner
+// sets the position of the upper left corner
// of the preview window relative to the
// upper left corner of the parent window
//---------------------------------------------------
@@ -352,13 +352,13 @@ sal_Bool SAL_CALL CFilePreview::setPos( POINT ulCorner )
OSL_PRECOND( IsWindow( m_hwnd ), "Preview window not initialized" );
// resize the fileopen file listbox
- return SetWindowPos(
- m_hwnd,
- NULL,
- ulCorner.x,
- ulCorner.y,
- 0,
- 0,
+ return SetWindowPos(
+ m_hwnd,
+ NULL,
+ ulCorner.x,
+ ulCorner.y,
+ 0,
+ 0,
SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE );
}
@@ -386,16 +386,16 @@ sal_Bool SAL_CALL CFilePreview::getPos( POINT& ulCorner ) const
}
//---------------------------------------------------
-//
+//
//---------------------------------------------------
void SAL_CALL CFilePreview::enable( sal_Bool bEnable )
{
m_bEnabled = bEnable;
-
+
// force a redraw
InvalidateRect( m_hwnd, NULL, TRUE );
- UpdateWindow( m_hwnd );
+ UpdateWindow( m_hwnd );
}
//---------------------------------------------------
@@ -415,33 +415,33 @@ sal_Bool SAL_CALL CFilePreview::show( sal_Bool bShow )
return ShowWindow( m_hwnd, showState );
}
-//---------------------------------------------------
-// if the preview is shown and enabled
+//---------------------------------------------------
+// if the preview is shown and enabled
// preview of the given file will be shown
// returns true on success or false if an error
// occured (the file in not there or not accessible etc.)
//---------------------------------------------------
sal_Bool SAL_CALL CFilePreview::update( const rtl::OUString& aFileName )
-{
+{
OSL_PRECOND( IsWindow( m_hwnd ), "Preview window not initialized" );
try
{
if ( m_bEnabled )
- {
+ {
if ( m_IPicture )
m_IPicture.Release( );
loadFile( aFileName );
-
+
// force a complete window redraw
InvalidateRect( m_hwnd, NULL, TRUE );
- UpdateWindow( m_hwnd );
+ UpdateWindow( m_hwnd );
}
- }
+ }
catch( _com_error& )
- {
+ {
}
return sal_True;
@@ -456,8 +456,8 @@ void SAL_CALL CFilePreview::onPaint( HWND hWnd, HDC hDC )
OSL_PRECOND( IsWindow( m_hwnd ), "Preview window not initialized" );
try
- {
- if ( m_bEnabled )
+ {
+ if ( m_bEnabled )
{
// get width and height of picture
long cxPicHIMETRIC;
@@ -465,16 +465,16 @@ void SAL_CALL CFilePreview::onPaint( HWND hWnd, HDC hDC )
m_IPicture->get_Width( &cxPicHIMETRIC );
m_IPicture->get_Height( &cyPicHIMETRIC );
-
+
// convert himetric to pixels
- int cxPicPIXEL = Himetric2Pixel( hDC, cxPicHIMETRIC, LOGPIXELSX );
- int cyPicPIXEL = Himetric2Pixel( hDC, cyPicHIMETRIC, LOGPIXELSY );
-
+ int cxPicPIXEL = Himetric2Pixel( hDC, cxPicHIMETRIC, LOGPIXELSX );
+ int cyPicPIXEL = Himetric2Pixel( hDC, cyPicHIMETRIC, LOGPIXELSY );
+
// scale the picture based on the size of the preview window
RECT rcPrevWnd;
GetClientRect(hWnd, &rcPrevWnd);
- CDimension scaledPicSize = _scalePictureSize(
+ CDimension scaledPicSize = _scalePictureSize(
hWnd, CDimension( cxPicPIXEL, cyPicPIXEL ) );
// calc the upper left corner so that the picture
@@ -492,27 +492,27 @@ void SAL_CALL CFilePreview::onPaint( HWND hWnd, HDC hDC )
cyPicHIMETRIC,
cxPicHIMETRIC,
-cyPicHIMETRIC,
- &rcPrevWnd );
+ &rcPrevWnd );
} // end if ( m_bEnabled )
}
catch( _com_error& )
- {
+ {
}
}
//---------------------------------------------------
//
//---------------------------------------------------
-
+
sal_Bool CFilePreview::loadFile( const rtl::OUString& aFileName )
{
- HANDLE hFile = 0;
- HGLOBAL hGlobal = 0;
- LPVOID pData = NULL;
- IStreamPtr pIStream;
- HRESULT hr = E_FAIL;
- sal_Bool bRet;
- sal_uInt32 nBytesRead;
+ HANDLE hFile = 0;
+ HGLOBAL hGlobal = 0;
+ LPVOID pData = NULL;
+ IStreamPtr pIStream;
+ HRESULT hr = E_FAIL;
+ sal_Bool bRet;
+ sal_uInt32 nBytesRead;
sal_uInt32 fszExtra;
sal_uInt32 fsize;
@@ -528,10 +528,10 @@ sal_Bool CFilePreview::loadFile( const rtl::OUString& aFileName )
goto CLEANUP_AND_EXIT;
fszExtra = 0;
- fsize = GetFileSize( hFile, &fszExtra );
+ fsize = GetFileSize( hFile, &fszExtra );
// empty file, error or file to big
- if ( -1 == fsize || 0 == fsize || fszExtra )
+ if ( -1 == fsize || 0 == fsize || fszExtra )
goto CLEANUP_AND_EXIT;
hGlobal = GlobalAlloc( GMEM_MOVEABLE, fsize );
@@ -541,23 +541,23 @@ sal_Bool CFilePreview::loadFile( const rtl::OUString& aFileName )
pData = GlobalLock( hGlobal );
if ( !pData )
goto CLEANUP_AND_EXIT;
-
+
bRet = ReadFile(
hFile, pData, fsize, &nBytesRead, NULL );
if ( !bRet )
goto CLEANUP_AND_EXIT;
-
+
hr = CreateStreamOnHGlobal(
hGlobal, FALSE, &pIStream );
if ( SUCCEEDED( hr ) )
{
hr = OleLoadPicture(
- pIStream, fsize, FALSE,
+ pIStream, fsize, FALSE,
__uuidof( IPicture ), (LPVOID*)&m_IPicture );
}
-
+
CLEANUP_AND_EXIT:
if ( hFile )
CloseHandle( hFile );
@@ -574,8 +574,8 @@ CLEANUP_AND_EXIT:
//---------------------------------------------------
//
//---------------------------------------------------
-
-LRESULT CALLBACK CFilePreview::WndProc(
+
+LRESULT CALLBACK CFilePreview::WndProc(
HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
LRESULT lResult = 0;
@@ -587,7 +587,7 @@ LRESULT CALLBACK CFilePreview::WndProc(
OSL_PRECOND( s_FilePreviewInst, "Static member not initialized" );
HDC hDC;
- PAINTSTRUCT ps;
+ PAINTSTRUCT ps;
hDC = BeginPaint( hWnd, &ps );
s_FilePreviewInst->onPaint( hWnd, hDC );
@@ -595,8 +595,8 @@ LRESULT CALLBACK CFilePreview::WndProc(
}
break;
- // under windows 95/98 the creation of the
- // hidden target request window fails if
+ // under windows 95/98 the creation of the
+ // hidden target request window fails if
// we don't handle this message ourself
// because the DefWindowProc returns 0 as
// a result of handling WM_NCCREATE what
diff --git a/fpicker/source/win32/filepicker/PreviewCtrl.hxx b/fpicker/source/win32/filepicker/PreviewCtrl.hxx
index 5cde69e5fa65..32937c7c69cf 100644
--- a/fpicker/source/win32/filepicker/PreviewCtrl.hxx
+++ b/fpicker/source/win32/filepicker/PreviewCtrl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,15 +50,15 @@ public:
CDimension( ) :
m_cx( 0 ),
m_cy( 0 )
- {
+ {
}
CDimension( sal_Int32 cx, sal_Int32 cy ) :
m_cx( cx ),
m_cy( cy )
- {
+ {
}
-
+
sal_Int32 m_cx;
sal_Int32 m_cy;
};
@@ -67,9 +67,9 @@ public:
// we use OleInitialize here because we are calling
// some Ole functions to realize the picture preview
// and we expect to be called from the main thread
-// so that there will be no problem calling
+// so that there will be no problem calling
// OleInitialize (the main thread should be an STA)
-// When OleInitialize should fail at worst the
+// When OleInitialize should fail at worst the
// preview doesn't work
//--------------------------------------------------
@@ -77,7 +77,7 @@ class CAutoOleInit
{
public:
- // used to communicate ole
+ // used to communicate ole
// initialzation failures
class COleInitException { };
@@ -97,7 +97,7 @@ public:
//---------------------------------------------
// A simple file preview class to preview some
// common picture formats like *.gif, *jpg, etc.
-// This class is not thread-safe and is
+// This class is not thread-safe and is
// implmented as singleton, because the class
// has only one static member to reconnect
// from callback functions
@@ -112,21 +112,21 @@ class CFilePreview
{
public:
// to ensure only one instance (singleton)
- static CFilePreview* createInstance(
- HWND aParent,
- POINT ulCorner,
- const CDimension& aSize,
- HINSTANCE hInstance,
- sal_Bool bShow = sal_True,
+ static CFilePreview* createInstance(
+ HWND aParent,
+ POINT ulCorner,
+ const CDimension& aSize,
+ HINSTANCE hInstance,
+ sal_Bool bShow = sal_True,
sal_Bool bEnabled = sal_True );
// sets the size of the preview window
sal_Bool SAL_CALL setSize( const CDimension& aSize );
-
+
// returns the CDimension of the preview
sal_Bool SAL_CALL getSize( CDimension& theSize ) const;
- // sets the position of the upper left corner
+ // sets the position of the upper left corner
// of the preview window relative to the
// upper left corner of the parent window
sal_Bool SAL_CALL setPos( POINT ulCorner );
@@ -136,7 +136,7 @@ public:
// parent window
sal_Bool SAL_CALL getPos( POINT& ulCorner ) const;
- // enables or disables the preview window
+ // enables or disables the preview window
// bEnable - true the window is enabled and updates its
// view when update is called
// bEnable - false the window shows itself in disabled
@@ -147,22 +147,22 @@ public:
// shows the preview window
// possible values see SHOW_STATE
sal_Bool SAL_CALL show( sal_Bool bShow );
-
-
- // if the preview is shown and enabled
+
+
+ // if the preview is shown and enabled
// preview of the given file will be shown
// returns true on success or false if an error
// occured (the file in not there or not accessible etc.)
virtual sal_Bool SAL_CALL update( const rtl::OUString& aFileName );
-protected:
+protected:
// clients can create instances only through the static create method
- CFilePreview(
- HWND aParent,
- POINT ulCorner,
- const CDimension& aSize,
- HINSTANCE hInstance,
- sal_Bool bShow = sal_True,
+ CFilePreview(
+ HWND aParent,
+ POINT ulCorner,
+ const CDimension& aSize,
+ HINSTANCE hInstance,
+ sal_Bool bShow = sal_True,
sal_Bool bEnabled = sal_True );
// only the singleton destroyer class is allowed to delete the
@@ -174,18 +174,18 @@ protected:
protected:
virtual void SAL_CALL onPaint( HWND hWnd, HDC hDC );
-
+
sal_Bool loadFile( const rtl::OUString& aFileName );
-
+
private:
CAutoOleInit m_autoOleInit;
- POINT m_pt;
- CDimension m_dim;
- HWND m_hwnd;
- sal_Bool m_bEnabled;
+ POINT m_pt;
+ CDimension m_dim;
+ HWND m_hwnd;
+ sal_Bool m_bEnabled;
IPicturePtr m_IPicture;
- ATOM m_atomPrevWndClass;
- HINSTANCE m_hInstance;
+ ATOM m_atomPrevWndClass;
+ HINSTANCE m_hInstance;
static LRESULT CALLBACK WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
diff --git a/fpicker/source/win32/filepicker/SolarMutex.cxx b/fpicker/source/win32/filepicker/SolarMutex.cxx
index b11d35a16aaf..393bd74836c3 100644
--- a/fpicker/source/win32/filepicker/SolarMutex.cxx
+++ b/fpicker/source/win32/filepicker/SolarMutex.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/win32/filepicker/SolarMutex.hxx b/fpicker/source/win32/filepicker/SolarMutex.hxx
index d9c73ba6fe02..1f39a40beb77 100644
--- a/fpicker/source/win32/filepicker/SolarMutex.hxx
+++ b/fpicker/source/win32/filepicker/SolarMutex.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index 3770cdaa330c..397fac4f1473 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -85,10 +85,10 @@ namespace vista{
namespace
{
- // controling event notifications
+ // controling event notifications
const bool STARTUP_SUSPENDED = true;
const bool STARTUP_ALIVE = false;
-
+
css::uno::Sequence< ::rtl::OUString > SAL_CALL VistaFilePicker_getSupportedServiceNames()
{
css::uno::Sequence< ::rtl::OUString > aRet(2);
@@ -118,20 +118,20 @@ namespace
fprintf(pFile, PARAM_MESSAGE, PARAM_1); \
fclose(pFile); \
}
-
+
#define LOG_FILE_2_PARAM(PARAM_MESSAGE, PARAM_1, PARAM_2) \
{ \
FILE* pFile = fopen(LOGFILE_VISTA, "a"); \
fprintf(pFile, PARAM_MESSAGE, PARAM_1, PARAM_2); \
fclose(pFile); \
}
-
+
#else
#define LOG_FILE(PARAM_MESSAGE)
#define LOG_FILE_1_PARAM(PARAM_MESSAGE, PARAM_1)
#define LOG_FILE_2_PARAM(PARAM_MESSAGE, PARAM_1, PARAM_2)
-
+
#endif
//-----------------------------------------------------------------------------------------
@@ -164,7 +164,7 @@ VistaFilePicker::VistaFilePicker(const css::uno::Reference< css::lang::XMultiSer
, m_rDialog (new VistaFilePickerImpl())
, m_aAsyncExecute (m_rDialog )
, m_nFilePickerThreadId (0 )
- , m_bInitialized (false )
+ , m_bInitialized (false )
{
}
@@ -174,7 +174,7 @@ VistaFilePicker::~VistaFilePicker()
}
//------------------------------------------------------------------------------------
-void SAL_CALL VistaFilePicker::addFilePickerListener(const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener)
+void SAL_CALL VistaFilePicker::addFilePickerListener(const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener)
throw(css::uno::RuntimeException)
{
RequestRef rRequest(new Request());
@@ -185,7 +185,7 @@ void SAL_CALL VistaFilePicker::addFilePickerListener(const css::uno::Reference<
}
//-----------------------------------------------------------------------------------------
-void SAL_CALL VistaFilePicker::removeFilePickerListener(const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
+void SAL_CALL VistaFilePicker::removeFilePickerListener(const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
throw(css::uno::RuntimeException)
{
RequestRef rRequest(new Request());
@@ -264,7 +264,7 @@ 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 >& lFilters )
throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException )
{
@@ -278,7 +278,7 @@ void SAL_CALL VistaFilePicker::appendFilterGroup(const ::rtl::OUString&
}
//-----------------------------------------------------------------------------------------
-void SAL_CALL VistaFilePicker::setDefaultName(const ::rtl::OUString& sName )
+void SAL_CALL VistaFilePicker::setDefaultName(const ::rtl::OUString& sName )
throw(css::uno::RuntimeException)
{
RequestRef rRequest(new Request());
@@ -289,7 +289,7 @@ void SAL_CALL VistaFilePicker::setDefaultName(const ::rtl::OUString& sName )
}
//-----------------------------------------------------------------------------------------
-void SAL_CALL VistaFilePicker::setDisplayDirectory(const ::rtl::OUString& sDirectory)
+void SAL_CALL VistaFilePicker::setDisplayDirectory(const ::rtl::OUString& sDirectory)
throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException )
{
@@ -299,7 +299,7 @@ void SAL_CALL VistaFilePicker::setDisplayDirectory(const ::rtl::OUString& sDirec
css::uno::Any aValue = ::comphelper::ConfigurationHelper::readDirectKey(
m_xSMGR, aPackage, aRelPath, aKey, ::comphelper::ConfigurationHelper::E_READONLY);
-
+
bool bChanged(false);
if (( aValue >>= bChanged ) && bChanged )
{
@@ -323,7 +323,7 @@ void SAL_CALL VistaFilePicker::setDisplayDirectory(const ::rtl::OUString& sDirec
rRequest->setRequest (VistaFilePickerImpl::E_GET_DIRECTORY);
m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED);
const ::rtl::OUString sDirectory = rRequest->getArgumentOrDefault(PROP_FILENAME, ::rtl::OUString());
-
+
return sDirectory;
}
@@ -376,7 +376,7 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL VistaFilePicker::getSelectedFiles
RequestRef rRequest(new Request());
rRequest->setRequest (VistaFilePickerImpl::E_SHOW_DIALOG_MODAL);
-
+
// if we want to show a modal window, the calling thread needs to process messages
m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::PROCESS_MESSAGES);
@@ -395,7 +395,7 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL VistaFilePicker::getSelectedFiles
void SAL_CALL VistaFilePicker::setValue( ::sal_Int16 nControlId ,
::sal_Int16 nControlAction,
- const css::uno::Any& aValue )
+ const css::uno::Any& aValue )
throw(css::uno::RuntimeException)
{
RequestRef rRequest(new Request());
@@ -408,7 +408,7 @@ void SAL_CALL VistaFilePicker::setValue( ::sal_Int16 nControlId ,
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
css::uno::Any SAL_CALL VistaFilePicker::getValue(::sal_Int16 nControlId ,
@@ -426,7 +426,7 @@ css::uno::Any SAL_CALL VistaFilePicker::getValue(::sal_Int16 nControlId ,
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
void SAL_CALL VistaFilePicker::enableControl(::sal_Int16 nControlId,
@@ -442,7 +442,7 @@ void SAL_CALL VistaFilePicker::enableControl(::sal_Int16 nControlId,
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
void SAL_CALL VistaFilePicker::setLabel( ::sal_Int16 nControlId,
@@ -458,7 +458,7 @@ void SAL_CALL VistaFilePicker::setLabel( ::sal_Int16 nControlId,
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
::rtl::OUString SAL_CALL VistaFilePicker::getLabel(::sal_Int16 nControlId)
@@ -474,7 +474,7 @@ void SAL_CALL VistaFilePicker::setLabel( ::sal_Int16 nControlId,
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
css::uno::Sequence< ::sal_Int16 > SAL_CALL VistaFilePicker::getSupportedImageFormats()
@@ -484,7 +484,7 @@ css::uno::Sequence< ::sal_Int16 > SAL_CALL VistaFilePicker::getSupportedImageFor
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
sal_Int32 SAL_CALL VistaFilePicker::getTargetColorDepth()
@@ -494,7 +494,7 @@ sal_Int32 SAL_CALL VistaFilePicker::getTargetColorDepth()
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
sal_Int32 SAL_CALL VistaFilePicker::getAvailableWidth()
@@ -504,7 +504,7 @@ sal_Int32 SAL_CALL VistaFilePicker::getAvailableWidth()
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
sal_Int32 SAL_CALL VistaFilePicker::getAvailableHeight()
@@ -514,18 +514,18 @@ sal_Int32 SAL_CALL VistaFilePicker::getAvailableHeight()
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
void SAL_CALL VistaFilePicker::setImage( sal_Int16 /*nImageFormat*/,
- const css::uno::Any& /*aImage */)
+ const css::uno::Any& /*aImage */)
throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException )
{
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
sal_Bool SAL_CALL VistaFilePicker::setShowState(sal_Bool /*bShowState*/)
@@ -535,7 +535,7 @@ sal_Bool SAL_CALL VistaFilePicker::setShowState(sal_Bool /*bShowState*/)
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
sal_Bool SAL_CALL VistaFilePicker::getShowState()
@@ -545,33 +545,33 @@ sal_Bool SAL_CALL VistaFilePicker::getShowState()
}
//------------------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------------------
-void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::Any >& lArguments)
+void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::Any >& lArguments)
throw(css::uno::Exception ,
css::uno::RuntimeException)
{
/*
// called twice ?
if (m_pDlg)
- throw css::uno::Exception(
+ throw css::uno::Exception(
::rtl::OUString::createFromAscii( "XInitialization::initialize() called twice." ),
static_cast< css::ui::dialogs::XFilePicker* >( this ));
*/
if (lArguments.getLength() < 1)
- throw css::lang::IllegalArgumentException(
+ throw css::lang::IllegalArgumentException(
::rtl::OUString::createFromAscii( "XInitialization::initialize() called without arguments." ),
static_cast< css::ui::dialogs::XFilePicker2* >( this ),
1);
sal_Int32 nTemplate = -1;
lArguments[0] >>= nTemplate;
-
+
::sal_Bool bFileOpenDialog = sal_True;
::sal_Int32 nFeatures = 0;
-
+
switch(nTemplate)
{
case css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE :
@@ -579,13 +579,13 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An
bFileOpenDialog = sal_True;
}
break;
-
+
case css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE :
{
bFileOpenDialog = sal_False;
}
break;
-
+
case css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD :
{
bFileOpenDialog = sal_False;
@@ -593,7 +593,7 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An
nFeatures |= FEATURE_PASSWORD;
}
break;
-
+
case css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS :
{
bFileOpenDialog = sal_False;
@@ -602,7 +602,7 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An
nFeatures |= FEATURE_FILTEROPTIONS;
}
break;
-
+
case css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_SELECTION :
{
bFileOpenDialog = sal_False;
@@ -610,7 +610,7 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An
nFeatures |= FEATURE_SELECTION;
}
break;
-
+
case css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE :
{
bFileOpenDialog = sal_False;
@@ -618,7 +618,7 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An
nFeatures |= FEATURE_TEMPLATE;
}
break;
-
+
case css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE :
{
bFileOpenDialog = sal_True;
@@ -627,14 +627,14 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An
nFeatures |= FEATURE_IMAGETEMPLATE;
}
break;
-
+
case css::ui::dialogs::TemplateDescription::FILEOPEN_PLAY :
{
bFileOpenDialog = sal_True;
nFeatures |= FEATURE_PLAY;
}
break;
-
+
case css::ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION :
{
bFileOpenDialog = sal_True;
@@ -642,7 +642,7 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An
nFeatures |= FEATURE_VERSION;
}
break;
-
+
case css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW :
{
bFileOpenDialog = sal_True;
@@ -650,7 +650,7 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An
nFeatures |= FEATURE_PREVIEW;
}
break;
-
+
case css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION :
{
bFileOpenDialog = sal_False;
@@ -669,7 +669,7 @@ void SAL_CALL VistaFilePicker::initialize(const css::uno::Sequence< css::uno::An
if ( ! m_aAsyncExecute.isRunning())
m_aAsyncExecute.create();
m_aAsyncExecute.triggerRequestThreadAware(rRequest, AsyncRequests::NON_BLOCKED);
-
+
{
osl::MutexGuard aGuard(m_aMutex);
m_bInitialized = true;
@@ -689,17 +689,17 @@ void SAL_CALL VistaFilePicker::cancel()
// XServiceInfo
// -------------------------------------------------
-::rtl::OUString SAL_CALL VistaFilePicker::getImplementationName()
+::rtl::OUString SAL_CALL VistaFilePicker::getImplementationName()
throw(css::uno::RuntimeException)
{
return ::rtl::OUString::createFromAscii("com.sun.star.comp.fpicker.VistaFileDialog");
}
// -------------------------------------------------
-// XServiceInfo
+// XServiceInfo
// -------------------------------------------------
-sal_Bool SAL_CALL VistaFilePicker::supportsService(const ::rtl::OUString& sServiceName)
+sal_Bool SAL_CALL VistaFilePicker::supportsService(const ::rtl::OUString& sServiceName)
throw(css::uno::RuntimeException )
{
css::uno::Sequence< ::rtl::OUString > lSupportedServicesNames = VistaFilePicker_getSupportedServiceNames();
@@ -712,10 +712,10 @@ sal_Bool SAL_CALL VistaFilePicker::supportsService(const ::rtl::OUString& sServi
}
// -------------------------------------------------
-// XServiceInfo
+// XServiceInfo
// -------------------------------------------------
-css::uno::Sequence< ::rtl::OUString > SAL_CALL VistaFilePicker::getSupportedServiceNames()
+css::uno::Sequence< ::rtl::OUString > SAL_CALL VistaFilePicker::getSupportedServiceNames()
throw(css::uno::RuntimeException)
{
return VistaFilePicker_getSupportedServiceNames();
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.hxx b/fpicker/source/win32/filepicker/VistaFilePicker.hxx
index 1a46ca0e1504..09380c19056c 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -71,7 +71,7 @@ namespace vista{
// types
//-----------------------------------------------------------------------------
-typedef ::cppu::WeakComponentImplHelper10<
+typedef ::cppu::WeakComponentImplHelper10<
css::ui::dialogs::XFilePicker2,
css::ui::dialogs::XFilterManager,
css::ui::dialogs::XFilterGroupManager,
@@ -107,49 +107,49 @@ public:
// XFilePickerNotifier
//------------------------------------------------------------------------------------
- virtual void SAL_CALL addFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
+ virtual void SAL_CALL addFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
throw( css::uno::RuntimeException );
- virtual void SAL_CALL removeFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
+ virtual void SAL_CALL removeFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
throw( css::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XExecutableDialog functions
//------------------------------------------------------------------------------------
-
- virtual void SAL_CALL setTitle( const ::rtl::OUString& sTitle )
+
+ virtual void SAL_CALL setTitle( const ::rtl::OUString& sTitle )
throw( css::uno::RuntimeException );
- virtual sal_Int16 SAL_CALL execute( )
+ virtual sal_Int16 SAL_CALL execute( )
throw( css::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XFilePicker functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL setMultiSelectionMode( sal_Bool bMode )
+ virtual void SAL_CALL setMultiSelectionMode( sal_Bool bMode )
throw( css::uno::RuntimeException );
- virtual void SAL_CALL setDefaultName( const ::rtl::OUString& sName )
+ virtual void SAL_CALL setDefaultName( const ::rtl::OUString& sName )
throw( css::uno::RuntimeException );
- virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& sDirectory )
+ virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& sDirectory )
throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getDisplayDirectory( )
+ virtual ::rtl::OUString SAL_CALL getDisplayDirectory( )
throw( css::uno::RuntimeException );
- virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getFiles( )
+ virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getFiles( )
throw( css::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XFilePicker2 functions
//------------------------------------------------------------------------------------
-
- virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSelectedFiles( )
+
+ virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSelectedFiles( )
throw( css::uno::RuntimeException );
-
+
//------------------------------------------------------------------------------------
// XFilterManager functions
//------------------------------------------------------------------------------------
@@ -159,11 +159,11 @@ public:
throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException );
- virtual void SAL_CALL setCurrentFilter( const ::rtl::OUString& sTitle )
+ virtual void SAL_CALL setCurrentFilter( const ::rtl::OUString& sTitle )
throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getCurrentFilter( )
+ virtual ::rtl::OUString SAL_CALL getCurrentFilter( )
throw( css::uno::RuntimeException );
//------------------------------------------------------------------------------------
@@ -171,7 +171,7 @@ public:
//------------------------------------------------------------------------------------
virtual void SAL_CALL appendFilterGroup( const ::rtl::OUString& sGroupTitle,
- const css::uno::Sequence< css::beans::StringPair >& lFilters )
+ const css::uno::Sequence< css::beans::StringPair >& lFilters )
throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException );
@@ -185,7 +185,7 @@ public:
throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL getValue( sal_Int16 nControlId ,
- sal_Int16 nControlAction )
+ sal_Int16 nControlAction )
throw (css::uno::RuntimeException);
virtual void SAL_CALL enableControl( sal_Int16 nControlId,
@@ -196,7 +196,7 @@ public:
const ::rtl::OUString& sLabel )
throw (css::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getLabel( sal_Int16 nControlId )
+ virtual ::rtl::OUString SAL_CALL getLabel( sal_Int16 nControlId )
throw (css::uno::RuntimeException);
//------------------------------------------------
@@ -244,27 +244,27 @@ public:
// XEventListener
//------------------------------------------------
- virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent )
+ virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent )
throw(css::uno::RuntimeException);
//------------------------------------------------
// XServiceInfo
- //------------------------------------------------
+ //------------------------------------------------
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
+ virtual ::rtl::OUString SAL_CALL getImplementationName( )
throw(css::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
throw(css::uno::RuntimeException);
- virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
+ virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
throw(css::uno::RuntimeException);
/*
//------------------------------------------------------------------------------------
// FilePicker Event functions
//------------------------------------------------------------------------------------
-
+
void SAL_CALL fileSelectionChanged(const css::ui::dialogs::FilePickerEvent& aEvent );
void SAL_CALL directoryChanged(const css::ui::dialogs::FilePickerEvent& aEvent );
::rtl::OUString SAL_CALL helpRequested(const css::ui::dialogs::FilePickerEvent& aEvent ) const;
@@ -276,36 +276,36 @@ public:
void suspendEventNotification();
void resumeEventNotification();
*/
-
+
private:
-
+
// prevent copy and assignment
- VistaFilePicker( const VistaFilePicker& );
+ VistaFilePicker( const VistaFilePicker& );
VistaFilePicker& operator=( const VistaFilePicker& );
-
+
using WeakComponentImplHelperBase::disposing;
private:
-
+
//---------------------------------------------------------------------
/// service manager to create own used uno services
css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
-
+
//---------------------------------------------------------------------
css::uno::Sequence< ::rtl::OUString > m_lLastFiles;
-
+
//---------------------------------------------------------------------
/** execute the COM dialog within a STA thread
* Must be used on the heap ... because it's implemented as OSL thread .-)
*/
RequestHandlerRef m_rDialog;
AsyncRequests m_aAsyncExecute;
-
+
//---------------------------------------------------------------------
oslThreadIdentifier m_nFilePickerThreadId;
bool m_bInitialized;
-};
+};
} // namespace vista
} // namespace win32
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
index 42bab08800b0..48dbfcaa3735 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -87,7 +87,7 @@ HRESULT STDMETHODCALLTYPE VistaFilePickerEventHandler::QueryInterface(REFIID rII
if ( rIID == IID_IFileDialogControlEvents )
*ppObject = (IFileDialogControlEvents*)this;
-
+
if ( *ppObject != NULL )
{
((IUnknown*)*ppObject)->AddRef();
@@ -170,7 +170,7 @@ void lcl_updateVersionListDirectly(IFileDialog* pDialog)
TFileDialog iDialog (pDialog);
TFileOpenDialog iOpen ;
TFileDialogCustomize iCustomize;
-
+
#ifdef __MINGW32__
iDialog->QueryInterface(IID_IFileOpenDialog, (void**)(&iOpen));
iDialog->QueryInterface(IID_IFileDialogCustomize, (void**)(&iCustomize));
@@ -182,7 +182,7 @@ void lcl_updateVersionListDirectly(IFileDialog* pDialog)
// make sure version list match to the current selection always ...
// at least an empty version list will be better then the wrong one .-)
iCustomize->RemoveAllControlItems(CONTROL_VERSIONLIST);
-
+
HRESULT hResult = E_FAIL;
ComPtr< IShellItemArray > iItems;
ComPtr< IShellItem > iItem;
@@ -201,16 +201,16 @@ void lcl_updateVersionListDirectly(IFileDialog* pDialog)
// we can show one version list only within control
if (nCount != 1)
return;
-
+
hResult = iItems->GetItemAt(0, &iItem);
- }
+ }
else
if (iDialog.is())
hResult = iDialog->GetCurrentSelection(&iItem);
if ( FAILED(hResult) )
return;
-
+
const ::rtl::OUString sURL = lcl_getURLFromShellItem2(iItem);
if (sURL.getLength() < 1)
return;
@@ -218,21 +218,21 @@ void lcl_updateVersionListDirectly(IFileDialog* pDialog)
INetURLObject aURL(sURL);
if (aURL.GetProtocol() != INET_PROT_FILE)
return;
-
+
::rtl::OUString sMain = aURL.GetMainURL(INetURLObject::NO_DECODE);
if ( ! ::utl::UCBContentHelper::IsDocument(sURL))
return;
-*/
+*/
try
{
css::uno::Reference< css::embed::XStorage > xStorage = ::comphelper::OStorageHelper::GetStorageFromURL(sURL, css::embed::ElementModes::READ);
if ( ! xStorage.is() )
return;
-
+
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
css::uno::Reference< css::document::XDocumentRevisionListPersistence > xReader (xSMGR->createInstance(SERVICENAME_REVISIONPERSISTENCE), css::uno::UNO_QUERY_THROW);
css::uno::Sequence< css::util::RevisionTag > lVersions = xReader->load(xStorage);
-
+
for (::sal_Int32 i=0; i<lVersions.getLength(); ++i)
{
const css::util::RevisionTag& aTag = lVersions[i];
@@ -369,14 +369,14 @@ STDMETHODIMP VistaFilePickerEventHandler::OnControlActivating(IFileDialogCustomi
}
//-----------------------------------------------------------------------------------------
-void SAL_CALL VistaFilePickerEventHandler::addFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
+void SAL_CALL VistaFilePickerEventHandler::addFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
throw( css::uno::RuntimeException )
{
m_lListener.addInterface(::getCppuType( (const css::uno::Reference< css::ui::dialogs::XFilePickerListener >*)NULL ), xListener);
}
//-----------------------------------------------------------------------------------------
-void SAL_CALL VistaFilePickerEventHandler::removeFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
+void SAL_CALL VistaFilePickerEventHandler::removeFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
throw( css::uno::RuntimeException )
{
m_lListener.removeInterface(::getCppuType( (const css::uno::Reference< css::ui::dialogs::XFilePickerListener >*)NULL ), xListener);
@@ -390,7 +390,7 @@ void VistaFilePickerEventHandler::startListening( const TFileDialog& pBroadcaste
if (m_pDialog.is())
return;
-
+
m_pDialog = pBroadcaster;
m_pDialog->Advise(this, &m_nListenerHandle);
}
@@ -412,54 +412,54 @@ static const ::rtl::OUString PROP_PICKER_LISTENER = ::rtl::OUString::createFromA
class AsyncPickerEvents : public RequestHandler
{
public:
-
+
AsyncPickerEvents()
{}
-
+
virtual ~AsyncPickerEvents()
{}
virtual void before()
{}
-
+
virtual void doRequest(const RequestRef& rRequest)
{
const ::sal_Int32 nEventID = rRequest->getRequest();
const ::sal_Int16 nControlID = rRequest->getArgumentOrDefault(PROP_CONTROL_ID, (::sal_Int16)0);
const css::uno::Reference< css::ui::dialogs::XFilePickerListener > xListener = rRequest->getArgumentOrDefault(PROP_PICKER_LISTENER, css::uno::Reference< css::ui::dialogs::XFilePickerListener >());
-
+
if ( ! xListener.is())
return;
-
+
css::ui::dialogs::FilePickerEvent aEvent;
aEvent.ElementId = nControlID;
-
+
switch (nEventID)
{
case VistaFilePickerEventHandler::E_FILE_SELECTION_CHANGED :
xListener->fileSelectionChanged(aEvent);
break;
-
+
case VistaFilePickerEventHandler::E_DIRECTORY_CHANGED :
xListener->directoryChanged(aEvent);
break;
-
+
case VistaFilePickerEventHandler::E_HELP_REQUESTED :
xListener->helpRequested(aEvent);
break;
-
+
case VistaFilePickerEventHandler::E_CONTROL_STATE_CHANGED :
xListener->controlStateChanged(aEvent);
break;
-
+
case VistaFilePickerEventHandler::E_DIALOG_SIZE_CHANGED :
xListener->dialogSizeChanged();
break;
-
+
// no default here. Let compiler detect changes on enum set !
}
}
-
+
virtual void after()
{}
};
@@ -473,20 +473,20 @@ void VistaFilePickerEventHandler::impl_sendEvent( EEventType eEventType,
::cppu::OInterfaceContainerHelper* pContainer = m_lListener.getContainer( ::getCppuType( ( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >*) NULL ) );
if ( ! pContainer)
return;
-
+
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
while (pIterator.hasMoreElements())
{
try
{
css::uno::Reference< css::ui::dialogs::XFilePickerListener > xListener (pIterator.next(), css::uno::UNO_QUERY);
-
+
RequestRef rRequest(new Request());
rRequest->setRequest (eEventType);
rRequest->setArgument(PROP_PICKER_LISTENER, xListener);
if ( nControlID )
rRequest->setArgument(PROP_CONTROL_ID, nControlID);
-
+
aNotify.triggerRequestDirectly(rRequest);
//aNotify.triggerRequestNonBlocked(rRequest);
}
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx
index 85eed3ca39e0..de9983d0cf53 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -76,14 +76,14 @@ class VistaFilePickerEventHandler : public ::cppu::BaseMutex
, public IFileDialogControlEvents
{
public:
-
+
//------------------------------------------------------------------------------------
// ctor/dtor
//------------------------------------------------------------------------------------
-
+
VistaFilePickerEventHandler(IVistaFilePickerInternalNotify* pInternalNotify);
virtual ~VistaFilePickerEventHandler();
-
+
//------------------------------------------------------------------------------------
// IUnknown
//------------------------------------------------------------------------------------
@@ -91,62 +91,62 @@ class VistaFilePickerEventHandler : public ::cppu::BaseMutex
void** ppObject);
virtual ULONG STDMETHODCALLTYPE AddRef();
virtual ULONG STDMETHODCALLTYPE Release();
-
+
//------------------------------------------------------------------------------------
// IFileDialogEvents
//------------------------------------------------------------------------------------
-
+
STDMETHODIMP OnFileOk(IFileDialog* pDialog);
-
+
STDMETHODIMP OnFolderChanging(IFileDialog* pDialog,
IShellItem* pFolder);
-
+
STDMETHODIMP OnFolderChange(IFileDialog* pDialog);
-
+
STDMETHODIMP OnSelectionChange(IFileDialog* pDialog);
-
+
STDMETHODIMP OnShareViolation(IFileDialog* pDialog ,
IShellItem* pItem ,
FDE_SHAREVIOLATION_RESPONSE* pResponse);
-
+
STDMETHODIMP OnTypeChange(IFileDialog* pDialog);
-
+
STDMETHODIMP OnOverwrite(IFileDialog* pDialog ,
IShellItem* pItem ,
FDE_OVERWRITE_RESPONSE* pResponse);
-
+
//------------------------------------------------------------------------------------
// IFileDialogControlEvents
//------------------------------------------------------------------------------------
-
+
STDMETHODIMP OnItemSelected(IFileDialogCustomize* pCustomize,
DWORD nIDCtl ,
DWORD nIDItem );
-
+
STDMETHODIMP OnButtonClicked(IFileDialogCustomize* pCustomize,
DWORD nIDCtl );
-
+
STDMETHODIMP OnCheckButtonToggled(IFileDialogCustomize* pCustomize,
DWORD nIDCtl ,
BOOL bChecked );
-
+
STDMETHODIMP OnControlActivating(IFileDialogCustomize* pCustomize,
DWORD nIDCtl );
-
+
//------------------------------------------------------------------------------------
// XFilePickerNotifier
//------------------------------------------------------------------------------------
-
- virtual void SAL_CALL addFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
+
+ virtual void SAL_CALL addFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
throw( css::uno::RuntimeException );
-
- virtual void SAL_CALL removeFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
+
+ virtual void SAL_CALL removeFilePickerListener( const css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
throw( css::uno::RuntimeException );
-
+
//------------------------------------------------------------------------------------
// native interface
//------------------------------------------------------------------------------------
-
+
//------------------------------------------------------------------------------------
/** start listening for file picker events on the given file open dialog COM object.
*
@@ -161,7 +161,7 @@ class VistaFilePickerEventHandler : public ::cppu::BaseMutex
* reference to the dialog, where we should start listening.
*/
void startListening( const TFileDialog& pBroadcaster );
-
+
//------------------------------------------------------------------------------------
/** stop listening for file picker events on the internaly cached dialog COM object.
*
@@ -170,7 +170,7 @@ class VistaFilePickerEventHandler : public ::cppu::BaseMutex
* listener handle is used. If listener was not already registered - nothing will happen.
*/
void stopListening();
-
+
public:
enum EEventType
@@ -181,20 +181,20 @@ class VistaFilePickerEventHandler : public ::cppu::BaseMutex
E_CONTROL_STATE_CHANGED,
E_DIALOG_SIZE_CHANGED
};
-
+
private:
//------------------------------------------------------------------------------------
/// @todo document me
void impl_sendEvent( EEventType eEventType,
::sal_Int16 nControlID);
-
+
private:
-
+
//------------------------------------------------------------------------------------
/// ref count for AddRef/Release()
oslInterlockedCount m_nRefCount;
-
+
//------------------------------------------------------------------------------------
/// unique handle for this listener provided by the broadcaster on registration time
DWORD m_nListenerHandle;
@@ -202,10 +202,10 @@ class VistaFilePickerEventHandler : public ::cppu::BaseMutex
//------------------------------------------------------------------------------------
/// cached file dialog instance (there we listen for events)
TFileDialog m_pDialog;
-
+
//---------------------------------------------------------------------
IVistaFilePickerInternalNotify* m_pInternalNotify;
-
+
//---------------------------------------------------------------------
/** used to inform file picker listener asynchronously.
* Those listener must be called asynchronously .. because
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
index 5c9760b26d7c..9f006d69259a 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -45,14 +45,14 @@
inline bool is_current_process_window(HWND hwnd)
{
- DWORD pid;
- GetWindowThreadProcessId(hwnd, &pid);
+ DWORD pid;
+ GetWindowThreadProcessId(hwnd, &pid);
return (pid == GetCurrentProcessId());
}
-
+
HWND choose_parent_window()
{
- HWND hwnd_parent = GetForegroundWindow();
+ HWND hwnd_parent = GetForegroundWindow();
if (!is_current_process_window(hwnd_parent))
hwnd_parent = GetDesktopWindow();
return hwnd_parent;
@@ -79,15 +79,15 @@ static const ::sal_Int16 INVALID_CONTROL_ACTION = -1;
typedef ::comphelper::SequenceAsVector< ::rtl::OUString > TStringList;
// Guids used for IFileDialog::SetClientGuid
-static const GUID CLIENTID_FILEDIALOG_SIMPLE = {0xB8628FD3, 0xA3F5, 0x4845, 0x9B, 0x62, 0xD5, 0x1E, 0xDF, 0x97, 0xC4, 0x83};
-static const GUID CLIENTID_FILEDIALOG_OPTIONS = {0x93ED486F, 0x0D04, 0x4807, 0x8C, 0x44, 0xAC, 0x26, 0xCB, 0x6C, 0x5D, 0x36};
-static const GUID CLIENTID_FILESAVE = {0x3B2E2261, 0x402D, 0x4049, 0xB0, 0xC0, 0x91, 0x13, 0xF8, 0x6E, 0x84, 0x7C};
-static const GUID CLIENTID_FILESAVE_PASSWORD = {0xC12D4F4C, 0x4D41, 0x4D4F, 0x97, 0xEF, 0x87, 0xF9, 0x8D, 0xB6, 0x1E, 0xA6};
-static const GUID CLIENTID_FILESAVE_SELECTION = {0x5B2482B3, 0x0358, 0x4E09, 0xAA, 0x64, 0x2B, 0x76, 0xB2, 0xA0, 0xDD, 0xFE};
-static const GUID CLIENTID_FILESAVE_TEMPLATE = {0x9996D877, 0x20D5, 0x424B, 0x9C, 0x2E, 0xD3, 0xB6, 0x31, 0xEC, 0xF7, 0xCE};
-static const GUID CLIENTID_FILEOPEN_LINK_TEMPLATE = {0x32237796, 0x1509, 0x49D1, 0xBB, 0x7E, 0x63, 0xAD, 0x36, 0xAE, 0x86, 0x8C};
-static const GUID CLIENTID_FILEOPEN_PLAY = {0x32CFB147, 0xF5AE, 0x4F90, 0xA1, 0xF1, 0x81, 0x20, 0x72, 0xBB, 0x2F, 0xC5};
-static const GUID CLIENTID_FILEOPEN_LINK = {0x39AC4BAE, 0x7D2D, 0x46BC, 0xBE, 0x2E, 0xF8, 0x8C, 0xB5, 0x65, 0x5E, 0x6A};
+static const GUID CLIENTID_FILEDIALOG_SIMPLE = {0xB8628FD3, 0xA3F5, 0x4845, 0x9B, 0x62, 0xD5, 0x1E, 0xDF, 0x97, 0xC4, 0x83};
+static const GUID CLIENTID_FILEDIALOG_OPTIONS = {0x93ED486F, 0x0D04, 0x4807, 0x8C, 0x44, 0xAC, 0x26, 0xCB, 0x6C, 0x5D, 0x36};
+static const GUID CLIENTID_FILESAVE = {0x3B2E2261, 0x402D, 0x4049, 0xB0, 0xC0, 0x91, 0x13, 0xF8, 0x6E, 0x84, 0x7C};
+static const GUID CLIENTID_FILESAVE_PASSWORD = {0xC12D4F4C, 0x4D41, 0x4D4F, 0x97, 0xEF, 0x87, 0xF9, 0x8D, 0xB6, 0x1E, 0xA6};
+static const GUID CLIENTID_FILESAVE_SELECTION = {0x5B2482B3, 0x0358, 0x4E09, 0xAA, 0x64, 0x2B, 0x76, 0xB2, 0xA0, 0xDD, 0xFE};
+static const GUID CLIENTID_FILESAVE_TEMPLATE = {0x9996D877, 0x20D5, 0x424B, 0x9C, 0x2E, 0xD3, 0xB6, 0x31, 0xEC, 0xF7, 0xCE};
+static const GUID CLIENTID_FILEOPEN_LINK_TEMPLATE = {0x32237796, 0x1509, 0x49D1, 0xBB, 0x7E, 0x63, 0xAD, 0x36, 0xAE, 0x86, 0x8C};
+static const GUID CLIENTID_FILEOPEN_PLAY = {0x32CFB147, 0xF5AE, 0x4F90, 0xA1, 0xF1, 0x81, 0x20, 0x72, 0xBB, 0x2F, 0xC5};
+static const GUID CLIENTID_FILEOPEN_LINK = {0x39AC4BAE, 0x7D2D, 0x46BC, 0xBE, 0x2E, 0xF8, 0x8C, 0xB5, 0x65, 0x5E, 0x6A};
//-----------------------------------------------------------------------------
::rtl::OUString lcl_getURLFromShellItem (IShellItem* pItem)
@@ -129,10 +129,10 @@ static const GUID CLIENTID_FILEOPEN_LINK = {0x39AC4BAE, 0x7D2D, 0x46B
while( rContainer.getNextFilter(aFilter) )
{
COMDLG_FILTERSPEC aSpec;
-
+
aSpec.pszName = reinterpret_cast<LPCTSTR>(aFilter.first.getStr()) ;
aSpec.pszSpec = reinterpret_cast<LPCTSTR>(aFilter.second.getStr());
-
+
lList.push_back(aSpec);
}
@@ -152,9 +152,9 @@ VistaFilePickerImpl::VistaFilePickerImpl()
, m_sDirectory ()
, m_sFilename ()
{
- m_hParentWindow = choose_parent_window();
+ m_hParentWindow = choose_parent_window();
}
-
+
//-------------------------------------------------------------------------------
VistaFilePickerImpl::~VistaFilePickerImpl()
{
@@ -191,39 +191,39 @@ void VistaFilePickerImpl::doRequest(const RequestRef& rRequest)
case E_ADD_PICKER_LISTENER :
impl_sta_addFilePickerListener(rRequest);
break;
-
+
case E_REMOVE_PICKER_LISTENER :
impl_sta_removeFilePickerListener(rRequest);
break;
-
+
case E_APPEND_FILTER :
impl_sta_appendFilter(rRequest);
break;
-
+
case E_SET_CURRENT_FILTER :
impl_sta_setCurrentFilter(rRequest);
break;
-
+
case E_GET_CURRENT_FILTER :
impl_sta_getCurrentFilter(rRequest);
break;
-
+
case E_CREATE_OPEN_DIALOG :
impl_sta_CreateOpenDialog(rRequest);
break;
-
+
case E_CREATE_SAVE_DIALOG :
impl_sta_CreateSaveDialog(rRequest);
break;
-
+
case E_SET_MULTISELECTION_MODE :
impl_sta_SetMultiSelectionMode(rRequest);
break;
-
+
case E_SET_TITLE :
impl_sta_SetTitle(rRequest);
break;
-
+
case E_SET_FILENAME:
impl_sta_SetFileName(rRequest);
break;
@@ -239,35 +239,35 @@ void VistaFilePickerImpl::doRequest(const RequestRef& rRequest)
case E_SET_DEFAULT_NAME :
impl_sta_SetDefaultName(rRequest);
break;
-
+
case E_GET_SELECTED_FILES :
impl_sta_getSelectedFiles(rRequest);
break;
-
+
case E_SHOW_DIALOG_MODAL :
impl_sta_ShowDialogModal(rRequest);
break;
-
+
case E_SET_CONTROL_VALUE :
impl_sta_SetControlValue(rRequest);
break;
-
+
case E_GET_CONTROL_VALUE :
impl_sta_GetControlValue(rRequest);
break;
-
+
case E_SET_CONTROL_LABEL :
impl_sta_SetControlLabel(rRequest);
break;
-
+
case E_GET_CONTROL_LABEL :
impl_sta_GetControlLabel(rRequest);
break;
-
+
case E_ENABLE_CONTROL :
impl_sta_EnableControl(rRequest);
break;
-
+
// no default: let the compiler detect changes on enum ERequest !
}
}
@@ -288,13 +288,13 @@ void VistaFilePickerImpl::impl_sta_addFilePickerListener(const RequestRef& rRequ
const css::uno::Reference< css::ui::dialogs::XFilePickerListener > xListener = rRequest->getArgumentOrDefault(PROP_PICKER_LISTENER, css::uno::Reference< css::ui::dialogs::XFilePickerListener >());
if ( ! xListener.is())
return;
-
+
// SYNCHRONIZED->
::osl::ResettableMutexGuard aLock(m_aMutex);
TFileDialogEvents iHandler = m_iEventHandler;
aLock.clear();
// <- SYNCHRONIZED
-
+
VistaFilePickerEventHandler* pHandlerImpl = (VistaFilePickerEventHandler*)iHandler.get();
if (pHandlerImpl)
pHandlerImpl->addFilePickerListener(xListener);
@@ -307,13 +307,13 @@ void VistaFilePickerImpl::impl_sta_removeFilePickerListener(const RequestRef& rR
const css::uno::Reference< css::ui::dialogs::XFilePickerListener > xListener = rRequest->getArgumentOrDefault(PROP_PICKER_LISTENER, css::uno::Reference< css::ui::dialogs::XFilePickerListener >());
if ( ! xListener.is())
return;
-
+
// SYNCHRONIZED->
::osl::ResettableMutexGuard aLock(m_aMutex);
TFileDialogEvents iHandler = m_iEventHandler;
aLock.clear();
// <- SYNCHRONIZED
-
+
VistaFilePickerEventHandler* pHandlerImpl = (VistaFilePickerEventHandler*)iHandler.get();
if (pHandlerImpl)
pHandlerImpl->removeFilePickerListener(xListener);
@@ -356,7 +356,7 @@ void VistaFilePickerImpl::impl_sta_getCurrentFilter(const RequestRef& rRequest)
// SYNCHRONIZED->
::osl::ResettableMutexGuard aLock(m_aMutex);
-
+
::rtl::OUString sTitle;
::sal_Int32 nRealIndex = (nIndex-1); // COM dialog base on 1 ... filter container on 0 .-)
if (
@@ -481,10 +481,10 @@ void VistaFilePickerImpl::impl_sta_enableFeatures(::sal_Int32 nFeatures, ::sal_I
case css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE :
aGUID = CLIENTID_FILEDIALOG_SIMPLE;
break;
-
+
case css::ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION :
case css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS :
- aGUID = CLIENTID_FILEDIALOG_OPTIONS;
+ aGUID = CLIENTID_FILEDIALOG_OPTIONS;
break;
case css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION :
@@ -494,23 +494,23 @@ void VistaFilePickerImpl::impl_sta_enableFeatures(::sal_Int32 nFeatures, ::sal_I
case css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD :
aGUID = CLIENTID_FILESAVE_PASSWORD;
break;
-
+
case css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_SELECTION :
aGUID = CLIENTID_FILESAVE_SELECTION;
break;
-
+
case css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE :
aGUID = CLIENTID_FILESAVE_TEMPLATE;
break;
-
+
case css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE :
aGUID = CLIENTID_FILEOPEN_LINK_TEMPLATE;
break;
-
+
case css::ui::dialogs::TemplateDescription::FILEOPEN_PLAY :
aGUID = CLIENTID_FILEOPEN_PLAY;
break;
-
+
case css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW :
aGUID = CLIENTID_FILEOPEN_LINK;
break;
@@ -553,35 +553,35 @@ void VistaFilePickerImpl::impl_sta_enableFeatures(::sal_Int32 nFeatures, ::sal_I
iCustom->AddCheckButton (nControlId, L"Auto Extension", true);
setLabelToControl(m_ResProvider, iCustom, nControlId);
}
-
+
if ((nFeatures & FEATURE_PASSWORD) == FEATURE_PASSWORD)
{
nControlId = css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_PASSWORD;
iCustom->AddCheckButton (nControlId, L"Password", false);
setLabelToControl(m_ResProvider, iCustom, nControlId);
}
-
+
if ((nFeatures & FEATURE_READONLY) == FEATURE_READONLY)
{
nControlId = css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_READONLY;
iCustom->AddCheckButton (nControlId, L"Readonly", false);
setLabelToControl(m_ResProvider, iCustom, nControlId);
}
-
+
if ((nFeatures & FEATURE_FILTEROPTIONS) == FEATURE_FILTEROPTIONS)
{
nControlId = css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_FILTEROPTIONS;
iCustom->AddCheckButton (nControlId, L"Filter Options", false);
setLabelToControl(m_ResProvider, iCustom, nControlId);
}
-
+
if ((nFeatures & FEATURE_LINK) == FEATURE_LINK)
{
nControlId = css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK;
iCustom->AddCheckButton (nControlId, L"Link", false);
setLabelToControl(m_ResProvider, iCustom, nControlId);
}
-
+
if ((nFeatures & FEATURE_SELECTION) == FEATURE_SELECTION)
{
nControlId = css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_SELECTION;
@@ -593,12 +593,12 @@ void VistaFilePickerImpl::impl_sta_enableFeatures(::sal_Int32 nFeatures, ::sal_I
if ((nFeatures & FEATURE_PREVIEW) == FEATURE_PREVIEW)
iCustom->AddCheckButton (css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, L"Preview", false);
*/
-
+
iCustom->EndVisualGroup();
if ((nFeatures & FEATURE_PLAY) == FEATURE_PLAY)
iCustom->AddPushButton (css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY, L"Play");
-
+
}
//-------------------------------------------------------------------------------
@@ -614,12 +614,12 @@ void VistaFilePickerImpl::impl_sta_SetMultiSelectionMode(const RequestRef& rRequ
DWORD nFlags = 0;
m_hLastResult = iDialog->GetOptions ( &nFlags );
-
+
if (bMultiSelection)
nFlags |= FOS_ALLOWMULTISELECT;
else
nFlags &= ~FOS_ALLOWMULTISELECT;
-
+
iDialog->SetOptions ( nFlags );
}
@@ -656,7 +656,7 @@ void VistaFilePickerImpl::impl_sta_SetDirectory(const RequestRef& rRequest)
{
::rtl::OUString sDirectory = rRequest->getArgumentOrDefault(PROP_DIRECTORY, ::rtl::OUString());
bool bForce = rRequest->getArgumentOrDefault(PROP_FORCE, false);
-
+
if( !m_bInExecute)
{
// Vista stores last used folders for file dialogs
@@ -681,7 +681,7 @@ void VistaFilePickerImpl::impl_sta_SetDirectory(const RequestRef& rRequest)
#endif
if ( FAILED(hResult) )
return;
-
+
if ( m_bInExecute || bForce )
iDialog->SetFolder(pFolder);
else
@@ -723,7 +723,7 @@ void VistaFilePickerImpl::impl_sta_SetDefaultName(const RequestRef& rRequest)
if ( -1 != nSepPos )
sFilename = sFilename.copy(0, nSepPos);
}
-
+
iDialog->SetFileName ( reinterpret_cast<LPCTSTR>(sFilename.getStr()));
m_sFilename = sFilename;
}
@@ -743,7 +743,7 @@ void VistaFilePickerImpl::impl_sta_setFiltersOnDialog()
aLock.clear();
// <- SYNCHRONIZED
- COMDLG_FILTERSPEC *pFilt = &lFilters[0];
+ COMDLG_FILTERSPEC *pFilt = &lFilters[0];
iDialog->SetFileTypes(lFilters.size(), pFilt/*&lFilters[0]*/);
iDialog->SetFileTypeIndex(nCurrentFilter + 1);
@@ -759,7 +759,7 @@ void VistaFilePickerImpl::impl_sta_setFiltersOnDialog()
lpFilterExt++;
iDialog->SetDefaultExtension( lpFilterExt );
}
-
+
}
//-------------------------------------------------------------------------------
@@ -772,7 +772,7 @@ void VistaFilePickerImpl::impl_sta_getSelectedFiles(const RequestRef& rRequest)
TFileSaveDialog iSave = m_iDialogSave;
::sal_Bool bInExecute = m_bInExecute;
- aLock.clear();
+ aLock.clear();
// <- SYNCHRONIZED
// ask dialog for results
@@ -803,8 +803,8 @@ void VistaFilePickerImpl::impl_sta_getSelectedFiles(const RequestRef& rRequest)
}
if (FAILED(hResult))
- return;
-
+ return;
+
// convert and pack results
TStringList lFiles;
if (iItem.is())
@@ -813,7 +813,7 @@ void VistaFilePickerImpl::impl_sta_getSelectedFiles(const RequestRef& rRequest)
if (sURL.getLength() > 0)
lFiles.push_back(sURL);
}
-
+
if (iItems.is())
{
DWORD nCount;
@@ -855,13 +855,13 @@ void VistaFilePickerImpl::impl_sta_ShowDialogModal(const RequestRef& rRequest)
m_bWasExecuted = sal_True;
- aLock.clear();
+ aLock.clear();
// <- SYNCHRONIZED
// we set the directory only if we have a save dialog and a filename
// for the other cases, the file dialog remembers its last location
// according to its client guid.
- if( m_sDirectory.getLength())
+ if( m_sDirectory.getLength())
{
ComPtr< IShellItem > pFolder;
#ifdef __MINGW32__
@@ -878,9 +878,9 @@ void VistaFilePickerImpl::impl_sta_ShowDialogModal(const RequestRef& rRequest)
if (nIndex != aFileURL.getLength()-1)
aFileURL += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/"));
aFileURL += m_sFilename;
-
+
TFileDialogCustomize iCustom = impl_getCustomizeInterface();
-
+
BOOL bValue = FALSE;
HRESULT hResult = iCustom->GetCheckButtonState( css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, &bValue);
if ( bValue )
@@ -904,8 +904,8 @@ void VistaFilePickerImpl::impl_sta_ShowDialogModal(const RequestRef& rRequest)
::rtl::OUString aSystemPath;
osl_getSystemPathFromFileURL( aFileURL.pData, &aSystemPath.pData );
- WIN32_FIND_DATA aFindFileData;
- HANDLE hFind = FindFirstFile( reinterpret_cast<LPCWSTR>(aSystemPath.getStr()), &aFindFileData );
+ WIN32_FIND_DATA aFindFileData;
+ HANDLE hFind = FindFirstFile( reinterpret_cast<LPCWSTR>(aSystemPath.getStr()), &aFindFileData );
if (hFind != INVALID_HANDLE_VALUE)
iDialog->SetFolder(pFolder);
else
@@ -917,7 +917,7 @@ void VistaFilePickerImpl::impl_sta_ShowDialogModal(const RequestRef& rRequest)
hResult = iDialog->AddPlace(pFolder, FDAP_TOP);
}
}
-
+
HRESULT hResult = E_FAIL;
try
@@ -931,16 +931,16 @@ void VistaFilePickerImpl::impl_sta_ShowDialogModal(const RequestRef& rRequest)
}
catch(...)
{}
-
+
// SYNCHRONIZED->
aLock.reset();
m_bInExecute = sal_False;
- aLock.clear();
+ aLock.clear();
// <- SYNCHRONIZED
-
+
if ( FAILED(hResult) )
return;
-
+
impl_sta_getSelectedFiles(rRequest);
rRequest->setArgument(PROP_DIALOG_SHOW_RESULT, (::sal_Bool)sal_True);
}
@@ -965,7 +965,7 @@ TFileDialog VistaFilePickerImpl::impl_getBaseDialogInterface()
#else
m_iDialogSave.query(&iDialog);
#endif
-
+
return iDialog;
}
@@ -990,7 +990,7 @@ TFileDialogCustomize VistaFilePickerImpl::impl_getCustomizeInterface()
#else
m_iDialogSave.query(&iCustom);
#endif
-
+
return iCustom;
}
@@ -1020,7 +1020,7 @@ void VistaFilePickerImpl::impl_sta_SetControlValue(const RequestRef& rRequest)
TFileDialogCustomize iCustom = impl_getCustomizeInterface();
if ( ! iCustom.is())
return;
-
+
switch (nId)
{
case css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION :
@@ -1036,7 +1036,7 @@ void VistaFilePickerImpl::impl_sta_SetControlValue(const RequestRef& rRequest)
iCustom->SetCheckButtonState(nId, bValue);
}
break;
-
+
case css::ui::dialogs::ExtendedFilePickerElementIds::LISTBOX_VERSION :
case css::ui::dialogs::ExtendedFilePickerElementIds::LISTBOX_TEMPLATE :
case css::ui::dialogs::ExtendedFilePickerElementIds::LISTBOX_IMAGE_TEMPLATE :
@@ -1051,7 +1051,7 @@ void VistaFilePickerImpl::impl_sta_SetControlValue(const RequestRef& rRequest)
lcl_removeControlItemsWorkaround(iCustom, nId);
}
break;
-
+
case css::ui::dialogs::ControlActions::ADD_ITEMS :
{
css::uno::Sequence< ::rtl::OUString > lItems;
@@ -1063,7 +1063,7 @@ void VistaFilePickerImpl::impl_sta_SetControlValue(const RequestRef& rRequest)
}
}
break;
-
+
case css::ui::dialogs::ControlActions::SET_SELECT_ITEM :
{
::sal_Int32 nItem = 0;
@@ -1074,7 +1074,7 @@ void VistaFilePickerImpl::impl_sta_SetControlValue(const RequestRef& rRequest)
}
}
break;
-
+
case css::ui::dialogs::ExtendedFilePickerElementIds::PUSHBUTTON_PLAY :
{
}
@@ -1094,7 +1094,7 @@ void VistaFilePickerImpl::impl_sta_GetControlValue(const RequestRef& rRequest)
TFileDialogCustomize iCustom = impl_getCustomizeInterface();
if ( ! iCustom.is())
return;
-
+
css::uno::Any aValue;
if( m_bWasExecuted )
switch (nId)
@@ -1150,13 +1150,13 @@ void VistaFilePickerImpl::impl_sta_EnableControl(const RequestRef& rRequest)
TFileDialogCustomize iCustom = impl_getCustomizeInterface();
if ( ! iCustom.is())
return;
-
+
CDCONTROLSTATEF eState = CDCS_VISIBLE;
if (bEnabled)
eState |= CDCS_ENABLED;
else
eState |= CDCS_INACTIVE;
-
+
iCustom->SetControlState(nId, eState);
}
//-------------------------------------------------------------------------------
@@ -1167,12 +1167,12 @@ void VistaFilePickerImpl::impl_SetDefaultExtension( const rtl::OUString& current
{
rtl::OUString FilterExt;
m_lFilters.getFilter(currentFilter, FilterExt);
-
+
sal_Int32 posOfPoint = FilterExt.indexOf(L'.');
const sal_Unicode* pFirstExtStart = FilterExt.getStr() + posOfPoint + 1;
sal_Int32 posOfSemiColon = FilterExt.indexOf(L';') - 1;
- if (posOfSemiColon < 0)
+ if (posOfSemiColon < 0)
posOfSemiColon = FilterExt.getLength() - 1;
FilterExt = rtl::OUString(pFirstExtStart, posOfSemiColon - posOfPoint);
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
index c07a476b3671..c902cf9f2dcf 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -98,10 +98,10 @@ static const ::rtl::OUString PROP_DIALOG_SHOW_RESULT = ::rtl::OUString::createF
static const ::rtl::OUString PROP_SELECTED_FILES = ::rtl::OUString::createFromAscii("selected_files" ); // [seq< OUString >] contains all user selected files (can be empty!)
static const ::rtl::OUString PROP_MULTISELECTION_MODE = ::rtl::OUString::createFromAscii("multiselection_mode"); // [sal_Bool] true=ON, false=OFF
static const ::rtl::OUString PROP_TITLE = ::rtl::OUString::createFromAscii("title" ); // [OUString]
-static const ::rtl::OUString PROP_FILENAME = ::rtl::OUString::createFromAscii("filename" ); // [OUString]
+static const ::rtl::OUString PROP_FILENAME = ::rtl::OUString::createFromAscii("filename" ); // [OUString]
static const ::rtl::OUString PROP_DIRECTORY = ::rtl::OUString::createFromAscii("directory" ); // [OUString]
static const ::rtl::OUString PROP_FEATURES = ::rtl::OUString::createFromAscii("features" ); // [sal_Int32]
-static const ::rtl::OUString PROP_TEMPLATE_DESCR = ::rtl::OUString::createFromAscii("templatedescription"); // [sal_Int32]
+static const ::rtl::OUString PROP_TEMPLATE_DESCR = ::rtl::OUString::createFromAscii("templatedescription"); // [sal_Int32]
static const ::rtl::OUString PROP_FILTER_TITLE = ::rtl::OUString::createFromAscii("filter_title" ); // [OUString]
static const ::rtl::OUString PROP_FILTER_VALUE = ::rtl::OUString::createFromAscii("filter_value" ); // [OUString]
static const ::rtl::OUString PROP_FORCE = ::rtl::OUString::createFromAscii("force" ); // [sal_Bool]
@@ -123,7 +123,7 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
, public IVistaFilePickerInternalNotify
{
public:
-
+
//---------------------------------------------------------------------
/** used for marshalling requests.
* Will be used to map requests to the right implementations.
@@ -152,68 +152,68 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
E_GET_CONTROL_LABEL,
E_ENABLE_CONTROL
};
-
+
public:
-
+
//---------------------------------------------------------------------
// ctor/dtor - nothing special
//---------------------------------------------------------------------
VistaFilePickerImpl();
virtual ~VistaFilePickerImpl();
-
+
//---------------------------------------------------------------------
// RequestHandler
//---------------------------------------------------------------------
-
+
virtual void before();
virtual void doRequest(const RequestRef& rRequest);
virtual void after();
-
+
//---------------------------------------------------------------------
virtual void onAutoExtensionChanged (bool bChecked);
-
+
private:
-
+
//---------------------------------------------------------------------
/// implementation of request E_ADD_FILEPICKER_LISTENER
void impl_sta_addFilePickerListener(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_REMOVE_FILEPICKER_LISTENER
void impl_sta_removeFilePickerListener(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_APPEND_FILTER
void impl_sta_appendFilter(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_SET_CURRENT_FILTER
void impl_sta_setCurrentFilter(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_GET_CURRENT_FILTER
void impl_sta_getCurrentFilter(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_CREATE_OPEN_DIALOG
void impl_sta_CreateOpenDialog(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_CREATE_SAVE_DIALOG
void impl_sta_CreateSaveDialog(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_SET_MULTISELECTION_MODE
void impl_sta_SetMultiSelectionMode(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_SET_TITLE
void impl_sta_SetTitle(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_SET_FILENAME
void impl_sta_SetFileName(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_SET_DIRECTORY
void impl_sta_SetDirectory(const RequestRef& rRequest);
@@ -225,35 +225,35 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
//---------------------------------------------------------------------
/// implementation of request E_SET_DEFAULT_NAME
void impl_sta_SetDefaultName(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_GET_SELECTED_FILES
void impl_sta_getSelectedFiles(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_SHOW_DIALOG_MODAL
void impl_sta_ShowDialogModal(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_SET_CONTROL_VALUE
void impl_sta_SetControlValue(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_GET_CONTROL_VALUE
void impl_sta_GetControlValue(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_SET_CONTROL_LABEL
void impl_sta_SetControlLabel(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_GET_CONTROL_LABEL
void impl_sta_GetControlLabel(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/// implementation of request E_ENABLE_CONTROL
void impl_sta_EnableControl(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/** create all needed (optional!) UI controls adressed by the field nFeatures.
* The given number nFeatures is used as a flag field. Use const values FEATURE_XXX
@@ -273,7 +273,7 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
* flag field(!) knows all features wich must be enabled.
*/
void impl_sta_enableFeatures(::sal_Int32 nFeatures, ::sal_Int32 nTemplate);
-
+
//---------------------------------------------------------------------
/** returns an interface, which can be used to customize the internaly used
* COM dialog.
@@ -286,19 +286,19 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
*/
TFileDialogCustomize impl_getCustomizeInterface();
TFileDialog impl_getBaseDialogInterface();
-
+
//---------------------------------------------------------------------
/// fill filter list of internal used dialog.
void impl_sta_setFiltersOnDialog();
-
+
void impl_SetDefaultExtension( const rtl::OUString& currentFilter );
-
+
private:
-
+
//---------------------------------------------------------------------
/// COM object representing a file open dialog
TFileOpenDialog m_iDialogOpen;
-
+
//---------------------------------------------------------------------
/// COM object representing a file save dialog
TFileSaveDialog m_iDialogSave;
@@ -306,11 +306,11 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
//---------------------------------------------------------------------
/// knows the return state of the last COM call
HRESULT m_hLastResult;
-
+
//---------------------------------------------------------------------
/// @todo document me
CFilterContainer m_lFilters;
-
+
//---------------------------------------------------------------------
/** cache last selected list of files
* Because those list must be retrieved directly after closing the dialog
@@ -319,13 +319,13 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
* and asking for results .-)
*/
css::uno::Sequence< ::rtl::OUString > m_lLastFiles;
-
+
//---------------------------------------------------------------------
/** help us to handle dialog events and provide them to interested office
* listener.
*/
TFileDialogEvents m_iEventHandler;
-
+
//---------------------------------------------------------------------
/// @todo document me
::sal_Bool m_bInExecute;
@@ -342,7 +342,7 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex
::rtl::OUString m_sFilename;
// Resource provider
- CResourceProvider m_ResProvider;
+ CResourceProvider m_ResProvider;
};
} // namespace vista
diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
index b7751a6f83a4..9a0cb5b7b164 100644
--- a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
+++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -71,7 +71,7 @@ using namespace ::com::sun::star::ui::dialogs::ListboxControlActions;
//-------------------------------------------------------------------------
enum ECW_ACTION_T
-{
+{
INIT_CUSTOM_CONTROLS,
CACHE_CONTROL_VALUES
};
@@ -91,24 +91,24 @@ struct EnumParam
// ctor
//-------------------------------------------------------------------------
-CWinFileOpenImpl::CWinFileOpenImpl(
- CFilePicker* aFilePicker,
+CWinFileOpenImpl::CWinFileOpenImpl(
+ CFilePicker* aFilePicker,
sal_Bool bFileOpenDialog,
sal_uInt32 dwFlags,
- sal_uInt32 dwTemplateId,
- HINSTANCE hInstance) :
- CFileOpenDialog(bFileOpenDialog, dwFlags, dwTemplateId, hInstance),
- m_filterContainer(new CFilterContainer()),
+ sal_uInt32 dwTemplateId,
+ HINSTANCE hInstance) :
+ CFileOpenDialog(bFileOpenDialog, dwFlags, dwTemplateId, hInstance),
+ m_filterContainer(new CFilterContainer()),
m_Preview(new CPreviewAdapter(hInstance)),
m_CustomControlFactory(new CCustomControlFactory()),
m_CustomControls(m_CustomControlFactory->CreateCustomControlContainer()),
- m_FilePicker(aFilePicker),
+ m_FilePicker(aFilePicker),
m_bInitialSelChanged(sal_True),
m_HelpPopupWindow(hInstance, m_hwndFileOpenDlg),
m_ExecuteFilePickerState(new CExecuteFilePickerState()),
m_NonExecuteFilePickerState(new CNonExecuteFilePickerState())
{
- m_FilePickerState = m_NonExecuteFilePickerState;
+ m_FilePickerState = m_NonExecuteFilePickerState;
}
//------------------------------------------------------------------------
@@ -125,28 +125,28 @@ CWinFileOpenImpl::~CWinFileOpenImpl()
// we expect the directory in URL format
//------------------------------------------------------------------------
-void CWinFileOpenImpl::setDisplayDirectory(const rtl::OUString& aDirectory)
+void CWinFileOpenImpl::setDisplayDirectory(const rtl::OUString& aDirectory)
throw( IllegalArgumentException, uno::RuntimeException )
{
rtl::OUString aSysDirectory;
if( aDirectory.getLength() > 0)
- {
- if ( ::osl::FileBase::E_None !=
+ {
+ if ( ::osl::FileBase::E_None !=
::osl::FileBase::getSystemPathFromFileURL(aDirectory,aSysDirectory))
- throw IllegalArgumentException(
+ throw IllegalArgumentException(
rtl::OUString::createFromAscii("Invalid directory"),
static_cast<XFilePicker2*>(m_FilePicker), 1);
// we ensure that there is a trailing '/' at the end of
// he given file url, because the windows functions only
// works correctly when providing "c:\" or an environment
- // variable like "=c:=c:\.." etc. is set, else the
- // FolderPicker would stand in the root of the shell
- // hierarchie which is the desktop folder
+ // variable like "=c:=c:\.." etc. is set, else the
+ // FolderPicker would stand in the root of the shell
+ // hierarchie which is the desktop folder
if ( aSysDirectory.lastIndexOf(BACKSLASH) != (aSysDirectory.getLength() - 1))
aSysDirectory += BACKSLASH;
}
-
+
// call base class method
CFileOpenDialog::setDisplayDirectory(aSysDirectory);
}
@@ -156,23 +156,23 @@ void CWinFileOpenImpl::setDisplayDirectory(const rtl::OUString& aDirectory)
//------------------------------------------------------------------------
rtl::OUString CWinFileOpenImpl::getDisplayDirectory() throw(uno::RuntimeException)
-{
+{
return m_FilePickerState->getDisplayDirectory(this);
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CWinFileOpenImpl::setDefaultName(const rtl::OUString& aName)
+void SAL_CALL CWinFileOpenImpl::setDefaultName(const rtl::OUString& aName)
throw( IllegalArgumentException, uno::RuntimeException )
-{
- // we don't set the default name directly
+{
+ // we don't set the default name directly
// because this influences how the file open
// dialog sets the initial path when it is about
// to open (see MSDN: OPENFILENAME)
- // so we save the default name which should
- // appear in the file-name-box and set
+ // so we save the default name which should
+ // appear in the file-name-box and set
// this name when processing onInitDone
m_defaultName = aName;
}
@@ -185,9 +185,9 @@ void SAL_CALL CWinFileOpenImpl::setDefaultName(const rtl::OUString& aName)
// the first entry is the path url, all other entries are file names
//-----------------------------------------------------------------------------------------
-uno::Sequence<rtl::OUString> SAL_CALL CWinFileOpenImpl::getFiles()
+uno::Sequence<rtl::OUString> SAL_CALL CWinFileOpenImpl::getFiles()
throw(uno::RuntimeException)
-{
+{
return m_FilePickerState->getFiles(this);
}
@@ -198,13 +198,13 @@ uno::Sequence<rtl::OUString> SAL_CALL CWinFileOpenImpl::getFiles()
sal_Int16 SAL_CALL CWinFileOpenImpl::execute( ) throw(uno::RuntimeException)
{
sal_Int16 rc = CFileOpenDialog::doModal();
-
+
if (1 == rc)
rc = ::com::sun::star::ui::dialogs::ExecutableDialogResults::OK;
else if (0 == rc)
rc = ::com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL;
else
- throw uno::RuntimeException(
+ throw uno::RuntimeException(
rtl::OUString::createFromAscii("Error executing dialog"),
static_cast<XFilePicker2*>(m_FilePicker));
@@ -212,15 +212,15 @@ sal_Int16 SAL_CALL CWinFileOpenImpl::execute( ) throw(uno::RuntimeException)
}
//-----------------------------------------------------------------------------------------
-// appends a new filter
+// appends a new filter
// returns false if the title (aTitle) was already added or the title or the filter are
// empty
//-----------------------------------------------------------------------------------------
-void SAL_CALL CWinFileOpenImpl::appendFilter(const rtl::OUString& aTitle, const rtl::OUString& aFilter)
+void SAL_CALL CWinFileOpenImpl::appendFilter(const rtl::OUString& aTitle, const rtl::OUString& aFilter)
throw(IllegalArgumentException, uno::RuntimeException)
-{
- sal_Bool bRet = m_filterContainer->addFilter(aTitle, aFilter);
+{
+ sal_Bool bRet = m_filterContainer->addFilter(aTitle, aFilter);
if (!bRet)
throw IllegalArgumentException(
@@ -228,12 +228,12 @@ void SAL_CALL CWinFileOpenImpl::appendFilter(const rtl::OUString& aTitle, const
static_cast<XFilePicker2*>(m_FilePicker), 1);
// #95345# see MSDN OPENFILENAME
- // If nFilterIndex is zero and lpstrCustomFilter is NULL,
+ // If nFilterIndex is zero and lpstrCustomFilter is NULL,
// the system uses the first filter in the lpstrFilter buffer.
- // to reflect this we must set the filter index so that calls
- // to getSelectedFilterIndex without explicitly calling
- // setFilterIndex before does not return 0 which leads to a
- // false state
+ // to reflect this we must set the filter index so that calls
+ // to getSelectedFilterIndex without explicitly calling
+ // setFilterIndex before does not return 0 which leads to a
+ // false state
if (0 == getSelectedFilterIndex())
CFileOpenDialog::setFilterIndex(1);
}
@@ -242,16 +242,16 @@ void SAL_CALL CWinFileOpenImpl::appendFilter(const rtl::OUString& aTitle, const
// sets a current filter
//-----------------------------------------------------------------------------------------
-void SAL_CALL CWinFileOpenImpl::setCurrentFilter(const rtl::OUString& aTitle)
+void SAL_CALL CWinFileOpenImpl::setCurrentFilter(const rtl::OUString& aTitle)
throw( IllegalArgumentException, uno::RuntimeException)
{
sal_Int32 filterPos = m_filterContainer->getFilterPos(aTitle);
if (filterPos < 0)
- throw IllegalArgumentException(
+ throw IllegalArgumentException(
rtl::OUString::createFromAscii("filter doesn't exist"),
- static_cast<XFilePicker2*>(m_FilePicker), 1);
-
+ static_cast<XFilePicker2*>(m_FilePicker), 1);
+
// filter index of the base class starts with 1
CFileOpenDialog::setFilterIndex(filterPos + 1);
}
@@ -277,10 +277,10 @@ rtl::OUString SAL_CALL CWinFileOpenImpl::getCurrentFilter() throw(uno::RuntimeEx
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
-inline void SAL_CALL CWinFileOpenImpl::appendFilterGroupSeparator()
+inline void SAL_CALL CWinFileOpenImpl::appendFilterGroupSeparator()
{
m_filterContainer->addFilter(FILTER_SEPARATOR, ALL_FILES_WILDCARD, ALLOW_DUPLICATES);
}
@@ -289,19 +289,19 @@ inline void SAL_CALL CWinFileOpenImpl::appendFilterGroupSeparator()
// XFilterGroupManager
//-----------------------------------------------------------------------------------------
-void SAL_CALL CWinFileOpenImpl::appendFilterGroup(const rtl::OUString& sGroupTitle, const uno::Sequence<beans::StringPair>& aFilters)
+void SAL_CALL CWinFileOpenImpl::appendFilterGroup(const rtl::OUString& sGroupTitle, const uno::Sequence<beans::StringPair>& aFilters)
throw (IllegalArgumentException, uno::RuntimeException)
{
(void) sGroupTitle; // avoid warning
OSL_ENSURE(0 == sGroupTitle.getLength(), "appendFilterGroup: Parameter 'GroupTitle' currently ignored");
-
+
sal_Int32 nFilters = aFilters.getLength();
OSL_PRECOND(nFilters > 0, "Empty filter list");
if (nFilters > 0)
{
- // append a separator before the next group if
+ // append a separator before the next group if
// there is already a group of filters
if (m_filterContainer->numFilter() > 0)
appendFilterGroupSeparator();
@@ -315,7 +315,7 @@ void SAL_CALL CWinFileOpenImpl::appendFilterGroup(const rtl::OUString& sGroupTit
// XExtendedFilePicker
//=================================================================================================================
-void SAL_CALL CWinFileOpenImpl::setValue(sal_Int16 aControlId, sal_Int16 aControlAction, const uno::Any& aValue)
+void SAL_CALL CWinFileOpenImpl::setValue(sal_Int16 aControlId, sal_Int16 aControlAction, const uno::Any& aValue)
throw(uno::RuntimeException)
{
OSL_ASSERT(m_FilePickerState);
@@ -323,22 +323,22 @@ void SAL_CALL CWinFileOpenImpl::setValue(sal_Int16 aControlId, sal_Int16 aContro
}
//-----------------------------------------------------------------------------------------
-// returns the value of an custom template element
+// returns the value of an custom template element
// we assume that there are only checkboxes or comboboxes
//-----------------------------------------------------------------------------------------
-uno::Any SAL_CALL CWinFileOpenImpl::getValue(sal_Int16 aControlId, sal_Int16 aControlAction)
+uno::Any SAL_CALL CWinFileOpenImpl::getValue(sal_Int16 aControlId, sal_Int16 aControlAction)
throw(uno::RuntimeException)
-{
+{
OSL_ASSERT(m_FilePickerState);
- return m_FilePickerState->getValue(aControlId, aControlAction);
+ return m_FilePickerState->getValue(aControlId, aControlAction);
}
//-----------------------------------------------------------------------------------------
// enables a custom template element
//-----------------------------------------------------------------------------------------
-void SAL_CALL CWinFileOpenImpl::enableControl(sal_Int16 ControlID, sal_Bool bEnable)
+void SAL_CALL CWinFileOpenImpl::enableControl(sal_Int16 ControlID, sal_Bool bEnable)
throw(uno::RuntimeException)
{
OSL_ASSERT(m_FilePickerState);
@@ -349,7 +349,7 @@ void SAL_CALL CWinFileOpenImpl::enableControl(sal_Int16 ControlID, sal_Bool bEna
//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CWinFileOpenImpl::setLabel( sal_Int16 aControlId, const rtl::OUString& aLabel )
+void SAL_CALL CWinFileOpenImpl::setLabel( sal_Int16 aControlId, const rtl::OUString& aLabel )
throw (uno::RuntimeException)
{
m_FilePickerState->setLabel(aControlId, aLabel);
@@ -359,17 +359,17 @@ void SAL_CALL CWinFileOpenImpl::setLabel( sal_Int16 aControlId, const rtl::OUStr
//
//-----------------------------------------------------------------------------------------
-rtl::OUString SAL_CALL CWinFileOpenImpl::getLabel( sal_Int16 aControlId )
+rtl::OUString SAL_CALL CWinFileOpenImpl::getLabel( sal_Int16 aControlId )
throw (uno::RuntimeException)
-{
+{
return m_FilePickerState->getLabel(aControlId);
}
-
+
//-----------------------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------------------
-uno::Sequence<sal_Int16> SAL_CALL CWinFileOpenImpl::getSupportedImageFormats()
+uno::Sequence<sal_Int16> SAL_CALL CWinFileOpenImpl::getSupportedImageFormats()
throw (uno::RuntimeException)
{
return m_Preview->getSupportedImageFormats();
@@ -379,9 +379,9 @@ uno::Sequence<sal_Int16> SAL_CALL CWinFileOpenImpl::getSupportedImageFormats()
//
//-----------------------------------------------------------------------------------------
-sal_Int32 SAL_CALL CWinFileOpenImpl::getTargetColorDepth()
+sal_Int32 SAL_CALL CWinFileOpenImpl::getTargetColorDepth()
throw (uno::RuntimeException)
-{
+{
return m_Preview->getTargetColorDepth();
}
@@ -389,7 +389,7 @@ sal_Int32 SAL_CALL CWinFileOpenImpl::getTargetColorDepth()
//
//-----------------------------------------------------------------------------------------
-sal_Int32 SAL_CALL CWinFileOpenImpl::getAvailableWidth()
+sal_Int32 SAL_CALL CWinFileOpenImpl::getAvailableWidth()
throw (uno::RuntimeException)
{
return m_Preview->getAvailableWidth();
@@ -399,7 +399,7 @@ sal_Int32 SAL_CALL CWinFileOpenImpl::getAvailableWidth()
//
//-----------------------------------------------------------------------------------------
-sal_Int32 SAL_CALL CWinFileOpenImpl::getAvailableHeight()
+sal_Int32 SAL_CALL CWinFileOpenImpl::getAvailableHeight()
throw (uno::RuntimeException)
{
return m_Preview->getAvailableHeight();
@@ -409,7 +409,7 @@ sal_Int32 SAL_CALL CWinFileOpenImpl::getAvailableHeight()
//
//-----------------------------------------------------------------------------------------
-void SAL_CALL CWinFileOpenImpl::setImage(sal_Int16 aImageFormat, const uno::Any& aImage)
+void SAL_CALL CWinFileOpenImpl::setImage(sal_Int16 aImageFormat, const uno::Any& aImage)
throw (IllegalArgumentException, uno::RuntimeException)
{
m_Preview->setImage(aImageFormat,aImage);
@@ -419,17 +419,17 @@ void SAL_CALL CWinFileOpenImpl::setImage(sal_Int16 aImageFormat, const uno::Any&
//
//-----------------------------------------------------------------------------------------
-sal_Bool SAL_CALL CWinFileOpenImpl::setShowState(sal_Bool bShowState)
+sal_Bool SAL_CALL CWinFileOpenImpl::setShowState(sal_Bool bShowState)
throw (uno::RuntimeException)
{
- return m_Preview->setShowState(bShowState);
+ return m_Preview->setShowState(bShowState);
}
//-----------------------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------------------
-sal_Bool SAL_CALL CWinFileOpenImpl::getShowState()
+sal_Bool SAL_CALL CWinFileOpenImpl::getShowState()
throw (uno::RuntimeException)
{
return m_Preview->getShowState();
@@ -443,13 +443,13 @@ void SAL_CALL CWinFileOpenImpl::cancel()
{
if (IsWindow(m_hwndFileOpenDlg))
{
- // simulate a mouse click to the
+ // simulate a mouse click to the
// cancel button
- PostMessage(
- m_hwndFileOpenDlg,
- WM_COMMAND,
- MAKEWPARAM(IDCANCEL,BN_CLICKED),
- (LPARAM)GetDlgItem(m_hwndFileOpenDlg, IDCANCEL));
+ PostMessage(
+ m_hwndFileOpenDlg,
+ WM_COMMAND,
+ MAKEWPARAM(IDCANCEL,BN_CLICKED),
+ (LPARAM)GetDlgItem(m_hwndFileOpenDlg, IDCANCEL));
}
}
@@ -460,13 +460,13 @@ void SAL_CALL CWinFileOpenImpl::cancel()
sal_Int16 SAL_CALL CWinFileOpenImpl::getFocused()
{
int nID = GetDlgCtrlID(GetFocus());
-
+
// we don't forward id's of standard file open
// dialog elements (ctlFirst is defined in dlgs.h
// in MS Platform SDK)
if (nID >= ctlFirst)
nID = 0;
-
+
return sal::static_int_cast< sal_Int16 >(nID);
}
@@ -484,40 +484,40 @@ inline sal_Bool SAL_CALL CWinFileOpenImpl::IsCustomControlHelpRequested(LPHELPIN
// we catch the WM_NCDESTROY message in order to erase an entry in our static map
// if one instance dies
//-----------------------------------------------------------------------------------------
-
-LRESULT CALLBACK CWinFileOpenImpl::SubClassFunc(
+
+LRESULT CALLBACK CWinFileOpenImpl::SubClassFunc(
HWND hWnd, UINT wMessage, WPARAM wParam, LPARAM lParam)
{
unsigned int lResult = 0;
CWinFileOpenImpl* pImpl = dynamic_cast<CWinFileOpenImpl*>(getCurrentInstance(hWnd));
-
+
switch(wMessage)
{
case WM_HELP:
- {
+ {
LPHELPINFO lphi = reinterpret_cast<LPHELPINFO>(lParam);
-
+
if (pImpl->IsCustomControlHelpRequested(lphi))
pImpl->onCustomControlHelpRequest(lphi);
else
- lResult = CallWindowProc(
- reinterpret_cast<WNDPROC>(pImpl->m_pfnOldDlgProc),
- hWnd,wMessage,wParam,lParam);
+ lResult = CallWindowProc(
+ reinterpret_cast<WNDPROC>(pImpl->m_pfnOldDlgProc),
+ hWnd,wMessage,wParam,lParam);
}
break;
-
+
case WM_SIZE:
lResult = CallWindowProc(
- reinterpret_cast<WNDPROC>(pImpl->m_pfnOldDlgProc),
- hWnd,wMessage,wParam,lParam);
+ reinterpret_cast<WNDPROC>(pImpl->m_pfnOldDlgProc),
+ hWnd,wMessage,wParam,lParam);
pImpl->onWMSize();
break;
case WM_WINDOWPOSCHANGED:
lResult = CallWindowProc(
- reinterpret_cast<WNDPROC>(pImpl->m_pfnOldDlgProc),
+ reinterpret_cast<WNDPROC>(pImpl->m_pfnOldDlgProc),
hWnd,wMessage,wParam,lParam);
pImpl->onWMWindowPosChanged();
@@ -525,37 +525,37 @@ LRESULT CALLBACK CWinFileOpenImpl::SubClassFunc(
case WM_SHOWWINDOW:
lResult = CallWindowProc(
- reinterpret_cast<WNDPROC>(pImpl->m_pfnOldDlgProc),
+ reinterpret_cast<WNDPROC>(pImpl->m_pfnOldDlgProc),
hWnd,wMessage,wParam,lParam);
pImpl->onWMShow((BOOL)wParam);
break;
-
+
case WM_NCDESTROY:
// restore the old window proc
- SetWindowLong(hWnd, GWL_WNDPROC,
+ SetWindowLong(hWnd, GWL_WNDPROC,
reinterpret_cast<LONG>(pImpl->m_pfnOldDlgProc));
- lResult = CallWindowProc(
- reinterpret_cast<WNDPROC>(pImpl->m_pfnOldDlgProc),
+ lResult = CallWindowProc(
+ reinterpret_cast<WNDPROC>(pImpl->m_pfnOldDlgProc),
hWnd,wMessage,wParam,lParam);
break;
-
- default:
- lResult = CallWindowProc(
- reinterpret_cast<WNDPROC>(pImpl->m_pfnOldDlgProc),
+
+ default:
+ lResult = CallWindowProc(
+ reinterpret_cast<WNDPROC>(pImpl->m_pfnOldDlgProc),
hWnd,wMessage,wParam,lParam);
break;
-
+
} // switch
-
+
return lResult;
-}
+}
//-----------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------
-
+
void SAL_CALL CWinFileOpenImpl::InitControlLabel(HWND hWnd)
{
//-----------------------------------------
@@ -570,15 +570,15 @@ void SAL_CALL CWinFileOpenImpl::InitControlLabel(HWND hWnd)
//-----------------------------------------------------------------
// There may be problems with the layout of our custom controls,
-// so that they are not aligned with the standard controls of the
+// so that they are not aligned with the standard controls of the
// FileOpen dialog.
// We use a simple algorithm to move the custom controls to their
// proper position and resize them.
-// Our approach is to align all static text controls with the
+// Our approach is to align all static text controls with the
// static text control "File name" of the FileOpen dialog,
// all checkboxes and all list/comboboxes will be left aligned with
// the standard combobox edt1 (defined in MS platform sdk dlgs.h)
-// and all push buttons will be left aligned with the standard
+// and all push buttons will be left aligned with the standard
// "OK" button
//-----------------------------------------------------------------
@@ -589,24 +589,24 @@ void SAL_CALL CWinFileOpenImpl::InitCustomControlContainer(HWND hCustomControl)
}
//-----------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------
void SAL_CALL CWinFileOpenImpl::CacheControlState(HWND hWnd)
{
OSL_ASSERT(m_FilePickerState && m_NonExecuteFilePickerState);
- m_ExecuteFilePickerState->cacheControlState(hWnd, m_NonExecuteFilePickerState);
+ m_ExecuteFilePickerState->cacheControlState(hWnd, m_NonExecuteFilePickerState);
}
//-----------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------
BOOL CALLBACK CWinFileOpenImpl::EnumChildWndProc(HWND hWnd, LPARAM lParam)
{
EnumParam* enumParam = (EnumParam*)lParam;
CWinFileOpenImpl* pImpl = enumParam->m_instance;
-
+
OSL_ASSERT(pImpl);
BOOL bRet = TRUE;
@@ -614,19 +614,19 @@ BOOL CALLBACK CWinFileOpenImpl::EnumChildWndProc(HWND hWnd, LPARAM lParam)
switch(enumParam->m_action)
{
case INIT_CUSTOM_CONTROLS:
- pImpl->InitControlLabel(hWnd);
+ pImpl->InitControlLabel(hWnd);
pImpl->InitCustomControlContainer(hWnd);
break;
case CACHE_CONTROL_VALUES:
pImpl->CacheControlState(hWnd);
- break;
-
+ break;
+
default:
// should not end here
- OSL_ASSERT(sal_False);
+ OSL_ASSERT(sal_False);
}
-
+
return bRet;
}
@@ -635,16 +635,16 @@ BOOL CALLBACK CWinFileOpenImpl::EnumChildWndProc(HWND hWnd, LPARAM lParam)
//-----------------------------------------------------------------
sal_uInt32 SAL_CALL CWinFileOpenImpl::onFileOk()
-{
+{
m_NonExecuteFilePickerState->reset();
EnumParam enumParam(CACHE_CONTROL_VALUES,this);
- EnumChildWindows(
- m_hwndFileOpenDlgChild,
- CWinFileOpenImpl::EnumChildWndProc,
+ EnumChildWindows(
+ m_hwndFileOpenDlgChild,
+ CWinFileOpenImpl::EnumChildWndProc,
(LPARAM)&enumParam);
-
+
return 0;
}
@@ -653,22 +653,22 @@ sal_uInt32 SAL_CALL CWinFileOpenImpl::onFileOk()
//-----------------------------------------------------------------
void SAL_CALL CWinFileOpenImpl::onSelChanged(HWND)
-{
+{
// the windows file open dialog sends an initial
// SelChanged message after the InitDone message
// when the dialog is about to be opened
// if the lpstrFile buffer of the OPENFILENAME is
- // empty (zero length string) the windows file open
+ // empty (zero length string) the windows file open
// dialog sends a WM_SETTEXT message with an empty
// string to the file name edit line
// this would overwritte our text when we would set
- // the default name in onInitDone, so we have to
+ // the default name in onInitDone, so we have to
// remeber that this is the first SelChanged message
// and set the default name here to overwrite the
// windows setting
InitialSetDefaultName();
- FilePickerEvent evt;
+ FilePickerEvent evt;
m_FilePicker->fileSelectionChanged(evt);
}
@@ -676,7 +676,7 @@ void SAL_CALL CWinFileOpenImpl::onSelChanged(HWND)
// and 'File type' is to short in some cases when the
// label will be changed (e.g. in the Brazil version).
// We just make sure that the labels are using the maximum
-// available space.
+// available space.
void CWinFileOpenImpl::EnlargeStdControlLabels() const
{
HWND hFilterBoxLabel = GetDlgItem(m_hwndFileOpenDlg, stc2);
@@ -684,25 +684,25 @@ void CWinFileOpenImpl::EnlargeStdControlLabels() const
HWND hFileNameBox = GetDlgItem(m_hwndFileOpenDlg, cmb13);
if (!hFileNameBox)
hFileNameBox = GetDlgItem(m_hwndFileOpenDlg, edt1); // under Win98 it is edt1 instead of cmb13
-
+
HWND hFilterBox = GetDlgItem(m_hwndFileOpenDlg, cmb1);
HWND hOkButton = GetDlgItem(m_hwndFileOpenDlg, IDOK);
-
+
// Move filter and file name box nearer to OK and Cancel button
RECT rcOkButton;
GetWindowRect(hOkButton, &rcOkButton);
-
+
const int MAX_GAP = IsWindows98() ? 5 : 10;
const int OFFSET = IsWindows98() ? 10 : 0;
-
+
RECT rcFileNameBox;
GetWindowRect(hFileNameBox, &rcFileNameBox);
int w = rcFileNameBox.right - rcFileNameBox.left;
int h = rcFileNameBox.bottom - rcFileNameBox.top;
-
+
int gap = rcOkButton.left - rcFileNameBox.right;
gap = (gap > MAX_GAP) ? gap - MAX_GAP : gap;
-
+
ScreenToClient(m_hwndFileOpenDlg, (LPPOINT)&rcFileNameBox);
MoveWindow(hFileNameBox, rcFileNameBox.left + gap + OFFSET, rcFileNameBox.top, w - OFFSET, h, true);
@@ -714,17 +714,17 @@ void CWinFileOpenImpl::EnlargeStdControlLabels() const
MoveWindow(hFilterBox, rcFilterBox.left + gap + OFFSET, rcFilterBox.top, w - OFFSET, h, true);
// get the new window rect
- GetWindowRect(hFileNameBox, &rcFileNameBox);
-
+ GetWindowRect(hFileNameBox, &rcFileNameBox);
+
RECT rcFilterBoxLabel;
GetWindowRect(hFilterBoxLabel, &rcFilterBoxLabel);
int offset = rcFileNameBox.left - rcFilterBoxLabel.right - 1;
-
+
w = rcFilterBoxLabel.right - rcFilterBoxLabel.left + offset;
h = rcFilterBoxLabel.bottom - rcFilterBoxLabel.top;
ScreenToClient(m_hwndFileOpenDlg, (LPPOINT)&rcFilterBoxLabel);
MoveWindow(hFilterBoxLabel, rcFilterBoxLabel.left, rcFilterBoxLabel.top, w, h, true);
-
+
RECT rcFileNameBoxLabel;
GetWindowRect(hFileNameBoxLabel, &rcFileNameBoxLabel);
w = rcFileNameBoxLabel.right - rcFileNameBoxLabel.left + offset;
@@ -739,27 +739,27 @@ void SAL_CALL CWinFileOpenImpl::onInitDone()
// but now we have a valid parent handle
m_HelpPopupWindow.setParent(m_hwndFileOpenDlg);
-
+
EnlargeStdControlLabels();
-
- // #99826
+
+ // #99826
// Set the online filepicker state before initializing
- // the control labels from the resource else we are
+ // the control labels from the resource else we are
// overriding the offline settings
m_ExecuteFilePickerState->setHwnd(m_hwndFileOpenDlgChild);
-
+
m_FilePickerState = m_ExecuteFilePickerState;
-
+
// initialize controls from cache
-
+
EnumParam enumParam(INIT_CUSTOM_CONTROLS,this);
-
- EnumChildWindows(
- m_hwndFileOpenDlgChild,
- CWinFileOpenImpl::EnumChildWndProc,
- (LPARAM)&enumParam);
-
- m_ExecuteFilePickerState->initFilePickerControls(
+
+ EnumChildWindows(
+ m_hwndFileOpenDlgChild,
+ CWinFileOpenImpl::EnumChildWndProc,
+ (LPARAM)&enumParam);
+
+ m_ExecuteFilePickerState->initFilePickerControls(
m_NonExecuteFilePickerState->getControlCommand());
SetDefaultExtension();
@@ -769,7 +769,7 @@ void SAL_CALL CWinFileOpenImpl::onInitDone()
m_CustomControls->SetFont(
reinterpret_cast<HFONT>(SendMessage(m_hwndFileOpenDlg, WM_GETFONT, 0, 0)));
- // resume event notification that was
+ // resume event notification that was
// defered in onInitDialog
m_FilePicker->resumeEventNotification();
@@ -779,8 +779,8 @@ void SAL_CALL CWinFileOpenImpl::onInitDone()
RegisterWindowMessage(TEXT("SYSTEM_WINDOW_ACTIVATED")),
0,
0);
-
- // call the parent function to center the
+
+ // call the parent function to center the
// dialog to it's parent
CFileOpenDialog::onInitDone();
}
@@ -791,7 +791,7 @@ void SAL_CALL CWinFileOpenImpl::onInitDone()
void SAL_CALL CWinFileOpenImpl::onFolderChanged()
{
- FilePickerEvent evt;
+ FilePickerEvent evt;
m_FilePicker->directoryChanged(evt);
}
@@ -803,8 +803,8 @@ void SAL_CALL CWinFileOpenImpl::onTypeChanged(sal_uInt32)
{
SetDefaultExtension();
- FilePickerEvent evt;
- evt.ElementId = LISTBOX_FILTER;
+ FilePickerEvent evt;
+ evt.ElementId = LISTBOX_FILTER;
m_FilePicker->controlStateChanged(evt);
}
@@ -812,15 +812,15 @@ void SAL_CALL CWinFileOpenImpl::onTypeChanged(sal_uInt32)
// onMessageCommand handler
//-----------------------------------------------------------------------------------------
-sal_uInt32 SAL_CALL CWinFileOpenImpl::onCtrlCommand(
+sal_uInt32 SAL_CALL CWinFileOpenImpl::onCtrlCommand(
HWND, sal_uInt16 ctrlId, sal_uInt16)
{
SetDefaultExtension();
if (ctrlId < ctlFirst)
{
- FilePickerEvent evt;
- evt.ElementId = ctrlId;
+ FilePickerEvent evt;
+ evt.ElementId = ctrlId;
m_FilePicker->controlStateChanged(evt);
}
@@ -828,7 +828,7 @@ sal_uInt32 SAL_CALL CWinFileOpenImpl::onCtrlCommand(
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
void CWinFileOpenImpl::onWMSize()
@@ -839,16 +839,16 @@ void CWinFileOpenImpl::onWMSize()
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
void CWinFileOpenImpl::onWMShow(BOOL bShow)
-{
+{
m_Preview->notifyParentShow(bShow);
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
void CWinFileOpenImpl::onWMWindowPosChanged()
@@ -857,7 +857,7 @@ void CWinFileOpenImpl::onWMWindowPosChanged()
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
void CWinFileOpenImpl::onCustomControlHelpRequest(LPHELPINFO lphi)
@@ -866,7 +866,7 @@ void CWinFileOpenImpl::onCustomControlHelpRequest(LPHELPINFO lphi)
evt.ElementId = sal::static_int_cast< sal_Int16 >(lphi->iCtrlId);
rtl::OUString aPopupHelpText = m_FilePicker->helpRequested(evt);
-
+
if (aPopupHelpText.getLength())
{
m_HelpPopupWindow.setText(aPopupHelpText);
@@ -877,32 +877,32 @@ void CWinFileOpenImpl::onCustomControlHelpRequest(LPHELPINFO lphi)
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
void SAL_CALL CWinFileOpenImpl::onInitDialog(HWND hwndDlg)
{
// subclass the dialog window
- m_pfnOldDlgProc =
- reinterpret_cast<WNDPROC>(
- SetWindowLong( hwndDlg, GWL_WNDPROC,
- reinterpret_cast<LONG>(SubClassFunc)));
+ m_pfnOldDlgProc =
+ reinterpret_cast<WNDPROC>(
+ SetWindowLong( hwndDlg, GWL_WNDPROC,
+ reinterpret_cast<LONG>(SubClassFunc)));
}
//-----------------------------------------------------------------------------------------
-// processing before showing the dialog
+// processing before showing the dialog
//-----------------------------------------------------------------------------------------
bool SAL_CALL CWinFileOpenImpl::preModal()
-{
- CFileOpenDialog::setFilter(
+{
+ CFileOpenDialog::setFilter(
makeWinFilterBuffer(*m_filterContainer.get()));
-
+
return true;
}
//-----------------------------------------------------------------------------------------
-// processing after showing the dialog
+// processing after showing the dialog
//-----------------------------------------------------------------------------------------
void CWinFileOpenImpl::postModal(sal_Int16 nDialogResult)
@@ -913,8 +913,8 @@ void CWinFileOpenImpl::postModal(sal_Int16 nDialogResult)
// invalid controls in case someone calls execute
// twice in sequence with the same instance
m_CustomControls->RemoveAllControls();
-
- m_FilePickerState = m_NonExecuteFilePickerState;
+
+ m_FilePickerState = m_NonExecuteFilePickerState;
}
//-----------------------------------------------------------------------------------------
@@ -922,7 +922,7 @@ void CWinFileOpenImpl::postModal(sal_Int16 nDialogResult)
//-----------------------------------------------------------------------------------------
void SAL_CALL CWinFileOpenImpl::SetDefaultExtension()
-{
+{
HWND hwndChkSaveWithExt = GetDlgItem(m_hwndFileOpenDlgChild, 100);
if (hwndChkSaveWithExt)
@@ -944,26 +944,26 @@ void SAL_CALL CWinFileOpenImpl::SetDefaultExtension()
{
rtl::OUString FilterExt;
m_filterContainer->getFilter(currentFilter, FilterExt);
-
+
sal_Int32 posOfPoint = FilterExt.indexOf(L'.');
const sal_Unicode* pFirstExtStart = FilterExt.getStr() + posOfPoint + 1;
-
+
sal_Int32 posOfSemiColon = FilterExt.indexOf(L';') - 1;
- if (posOfSemiColon < 0)
+ if (posOfSemiColon < 0)
posOfSemiColon = FilterExt.getLength() - 1;
FilterExt = rtl::OUString(pFirstExtStart, posOfSemiColon - posOfPoint);
- SendMessage(m_hwndFileOpenDlg, CDM_SETDEFEXT, 0, reinterpret_cast<LPARAM>(FilterExt.getStr()));
+ SendMessage(m_hwndFileOpenDlg, CDM_SETDEFEXT, 0, reinterpret_cast<LPARAM>(FilterExt.getStr()));
}
}
}
else
- {
+ {
SendMessage(m_hwndFileOpenDlg, CDM_SETDEFEXT, 0, reinterpret_cast<LPARAM>(TEXT("")));
}
}
-
+
// !!! HACK !!!
}
@@ -972,7 +972,7 @@ void SAL_CALL CWinFileOpenImpl::SetDefaultExtension()
//-----------------------------------------------------------------------------------------
void SAL_CALL CWinFileOpenImpl::InitialSetDefaultName()
-{
+{
// manually setting the file name that appears
// initially in the file-name-box of the file
// open dialog (reason: see above setDefaultName)
@@ -985,13 +985,13 @@ void SAL_CALL CWinFileOpenImpl::InitialSetDefaultName()
// the control id of this box is cmb13 and not
// edt1 as before so we must use this id
if (IsWindows2000Platform())
- edt1Id = cmb13;
+ edt1Id = cmb13;
HWND hwndEdt1 = GetDlgItem(m_hwndFileOpenDlg, edt1Id);
- SetWindowText(hwndEdt1, reinterpret_cast<LPCTSTR>(m_defaultName.getStr()));
+ SetWindowText(hwndEdt1, reinterpret_cast<LPCTSTR>(m_defaultName.getStr()));
}
- m_bInitialSelChanged = sal_False;
+ m_bInitialSelChanged = sal_False;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx
index e20fbf58ff1a..379a2dd49646 100644
--- a/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx
+++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -63,32 +63,32 @@ class CNonExecuteFilePickerState;
class CWinFileOpenImpl : public CFileOpenDialog
{
public:
- CWinFileOpenImpl(
- CFilePicker* aFilePicker,
- sal_Bool bFileOpenDialog = sal_True,
+ CWinFileOpenImpl(
+ CFilePicker* aFilePicker,
+ sal_Bool bFileOpenDialog = sal_True,
sal_uInt32 dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
sal_uInt32 dwTemplateId = 0,
HINSTANCE hInstance = 0 );
virtual ~CWinFileOpenImpl( );
-
+
//-----------------------------------------------------------------------------------------
// XExecutableDialog
//-----------------------------------------------------------------------------------------
-
+
virtual sal_Int16 SAL_CALL execute( ) throw( ::com::sun::star::uno::RuntimeException );
//-----------------------------------------------------------------------------------------
// XFilePicker
//-----------------------------------------------------------------------------------------
-
- virtual void SAL_CALL setDefaultName( const ::rtl::OUString& aName )
+
+ virtual void SAL_CALL setDefaultName( const ::rtl::OUString& aName )
throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
-
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getFiles( )
+
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getFiles( )
throw(::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& aDirectory )
+
+ virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& aDirectory )
throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
virtual ::rtl::OUString SAL_CALL getDisplayDirectory( ) throw ( ::com::sun::star::uno::RuntimeException );
@@ -97,64 +97,64 @@ public:
// XFilterManager
//-----------------------------------------------------------------------------------------
- virtual void SAL_CALL appendFilter( const ::rtl::OUString& aTitle, const ::rtl::OUString& aFilter )
+ virtual void SAL_CALL appendFilter( const ::rtl::OUString& aTitle, const ::rtl::OUString& aFilter )
throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setCurrentFilter( const ::rtl::OUString& aTitle )
+ virtual void SAL_CALL setCurrentFilter( const ::rtl::OUString& aTitle )
throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
- virtual ::rtl::OUString SAL_CALL getCurrentFilter( )
+ virtual ::rtl::OUString SAL_CALL getCurrentFilter( )
throw( ::com::sun::star::uno::RuntimeException );
//-----------------------------------------------------------------------------------------
// XFilterGroupManager
//-----------------------------------------------------------------------------------------
- virtual void SAL_CALL appendFilterGroup( const ::rtl::OUString& sGroupTitle, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair >& aFilters )
+ virtual void SAL_CALL appendFilterGroup( const ::rtl::OUString& sGroupTitle, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair >& aFilters )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
//-----------------------------------------------------------------------------------------
// XFilePickerControlAccess
//-----------------------------------------------------------------------------------------
-
- virtual void SAL_CALL setValue( sal_Int16 aControlId, sal_Int16 aControlAction, const ::com::sun::star::uno::Any& aValue )
+
+ virtual void SAL_CALL setValue( sal_Int16 aControlId, sal_Int16 aControlAction, const ::com::sun::star::uno::Any& aValue )
throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Any SAL_CALL getValue( sal_Int16 aControlId, sal_Int16 aControlAction )
+ virtual ::com::sun::star::uno::Any SAL_CALL getValue( sal_Int16 aControlId, sal_Int16 aControlAction )
throw( ::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL enableControl( sal_Int16 aControlId, sal_Bool bEnable )
+
+ virtual void SAL_CALL enableControl( sal_Int16 aControlId, sal_Bool bEnable )
throw( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setLabel( sal_Int16 aControlId, const ::rtl::OUString& aLabel )
+ virtual void SAL_CALL setLabel( sal_Int16 aControlId, const ::rtl::OUString& aLabel )
throw (::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getLabel( sal_Int16 aControlId )
+ virtual ::rtl::OUString SAL_CALL getLabel( sal_Int16 aControlId )
throw ( ::com::sun::star::uno::RuntimeException);
-
+
//------------------------------------------------
// XFilePreview
//------------------------------------------------
- virtual ::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSupportedImageFormats( )
+ virtual ::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL getSupportedImageFormats( )
throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getTargetColorDepth( )
+ virtual sal_Int32 SAL_CALL getTargetColorDepth( )
throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getAvailableWidth( )
+ virtual sal_Int32 SAL_CALL getAvailableWidth( )
throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getAvailableHeight( )
+ virtual sal_Int32 SAL_CALL getAvailableHeight( )
throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage )
+ virtual void SAL_CALL setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL setShowState( sal_Bool bShowState )
+ virtual sal_Bool SAL_CALL setShowState( sal_Bool bShowState )
throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL getShowState( )
+ virtual sal_Bool SAL_CALL getShowState( )
throw (::com::sun::star::uno::RuntimeException);
//------------------------------------------------
@@ -174,59 +174,59 @@ protected:
virtual void SAL_CALL postModal( sal_Int16 nDialogResult );
virtual sal_uInt32 SAL_CALL onFileOk();
- virtual void SAL_CALL onSelChanged( HWND hwndListBox );
+ virtual void SAL_CALL onSelChanged( HWND hwndListBox );
// only called back if OFN_EXPLORER is set
- virtual void SAL_CALL onInitDone();
+ virtual void SAL_CALL onInitDone();
virtual void SAL_CALL onFolderChanged();
virtual void SAL_CALL onTypeChanged( sal_uInt32 nFilterIndex );
-
+
// call base class method first when overloading
virtual void SAL_CALL onInitDialog( HWND hwndDlg );
virtual sal_uInt32 SAL_CALL onCtrlCommand( HWND hwndDlg, sal_uInt16 ctrlId, sal_uInt16 notifyCode );
-
+
void onWMSize();
void onWMShow(BOOL bShow);
void onWMWindowPosChanged();
void onCustomControlHelpRequest(LPHELPINFO lphi);
-private:
+private:
inline void SAL_CALL appendFilterGroupSeparator( );
-
+
inline sal_Bool SAL_CALL IsCustomControlHelpRequested(LPHELPINFO lphi) const;
void EnlargeStdControlLabels() const;
-
+
// initialize all controls from cache
void SAL_CALL InitControlLabel( HWND hWnd );
void SAL_CALL InitCustomControlContainer(HWND hCustomControl);
-
- // save the control state
+
+ // save the control state
void SAL_CALL CacheControlState(HWND hWnd);
void SAL_CALL SetDefaultExtension();
void SAL_CALL InitialSetDefaultName();
-
+
static LRESULT CALLBACK SubClassFunc(HWND hWnd, UINT wMessage, WPARAM wParam, LPARAM lParam);
static BOOL CALLBACK EnumChildWndProc( HWND hWnd, LPARAM lParam );
-
-private:
- std::auto_ptr<CFilterContainer> m_filterContainer;
- std::auto_ptr<CPreviewAdapter> m_Preview;
- std::auto_ptr<CCustomControlFactory> m_CustomControlFactory;
- std::auto_ptr<CCustomControl> m_CustomControls;
- CFilePicker* m_FilePicker;
- WNDPROC m_pfnOldDlgProc;
- rtl::OUString m_defaultName;
- sal_Bool m_bInitialSelChanged;
- CHelpPopupWindow m_HelpPopupWindow;
- CFilePickerState* m_FilePickerState;
- CExecuteFilePickerState* m_ExecuteFilePickerState;
- CNonExecuteFilePickerState* m_NonExecuteFilePickerState;
- CResourceProvider m_ResProvider;
+
+private:
+ std::auto_ptr<CFilterContainer> m_filterContainer;
+ std::auto_ptr<CPreviewAdapter> m_Preview;
+ std::auto_ptr<CCustomControlFactory> m_CustomControlFactory;
+ std::auto_ptr<CCustomControl> m_CustomControls;
+ CFilePicker* m_FilePicker;
+ WNDPROC m_pfnOldDlgProc;
+ rtl::OUString m_defaultName;
+ sal_Bool m_bInitialSelChanged;
+ CHelpPopupWindow m_HelpPopupWindow;
+ CFilePickerState* m_FilePickerState;
+ CExecuteFilePickerState* m_ExecuteFilePickerState;
+ CNonExecuteFilePickerState* m_NonExecuteFilePickerState;
+ CResourceProvider m_ResProvider;
};
diff --git a/fpicker/source/win32/filepicker/asynceventnotifier.cxx b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
index 0e71ec966b3d..d69746fd07cd 100644
--- a/fpicker/source/win32/filepicker/asynceventnotifier.cxx
+++ b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,25 +52,25 @@ using ::com::sun::star::ui::dialogs::XFilePickerListener;
//
//------------------------------------------------
-CAsyncEventNotifier::CAsyncEventNotifier(cppu::OBroadcastHelper& rBroadcastHelper) :
+CAsyncEventNotifier::CAsyncEventNotifier(cppu::OBroadcastHelper& rBroadcastHelper) :
m_hThread(0),
m_bRun(false),
m_ThreadId(0),
m_rBroadcastHelper(rBroadcastHelper),
m_NotifyEvent(m_hEvents[0]),
m_ResumeNotifying(m_hEvents[1])
-{
+{
// m_NotifyEvent
- m_hEvents[0] = CreateEvent(0, /* no security */
- true, /* manual reset */
- false, /* initial state not signaled */
- 0); /* automatic name */
-
- // m_ResumeNotifying
- m_hEvents[1] = CreateEvent(0, /* no security */
- true, /* manual reset */
- false, /* initial state not signaled */
- 0); /* automatic name */
+ m_hEvents[0] = CreateEvent(0, /* no security */
+ true, /* manual reset */
+ false, /* initial state not signaled */
+ 0); /* automatic name */
+
+ // m_ResumeNotifying
+ m_hEvents[1] = CreateEvent(0, /* no security */
+ true, /* manual reset */
+ false, /* initial state not signaled */
+ 0); /* automatic name */
}
//------------------------------------------------
@@ -80,7 +80,7 @@ CAsyncEventNotifier::CAsyncEventNotifier(cppu::OBroadcastHelper& rBroadcastHelpe
CAsyncEventNotifier::~CAsyncEventNotifier()
{
OSL_ENSURE(0 == m_hThread,"Thread not stopped, destroying this instance leads to desaster");
-
+
CloseHandle(m_hEvents[0]);
CloseHandle(m_hEvents[1]);
}
@@ -93,15 +93,15 @@ void SAL_CALL CAsyncEventNotifier::addListener(const uno::Type&
const uno::Reference< uno::XInterface >& xListener)
{
if ( m_rBroadcastHelper.bDisposed )
- throw lang::DisposedException(
+ throw lang::DisposedException(
::rtl::OUString::createFromAscii( "FilePicker is already disposed" ),
uno::Reference< uno::XInterface >() );
if ( m_rBroadcastHelper.bInDispose )
- throw lang::DisposedException(
+ throw lang::DisposedException(
::rtl::OUString::createFromAscii( "FilePicker will be disposed now." ),
uno::Reference< uno::XInterface >() );
-
+
m_rBroadcastHelper.aLC.addInterface( aType, xListener );
}
@@ -113,7 +113,7 @@ void SAL_CALL CAsyncEventNotifier::removeListener(const uno::Type&
const uno::Reference< uno::XInterface >& xListener)
{
if ( m_rBroadcastHelper.bDisposed )
- throw lang::DisposedException(
+ throw lang::DisposedException(
::rtl::OUString::createFromAscii( "FilePicker is already disposed." ),
uno::Reference< uno::XInterface >() );
@@ -131,13 +131,13 @@ bool SAL_CALL CAsyncEventNotifier::startup(bool bCreateSuspended)
// m_bRun may already be false because of a
// call to stop but the thread did not yet
// terminate so m_hEventNotifierThread is
- // yet a valid thread handle that should
+ // yet a valid thread handle that should
// not be overwritten
if (!m_bRun)
{
if (!bCreateSuspended)
SetEvent(m_ResumeNotifying);
-
+
m_hThread = (HANDLE)_beginthreadex(
NULL, 0, CAsyncEventNotifier::ThreadProc, this, 0, &m_ThreadId);
@@ -159,20 +159,20 @@ bool SAL_CALL CAsyncEventNotifier::startup(bool bCreateSuspended)
void SAL_CALL CAsyncEventNotifier::shutdown()
{
unsigned nThreadId = GetCurrentThreadId();
-
+
OSL_PRECOND(nThreadId != m_ThreadId, "Method called in wrong thread context!");
osl::ResettableMutexGuard aGuard(m_Mutex);
-
+
OSL_PRECOND(m_bRun,"Event notifier does not run!");
m_bRun = false;
- m_EventList.clear();
-
+ m_EventList.clear();
+
// awake the the notifier thread
SetEvent(m_ResumeNotifying);
SetEvent(m_NotifyEvent);
-
+
// releas the mutex here because the event
// notifier thread may need it to finish
aGuard.clear();
@@ -186,7 +186,7 @@ void SAL_CALL CAsyncEventNotifier::shutdown()
// lock mutex again to reset m_hThread
// and prevent a race with start()
aGuard.reset();
-
+
CloseHandle(m_hThread);
m_hThread = 0;
}
@@ -199,7 +199,7 @@ void CAsyncEventNotifier::suspend()
{
ResetEvent(m_ResumeNotifying);
}
-
+
//------------------------------------------------
//
//------------------------------------------------
@@ -208,7 +208,7 @@ void CAsyncEventNotifier::resume()
{
SetEvent(m_ResumeNotifying);
}
-
+
//------------------------------------------------
//
//------------------------------------------------
@@ -243,8 +243,8 @@ size_t SAL_CALL CAsyncEventNotifier::getEventListSize()
void SAL_CALL CAsyncEventNotifier::resetNotifyEvent()
{
osl::MutexGuard aGuard(m_Mutex);
- if (0 == m_EventList.size())
- ResetEvent(m_NotifyEvent);
+ if (0 == m_EventList.size())
+ ResetEvent(m_NotifyEvent);
}
//------------------------------------------------
@@ -263,28 +263,28 @@ CEventNotification* SAL_CALL CAsyncEventNotifier::getNextEventRecord()
void SAL_CALL CAsyncEventNotifier::removeNextEventRecord()
{
- osl::MutexGuard aGuard(m_Mutex);
- m_EventList.pop_front();
+ osl::MutexGuard aGuard(m_Mutex);
+ m_EventList.pop_front();
}
//------------------------------------------------
//
//------------------------------------------------
-void SAL_CALL CAsyncEventNotifier::run()
+void SAL_CALL CAsyncEventNotifier::run()
{
while (m_bRun)
- {
+ {
WaitForMultipleObjects(2, m_hEvents, true, INFINITE);
-
+
if (m_bRun)
- {
+ {
while (getEventListSize() > 0)
- {
+ {
std::auto_ptr<CEventNotification> EventNotification(getNextEventRecord());
removeNextEventRecord();
- ::cppu::OInterfaceContainerHelper* pICHelper =
+ ::cppu::OInterfaceContainerHelper* pICHelper =
m_rBroadcastHelper.getContainer(getCppuType((uno::Reference<XFilePickerListener>*)0));
if (pICHelper)
@@ -292,9 +292,9 @@ void SAL_CALL CAsyncEventNotifier::run()
::cppu::OInterfaceIteratorHelper iter(*pICHelper);
while(iter.hasMoreElements())
- {
+ {
try
- {
+ {
EventNotification->notifyEventListener(iter.next());
}
catch(uno::RuntimeException&)
@@ -305,10 +305,10 @@ void SAL_CALL CAsyncEventNotifier::run()
}
} // while(getEventListSize() > 0)
+
+ resetNotifyEvent();
- resetNotifyEvent();
-
- } // if (m_bRun)
+ } // if (m_bRun)
} // while(m_bRun)
}
diff --git a/fpicker/source/win32/filepicker/asynceventnotifier.hxx b/fpicker/source/win32/filepicker/asynceventnotifier.hxx
index d7fd8ea0cefb..fa50a03e82fd 100644
--- a/fpicker/source/win32/filepicker/asynceventnotifier.hxx
+++ b/fpicker/source/win32/filepicker/asynceventnotifier.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -63,14 +63,14 @@ public:
void SAL_CALL shutdown();
// notifications may be added the
- // the event queue but will only
+ // the event queue but will only
// be notified to the clients after
// resume was called
void suspend();
-
+
// resume notifying events
void resume();
-
+
// this class is responsible for the memory management of
// the CEventNotification instance
void SAL_CALL notifyEvent(CEventNotification* EventNotification);
@@ -90,16 +90,16 @@ private:
static unsigned int WINAPI ThreadProc(LPVOID pParam);
-private:
+private:
std::list<CEventNotification*> m_EventList;
- HANDLE m_hThread;
- bool m_bRun;
- unsigned m_ThreadId;
- ::cppu::OBroadcastHelper& m_rBroadcastHelper;
+ HANDLE m_hThread;
+ bool m_bRun;
+ unsigned m_ThreadId;
+ ::cppu::OBroadcastHelper& m_rBroadcastHelper;
HANDLE m_hEvents[2];
HANDLE& m_NotifyEvent;
- HANDLE& m_ResumeNotifying;
- osl::Mutex m_Mutex;
+ HANDLE& m_ResumeNotifying;
+ osl::Mutex m_Mutex;
// prevent copy and assignment
private:
diff --git a/fpicker/source/win32/filepicker/asyncrequests.cxx b/fpicker/source/win32/filepicker/asyncrequests.cxx
index 7dcf6dac9a0f..ed197cd9b402 100644
--- a/fpicker/source/win32/filepicker/asyncrequests.cxx
+++ b/fpicker/source/win32/filepicker/asyncrequests.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -110,7 +110,7 @@ void AsyncRequests::triggerRequestProcessMessages (const RequestRef& rRequest)
if ( ! isRunning())
create();
-
+
rRequest->waitProcessMessages();
}
@@ -195,7 +195,7 @@ void SAL_CALL AsyncRequests::run()
{
// SYNCHRONIZED ->
aLock.reset();
-
+
RequestRef rRequest;
if ( ! m_lRequests.empty())
{
@@ -203,7 +203,7 @@ void SAL_CALL AsyncRequests::run()
m_lRequests.pop();
}
bFinished = m_bFinish;
-
+
aLock.clear();
// <- SYNCHRONIZED
diff --git a/fpicker/source/win32/filepicker/asyncrequests.hxx b/fpicker/source/win32/filepicker/asyncrequests.hxx
index ba9b07eae995..6075a247d032 100644
--- a/fpicker/source/win32/filepicker/asyncrequests.hxx
+++ b/fpicker/source/win32/filepicker/asyncrequests.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -62,15 +62,15 @@ class Request
{
//-------------------------------------------------------------------------
public:
-
+
static const ::sal_Int32 WAIT_INFINITE = 0;
-
+
//-------------------------------------------------------------------------
// interface
//-------------------------------------------------------------------------
-
+
public:
-
+
//---------------------------------------------------------------------
explicit Request()
: m_aJoiner ( )
@@ -79,28 +79,28 @@ class Request
{
m_aJoiner.reset();
}
-
+
//---------------------------------------------------------------------
virtual ~Request() {};
-
+
//---------------------------------------------------------------------
void setRequest(::sal_Int32 nRequest)
{
m_nRequest = nRequest;
}
-
+
//---------------------------------------------------------------------
::sal_Int32 getRequest()
{
return m_nRequest;
}
-
+
//---------------------------------------------------------------------
void clearArguments()
{
m_lArguments.clear();
}
-
+
//---------------------------------------------------------------------
template< class TArgumentType >
void setArgument(const ::rtl::OUString& sName ,
@@ -108,7 +108,7 @@ class Request
{
m_lArguments[sName] <<= aValue;
}
-
+
//---------------------------------------------------------------------
template< class TArgumentType >
TArgumentType getArgumentOrDefault(const ::rtl::OUString& sName ,
@@ -116,21 +116,21 @@ class Request
{
return m_lArguments.getUnpackedValueOrDefault(sName, aDefault);
}
-
+
//---------------------------------------------------------------------
void wait(::sal_Int32 nMilliSeconds = WAIT_INFINITE);
-
+
void waitProcessMessages();
-
+
//---------------------------------------------------------------------
void notify();
//-------------------------------------------------------------------------
// member
//-------------------------------------------------------------------------
-
+
private:
-
+
::osl::Condition m_aJoiner;
::sal_Int32 m_nRequest;
::comphelper::SequenceAsHashMap m_lArguments;
@@ -157,7 +157,7 @@ class AsyncRequests : private ::cppu::BaseMutex
, public ::osl::Thread
{
public:
- static const ::sal_Int16 PROCESS_MESSAGES = 2;
+ static const ::sal_Int16 PROCESS_MESSAGES = 2;
static const ::sal_Int16 BLOCKED = 1;
static const ::sal_Int16 NON_BLOCKED = 0;
@@ -165,55 +165,55 @@ class AsyncRequests : private ::cppu::BaseMutex
/** creates the new asynchronous request executor.
*/
explicit AsyncRequests(const RequestHandlerRef& rHandler);
-
+
void setHandler(const RequestHandlerRef& rHandler)
{
m_rHandler = rHandler;
}
-
+
//---------------------------------------------------------------------
/** does nothing special / excepting to make sure our class wont be inline .-)
*/
virtual ~AsyncRequests();
-
+
//---------------------------------------------------------------------
/** @todo document me
*/
void triggerRequestProcessMessages (const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/** @todo document me
*/
void triggerRequestBlocked(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/** @todo document me
*/
void triggerRequestNonBlocked(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/** @todo document me
*/
void triggerRequestDirectly(const RequestRef& rRequest);
-
+
//---------------------------------------------------------------------
/** @todo document me
*/
void triggerRequestThreadAware(const RequestRef& rRequest,
::sal_Int16 nWait );
-
+
private:
-
+
//---------------------------------------------------------------------
/** our STA .-)
- * Will run between start() & finish(). Internaly it runs a loop ...
+ * Will run between start() & finish(). Internaly it runs a loop ...
* waiting for requests. Every request will be executed synchronously
* in blocked mode.
*/
virtual void SAL_CALL run();
-
+
private:
-
+
::sal_Bool m_bFinish;
RequestHandlerRef m_rHandler;
RequestQueue m_lRequests;
diff --git a/fpicker/source/win32/filepicker/comptr.hxx b/fpicker/source/win32/filepicker/comptr.hxx
index 2eb4796921c2..ee4b1b55385e 100644
--- a/fpicker/source/win32/filepicker/comptr.hxx
+++ b/fpicker/source/win32/filepicker/comptr.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,7 +39,7 @@ template< class T_INTERFACE ,
class ComPtr
{
public:
-
+
//---------------------------------------------------------------------
/** initialize com ptr with null.
*/
@@ -47,7 +47,7 @@ class ComPtr
{
m_pInterface = NULL;
}
-
+
//---------------------------------------------------------------------
/** initialize com ptr with given interface.
*/
@@ -57,7 +57,7 @@ class ComPtr
if (m_pInterface)
m_pInterface->AddRef();
}
-
+
//---------------------------------------------------------------------
/** copy ctor.
*/
@@ -67,7 +67,7 @@ class ComPtr
if (m_pInterface)
m_pInterface->AddRef();
}
-
+
//---------------------------------------------------------------------
/** initialize object by quering external object for the right interface.
*/
@@ -76,7 +76,7 @@ class ComPtr
if (pIUnknown)
pIUnknown->QueryInterface(P_IID, (void**)&m_pInterface);
}
-
+
//---------------------------------------------------------------------
/** deinitialize com object right.
*/
@@ -86,51 +86,51 @@ class ComPtr
}
public:
-
+
//---------------------------------------------------------------------
HRESULT create()
{
return CoCreateInstance(P_CLSID, NULL, CLSCTX_ALL, P_IID, (void**)&m_pInterface);
}
-
+
//---------------------------------------------------------------------
operator T_INTERFACE*() const
{
return m_pInterface;
}
-
+
//---------------------------------------------------------------------
T_INTERFACE& operator*() const
{
return *m_pInterface;
}
-
+
//---------------------------------------------------------------------
T_INTERFACE** operator&()
{
return &m_pInterface;
}
-
+
//---------------------------------------------------------------------
T_INTERFACE* operator->() const
{
return m_pInterface;
}
-
+
//---------------------------------------------------------------------
T_INTERFACE* operator=(T_INTERFACE* pInterface)
{
if ( equals(pInterface) )
return m_pInterface;
-
+
m_pInterface->Release();
m_pInterface = pInterface;
if (m_pInterface)
m_pInterface->AddRef();
-
+
return m_pInterface;
}
-
+
//---------------------------------------------------------------------
T_INTERFACE* operator=(IUnknown* pIUnknown)
{
@@ -138,23 +138,23 @@ class ComPtr
pIUnknown->QueryInterface(P_IID, (void**)&m_pInterface);
return m_pInterface;
}
-
+
//---------------------------------------------------------------------
T_INTERFACE* operator=(const ComPtr< T_INTERFACE, P_IID, P_CLSID >& aCopy)
{
m_pInterface = aCopy.m_pInterface;
if (m_pInterface)
m_pInterface->AddRef();
-
+
return m_pInterface;
}
-
+
//---------------------------------------------------------------------
T_INTERFACE* get() const
{
return m_pInterface;
}
-
+
//---------------------------------------------------------------------
void attach(T_INTERFACE* pInterface)
{
@@ -164,7 +164,7 @@ class ComPtr
m_pInterface = pInterface;
}
}
-
+
//---------------------------------------------------------------------
T_INTERFACE* detach()
{
@@ -172,7 +172,7 @@ class ComPtr
m_pInterface = NULL;
return pInterface;
}
-
+
//---------------------------------------------------------------------
void release()
{
@@ -182,7 +182,7 @@ class ComPtr
m_pInterface = NULL;
}
}
-
+
#ifndef __MINGW32__
//---------------------------------------------------------------------
template< class T_QUERYINTERFACE >
@@ -191,7 +191,7 @@ class ComPtr
return m_pInterface->QueryInterface(__uuidof(T_QUERYINTERFACE), (void**)pQuery);
}
#endif
-
+
//---------------------------------------------------------------------
::sal_Bool equals(IUnknown* pCheck)
{
@@ -200,16 +200,16 @@ class ComPtr
( ! pCheck )
)
return sal_True;
-
+
IUnknown* pCurrent = NULL;
m_pInterface->QueryInterface(IID_IUnknown, (void**)&pCurrent);
-
+
::sal_Bool bEquals = (pCheck == pCurrent);
pCurrent->Release();
-
+
return bEquals;
}
-
+
//---------------------------------------------------------------------
::sal_Bool is()
{
diff --git a/fpicker/source/win32/filepicker/controlaccess.cxx b/fpicker/source/win32/filepicker/controlaccess.cxx
index 8831d017f82d..cde1ee52f6dc 100644
--- a/fpicker/source/win32/filepicker/controlaccess.cxx
+++ b/fpicker/source/win32/filepicker/controlaccess.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,9 +40,9 @@
#include "..\misc\WinImplHelper.hxx"
//------------------------------------------------------------
-// we are using a table based algorithm to dispatch control
-// actions there is one table containing one action table for
-// each control class and one action table per control class
+// we are using a table based algorithm to dispatch control
+// actions there is one table containing one action table for
+// each control class and one action table per control class
// which contains function pointer to control action functions
//------------------------------------------------------------
@@ -106,16 +106,16 @@ namespace // private
size_t TableSize;
};
- // an array of function tables, one for each control class
+ // an array of function tables, one for each control class
_ENTRY CtrlClassSetValueFunctionTable[] =
{
{ NULL, 0 },
- { CheckboxSetValueFunctionTable, SIZE_CHECKBOX_SETVALUE_FUNCTION_TABLE },
+ { CheckboxSetValueFunctionTable, SIZE_CHECKBOX_SETVALUE_FUNCTION_TABLE },
{ ListboxSetValueFunctionTable, SIZE_LISTBOX_SETVALUE_FUNCTION_TABLE },
{ NULL, 0 }
};
-
- // an array of function tables, one for each control class
+
+ // an array of function tables, one for each control class
_ENTRY CtrlClassGetValueFunctionTable[] =
{
{ NULL, 0 },
@@ -123,41 +123,41 @@ namespace // private
{ ListboxGetValueFunctionTable, SIZE_LISTBOX_GETVALUE_ACTION_TABLE },
{ NULL, 0 }
};
-
+
//------------------------------------------------------------
//
//------------------------------------------------------------
- CTRL_SETVALUE_FUNCTION_T SAL_CALL GetCtrlSetValueFunction(
+ CTRL_SETVALUE_FUNCTION_T SAL_CALL GetCtrlSetValueFunction(
CTRL_SETVALUE_FUNCTION_T* aCtrlSetValueFunctionTable, size_t aTableSize, sal_Int16 aCtrlAction )
- {
+ {
if ( !aCtrlSetValueFunctionTable ||
aCtrlAction < 0
|| sal::static_int_cast< sal_uInt16 >(aCtrlAction) >= aTableSize )
return NULL;
- return aCtrlSetValueFunctionTable[aCtrlAction];
+ return aCtrlSetValueFunctionTable[aCtrlAction];
}
//------------------------------------------------------------
//
//------------------------------------------------------------
- CTRL_GETVALUE_FUNCTION_T SAL_CALL GetCtrlGetValueFunction(
+ CTRL_GETVALUE_FUNCTION_T SAL_CALL GetCtrlGetValueFunction(
CTRL_GETVALUE_FUNCTION_T* aCtrlGetValueFunctionTable, size_t aTableSize, sal_Int16 aCtrlAction )
- {
+ {
if ( !aCtrlGetValueFunctionTable ||
aCtrlAction < 0 ||
sal::static_int_cast< sal_uInt16 >(aCtrlAction) >= aTableSize )
return NULL;
- return aCtrlGetValueFunctionTable[aCtrlAction];
+ return aCtrlGetValueFunctionTable[aCtrlAction];
}
//------------------------------------------------------------
//
//------------------------------------------------------------
-
+
inline
_ENTRY SAL_CALL GetCtrlClassSetValueFunctionTable( CTRL_CLASS aCtrlClass )
{
@@ -167,7 +167,7 @@ namespace // private
//------------------------------------------------------------
//
//------------------------------------------------------------
-
+
inline
_ENTRY SAL_CALL GetCtrlClassGetValueFunctionTable( CTRL_CLASS aCtrlClass )
{
@@ -187,7 +187,7 @@ namespace // private
};
const int SIZE_WINDOWS_FILEOPEN_CTRL_IDS = SAL_N_ELEMENTS(WindowsFileOpenCtrlIds);
-}; // end namespace
+}; // end namespace
//------------------------------------------------------------
//
@@ -198,9 +198,9 @@ CTRL_SETVALUE_FUNCTION_T SAL_CALL GetCtrlSetValueFunction( CTRL_CLASS aCtrlClass
_ENTRY aEntry =
GetCtrlClassSetValueFunctionTable( aCtrlClass );
- return GetCtrlSetValueFunction(
- reinterpret_cast< CTRL_SETVALUE_FUNCTION_T* >( aEntry.lpFunctionTable ),
- aEntry.TableSize,
+ return GetCtrlSetValueFunction(
+ reinterpret_cast< CTRL_SETVALUE_FUNCTION_T* >( aEntry.lpFunctionTable ),
+ aEntry.TableSize,
aCtrlAction );
}
@@ -213,9 +213,9 @@ CTRL_GETVALUE_FUNCTION_T SAL_CALL GetCtrlGetValueFunction( CTRL_CLASS aCtrlClass
_ENTRY aEntry =
GetCtrlClassGetValueFunctionTable( aCtrlClass );
- return GetCtrlGetValueFunction(
- reinterpret_cast< CTRL_GETVALUE_FUNCTION_T* >( aEntry.lpFunctionTable ),
- aEntry.TableSize,
+ return GetCtrlGetValueFunction(
+ reinterpret_cast< CTRL_GETVALUE_FUNCTION_T* >( aEntry.lpFunctionTable ),
+ aEntry.TableSize,
aCtrlAction );
}
diff --git a/fpicker/source/win32/filepicker/controlaccess.hxx b/fpicker/source/win32/filepicker/controlaccess.hxx
index d62819286b52..5731297eb4ea 100644
--- a/fpicker/source/win32/filepicker/controlaccess.hxx
+++ b/fpicker/source/win32/filepicker/controlaccess.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,7 +53,7 @@
typedef void ( SAL_CALL *CTRL_SETVALUE_FUNCTION_T)( HWND, const ::com::sun::star::uno::Any&, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >&, sal_Int16 );
typedef ::com::sun::star::uno::Any ( SAL_CALL *CTRL_GETVALUE_FUNCTION_T )( HWND );
-// the currently supported control classes
+// the currently supported control classes
enum CTRL_CLASS
{
UNKNOWN = 0,
@@ -62,14 +62,14 @@ enum CTRL_CLASS
PUSHBUTTON
};
-// returns the class of a control
+// returns the class of a control
CTRL_CLASS SAL_CALL GetCtrlClass( HWND hwndCtrl );
-// returns a pointer to a setValue function based on the control class
+// returns a pointer to a setValue function based on the control class
// and the control action, if no function was found NULL will be returned
CTRL_SETVALUE_FUNCTION_T SAL_CALL GetCtrlSetValueFunction( CTRL_CLASS aCtrlClass, sal_Int16 aCtrlAction );
-// returns a pointer to a getValue function based on the control class
+// returns a pointer to a getValue function based on the control class
// and the control action, if no function was found NULL will be returned
CTRL_GETVALUE_FUNCTION_T SAL_CALL GetCtrlGetValueFunction( CTRL_CLASS aCtrlClass, sal_Int16 aCtrlAction );
diff --git a/fpicker/source/win32/filepicker/controlcommand.cxx b/fpicker/source/win32/filepicker/controlcommand.cxx
index 464d7c72df3f..77385fe5fa49 100644
--- a/fpicker/source/win32/filepicker/controlcommand.cxx
+++ b/fpicker/source/win32/filepicker/controlcommand.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -115,8 +115,8 @@ sal_Int16 SAL_CALL CControlCommand::getControlId( ) const
//
//---------------------------------------------
-CValueControlCommand::CValueControlCommand(
- sal_Int16 aControlId,
+CValueControlCommand::CValueControlCommand(
+ sal_Int16 aControlId,
sal_Int16 aControlAction,
const ::com::sun::star::uno::Any& aValue ) :
CControlCommand( aControlId ),
@@ -133,7 +133,7 @@ void SAL_CALL CValueControlCommand::exec( CFilePickerState* aFilePickerState )
{
OSL_ENSURE( aFilePickerState, "empty reference" );
- aFilePickerState->setValue(
+ aFilePickerState->setValue(
getControlId( ),
m_aControlAction,
m_aValue );
@@ -145,14 +145,14 @@ void SAL_CALL CValueControlCommand::exec( CFilePickerState* aFilePickerState )
CControlCommandResult* SAL_CALL CValueControlCommand::handleRequest( CControlCommandRequest* aRequest )
{
- CValueControlCommandRequest* value_request =
+ CValueControlCommandRequest* value_request =
dynamic_cast< CValueControlCommandRequest* >( aRequest );
CControlCommandResult* result;
CControlCommand* nextCommand;
- if ( value_request &&
- (value_request->getControlId( ) == getControlId( )) &&
+ if ( value_request &&
+ (value_request->getControlId( ) == getControlId( )) &&
(value_request->getControlAction( ) == m_aControlAction) )
{
result = new CValueCommandResult( sal_True, m_aValue );
@@ -190,15 +190,15 @@ sal_Int16 SAL_CALL CValueControlCommand::getControlAction( ) const
{
return m_aValue;
}
-
+
//---------------------------------------------
//
//---------------------------------------------
-CLabelControlCommand::CLabelControlCommand(
- sal_Int16 aControlId,
- const rtl::OUString& aLabel ) :
+CLabelControlCommand::CLabelControlCommand(
+ sal_Int16 aControlId,
+ const rtl::OUString& aLabel ) :
CControlCommand( aControlId ),
m_aLabel( aLabel )
{
@@ -226,10 +226,10 @@ CControlCommandResult* SAL_CALL CLabelControlCommand::handleRequest( CControlCom
CControlCommandResult* result;
CControlCommand* nextCommand;
- CValueControlCommandRequest* value_request =
+ CValueControlCommandRequest* value_request =
dynamic_cast< CValueControlCommandRequest* >( aRequest );
- if ( !value_request &&
+ if ( !value_request &&
(aRequest->getControlId( ) == getControlId( )) )
{
result = new CLabelCommandResult( sal_True, m_aLabel );
@@ -263,8 +263,8 @@ rtl::OUString SAL_CALL CLabelControlCommand::getLabel( ) const
//
//---------------------------------------------
-CEnableControlCommand::CEnableControlCommand(
- sal_Int16 aControlId,
+CEnableControlCommand::CEnableControlCommand(
+ sal_Int16 aControlId,
sal_Bool bEnable ) :
CControlCommand( aControlId ),
m_bEnable( bEnable )
diff --git a/fpicker/source/win32/filepicker/controlcommand.hxx b/fpicker/source/win32/filepicker/controlcommand.hxx
index f44050cf8842..362aa78f81fc 100644
--- a/fpicker/source/win32/filepicker/controlcommand.hxx
+++ b/fpicker/source/win32/filepicker/controlcommand.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -57,7 +57,7 @@ public:
virtual void SAL_CALL exec( CFilePickerState* aFilePickerState ) = 0;
- // the client inherits the ownership of the returned
+ // the client inherits the ownership of the returned
// CControlCommandResult and has to delete it or he may
// use the auto_ptr template for automatic deletion
virtual CControlCommandResult* SAL_CALL handleRequest( CControlCommandRequest* aRequest );
@@ -66,7 +66,7 @@ public:
// pointer only temporary because it's not ref-counted
// and the ownerhsip belongs to this instance
CControlCommand* SAL_CALL getNextCommand( ) const;
-
+
// transfers the ownership to this class
void SAL_CALL setNextCommand( CControlCommand* nextCommand );
@@ -85,8 +85,8 @@ private:
class CValueControlCommand : public CControlCommand
{
public:
- CValueControlCommand(
- sal_Int16 aControlId,
+ CValueControlCommand(
+ sal_Int16 aControlId,
sal_Int16 aControlAction,
const ::com::sun::star::uno::Any& aValue );
@@ -97,10 +97,10 @@ public:
sal_Int16 SAL_CALL getControlAction( ) const;
::com::sun::star::uno::Any SAL_CALL getValue( ) const;
-
+
private:
sal_Int16 m_aControlAction;
- ::com::sun::star::uno::Any m_aValue;
+ ::com::sun::star::uno::Any m_aValue;
};
//---------------------------------------------
@@ -110,8 +110,8 @@ private:
class CLabelControlCommand : public CControlCommand
{
public:
- CLabelControlCommand(
- sal_Int16 aControlId,
+ CLabelControlCommand(
+ sal_Int16 aControlId,
const rtl::OUString& aLabel );
virtual void SAL_CALL exec( CFilePickerState* aFilePickerState );
@@ -131,8 +131,8 @@ private:
class CEnableControlCommand : public CControlCommand
{
public:
- CEnableControlCommand(
- sal_Int16 controlId,
+ CEnableControlCommand(
+ sal_Int16 controlId,
sal_Bool bEnable );
virtual void SAL_CALL exec( CFilePickerState* aFilePickerState );
diff --git a/fpicker/source/win32/filepicker/controlcommandrequest.hxx b/fpicker/source/win32/filepicker/controlcommandrequest.hxx
index 53c28c69ebfd..6f7a94704cd9 100644
--- a/fpicker/source/win32/filepicker/controlcommandrequest.hxx
+++ b/fpicker/source/win32/filepicker/controlcommandrequest.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,7 +46,7 @@ public:
m_aControlId( aControlId )
{
}
-
+
virtual ~CControlCommandRequest( )
{
}
@@ -67,8 +67,8 @@ private:
class CValueControlCommandRequest : public CControlCommandRequest
{
public:
- CValueControlCommandRequest(
- sal_Int16 aControlId,
+ CValueControlCommandRequest(
+ sal_Int16 aControlId,
sal_Int16 aControlAction ) :
CControlCommandRequest( aControlId ),
m_aControlAction( aControlAction )
diff --git a/fpicker/source/win32/filepicker/controlcommandresult.hxx b/fpicker/source/win32/filepicker/controlcommandresult.hxx
index 99fc66d5bfe1..ed601218ad26 100644
--- a/fpicker/source/win32/filepicker/controlcommandresult.hxx
+++ b/fpicker/source/win32/filepicker/controlcommandresult.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/win32/filepicker/customcontrol.cxx b/fpicker/source/win32/filepicker/customcontrol.cxx
index c7d78fa8b294..7a5e20793c5b 100644
--- a/fpicker/source/win32/filepicker/customcontrol.cxx
+++ b/fpicker/source/win32/filepicker/customcontrol.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,7 +31,7 @@
#include "customcontrol.hxx"
//-----------------------------------
-//
+//
//-----------------------------------
CCustomControl::~CCustomControl()
@@ -39,7 +39,7 @@ CCustomControl::~CCustomControl()
}
//-----------------------------------
-//
+//
//-----------------------------------
void SAL_CALL CCustomControl::AddControl(CCustomControl*)
@@ -48,7 +48,7 @@ void SAL_CALL CCustomControl::AddControl(CCustomControl*)
}
//-----------------------------------
-//
+//
//-----------------------------------
void SAL_CALL CCustomControl::RemoveControl(CCustomControl*)
@@ -57,7 +57,7 @@ void SAL_CALL CCustomControl::RemoveControl(CCustomControl*)
}
//-----------------------------------
-//
+//
//-----------------------------------
void SAL_CALL CCustomControl::RemoveAllControls()
diff --git a/fpicker/source/win32/filepicker/customcontrol.hxx b/fpicker/source/win32/filepicker/customcontrol.hxx
index ea74c7c4710d..6d961147e6fa 100644
--- a/fpicker/source/win32/filepicker/customcontrol.hxx
+++ b/fpicker/source/win32/filepicker/customcontrol.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +40,7 @@
#endif
//-----------------------------------
-//
+//
//-----------------------------------
class CCustomControl
@@ -50,9 +50,9 @@ public:
// align the control to a reference object/control
virtual void SAL_CALL Align() = 0;
-
+
virtual void SAL_CALL SetFont(HFONT hFont) = 0;
-
+
virtual void SAL_CALL AddControl(CCustomControl* aCustomControl);
virtual void SAL_CALL RemoveControl(CCustomControl* aCustomControl);
virtual void SAL_CALL RemoveAllControls();
diff --git a/fpicker/source/win32/filepicker/customcontrolcontainer.cxx b/fpicker/source/win32/filepicker/customcontrolcontainer.cxx
index 24ea12111990..00bcbddb1479 100644
--- a/fpicker/source/win32/filepicker/customcontrolcontainer.cxx
+++ b/fpicker/source/win32/filepicker/customcontrolcontainer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,20 +48,20 @@ namespace /* private */
{
aCustomControl->Align();
};
-
+
class CSetFontHelper
{
public:
- CSetFontHelper(HFONT hFont) :
+ CSetFontHelper(HFONT hFont) :
m_hFont(hFont)
{
}
-
+
void SAL_CALL operator()(CCustomControl* aCustomControl)
{
aCustomControl->SetFont(m_hFont);
}
-
+
private:
HFONT m_hFont;
};
@@ -95,7 +95,7 @@ void SAL_CALL CCustomControlContainer::Align()
void SAL_CALL CCustomControlContainer::SetFont(HFONT hFont)
{
CSetFontHelper aSetFontHelper(hFont);
-
+
std::for_each(
m_ControlContainer.begin(),
m_ControlContainer.end(),
@@ -105,7 +105,7 @@ void SAL_CALL CCustomControlContainer::SetFont(HFONT hFont)
//-----------------------------------
//
//-----------------------------------
-
+
void SAL_CALL CCustomControlContainer::AddControl(CCustomControl* aCustomControl)
{
m_ControlContainer.push_back(aCustomControl);
@@ -116,12 +116,12 @@ void SAL_CALL CCustomControlContainer::AddControl(CCustomControl* aCustomControl
//-----------------------------------
void SAL_CALL CCustomControlContainer::RemoveControl(CCustomControl* aCustomControl)
-{
+{
ControlContainer_t::iterator iter_end = m_ControlContainer.end();
- ControlContainer_t::iterator iter =
+ ControlContainer_t::iterator iter =
std::find(m_ControlContainer.begin(),iter_end,aCustomControl);
-
+
if (iter != iter_end)
{
delete *iter;
diff --git a/fpicker/source/win32/filepicker/customcontrolcontainer.hxx b/fpicker/source/win32/filepicker/customcontrolcontainer.hxx
index dc63c8cb355f..6dcc9d486de9 100644
--- a/fpicker/source/win32/filepicker/customcontrolcontainer.hxx
+++ b/fpicker/source/win32/filepicker/customcontrolcontainer.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@
// A container for custom controls
// the container is resposible for
// the destruction of the custom
-// controls
+// controls
//-----------------------------------
class CCustomControlContainer : public CCustomControl
@@ -47,7 +47,7 @@ public:
virtual void SAL_CALL Align();
virtual void SAL_CALL SetFont(HFONT hFont);
-
+
virtual void SAL_CALL AddControl(CCustomControl* aCustomControl);
virtual void SAL_CALL RemoveControl(CCustomControl* aCustomControl);
virtual void SAL_CALL RemoveAllControls();
@@ -55,7 +55,7 @@ public:
private:
typedef std::list<CCustomControl*> ControlContainer_t;
- ControlContainer_t m_ControlContainer;
+ ControlContainer_t m_ControlContainer;
};
#endif
diff --git a/fpicker/source/win32/filepicker/customcontrolfactory.cxx b/fpicker/source/win32/filepicker/customcontrolfactory.cxx
index d21afa49a7c9..5332fe4087ad 100644
--- a/fpicker/source/win32/filepicker/customcontrolfactory.cxx
+++ b/fpicker/source/win32/filepicker/customcontrolfactory.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,7 +36,7 @@
#include <osl/diagnose.h>
//-----------------------------------
-//
+//
//-----------------------------------
CCustomControl* CCustomControlFactory::CreateCustomControl(HWND aControlHandle, HWND aParentHandle)
@@ -44,8 +44,8 @@ CCustomControl* CCustomControlFactory::CreateCustomControl(HWND aControlHandle,
OSL_PRECOND(IsWindow(aControlHandle),"Invalid control handle");
OSL_PRECOND(IsWindow(aControlHandle),"Invalid parent handle");
- // get window class
- // if static text create static text control etc.
+ // get window class
+ // if static text create static text control etc.
TCHAR aClsName[256];
ZeroMemory(aClsName,sizeof(aClsName));
@@ -67,18 +67,18 @@ CCustomControl* CCustomControlFactory::CreateCustomControl(HWND aControlHandle,
return new CDummyCustomControl(aControlHandle,aParentHandle);
}
-
+
if (0 == _tcsicmp(aClsName,TEXT("listbox")) || 0 == _tcsicmp(aClsName,TEXT("combobox")))
return new CComboboxCustomControl(aControlHandle,aParentHandle);
if (0 == _tcsicmp(aClsName,TEXT("static")))
return new CStaticCustomControl(aControlHandle,aParentHandle);
-
+
return new CDummyCustomControl(aControlHandle,aParentHandle);
}
//-----------------------------------
-//
+//
//-----------------------------------
CCustomControl* CCustomControlFactory::CreateCustomControlContainer()
diff --git a/fpicker/source/win32/filepicker/customcontrolfactory.hxx b/fpicker/source/win32/filepicker/customcontrolfactory.hxx
index 8222531f72e7..de5961e6fc27 100644
--- a/fpicker/source/win32/filepicker/customcontrolfactory.hxx
+++ b/fpicker/source/win32/filepicker/customcontrolfactory.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,7 +44,7 @@
class CCustomControl;
//-----------------------------------
-//
+//
//-----------------------------------
class CCustomControlFactory
diff --git a/fpicker/source/win32/filepicker/dialogcustomcontrols.cxx b/fpicker/source/win32/filepicker/dialogcustomcontrols.cxx
index 0be7a7e72b93..afe673c77adb 100644
--- a/fpicker/source/win32/filepicker/dialogcustomcontrols.cxx
+++ b/fpicker/source/win32/filepicker/dialogcustomcontrols.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,7 +35,7 @@
#include <osl/diagnose.h>
//-----------------------------------
-//
+//
//-----------------------------------
CDialogCustomControlBase::CDialogCustomControlBase(HWND aControlHandle, HWND aParentHandle) :
@@ -45,7 +45,7 @@ CDialogCustomControlBase::CDialogCustomControlBase(HWND aControlHandle, HWND aPa
}
//-----------------------------------
-//
+//
//-----------------------------------
void SAL_CALL CDialogCustomControlBase::SetFont(HFONT hFont)
@@ -58,7 +58,7 @@ void SAL_CALL CDialogCustomControlBase::SetFont(HFONT hFont)
}
//-----------------------------------
-//
+//
//-----------------------------------
void SAL_CALL CDialogCustomControlBase::AlignToBuddy(HWND aBuddyHandle)
@@ -70,7 +70,7 @@ void SAL_CALL CDialogCustomControlBase::AlignToBuddy(HWND aBuddyHandle)
POINT pt = {rcBuddy.left,rcBuddy.top};
ScreenToClient(m_ParentHandle,&pt);
-
+
int cx_new = rcBuddy.right - rcBuddy.left;
int cy_new = rcBuddy.bottom - rcBuddy.top;
@@ -79,30 +79,30 @@ void SAL_CALL CDialogCustomControlBase::AlignToBuddy(HWND aBuddyHandle)
// this job
RECT rcMe;
GetWindowRect(m_CustomControlHandle,&rcMe);
-
+
POINT ptMe = {rcMe.left,rcMe.top};
ScreenToClient(m_ParentHandle,&ptMe);
SetWindowPos(
m_CustomControlHandle,
- HWND_TOP,
- pt.x,
- ptMe.y,
- cx_new,
- cy_new,
+ HWND_TOP,
+ pt.x,
+ ptMe.y,
+ cx_new,
+ cy_new,
SWP_NOACTIVATE);
}
//-----------------------------------
-//
+//
//-----------------------------------
-CDummyCustomControl::CDummyCustomControl(HWND, HWND)
+CDummyCustomControl::CDummyCustomControl(HWND, HWND)
{
}
//-----------------------------------
-//
+//
//-----------------------------------
void SAL_CALL CDummyCustomControl::Align()
@@ -111,7 +111,7 @@ void SAL_CALL CDummyCustomControl::Align()
}
//-----------------------------------
-//
+//
//-----------------------------------
void SAL_CALL CDummyCustomControl::SetFont(HFONT)
@@ -120,7 +120,7 @@ void SAL_CALL CDummyCustomControl::SetFont(HFONT)
}
//-----------------------------------
-//
+//
//-----------------------------------
CStaticCustomControl::CStaticCustomControl(HWND aControlHandle, HWND aParentHandle) :
@@ -129,17 +129,17 @@ CStaticCustomControl::CStaticCustomControl(HWND aControlHandle, HWND aParentHand
}
//-----------------------------------
-// Align to the "File name" static
+// Align to the "File name" static
// text of the standard FileOpen dlg
//-----------------------------------
void SAL_CALL CStaticCustomControl::Align()
{
- AlignToBuddy(GetDlgItem(m_ParentHandle,stc3));
+ AlignToBuddy(GetDlgItem(m_ParentHandle,stc3));
}
//-----------------------------------
-//
+//
//-----------------------------------
CPushButtonCustomControl::CPushButtonCustomControl(HWND aControlHandle, HWND aParentHandle) :
@@ -148,7 +148,7 @@ CPushButtonCustomControl::CPushButtonCustomControl(HWND aControlHandle, HWND aPa
}
//-----------------------------------
-// Align to the "OK" button of the
+// Align to the "OK" button of the
// standard FileOpen dlg
//-----------------------------------
@@ -158,7 +158,7 @@ void SAL_CALL CPushButtonCustomControl::Align()
}
//-----------------------------------
-//
+//
//-----------------------------------
CComboboxCustomControl::CComboboxCustomControl(HWND aControlHandle, HWND aParentHandle) :
@@ -177,7 +177,7 @@ void SAL_CALL CComboboxCustomControl::Align()
}
//-----------------------------------
-//
+//
//-----------------------------------
CCheckboxCustomControl::CCheckboxCustomControl(HWND aControlHandle, HWND aParentHandle) :
@@ -186,7 +186,7 @@ CCheckboxCustomControl::CCheckboxCustomControl(HWND aControlHandle, HWND aParent
}
//-----------------------------------
-// Align to the "File name" combobox
+// Align to the "File name" combobox
// of the standard FileOpen dlg
//-----------------------------------
diff --git a/fpicker/source/win32/filepicker/dialogcustomcontrols.hxx b/fpicker/source/win32/filepicker/dialogcustomcontrols.hxx
index b7f64dc13ef2..d3b62867c96c 100644
--- a/fpicker/source/win32/filepicker/dialogcustomcontrols.hxx
+++ b/fpicker/source/win32/filepicker/dialogcustomcontrols.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +40,7 @@
#endif
//-----------------------------------
-//
+//
//-----------------------------------
class CDummyCustomControl : public CCustomControl
@@ -53,7 +53,7 @@ public:
};
//-----------------------------------
-//
+//
//-----------------------------------
class CDialogCustomControlBase : public CCustomControl
@@ -62,11 +62,11 @@ protected:
CDialogCustomControlBase(HWND aControlHandle, HWND aParentHandle);
virtual void SAL_CALL SetFont(HFONT hFont);
-
+
// aligns the specific control class to a reference
// buddy
- //
- void SAL_CALL AlignToBuddy(HWND aBuddyHandle);
+ //
+ void SAL_CALL AlignToBuddy(HWND aBuddyHandle);
protected:
HWND m_CustomControlHandle;
@@ -74,7 +74,7 @@ protected:
};
//-----------------------------------
-//
+//
//-----------------------------------
class CStaticCustomControl : public CDialogCustomControlBase
@@ -82,11 +82,11 @@ class CStaticCustomControl : public CDialogCustomControlBase
public:
CStaticCustomControl(HWND aControlHandle, HWND aParentHandle);
- virtual void SAL_CALL Align();
+ virtual void SAL_CALL Align();
};
//-----------------------------------
-//
+//
//-----------------------------------
class CPushButtonCustomControl : public CDialogCustomControlBase
@@ -94,11 +94,11 @@ class CPushButtonCustomControl : public CDialogCustomControlBase
public:
CPushButtonCustomControl(HWND aControlHandle, HWND aParentHandle);
- virtual void SAL_CALL Align();
+ virtual void SAL_CALL Align();
};
//-----------------------------------
-//
+//
//-----------------------------------
class CComboboxCustomControl : public CDialogCustomControlBase
@@ -106,11 +106,11 @@ class CComboboxCustomControl : public CDialogCustomControlBase
public:
CComboboxCustomControl(HWND aControlHandle, HWND aParentHandle);
- virtual void SAL_CALL Align();
+ virtual void SAL_CALL Align();
};
//-----------------------------------
-//
+//
//-----------------------------------
class CCheckboxCustomControl : public CDialogCustomControlBase
@@ -118,7 +118,7 @@ class CCheckboxCustomControl : public CDialogCustomControlBase
public:
CCheckboxCustomControl(HWND aControlHandle, HWND aParentHandle);
- virtual void SAL_CALL Align();
+ virtual void SAL_CALL Align();
};
#endif
diff --git a/fpicker/source/win32/filepicker/dibpreview.cxx b/fpicker/source/win32/filepicker/dibpreview.cxx
index 2ba23b0fa38f..ede628d2b673 100644
--- a/fpicker/source/win32/filepicker/dibpreview.cxx
+++ b/fpicker/source/win32/filepicker/dibpreview.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -277,7 +277,7 @@ void SAL_CALL CDIBPreview::onPaint(HWND hWnd, HDC hDC)
hDC, nX, nY, cxDib, cyDib,
0, 0, cxDib, cyDib, pBits, pbmi,
DIB_RGB_COLORS, SRCCOPY);
-
+
OSL_ASSERT(GDI_ERROR != GDIError);
// paint the border
@@ -286,15 +286,15 @@ void SAL_CALL CDIBPreview::onPaint(HWND hWnd, HDC hDC)
if (nY > 0)
{
// top
- rc.left = 0;
- rc.top = 0;
+ rc.left = 0;
+ rc.top = 0;
rc.right = nWidth;
rc.bottom = nY;
FillRect(hDC,&rc,(HBRUSH)(COLOR_INACTIVEBORDER + 1));
// bottom
- rc.left = 0;
- rc.top = nHeight - nY - 1;
+ rc.left = 0;
+ rc.top = nHeight - nY - 1;
rc.right = nWidth;
rc.bottom = nHeight;
FillRect(hDC,&rc,(HBRUSH)(COLOR_INACTIVEBORDER + 1));
@@ -303,15 +303,15 @@ void SAL_CALL CDIBPreview::onPaint(HWND hWnd, HDC hDC)
if (nX > 0)
{
// left
- rc.left = 0;
- rc.top = nY;
+ rc.left = 0;
+ rc.top = nY;
rc.right = nX;
rc.bottom = nHeight - nY;
FillRect(hDC,&rc,(HBRUSH)(COLOR_INACTIVEBORDER + 1));
// right
- rc.left = nWidth - nX - 1;
- rc.top = nY;
+ rc.left = nWidth - nX - 1;
+ rc.top = nY;
rc.right = nWidth;
rc.bottom = nHeight - nY;
FillRect(hDC,&rc,(HBRUSH)(COLOR_INACTIVEBORDER + 1));
@@ -413,7 +413,7 @@ ATOM SAL_CALL CDIBPreview::RegisterDibPreviewWindowClass()
ZeroMemory(&wndClsEx, sizeof(wndClsEx));
wndClsEx.cbSize = sizeof(wndClsEx);
- wndClsEx.style = CS_HREDRAW | CS_VREDRAW;
+ wndClsEx.style = CS_HREDRAW | CS_VREDRAW;
wndClsEx.lpfnWndProc = CDIBPreview::WndProc;
wndClsEx.hInstance = m_Instance;
wndClsEx.hbrBackground = (HBRUSH)(COLOR_INACTIVEBORDER + 1);
@@ -421,9 +421,9 @@ ATOM SAL_CALL CDIBPreview::RegisterDibPreviewWindowClass()
// register the preview window class
// !!! Win95 - the window class will be unregistered automaticly
- // if the dll is unloaded
+ // if the dll is unloaded
// Win2000 - the window class must be unregistered manually
- // if the dll is unloaded
+ // if the dll is unloaded
s_ClassAtom = RegisterClassEx(&wndClsEx);
OSL_POSTCOND(s_ClassAtom,"Could not register preview window class");
diff --git a/fpicker/source/win32/filepicker/dibpreview.hxx b/fpicker/source/win32/filepicker/dibpreview.hxx
index 2269fce065c7..0cf568b66eb6 100644
--- a/fpicker/source/win32/filepicker/dibpreview.hxx
+++ b/fpicker/source/win32/filepicker/dibpreview.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -57,7 +57,7 @@
class CDIBPreview : public PreviewBase
{
public:
-
+
// ctor
CDIBPreview(HINSTANCE instance,HWND parent,sal_Bool bShowWindow = sal_False);
@@ -66,23 +66,23 @@ public:
// preview interface implementation
- virtual sal_Int32 SAL_CALL getTargetColorDepth()
+ virtual sal_Int32 SAL_CALL getTargetColorDepth()
throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getAvailableWidth()
+ virtual sal_Int32 SAL_CALL getAvailableWidth()
throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getAvailableHeight()
+ virtual sal_Int32 SAL_CALL getAvailableHeight()
throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setImage(sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage)
+ virtual void SAL_CALL setImage(sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage)
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL setShowState(sal_Bool bShowState)
throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL getShowState()
- throw (::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::uno::RuntimeException);
virtual HWND SAL_CALL getWindowHandle() const;
@@ -93,12 +93,12 @@ private:
void SAL_CALL UnregisterDibPreviewWindowClass( );
static LRESULT CALLBACK WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
-
-private:
+
+private:
HINSTANCE m_Instance;
- HWND m_Hwnd;
+ HWND m_Hwnd;
com::sun::star::uno::Sequence<sal_Int8> m_Image;
- osl::Mutex m_PaintLock;
+ osl::Mutex m_PaintLock;
// the preview window class has to be registered only
// once per process, so multiple instance of this class
@@ -106,7 +106,7 @@ private:
static ATOM s_ClassAtom;
static osl::Mutex s_Mutex;
static sal_Int32 s_RegisterDibPreviewWndCount;
-
+
// prevent copy and assignment
private:
CDIBPreview(const CDIBPreview&);
diff --git a/fpicker/source/win32/filepicker/eventnotification.hxx b/fpicker/source/win32/filepicker/eventnotification.hxx
index 3866ca59946f..f0cefd679465 100644
--- a/fpicker/source/win32/filepicker/eventnotification.hxx
+++ b/fpicker/source/win32/filepicker/eventnotification.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@
// notification, because there are
// two types of filepicker notifications
// with and without parameter
-// this is an application of the
+// this is an application of the
// "command" pattern see GoF
//-----------------------------------
diff --git a/fpicker/source/win32/filepicker/filepickereventnotification.cxx b/fpicker/source/win32/filepicker/filepickereventnotification.cxx
index 13001fdcd81a..e79bc9b2f958 100644
--- a/fpicker/source/win32/filepicker/filepickereventnotification.cxx
+++ b/fpicker/source/win32/filepicker/filepickereventnotification.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,11 +39,11 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::ui::dialogs;
//-----------------------------------
-// A FilePicker event without
+// A FilePicker event without
// parameter
//-----------------------------------
-CFilePickerEventNotification::CFilePickerEventNotification(EventListenerMethod_t EventListenerMethod) :
+CFilePickerEventNotification::CFilePickerEventNotification(EventListenerMethod_t EventListenerMethod) :
m_EventListenerMethod(EventListenerMethod)
{
}
diff --git a/fpicker/source/win32/filepicker/filepickereventnotification.hxx b/fpicker/source/win32/filepicker/filepickereventnotification.hxx
index 4a64c0ffcf80..d2230455c00d 100644
--- a/fpicker/source/win32/filepicker/filepickereventnotification.hxx
+++ b/fpicker/source/win32/filepicker/filepickereventnotification.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,7 +34,7 @@
#include <com/sun/star/ui/dialogs/FilePickerEvent.hpp>
//-----------------------------------
-// A FilePicker event without
+// A FilePicker event without
// parameter
//-----------------------------------
@@ -66,7 +66,7 @@ public:
virtual void SAL_CALL notifyEventListener( com::sun::star::uno::Reference< com::sun::star::uno::XInterface > xListener );
private:
- EventListenerMethod_t m_EventListenerMethod;
+ EventListenerMethod_t m_EventListenerMethod;
com::sun::star::ui::dialogs::FilePickerEvent m_FilePickerEvent;
};
diff --git a/fpicker/source/win32/filepicker/filepickerstate.cxx b/fpicker/source/win32/filepicker/filepickerstate.cxx
index dedc63b3458a..1ec72dcec0ef 100644
--- a/fpicker/source/win32/filepicker/filepickerstate.cxx
+++ b/fpicker/source/win32/filepicker/filepickerstate.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -101,7 +101,7 @@ CNonExecuteFilePickerState::~CNonExecuteFilePickerState( )
void SAL_CALL CNonExecuteFilePickerState::setValue( sal_Int16 aControlId, sal_Int16 aControlAction, const Any& aValue )
{
- CValueControlCommand* value_command = new CValueControlCommand(
+ CValueControlCommand* value_command = new CValueControlCommand(
aControlId, aControlAction, aValue );
addControlCommand( value_command );
@@ -113,8 +113,8 @@ void SAL_CALL CNonExecuteFilePickerState::setValue( sal_Int16 aControlId, sal_In
Any SAL_CALL CNonExecuteFilePickerState::getValue( sal_Int16 aControlId, sal_Int16 aControlAction )
{
- CValueControlCommandRequest value_request( aControlId, aControlAction );
- Any aAny;
+ CValueControlCommandRequest value_request( aControlId, aControlAction );
+ Any aAny;
if (m_FirstControlCommand)
{
@@ -127,9 +127,9 @@ Any SAL_CALL CNonExecuteFilePickerState::getValue( sal_Int16 aControlId, sal_Int
{
// #101753 must remove assertion else running into deadlock
// because getValue may be called asynchronously from main thread
- // with locked SOLAR_MUTEX but we also need SOLAR_MUTEX in
+ // with locked SOLAR_MUTEX but we also need SOLAR_MUTEX in
// WinFileOpenDialog::onInitDone ... but we cannot dismiss the
- // assertion dialog because at this point the FileOpen Dialog
+ // assertion dialog because at this point the FileOpen Dialog
// has aleady the focus but is not yet visible :-(
// The real cure is to remove the VCL/SOLAR_MUTEX dependency
// cause by the use of our resource manager and not being able to
@@ -153,10 +153,10 @@ Any SAL_CALL CNonExecuteFilePickerState::getValue( sal_Int16 aControlId, sal_Int
//---------------------------------------------
//
//---------------------------------------------
-
+
void SAL_CALL CNonExecuteFilePickerState::enableControl( sal_Int16 aControlId, sal_Bool bEnable )
{
- CEnableControlCommand* enable_command = new CEnableControlCommand(
+ CEnableControlCommand* enable_command = new CEnableControlCommand(
aControlId, bEnable );
addControlCommand( enable_command );
@@ -200,7 +200,7 @@ OUString SAL_CALL CNonExecuteFilePickerState::getLabel( sal_Int16 aControlId )
return aLabel;
}
-/* #i26224#
+/* #i26224#
When typing file names with drive letter but without '\'
in the "File name" box of the FileOpen dialog the FileOpen
dialog makes strange paths out of them e.g. "d:.\test.sxw".
@@ -209,22 +209,22 @@ OUString SAL_CALL CNonExecuteFilePickerState::getLabel( sal_Int16 aControlId )
OUString MatchFixBrokenPath(const OUString& path)
{
OSL_ASSERT(path.getLength() >= 4);
-
+
if (path[1] == ':' && path[2] == '.' && path[3] == '\\')
{
// skip the '.'
- return OUString(path, 2) + path.copy(3, path.getLength() - 3);
- }
- return path;
+ return OUString(path, 2) + path.copy(3, path.getLength() - 3);
+ }
+ return path;
}
//-----------------------------------------------------------------------------------------
-//
+//
//-----------------------------------------------------------------------------------------
static ::rtl::OUString trimTrailingSpaces(const ::rtl::OUString& rString)
{
rtl::OUString aResult(rString);
-
+
sal_Int32 nIndex = rString.lastIndexOf(' ');
if (nIndex == rString.getLength()-1)
{
@@ -237,7 +237,7 @@ static ::rtl::OUString trimTrailingSpaces(const ::rtl::OUString& rString)
}
return aResult;
}
-
+
Sequence< OUString > SAL_CALL CNonExecuteFilePickerState::getFiles( CFileOpenDialog* aFileOpenDialog )
{
OSL_PRECOND( aFileOpenDialog, "invalid parameter" );
@@ -253,33 +253,33 @@ Sequence< OUString > SAL_CALL CNonExecuteFilePickerState::getFiles( CFileOpenDia
{
// tokenize the returned string and copy the
// sub-strings separately into a sequence
- const sal_Unicode* pTemp = aFilePath.getStr();
+ const sal_Unicode* pTemp = aFilePath.getStr();
const sal_Unicode* pStrEnd = pTemp + aFilePath.getLength();
- sal_uInt32 lSubStr;
+ sal_uInt32 lSubStr;
while (pTemp < pStrEnd)
{
- // detect the length of the next sub string
+ // detect the length of the next sub string
lSubStr = rtl_ustr_getLength(pTemp);
-
+
aFilePathList.realloc(aFilePathList.getLength() + 1);
-
- aFilePathList[aFilePathList.getLength() - 1] =
+
+ aFilePathList[aFilePathList.getLength() - 1] =
MatchFixBrokenPath(OUString(pTemp, lSubStr));
pTemp += (lSubStr + 1);
}
- // change all entries to file URLs
+ // change all entries to file URLs
sal_Int32 lenFileList = aFilePathList.getLength( );
OSL_ASSERT( lenFileList >= 1 );
for ( sal_Int32 i = 0; i < lenFileList; i++ )
- {
+ {
aFilePath = trimTrailingSpaces(aFilePathList[i]);
- rc = ::osl::FileBase::getFileURLFromSystemPath(
+ rc = ::osl::FileBase::getFileURLFromSystemPath(
aFilePath, aFilePathURL );
-
+
// we do return all or nothing, that means
// in case of failures we destroy the sequence
// and return an empty sequence
@@ -308,10 +308,10 @@ OUString SAL_CALL CNonExecuteFilePickerState::getDisplayDirectory( CFileOpenDial
OUString displayDir;
displayDir = aFileOpenDialog->getLastDisplayDirectory( );
-
+
if ( displayDir.getLength( ) )
::osl::FileBase::getFileURLFromSystemPath( displayDir, pathURL );
-
+
return pathURL;
}
@@ -323,7 +323,7 @@ void SAL_CALL CNonExecuteFilePickerState::reset( )
{
CControlCommand* nextCommand;
CControlCommand* currentCommand = m_FirstControlCommand;
-
+
while( currentCommand )
{
nextCommand = currentCommand->getNextCommand( );
@@ -376,7 +376,7 @@ void SAL_CALL CNonExecuteFilePickerState::addControlCommand( CControlCommand* aC
CExecuteFilePickerState::CExecuteFilePickerState( HWND hwndDlg ) :
m_hwndDlg( hwndDlg )
-{
+{
}
//---------------------------------------------
@@ -388,13 +388,13 @@ void SAL_CALL CExecuteFilePickerState::setValue( sal_Int16 aControlId, sal_Int16
// we do not support SET_HELP_URL/GET_HELP_URL
if ( com::sun::star::ui::dialogs::ControlActions::SET_HELP_URL == aControlAction )
return;
-
+
HWND hwndCtrl = GetHwndDlgItem( aControlId );
- // the filter listbox can be manipulated via this
+ // the filter listbox can be manipulated via this
// method the caller should use XFilterManager
if ( !hwndCtrl || (aControlId == LISTBOX_FILTER) )
- {
+ {
OSL_ENSURE( sal_False, "invalid control id" );
return;
}
@@ -411,11 +411,11 @@ void SAL_CALL CExecuteFilePickerState::setValue( sal_Int16 aControlId, sal_Int16
if ( !lpfnSetValue )
{
- OSL_ENSURE( sal_False, "unsupported control action" );
+ OSL_ENSURE( sal_False, "unsupported control action" );
return;
}
- // the function that we call should throw an IllegalArgumentException if
+ // the function that we call should throw an IllegalArgumentException if
// the given value is invalid or empty, that's why we provide a Reference
// to an XInterface and a argument position
lpfnSetValue( hwndCtrl, aValue, Reference< XInterface >( ), 3 );
@@ -433,7 +433,7 @@ Any SAL_CALL CExecuteFilePickerState::getValue( sal_Int16 aControlId, sal_Int16
HWND hwndCtrl = GetHwndDlgItem( aControlId );
- // the filter listbox can be manipulated via this
+ // the filter listbox can be manipulated via this
// method the caller should use XFilterManager
if ( !hwndCtrl || (aControlId == LISTBOX_FILTER) )
{
@@ -463,13 +463,13 @@ Any SAL_CALL CExecuteFilePickerState::getValue( sal_Int16 aControlId, sal_Int16
//---------------------------------------------
//
//---------------------------------------------
-
+
void SAL_CALL CExecuteFilePickerState::enableControl( sal_Int16 aControlId, sal_Bool bEnable )
{
HWND hwndCtrl = GetHwndDlgItem( aControlId );
OSL_ENSURE( IsWindow( hwndCtrl ), "invalid element id");
-
+
EnableWindow( hwndCtrl, bEnable );
}
@@ -480,9 +480,9 @@ void SAL_CALL CExecuteFilePickerState::enableControl( sal_Int16 aControlId, sal_
void SAL_CALL CExecuteFilePickerState::setLabel( sal_Int16 aControlId, const OUString& aLabel )
{
HWND hwndCtrl = GetHwndDlgItem( aControlId );
-
+
OSL_ENSURE( IsWindow( hwndCtrl ), "invalid element id");
-
+
if ( IsListboxControl( hwndCtrl ) )
hwndCtrl = GetListboxLabelItem( aControlId );
@@ -500,15 +500,15 @@ void SAL_CALL CExecuteFilePickerState::setLabel( sal_Int16 aControlId, const OUS
OUString SAL_CALL CExecuteFilePickerState::getLabel( sal_Int16 aControlId )
{
HWND hwndCtrl = GetHwndDlgItem( aControlId );
-
+
OSL_ENSURE( IsWindow( hwndCtrl ), "invalid element id");
-
+
if ( IsListboxControl( hwndCtrl ) )
hwndCtrl = GetListboxLabelItem( aControlId );
sal_Unicode aLabel[MAX_LABEL];
int nRet = GetWindowText( hwndCtrl, reinterpret_cast<LPTSTR>(aLabel), MAX_LABEL );
-
+
OUString ctrlLabel;
if ( nRet )
{
@@ -534,24 +534,24 @@ Sequence< OUString > SAL_CALL CExecuteFilePickerState::getFiles( CFileOpenDialog
// in execution mode getFullFileName doesn't
// return anything, so we must use another way
-
- // returns the currently selected file(s)
+
+ // returns the currently selected file(s)
// including path information
- aFilePath = aFileOpenDialog->getCurrentFilePath( );
+ aFilePath = aFileOpenDialog->getCurrentFilePath( );
// if multiple files are selected or the user
// typed anything that doesn't seem to be a valid
// file name getFileURLFromSystemPath fails
// and we return an empty file list
- rc = ::osl::FileBase::getFileURLFromSystemPath(
+ rc = ::osl::FileBase::getFileURLFromSystemPath(
aFilePath, aFilePathURL );
if ( ::osl::FileBase::E_None == rc )
{
aFilePathList.realloc( 1 );
aFilePathList[0] = aFilePathURL;
- }
-
+ }
+
return aFilePathList;
}
@@ -570,7 +570,7 @@ OUString SAL_CALL CExecuteFilePickerState::getDisplayDirectory( CFileOpenDialog*
if ( displayDir.getLength( ) )
::osl::FileBase::getFileURLFromSystemPath( displayDir, pathURL );
-
+
return pathURL;
}
@@ -597,24 +597,24 @@ void SAL_CALL CExecuteFilePickerState::cacheControlState( HWND hwndControl, CFil
{
OSL_ENSURE( hwndControl && aNonExecFilePickerState, "invalid parameters" );
- CTRL_CLASS aCtrlClass = GetCtrlClass( hwndControl );
-
+ CTRL_CLASS aCtrlClass = GetCtrlClass( hwndControl );
+
sal_Int16 aControlAction;
CTRL_GETVALUE_FUNCTION_T lpfnGetValue;
if ( CHECKBOX == aCtrlClass )
- {
+ {
aControlAction = 0;
-
+
lpfnGetValue = GetCtrlGetValueFunction( aCtrlClass, aControlAction );
OSL_ASSERT( lpfnGetValue );
- aNonExecFilePickerState->setValue(
+ aNonExecFilePickerState->setValue(
sal::static_int_cast< sal_Int16 >( GetDlgCtrlID( hwndControl ) ),
aControlAction,
- lpfnGetValue( hwndControl ) );
-
+ lpfnGetValue( hwndControl ) );
+
aNonExecFilePickerState->setLabel(
sal::static_int_cast< sal_Int16 >( GetDlgCtrlID( hwndControl ) ),
getLabel(
@@ -624,27 +624,27 @@ void SAL_CALL CExecuteFilePickerState::cacheControlState( HWND hwndControl, CFil
else if ( LISTBOX == aCtrlClass )
{
// for listboxes we save only the
- // last selected item and the last
+ // last selected item and the last
// selected item index
aControlAction = GET_SELECTED_ITEM;
-
+
lpfnGetValue = GetCtrlGetValueFunction( aCtrlClass, aControlAction );
- aNonExecFilePickerState->setValue(
+ aNonExecFilePickerState->setValue(
sal::static_int_cast< sal_Int16 >( GetDlgCtrlID( hwndControl ) ),
aControlAction,
lpfnGetValue( hwndControl ) );
aControlAction = ::com::sun::star::ui::dialogs::ControlActions::GET_SELECTED_ITEM_INDEX;
-
+
lpfnGetValue = GetCtrlGetValueFunction( aCtrlClass, aControlAction );
- aNonExecFilePickerState->setValue(
+ aNonExecFilePickerState->setValue(
sal::static_int_cast< sal_Int16 >( GetDlgCtrlID( hwndControl ) ),
aControlAction,
lpfnGetValue( hwndControl ) );
- }
+ }
}
//---------------------------------------------
@@ -664,7 +664,7 @@ inline sal_Bool SAL_CALL CExecuteFilePickerState::IsListboxControl( HWND hwndCon
{
OSL_PRECOND( IsWindow( hwndControl ), "invalid parameter" );
- CTRL_CLASS aCtrlClass = GetCtrlClass( hwndControl );
+ CTRL_CLASS aCtrlClass = GetCtrlClass( hwndControl );
return ( LISTBOX == aCtrlClass );
}
@@ -705,7 +705,7 @@ HWND SAL_CALL CExecuteFilePickerState::GetHwndDlgItem( sal_Int16 aControlId, sal
HWND hwndCtrl = GetDlgItem( m_hwndDlg, aControlId );
- // maybe it's a control of the dialog itself for instance
+ // maybe it's a control of the dialog itself for instance
// the ok and cancel button
if ( !hwndCtrl && bIncludeStdCtrls )
{
diff --git a/fpicker/source/win32/filepicker/filepickerstate.hxx b/fpicker/source/win32/filepicker/filepickerstate.hxx
index 1255e9325619..956082e4acbf 100644
--- a/fpicker/source/win32/filepicker/filepickerstate.hxx
+++ b/fpicker/source/win32/filepicker/filepickerstate.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -66,7 +66,7 @@ public:
virtual void SAL_CALL setValue( sal_Int16 aControlId, sal_Int16 aControlAction, const ::com::sun::star::uno::Any& aValue ) = 0;
virtual ::com::sun::star::uno::Any SAL_CALL getValue( sal_Int16 aControlId, sal_Int16 aControlAction ) = 0;
-
+
virtual void SAL_CALL enableControl( sal_Int16 aControlId, sal_Bool bEnable ) = 0;
virtual void SAL_CALL setLabel( sal_Int16 aControlId, const ::rtl::OUString& aLabel ) = 0;
@@ -92,7 +92,7 @@ public:
virtual void SAL_CALL setValue( sal_Int16 aControlId, sal_Int16 aControlAction, const ::com::sun::star::uno::Any& aValue );
virtual ::com::sun::star::uno::Any SAL_CALL getValue( sal_Int16 aControlId, sal_Int16 aControlAction );
-
+
virtual void SAL_CALL enableControl( sal_Int16 aControlId, sal_Bool bEnable );
virtual void SAL_CALL setLabel( sal_Int16 aControlId, const ::rtl::OUString& aLabel );
@@ -126,7 +126,7 @@ public:
virtual void SAL_CALL setValue( sal_Int16 aControlId, sal_Int16 aControlAction, const ::com::sun::star::uno::Any& aValue );
virtual ::com::sun::star::uno::Any SAL_CALL getValue( sal_Int16 aControlId, sal_Int16 aControlAction );
-
+
virtual void SAL_CALL enableControl( sal_Int16 aControlId, sal_Bool bEnable );
virtual void SAL_CALL setLabel( sal_Int16 aControlId, const ::rtl::OUString& aLabel );
@@ -146,12 +146,12 @@ public:
private:
inline sal_Bool SAL_CALL IsListboxControl( HWND hwndControl ) const;
-
+
inline sal_Int16 SAL_CALL ListboxIdToListboxLabelId( sal_Int16 aListboxId ) const;
inline HWND SAL_CALL GetListboxLabelItem( sal_Int16 aControlId ) const;
- // returns a hwnd for a control if successful
+ // returns a hwnd for a control if successful
// if bIncludeStdCtrls is false, the standard file dialog
// controls like OK button, etc. will not be considered
// the function return 0 on failure
diff --git a/fpicker/source/win32/filepicker/fps.xml b/fpicker/source/win32/filepicker/fps.xml
index 93530780956b..445faaafdbd3 100644
--- a/fpicker/source/win32/filepicker/fps.xml
+++ b/fpicker/source/win32/filepicker/fps.xml
@@ -4,48 +4,48 @@
<module-name>fps</module-name>
<component-description>
<author> Tino Rachui </author>
- <name> com.sun.star.comp.ui.dialogs.FilePicker </name>
+ <name> com.sun.star.comp.ui.dialogs.FilePicker </name>
<description>
The win32 implementation of the FilePicker service.
</description>
<loader-name>com.sun.star.loader.SharedLibrary</loader-name>
- <language> c++ </language>
+ <language> c++ </language>
<status value="beta"/>
- <supported-service> com.sun.star.ui.dialogs.FilePicker </supported-service>
+ <supported-service> com.sun.star.ui.dialogs.FilePicker </supported-service>
<service-dependency>...</service-dependency>
- <type> com.sun.star.ui.dialogs.XExecutableDialog </type>
- <type> com.sun.star.ui.dialogs.XFilePicker </type>
- <type> com.sun.star.ui.dialogs.XFilterManager </type>
- <type> com.sun.star.ui.dialogs.XFilterGroupManager </type>
- <type> com.sun.star.ui.dialogs.XFilePickerListener </type>
- <type> com.sun.star.ui.dialogs.ExecutableDialogException </type>
- <type> com.sun.star.ui.dialogs.XFilePickerNotifier </type>
- <type> com.sun.star.ui.dialogs.XFilePickerControlAccess </type>
+ <type> com.sun.star.ui.dialogs.XExecutableDialog </type>
+ <type> com.sun.star.ui.dialogs.XFilePicker </type>
+ <type> com.sun.star.ui.dialogs.XFilterManager </type>
+ <type> com.sun.star.ui.dialogs.XFilterGroupManager </type>
+ <type> com.sun.star.ui.dialogs.XFilePickerListener </type>
+ <type> com.sun.star.ui.dialogs.ExecutableDialogException </type>
+ <type> com.sun.star.ui.dialogs.XFilePickerNotifier </type>
+ <type> com.sun.star.ui.dialogs.XFilePickerControlAccess </type>
<type> com.sun.star.ui.dialogs.XFilePreview </type>
<type> com.sun.star.ui.dialogs.ExtendedFilePickerElementIds </type>
- <type> com.sun.star.ui.dialogs.ExecutableDialogResults </type>
- <type> com.sun.star.ui.dialogs.FilePickerEvent </type>
+ <type> com.sun.star.ui.dialogs.ExecutableDialogResults </type>
+ <type> com.sun.star.ui.dialogs.FilePickerEvent </type>
<type> com.sun.star.ui.dialogs.CommonFilePickerElementIds </type>
<type> com.sun.star.ui.dialogs.ListboxControlActions </type>
- <type> com.sun.star.ui.dialogs.TemplateDescription </type>
- <type> com.sun.star.ui.dialogs.FilePreviewImageFormats </type>
- <type> com.sun.star.util.XCancellable </type>
- <type> com.sun.star.lang.XComponent </type>
- <type> com.sun.star.lang.XMultiServiceFactory </type>
- <type> com.sun.star.lang.XSingleServiceFactory </type>
- <type> com.sun.star.lang.XServiceInfo </type>
- <type> com.sun.star.lang.XTypeProvider </type>
- <type> com.sun.star.lang.IllegalArgumentException </type>
- <type> com.sun.star.uno.TypeClass </type>
- <type> com.sun.star.uno.XWeak </type>
- <type> com.sun.star.uno.XAggregation </type>
- <type> com.sun.star.registry.XRegistryKey </type>
- <type> com.sun.star.container.XSet </type>
+ <type> com.sun.star.ui.dialogs.TemplateDescription </type>
+ <type> com.sun.star.ui.dialogs.FilePreviewImageFormats </type>
+ <type> com.sun.star.util.XCancellable </type>
+ <type> com.sun.star.lang.XComponent </type>
+ <type> com.sun.star.lang.XMultiServiceFactory </type>
+ <type> com.sun.star.lang.XSingleServiceFactory </type>
+ <type> com.sun.star.lang.XServiceInfo </type>
+ <type> com.sun.star.lang.XTypeProvider </type>
+ <type> com.sun.star.lang.IllegalArgumentException </type>
+ <type> com.sun.star.uno.TypeClass </type>
+ <type> com.sun.star.uno.XWeak </type>
+ <type> com.sun.star.uno.XAggregation </type>
+ <type> com.sun.star.registry.XRegistryKey </type>
+ <type> com.sun.star.container.XSet </type>
</component-description>
- <project-build-dependency> cppuhelper </project-build-dependency>
- <project-build-dependency> cppu </project-build-dependency>
- <project-build-dependency> sal </project-build-dependency>
- <runtime-module-dependency> cppuhelper </runtime-module-dependency>
- <runtime-module-dependency> cppu2 </runtime-module-dependency>
- <runtime-module-dependency> sal2 </runtime-module-dependency>
+ <project-build-dependency> cppuhelper </project-build-dependency>
+ <project-build-dependency> cppu </project-build-dependency>
+ <project-build-dependency> sal </project-build-dependency>
+ <runtime-module-dependency> cppuhelper </runtime-module-dependency>
+ <runtime-module-dependency> cppu2 </runtime-module-dependency>
+ <runtime-module-dependency> sal2 </runtime-module-dependency>
</module-description>
diff --git a/fpicker/source/win32/filepicker/getfilenamewrapper.cxx b/fpicker/source/win32/filepicker/getfilenamewrapper.cxx
index 107112a1b1b7..70977b627252 100644
--- a/fpicker/source/win32/filepicker/getfilenamewrapper.cxx
+++ b/fpicker/source/win32/filepicker/getfilenamewrapper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,7 +58,7 @@ namespace /* private */
BOOL m_bValid;
wchar_t* m_pBuffer;
DWORD m_nBufLen;
-
+
public:
CurDirGuard()
: m_bValid( FALSE )
@@ -135,7 +135,7 @@ namespace /* private */
//-----------------------------------------------
struct GetFileNameParam
- {
+ {
GetFileNameParam(bool bOpen, LPOPENFILENAME lpofn) :
m_bOpen(bOpen),
m_lpofn(lpofn),
@@ -143,10 +143,10 @@ namespace /* private */
m_ExtErr(0)
{}
- bool m_bOpen;
+ bool m_bOpen;
LPOPENFILENAME m_lpofn;
- bool m_bRet;
- int m_ExtErr;
+ bool m_bRet;
+ int m_ExtErr;
};
//-----------------------------------------------
@@ -157,10 +157,10 @@ namespace /* private */
{
CurDirGuard aGuard;
- GetFileNameParam* lpgfnp =
+ GetFileNameParam* lpgfnp =
reinterpret_cast<GetFileNameParam*>(pParam);
- HRESULT hr = OleInitialize( NULL );
+ HRESULT hr = OleInitialize( NULL );
if (lpgfnp->m_bOpen)
lpgfnp->m_bRet = GetOpenFileName(lpgfnp->m_lpofn);
@@ -176,30 +176,30 @@ namespace /* private */
}
//-----------------------------------------------
- // exceutes GetOpenFileName/GetSaveFileName in
+ // exceutes GetOpenFileName/GetSaveFileName in
// a separat thread
//-----------------------------------------------
bool ThreadExecGetFileName(LPOPENFILENAME lpofn, bool bOpen, /*out*/ int& ExtErr)
{
- GetFileNameParam gfnp(bOpen,lpofn);
- unsigned id;
+ GetFileNameParam gfnp(bOpen,lpofn);
+ unsigned id;
HANDLE hThread = reinterpret_cast<HANDLE>(
_beginthreadex(0, 0, ThreadProc, &gfnp, 0, &id));
-
+
OSL_POSTCOND(hThread, "could not create STA thread");
WaitForSingleObject(hThread, INFINITE);
- CloseHandle(hThread);
-
+ CloseHandle(hThread);
+
ExtErr = gfnp.m_ExtErr;
return gfnp.m_bRet;
}
//-----------------------------------------------
- // This function returns true if the calling
+ // This function returns true if the calling
// thread belongs to a Multithreaded Appartment
// (MTA)
//-----------------------------------------------
@@ -207,10 +207,10 @@ namespace /* private */
bool IsMTA()
{
HRESULT hr = CoInitialize(NULL);
-
+
if (RPC_E_CHANGED_MODE == hr)
return true;
-
+
if(SUCCEEDED(hr))
CoUninitialize();
@@ -234,7 +234,7 @@ CGetFileNameWrapper::CGetFileNameWrapper() :
//-----------------------------------------------
bool CGetFileNameWrapper::getOpenFileName(LPOPENFILENAME lpofn)
-{
+{
OSL_PRECOND(lpofn,"invalid parameter");
bool bRet = false;
@@ -242,18 +242,18 @@ bool CGetFileNameWrapper::getOpenFileName(LPOPENFILENAME lpofn)
if (IsMTA())
{
bRet = ThreadExecGetFileName(
- lpofn, true, m_ExtendedDialogError);
+ lpofn, true, m_ExtendedDialogError);
}
else
{
CurDirGuard aGuard;
- HRESULT hr = OleInitialize( NULL );
+ HRESULT hr = OleInitialize( NULL );
bRet = GetOpenFileName(lpofn);
m_ExtendedDialogError = CommDlgExtendedError();
- if ( SUCCEEDED( hr ) )
+ if ( SUCCEEDED( hr ) )
OleUninitialize();
}
@@ -265,7 +265,7 @@ bool CGetFileNameWrapper::getOpenFileName(LPOPENFILENAME lpofn)
//-----------------------------------------------
bool CGetFileNameWrapper::getSaveFileName(LPOPENFILENAME lpofn)
-{
+{
OSL_PRECOND(lpofn,"invalid parameter");
bool bRet = false;
@@ -273,7 +273,7 @@ bool CGetFileNameWrapper::getSaveFileName(LPOPENFILENAME lpofn)
if (IsMTA())
{
bRet = ThreadExecGetFileName(
- lpofn, false, m_ExtendedDialogError);
+ lpofn, false, m_ExtendedDialogError);
}
else
{
diff --git a/fpicker/source/win32/filepicker/getfilenamewrapper.hxx b/fpicker/source/win32/filepicker/getfilenamewrapper.hxx
index 2e028b4df210..9e7b4cfe8ecb 100644
--- a/fpicker/source/win32/filepicker/getfilenamewrapper.hxx
+++ b/fpicker/source/win32/filepicker/getfilenamewrapper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,8 +47,8 @@
/*
A simple wrapper around the GetOpenFileName/GetSaveFileName API.
- Because currently the Win32 API functions GetOpenFileName/GetSaveFileName
- work only properly in an Single Threaded Appartment.
+ Because currently the Win32 API functions GetOpenFileName/GetSaveFileName
+ work only properly in an Single Threaded Appartment.
*/
class CGetFileNameWrapper
diff --git a/fpicker/source/win32/filepicker/helppopupwindow.cxx b/fpicker/source/win32/filepicker/helppopupwindow.cxx
index f1faf3928416..42c1ec1327dd 100644
--- a/fpicker/source/win32/filepicker/helppopupwindow.cxx
+++ b/fpicker/source/win32/filepicker/helppopupwindow.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -72,7 +72,7 @@ const DWORD OUTER_FRAME_COLOR = 0; // black
const sal_Int32 OUTER_FRAME_WIDTH = 1; // pixel
// it's the standard windows color of an inactive window border
-const DWORD INNER_FRAME_COLOR = 0xC8D0D4;
+const DWORD INNER_FRAME_COLOR = 0xC8D0D4;
const sal_Int32 INNER_FRAME_WIDTH = 1; // pixel
//---------------------------------------------------
@@ -87,9 +87,9 @@ sal_Int32 CHelpPopupWindow::s_RegisterWndClassCount = 0;
//
//---------------------------------------------------
-CHelpPopupWindow::CHelpPopupWindow(
- HINSTANCE hInstance,
- HWND hwndParent ) :
+CHelpPopupWindow::CHelpPopupWindow(
+ HINSTANCE hInstance,
+ HWND hwndParent ) :
m_hMargins( 0 ),
m_vMargins( 0 ),
m_avCharWidth( 0 ),
@@ -99,13 +99,13 @@ CHelpPopupWindow::CHelpPopupWindow(
m_hInstance( hInstance ),
m_hBitmapShadow( NULL ),
m_hBrushShadow( NULL )
-{
- m_bWndClassRegistered = RegisterWindowClass( ) ? sal_True : sal_False;
+{
+ m_bWndClassRegistered = RegisterWindowClass( ) ? sal_True : sal_False;
// create a pattern brush for the window shadow
WORD aPattern[] = { 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55 };
-
- m_hBitmapShadow = CreateBitmap( 8, 8, 1, 1, aPattern );
+
+ m_hBitmapShadow = CreateBitmap( 8, 8, 1, 1, aPattern );
m_hBrushShadow = CreatePatternBrush( m_hBitmapShadow );
}
@@ -114,7 +114,7 @@ CHelpPopupWindow::CHelpPopupWindow(
//---------------------------------------------------
CHelpPopupWindow::~CHelpPopupWindow( )
-{
+{
// remember: we don't have to destroy the
// preview window because it will be destroyed
// by it's parent window (the FileOpen dialog)
@@ -127,7 +127,7 @@ CHelpPopupWindow::~CHelpPopupWindow( )
}
//---------------------------------------------------
-//
+//
//---------------------------------------------------
void SAL_CALL CHelpPopupWindow::setText( const rtl::OUString& aHelpText )
@@ -136,7 +136,7 @@ void SAL_CALL CHelpPopupWindow::setText( const rtl::OUString& aHelpText )
}
//---------------------------------------------------
-//
+//
//---------------------------------------------------
void SAL_CALL CHelpPopupWindow::show( sal_Int32 x, sal_Int32 y )
@@ -144,11 +144,11 @@ void SAL_CALL CHelpPopupWindow::show( sal_Int32 x, sal_Int32 y )
OSL_ENSURE( NULL == m_hwnd, "method should not be called twice in sequence" );
// we create a window with length and heigth of 0
- // first in order to get a device context of this
+ // first in order to get a device context of this
// window, then we calculate the upper left corner
// and the dimensions and resize the window
- m_hwnd = CreateWindowEx(
+ m_hwnd = CreateWindowEx(
NULL,
HELPPOPUPWND_CLASS_NAME,
NULL,
@@ -195,40 +195,40 @@ HWND SAL_CALL CHelpPopupWindow::setParent( HWND hwndNewParent )
void SAL_CALL CHelpPopupWindow::calcWindowRect( LPRECT lprect )
{
OSL_ASSERT( m_hwnd && lprect );
-
+
SetRect( lprect, 0, 0, MAX_CHARS_PER_LINE * m_avCharWidth, 0 );
HDC hdc = GetDC( m_hwnd );
// set the font we are using later
- HGDIOBJ oldFont = SelectObject(
+ HGDIOBJ oldFont = SelectObject(
hdc, GetStockObject( DEFAULT_GUI_FONT ) );
-
+
UINT nFormat = DT_WORDBREAK | DT_CALCRECT | DT_EXTERNALLEADING | DT_LEFT;
if ( m_HelpText.getLength( ) <= MAX_CHARS_PER_LINE )
nFormat |= DT_SINGLELINE;
- DrawText(
- hdc,
- reinterpret_cast<LPCTSTR>(m_HelpText.getStr( )),
- m_HelpText.getLength( ),
- lprect,
+ DrawText(
+ hdc,
+ reinterpret_cast<LPCTSTR>(m_HelpText.getStr( )),
+ m_HelpText.getLength( ),
+ lprect,
nFormat );
-
+
// add the necessary space for the frames
// and margins
- lprect->bottom +=
- m_vMargins +
- SHADOW_HEIGHT +
- OUTER_FRAME_WIDTH * 2 +
+ lprect->bottom +=
+ m_vMargins +
+ SHADOW_HEIGHT +
+ OUTER_FRAME_WIDTH * 2 +
INNER_FRAME_WIDTH * 2;
-
- lprect->right +=
- SHADOW_WIDTH +
- 2 * m_avCharWidth +
- OUTER_FRAME_WIDTH * 2 +
+
+ lprect->right +=
+ SHADOW_WIDTH +
+ 2 * m_avCharWidth +
+ OUTER_FRAME_WIDTH * 2 +
INNER_FRAME_WIDTH * 2;
SelectObject( hdc, oldFont );
@@ -265,19 +265,19 @@ void SAL_CALL CHelpPopupWindow::adjustWindowSize( sal_Int32* cx_new, sal_Int32*
//
//---------------------------------------------------
-void SAL_CALL CHelpPopupWindow::adjustWindowPos(
+void SAL_CALL CHelpPopupWindow::adjustWindowPos(
sal_Int32 x, sal_Int32 y, sal_Int32 cx, sal_Int32 cy )
-{
+{
int popX;
int popY;
int popWidth;
int popHeight;
-
+
OSL_ASSERT( m_hwnd );
HDC hdc = GetDC( m_hwnd );
- // assuming these are screen coordinates
+ // assuming these are screen coordinates
popWidth = cx;
popHeight = cy;
popX = x - ( popWidth / 2 );
@@ -288,13 +288,13 @@ void SAL_CALL CHelpPopupWindow::adjustWindowPos(
if (popX < 0)
popX = 0;
-
+
if (popY < 0)
popY = 0;
-
+
if ((popX + popWidth) > xScreen)
popX = xScreen - popWidth;
-
+
if ((popY + popHeight) > yScreen)
popY = yScreen - popHeight;
@@ -305,7 +305,7 @@ void SAL_CALL CHelpPopupWindow::adjustWindowPos(
popY,
0,
0,
- SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE );
+ SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOSIZE );
ReleaseDC( m_hwnd, hdc );
}
@@ -319,20 +319,20 @@ void SAL_CALL CHelpPopupWindow::onPaint( HWND hWnd, HDC hdc )
RECT rc;
RECT rect;
HGDIOBJ hpen, hpenOld;
- HGDIOBJ hbrOld;
+ HGDIOBJ hbrOld;
COLORREF oldBkColor;
COLORREF oldTextColor;
HGDIOBJ oldFont;
HGDIOBJ oldBrush;
HGDIOBJ hBrush;
-
+
GetClientRect( hWnd, &rc );
- // draw the black border
+ // draw the black border
hBrush = CreateSolidBrush( GetSysColor( COLOR_INFOBK ) );
oldBrush = SelectObject( hdc, hBrush );
-
+
hpen = CreatePen( PS_SOLID, 0, OUTER_FRAME_COLOR );
hpenOld = SelectObject( hdc, hpen );
@@ -367,7 +367,7 @@ void SAL_CALL CHelpPopupWindow::onPaint( HWND hWnd, HDC hdc )
DeleteObject( hBrush );
DeleteObject( hpen );
-
+
// Write some text to this window
rect.left = rc.left + OUTER_FRAME_WIDTH + INNER_FRAME_WIDTH + 1 + m_hMargins;
@@ -377,26 +377,26 @@ void SAL_CALL CHelpPopupWindow::onPaint( HWND hWnd, HDC hdc )
oldBkColor = SetBkColor( hdc, GetSysColor( COLOR_INFOBK ) );
oldTextColor = SetTextColor( hdc, COLOR_INFOTEXT );
-
+
oldFont = SelectObject( hdc, GetStockObject( DEFAULT_GUI_FONT ) );
UINT nFormat = DT_WORDBREAK | DT_EXTERNALLEADING | DT_LEFT;
-
+
if ( m_HelpText.getLength( ) <= MAX_CHARS_PER_LINE )
nFormat |= DT_SINGLELINE;
- DrawText(
- hdc,
- (LPWSTR)m_HelpText.getStr( ),
- m_HelpText.getLength( ),
- &rect,
+ DrawText(
+ hdc,
+ (LPWSTR)m_HelpText.getStr( ),
+ m_HelpText.getLength( ),
+ &rect,
nFormat );
SelectObject( hdc, oldFont );
SetTextColor( hdc, oldTextColor );
SetBkColor( hdc, oldBkColor );
- // set text color and text background color
+ // set text color and text background color
// see MSDN PatBlt
oldBkColor = SetBkColor( hdc, RGB( 0, 0, 0 ) );
@@ -449,7 +449,7 @@ void SAL_CALL CHelpPopupWindow::onCreate( HWND hwnd )
HDC hdc = GetDC( m_hwnd );
- HGDIOBJ oldFont = SelectObject(
+ HGDIOBJ oldFont = SelectObject(
hdc, GetStockObject( DEFAULT_GUI_FONT ) );
TEXTMETRIC tm;
@@ -461,7 +461,7 @@ void SAL_CALL CHelpPopupWindow::onCreate( HWND hwnd )
if ( 0 == m_hMargins )
m_hMargins = m_avCharWidth;
- if ( 0 == m_vMargins )
+ if ( 0 == m_vMargins )
m_vMargins = m_avCharHeight;
SelectObject( hdc, oldFont );
@@ -472,8 +472,8 @@ void SAL_CALL CHelpPopupWindow::onCreate( HWND hwnd )
//---------------------------------------------------
//
//---------------------------------------------------
-
-LRESULT CALLBACK CHelpPopupWindow::WndProc(
+
+LRESULT CALLBACK CHelpPopupWindow::WndProc(
HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
LRESULT lResult = 0;
@@ -481,17 +481,17 @@ LRESULT CALLBACK CHelpPopupWindow::WndProc(
switch ( uMsg )
{
case WM_CREATE:
- {
- LPCREATESTRUCT lpcs =
+ {
+ LPCREATESTRUCT lpcs =
reinterpret_cast< LPCREATESTRUCT >( lParam );
OSL_ASSERT( lpcs->lpCreateParams );
-
+
CHelpPopupWindow* pImpl = reinterpret_cast< CHelpPopupWindow* >(
lpcs->lpCreateParams );
-
- // connect the instance handle to the window
- SetProp( hWnd, CURRENT_INSTANCE, pImpl );
+
+ // connect the instance handle to the window
+ SetProp( hWnd, CURRENT_INSTANCE, pImpl );
pImpl->onCreate( hWnd );
@@ -507,7 +507,7 @@ LRESULT CALLBACK CHelpPopupWindow::WndProc(
OSL_ASSERT( pImpl );
- PAINTSTRUCT ps;
+ PAINTSTRUCT ps;
BeginPaint(hWnd, &ps);
pImpl->onPaint( hWnd, ps.hdc );
@@ -518,7 +518,7 @@ LRESULT CALLBACK CHelpPopupWindow::WndProc(
case WM_NCDESTROY:
{
// RemoveProp returns the saved value on success
- CHelpPopupWindow* pImpl = reinterpret_cast< CHelpPopupWindow* >(
+ CHelpPopupWindow* pImpl = reinterpret_cast< CHelpPopupWindow* >(
RemoveProp( hWnd, CURRENT_INSTANCE ) );
OSL_ASSERT( pImpl );
@@ -527,16 +527,16 @@ LRESULT CALLBACK CHelpPopupWindow::WndProc(
}
break;
- case WM_LBUTTONDOWN:
+ case WM_LBUTTONDOWN:
case WM_KEYDOWN:
- case WM_SYSKEYDOWN:
+ case WM_SYSKEYDOWN:
case WM_MBUTTONDOWN:
case WM_RBUTTONDOWN:
- ReleaseCapture();
+ ReleaseCapture();
DestroyWindow(hWnd);
break;
- default:
+ default:
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
@@ -548,30 +548,30 @@ LRESULT CALLBACK CHelpPopupWindow::WndProc(
//---------------------------------------------------
ATOM SAL_CALL CHelpPopupWindow::RegisterWindowClass( )
-{
+{
osl::MutexGuard aGuard( s_Mutex );
if ( 0 == s_ClassAtom )
- {
- // register the window class
- WNDCLASSEX wndClsEx;
+ {
+ // register the window class
+ WNDCLASSEX wndClsEx;
ZeroMemory(&wndClsEx, sizeof(wndClsEx));
- wndClsEx.cbSize = sizeof(wndClsEx);
+ wndClsEx.cbSize = sizeof(wndClsEx);
wndClsEx.lpfnWndProc = CHelpPopupWindow::WndProc;
wndClsEx.hInstance = m_hInstance;
wndClsEx.hCursor = LoadCursor(NULL, IDC_ARROW);
wndClsEx.hbrBackground = (HBRUSH)GetStockObject( NULL_BRUSH );
wndClsEx.lpszClassName = HELPPOPUPWND_CLASS_NAME;
-
+
// register the preview window class
- // !!! Win95 - the window class will be unregistered automaticly
- // if the dll is unloaded
+ // !!! Win95 - the window class will be unregistered automaticly
+ // if the dll is unloaded
// Win2000 - the window class must be unregistered manually
- // if the dll is unloaded
+ // if the dll is unloaded
s_ClassAtom = RegisterClassEx( &wndClsEx );
- OSL_ASSERT(s_ClassAtom);
+ OSL_ASSERT(s_ClassAtom);
}
// increment the register class counter
@@ -590,13 +590,13 @@ ATOM SAL_CALL CHelpPopupWindow::RegisterWindowClass( )
void SAL_CALL CHelpPopupWindow::UnregisterWindowClass( )
{
osl::MutexGuard aGuard( s_Mutex );
-
- OSL_ASSERT( ( (0 != s_ClassAtom) && (s_RegisterWndClassCount > 0)) ||
+
+ OSL_ASSERT( ( (0 != s_ClassAtom) && (s_RegisterWndClassCount > 0)) ||
( (0 == s_ClassAtom) && (0 == s_RegisterWndClassCount) ) );
- // update the register class counter
+ // update the register class counter
// and unregister the window class if
- // counter drops to zero
+ // counter drops to zero
if ( 0 != s_ClassAtom )
{
s_RegisterWndClassCount--;
@@ -612,7 +612,7 @@ void SAL_CALL CHelpPopupWindow::UnregisterWindowClass( )
}
s_ClassAtom = 0;
- }
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/filepicker/helppopupwindow.hxx b/fpicker/source/win32/filepicker/helppopupwindow.hxx
index 71f74ad5a055..ddb74e1f30e5 100644
--- a/fpicker/source/win32/filepicker/helppopupwindow.hxx
+++ b/fpicker/source/win32/filepicker/helppopupwindow.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -74,10 +74,10 @@ public:
a default value will be taken.
The values are in pixel.
*/
- CHelpPopupWindow(
+ CHelpPopupWindow(
HINSTANCE hInstance,
HWND hwndParent );
-
+
/*
dtor
*/
@@ -115,26 +115,26 @@ private:
static LRESULT CALLBACK WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
-private:
+private:
sal_Int32 m_hMargins;
sal_Int32 m_vMargins;
sal_Int32 m_avCharWidth;
sal_Int32 m_avCharHeight;
- HWND m_hwnd;
+ HWND m_hwnd;
HWND m_hwndParent;
- HINSTANCE m_hInstance;
+ HINSTANCE m_hInstance;
sal_Bool m_bWndClassRegistered;
::rtl::OUString m_HelpText;
HBITMAP m_hBitmapShadow;
HBRUSH m_hBrushShadow;
-
+
// the window class has to be registered only
// once per process, so multiple instance of this class
// share the registered window class
static ATOM s_ClassAtom;
static osl::Mutex s_Mutex;
static sal_Int32 s_RegisterWndClassCount;
-
+
// prevent copy and assignment
private:
CHelpPopupWindow( const CHelpPopupWindow& );
diff --git a/fpicker/source/win32/filepicker/platform_vista.h b/fpicker/source/win32/filepicker/platform_vista.h
index c6fd8688bbd7..84479c2c9e41 100644
--- a/fpicker/source/win32/filepicker/platform_vista.h
+++ b/fpicker/source/win32/filepicker/platform_vista.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/win32/filepicker/platform_xp.h b/fpicker/source/win32/filepicker/platform_xp.h
index 41b034070425..d6d8e650cbaa 100644
--- a/fpicker/source/win32/filepicker/platform_xp.h
+++ b/fpicker/source/win32/filepicker/platform_xp.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/win32/filepicker/previewadapter.cxx b/fpicker/source/win32/filepicker/previewadapter.cxx
index 407f000a7e6c..b0f7effb8b9d 100644
--- a/fpicker/source/win32/filepicker/previewadapter.cxx
+++ b/fpicker/source/win32/filepicker/previewadapter.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,7 +47,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
//---------------------------------------------
-// An impl class to hide implementation details
+// An impl class to hide implementation details
// from clients
//---------------------------------------------
@@ -57,22 +57,22 @@ public:
CPreviewAdapterImpl(HINSTANCE instance);
virtual ~CPreviewAdapterImpl();
-
+
virtual sal_Int32 SAL_CALL getTargetColorDepth();
-
+
virtual sal_Int32 SAL_CALL getAvailableWidth();
-
+
virtual sal_Int32 SAL_CALL getAvailableHeight();
-
- virtual void SAL_CALL setImage( sal_Int16 aImageFormat, const Any& aImage )
+
+ virtual void SAL_CALL setImage( sal_Int16 aImageFormat, const Any& aImage )
throw (IllegalArgumentException,RuntimeException);
virtual sal_Bool SAL_CALL setShowState(sal_Bool bShowState);
-
+
virtual sal_Bool SAL_CALL getShowState();
-
+
virtual void SAL_CALL setParent(HWND parent);
-
+
virtual HWND SAL_CALL getParent();
//-------------------------------------
@@ -80,12 +80,12 @@ public:
//-------------------------------------
virtual void SAL_CALL notifyParentShow(sal_Bool bShow);
-
+
virtual void SAL_CALL notifyParentSizeChanged();
virtual void SAL_CALL notifyParentWindowPosChanged();
-protected:
+protected:
virtual void SAL_CALL calcRightMargin();
virtual void SAL_CALL rearrangeLayout();
@@ -96,10 +96,10 @@ protected:
// member
protected:
- HINSTANCE m_Instance;
+ HINSTANCE m_Instance;
std::auto_ptr<PreviewBase> m_Preview;
- HWND m_FileDialog;
- int m_RightMargin;
+ HWND m_FileDialog;
+ int m_RightMargin;
//prevent copy/assignment
private:
@@ -111,7 +111,7 @@ private:
//
//-----------------------------------------
-CPreviewAdapterImpl::CPreviewAdapterImpl(HINSTANCE instance) :
+CPreviewAdapterImpl::CPreviewAdapterImpl(HINSTANCE instance) :
m_Instance(instance),
m_Preview(new PreviewBase()), // create dummy preview (NULL-Object pattern)
m_FileDialog(0),
@@ -158,7 +158,7 @@ sal_Int32 SAL_CALL CPreviewAdapterImpl::getAvailableHeight()
//
//-----------------------------------------
-void SAL_CALL CPreviewAdapterImpl::setImage( sal_Int16 aImageFormat, const Any& aImage )
+void SAL_CALL CPreviewAdapterImpl::setImage( sal_Int16 aImageFormat, const Any& aImage )
throw (IllegalArgumentException,RuntimeException)
{
m_Preview->setImage(aImageFormat,aImage);
@@ -193,7 +193,7 @@ void SAL_CALL CPreviewAdapterImpl::setParent(HWND parent)
OSL_PRECOND(IsWindow(parent),"Invalid FileDialog handle");
m_FileDialog = parent;
- calcRightMargin();
+ calcRightMargin();
}
//-----------------------------------------
@@ -225,7 +225,7 @@ void SAL_CALL CPreviewAdapterImpl::calcRightMargin()
// even if the size of the dialog changes
HWND flb = GetDlgItem(m_FileDialog,lst1);
-
+
OSL_ENSURE(IsWindow(flb),"Filelistbox not found");
RECT rcFlb;
@@ -248,7 +248,7 @@ void SAL_CALL CPreviewAdapterImpl::notifyParentShow(sal_Bool)
//-----------------------------------------
//
//-----------------------------------------
-
+
void SAL_CALL CPreviewAdapterImpl::notifyParentSizeChanged()
{
rearrangeLayout();
@@ -269,7 +269,7 @@ void SAL_CALL CPreviewAdapterImpl::notifyParentWindowPosChanged()
void SAL_CALL CPreviewAdapterImpl::rearrangeLayout()
{
// try to get a handle to the filelistbox
- // if there is no new-style filelistbox like
+ // if there is no new-style filelistbox like
// in Win2000/XP there should be at least the
// old listbox, so we take this one
// lst1 - identifies the old-style filelistbox
@@ -279,25 +279,25 @@ void SAL_CALL CPreviewAdapterImpl::rearrangeLayout()
// under Windows NT 4.0 the size of the old
// filelistbox will be used as reference for
- // sizing the new filelistbox, so we have
+ // sizing the new filelistbox, so we have
// to change the size of it too
HWND flb_old = GetDlgItem(m_FileDialog,lst1);
RECT rcFlbNew;
GetWindowRect(flb_new,&rcFlbNew);
- RECT rcFileDlg;
+ RECT rcFileDlg;
GetWindowRect(m_FileDialog,&rcFileDlg);
rcFileDlg.right -= m_RightMargin;
// the available area for the filelistbox should be
- // the left edge of the filelistbox and the right
+ // the left edge of the filelistbox and the right
// edge of the OK button, we take this as reference
int height = rcFlbNew.bottom - rcFlbNew.top;
int width = rcFileDlg.right - rcFlbNew.left;
-
+
HWND prvwnd = m_Preview->getWindowHandle();
-
+
// we use GetWindowLong to ask for the visibility
// of the preview window because IsWindowVisible
// only returns true the specified window including
@@ -315,45 +315,45 @@ void SAL_CALL CPreviewAdapterImpl::rearrangeLayout()
{
cx = width/2;
- // resize the filelistbox to the half of the
+ // resize the filelistbox to the half of the
// available space
BOOL bRet = SetWindowPos(flb_new,
NULL, 0, 0, cx, height,
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
-
+
bRet = SetWindowPos(flb_old,
- NULL, 0, 0, cx, height,
+ NULL, 0, 0, cx, height,
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
// get the new dimensions of the filelistbox after
// resizing and take the right,top corner as starting
// point for the preview window
- GetWindowRect(flb_new,&rcFlbNew);
+ GetWindowRect(flb_new,&rcFlbNew);
POINT pt = { rcFlbNew.right, rcFlbNew.top };
ScreenToClient(m_FileDialog,&pt);
-
+
// resize the preview window to fit within
// the available space and set the window
- // to the top of the z-order else it will
+ // to the top of the z-order else it will
// be invisible
SetWindowPos(prvwnd,
- HWND_TOP, pt.x, pt.y, cx, height, SWP_NOACTIVATE);
+ HWND_TOP, pt.x, pt.y, cx, height, SWP_NOACTIVATE);
}
else
{
- // resize the filelistbox to the maximum available
+ // resize the filelistbox to the maximum available
// space
cx = rcFileDlg.right - rcFlbNew.left;
-
+
// resize the old filelistbox
SetWindowPos(flb_old,
- NULL, 0, 0, cx, height,
+ NULL, 0, 0, cx, height,
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
// resize the new filelistbox
SetWindowPos(flb_new,
NULL, 0, 0, cx, height,
- SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE );
+ SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE );
}
}
@@ -364,18 +364,18 @@ void SAL_CALL CPreviewAdapterImpl::rearrangeLayout()
void SAL_CALL CPreviewAdapterImpl::initializeActivePreview() throw(std::runtime_error)
{
sal_Bool bShowState = m_Preview->getImaginaryShowState();
-
+
sal_Int16 aImgFrmt;
Any aImg;
m_Preview->getImage(aImgFrmt,aImg);
HWND flb = findFileListbox();
-
+
PreviewBase* prv = new CDIBPreview(
m_Instance, GetParent(flb), bShowState);
-
- m_Preview.reset(prv);
-
+
+ m_Preview.reset(prv);
+
m_Preview->setImage(aImgFrmt,aImg);
}
@@ -383,17 +383,17 @@ void SAL_CALL CPreviewAdapterImpl::initializeActivePreview() throw(std::runtime_
//
//-----------------------------------------
-HWND SAL_CALL CPreviewAdapterImpl::findFileListbox() const
+HWND SAL_CALL CPreviewAdapterImpl::findFileListbox() const
{
// try to get a handle to the filelistbox
- // if there is no new-style filelistbox like
+ // if there is no new-style filelistbox like
// in Win2000/XP there should be at least the
// old listbox, so we take this one
// lst1 - identifies the old-style filelistbox
// lst2 - identifies the new-style filelistbox
// see dlgs.h
- HWND flb = GetDlgItem(m_FileDialog,lst2);
- if (!IsWindow(flb))
+ HWND flb = GetDlgItem(m_FileDialog,lst2);
+ if (!IsWindow(flb))
flb = GetDlgItem(m_FileDialog,lst1);
return flb;
@@ -418,15 +418,15 @@ public:
protected:
virtual void SAL_CALL rearrangeLayout();
-
+
bool isValidToolbarDimension() const;
private:
- sal_Bool m_PreviewActive;
- int m_ToolbarPosX;
- int m_ToolbarPosY;
- int m_ToolbarWidth;
- int m_ToolbarHeight;
+ sal_Bool m_PreviewActive;
+ int m_ToolbarPosX;
+ int m_ToolbarPosY;
+ int m_ToolbarWidth;
+ int m_ToolbarHeight;
};
//--------------------------------------------
@@ -451,26 +451,26 @@ void SAL_CALL CWin98PreviewAdapterImpl::notifyParentWindowPosChanged()
{
try
{
- // the reason for this condition is
+ // the reason for this condition is
// Windows 98
// Under Windows 98 the message WM_SHOWWINDOW
- // will be sent only the first time the
+ // will be sent only the first time the
// GetOpenFileName function is called within
// the same process
// so we must use another message to initialize
// the preview window
if (IsWindow(m_FileDialog) && !m_PreviewActive)
{
- initializeActivePreview();
+ initializeActivePreview();
m_PreviewActive = sal_True;
rearrangeLayout();
}
-
+
if (IsWindow(m_FileDialog) && !isValidToolbarDimension())
{
RECT rcStc1;
GetWindowRect(GetDlgItem(m_FileDialog,stc1),&rcStc1);
-
+
RECT rcCmb2;
GetWindowRect(GetDlgItem(m_FileDialog,cmb2),&rcCmb2);
@@ -481,23 +481,23 @@ void SAL_CALL CWin98PreviewAdapterImpl::notifyParentWindowPosChanged()
// the stc1 static text is invisible at runtime
// but will be used as reference for the position
// and dimension of the toolbar
- if (rcStc1.left >= rcCmb2.right)
+ if (rcStc1.left >= rcCmb2.right)
{
// important: save the upper left corner in
- // client coordinates
+ // client coordinates
POINT pt = {rcStc1.left,rcStc1.top};
ScreenToClient(m_FileDialog,&pt);
m_ToolbarPosX = pt.x;
m_ToolbarPosY = pt.y;
m_ToolbarWidth = rcStc1.right - rcStc1.left;
- m_ToolbarHeight = rcStc1.bottom - rcStc1.top;
+ m_ToolbarHeight = rcStc1.bottom - rcStc1.top;
}
}
}
catch(std::runtime_error&)
- {
- }
+ {
+ }
}
//--------------------------------------------
@@ -507,11 +507,11 @@ void SAL_CALL CWin98PreviewAdapterImpl::notifyParentWindowPosChanged()
void SAL_CALL CWin98PreviewAdapterImpl::rearrangeLayout()
{
CPreviewAdapterImpl::rearrangeLayout();
-
+
// fix the position of the upper toolbar
// because the FileDialog moves all windows
// that are to the right of the FileListbox
- // so if we have changed the size of the
+ // so if we have changed the size of the
// FileListbox we would run into trouble else
if (isValidToolbarDimension())
{
@@ -519,12 +519,12 @@ void SAL_CALL CWin98PreviewAdapterImpl::rearrangeLayout()
m_FileDialog,NULL,TEXT("ToolbarWindow32"),NULL);
SetWindowPos(hwndTlb,
- HWND_TOP,
+ HWND_TOP,
m_ToolbarPosX,
m_ToolbarPosY,
m_ToolbarWidth,
m_ToolbarHeight,
- SWP_NOACTIVATE);
+ SWP_NOACTIVATE);
}
}
@@ -534,9 +534,9 @@ void SAL_CALL CWin98PreviewAdapterImpl::rearrangeLayout()
bool CWin98PreviewAdapterImpl::isValidToolbarDimension() const
{
- return (m_ToolbarPosX > 0 &&
- m_ToolbarPosY > 0 &&
- m_ToolbarWidth > 0 &&
+ return (m_ToolbarPosX > 0 &&
+ m_ToolbarPosY > 0 &&
+ m_ToolbarWidth > 0 &&
m_ToolbarHeight > 0);
}
@@ -546,7 +546,7 @@ bool CWin98PreviewAdapterImpl::isValidToolbarDimension() const
//--------------------------------------------
// Implementation for Windows 95/NT/ME/2000/XP
// because:
-//
+//
//--------------------------------------------
class CWin95NTPreviewAdapterImpl : public CPreviewAdapterImpl
@@ -575,14 +575,14 @@ void SAL_CALL CWin95NTPreviewAdapterImpl::notifyParentShow(sal_Bool bShow)
try
{
if (bShow)
- {
- initializeActivePreview();
+ {
+ initializeActivePreview();
rearrangeLayout();
}
}
catch(std::runtime_error&)
- {
- }
+ {
+ }
}
@@ -593,7 +593,7 @@ void SAL_CALL CWin95NTPreviewAdapterImpl::notifyParentShow(sal_Bool bShow)
// ctor
//-------------------------------
-CPreviewAdapter::CPreviewAdapter(HINSTANCE instance)
+CPreviewAdapter::CPreviewAdapter(HINSTANCE instance)
{
if (!IsWindows98())
m_pImpl.reset(new CWin95NTPreviewAdapterImpl(instance));
@@ -651,7 +651,7 @@ sal_Int32 SAL_CALL CPreviewAdapter::getAvailableHeight()
//
//-------------------------------
-void SAL_CALL CPreviewAdapter::setImage( sal_Int16 aImageFormat, const Any& aImage )
+void SAL_CALL CPreviewAdapter::setImage( sal_Int16 aImageFormat, const Any& aImage )
throw (IllegalArgumentException, RuntimeException)
{
m_pImpl->setImage(aImageFormat,aImage);
@@ -663,7 +663,7 @@ void SAL_CALL CPreviewAdapter::setImage( sal_Int16 aImageFormat, const Any& aIma
sal_Bool SAL_CALL CPreviewAdapter::setShowState( sal_Bool bShowState )
{
- return m_pImpl->setShowState(bShowState);
+ return m_pImpl->setShowState(bShowState);
}
//-------------------------------
@@ -696,7 +696,7 @@ void SAL_CALL CPreviewAdapter::notifyParentShow(bool bShow)
//-------------------------------
//
//-------------------------------
-
+
void SAL_CALL CPreviewAdapter::notifyParentSizeChanged()
{
m_pImpl->notifyParentSizeChanged();
diff --git a/fpicker/source/win32/filepicker/previewadapter.hxx b/fpicker/source/win32/filepicker/previewadapter.hxx
index 0efc2e60245a..e10b2e5d31df 100644
--- a/fpicker/source/win32/filepicker/previewadapter.hxx
+++ b/fpicker/source/win32/filepicker/previewadapter.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,17 +53,17 @@ class CPreviewAdapterImpl;
// window may only become visible if there is
// a valid parent window (means, the FilePicker)
// is in execution mode. So unless someone sets
-// the preview active with a valid parent
+// the preview active with a valid parent
// window the preview may not be visible
//---------------------------------------------
class CPreviewAdapter
{
public:
-
+
// ctor
CPreviewAdapter(HINSTANCE instance);
-
+
~CPreviewAdapter();
::com::sun::star::uno::Sequence<sal_Int16> SAL_CALL getSupportedImageFormats();
@@ -74,13 +74,13 @@ public:
sal_Int32 SAL_CALL getAvailableHeight();
- void SAL_CALL setImage(sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage)
+ void SAL_CALL setImage(sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage)
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
sal_Bool SAL_CALL setShowState(sal_Bool bShowState);
- sal_Bool SAL_CALL getShowState();
-
+ sal_Bool SAL_CALL getShowState();
+
void SAL_CALL setParent(HWND parent);
//--------------------------------------
@@ -88,9 +88,9 @@ public:
//--------------------------------------
void SAL_CALL notifyParentShow(bool bShow);
-
+
void SAL_CALL notifyParentSizeChanged();
-
+
void SAL_CALL notifyParentWindowPosChanged();
private:
diff --git a/fpicker/source/win32/filepicker/previewbase.cxx b/fpicker/source/win32/filepicker/previewbase.cxx
index 4047e693a50a..ae505af164d4 100644
--- a/fpicker/source/win32/filepicker/previewbase.cxx
+++ b/fpicker/source/win32/filepicker/previewbase.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -85,7 +85,7 @@ sal_Int32 SAL_CALL PreviewBase::getAvailableHeight() throw (RuntimeException)
//
//-------------------------------
-void SAL_CALL PreviewBase::setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage )
+void SAL_CALL PreviewBase::setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage )
throw (IllegalArgumentException, RuntimeException)
{
if (aImageFormat != ::com::sun::star::ui::dialogs::FilePreviewImageFormats::BITMAP)
diff --git a/fpicker/source/win32/filepicker/previewbase.hxx b/fpicker/source/win32/filepicker/previewbase.hxx
index d4b36a618c7f..b05e3fb3bfa7 100644
--- a/fpicker/source/win32/filepicker/previewbase.hxx
+++ b/fpicker/source/win32/filepicker/previewbase.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -54,24 +54,24 @@ public:
// dtor
virtual ~PreviewBase();
-
- virtual sal_Int32 SAL_CALL getTargetColorDepth()
+
+ virtual sal_Int32 SAL_CALL getTargetColorDepth()
throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getAvailableWidth()
+ virtual sal_Int32 SAL_CALL getAvailableWidth()
throw (::com::sun::star::uno::RuntimeException);
- virtual sal_Int32 SAL_CALL getAvailableHeight()
+ virtual sal_Int32 SAL_CALL getAvailableHeight()
throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage )
+ virtual void SAL_CALL setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& aImage )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL setShowState( sal_Bool bShowState )
throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL getShowState()
- throw (::com::sun::star::uno::RuntimeException);
+ throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL getImage(sal_Int16& aImageFormat,com::sun::star::uno::Any& aImage);
@@ -81,8 +81,8 @@ public:
protected:
::com::sun::star::uno::Any m_ImageData;
- sal_Int16 m_ImageFormat;
- sal_Bool m_bShowState;
+ sal_Int16 m_ImageFormat;
+ sal_Bool m_bShowState;
};
diff --git a/fpicker/source/win32/filepicker/propmap.hxx b/fpicker/source/win32/filepicker/propmap.hxx
index a37cfefd0fcd..2eed6fce1335 100644
--- a/fpicker/source/win32/filepicker/propmap.hxx
+++ b/fpicker/source/win32/filepicker/propmap.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,11 +41,11 @@ typedef ::std::hash_map< ::rtl::OUString ,
class TPropMap
{
private:
-
+
TPropMapBase m_aMap;
public:
-
+
template< class TValueType >
void put(const ::rtl::OUString& sKey ,
const TValueType& rValue)
@@ -53,15 +53,15 @@ class TPropMap
void* pValue = (void*)&rValue;
m_aMap[sKey] = pValue;
}
-
+
template< class TValueType >
- void put_copy(const ::rtl::OUString& sKey ,
+ void put_copy(const ::rtl::OUString& sKey ,
const TValueType& rValue)
{
TValueType* pCopy = new TValueType(rValue);
m_aMap[sKey] = (void*)pCopy;
}
-
+
template< class TValueType >
sal_Bool get(const ::rtl::OUString& sKey ,
TValueType** pValue)
@@ -69,7 +69,7 @@ class TPropMap
TPropMapBase::iterator pIt = m_aMap.find(sKey);
if (pIt == m_aMap.end())
return sal_False;
-
+
void* pItem = pIt->second;
*pValue = (TValueType*)pItem;
return (pItem != 0);
@@ -82,17 +82,17 @@ class TPropMap
TPropMapBase::iterator pIt = m_aMap.find(sKey);
if (pIt == m_aMap.end())
return sal_False;
-
+
void* pValue = pIt->second;
if ( ! pValue)
return sal_False;
-
+
rValue = *((TValueType*)pValue);
//delete pValue;
m_aMap.erase(pIt);
return sal_True;
}
-
+
void clear()
{
m_aMap.clear();
diff --git a/fpicker/source/win32/filepicker/resource.h b/fpicker/source/win32/filepicker/resource.h
index f99ffe34cf5a..3a3f56b5c722 100644
--- a/fpicker/source/win32/filepicker/resource.h
+++ b/fpicker/source/win32/filepicker/resource.h
@@ -11,7 +11,7 @@
#define IDC_STATIC -1
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 119
diff --git a/fpicker/source/win32/filepicker/shared.hxx b/fpicker/source/win32/filepicker/shared.hxx
index a1334518b17b..cfec9032f36d 100644
--- a/fpicker/source/win32/filepicker/shared.hxx
+++ b/fpicker/source/win32/filepicker/shared.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -25,12 +25,12 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
#ifndef FPICKER_WIN32_FILEPICKER_SHARED_HXX
#define FPICKER_WIN32_FILEPICKER_SHARED_HXX
-
+
#include <rtl/ustring.hxx>
-
+
const ::rtl::OUString BACKSLASH = ::rtl::OUString::createFromAscii( "\\" );
const ::rtl::OUString FILTER_SEPARATOR = ::rtl::OUString::createFromAscii( "------------------------------------------" );
const ::rtl::OUString ALL_FILES_WILDCARD = ::rtl::OUString::createFromAscii( "*.*" );
diff --git a/fpicker/source/win32/filepicker/vistatypes.h b/fpicker/source/win32/filepicker/vistatypes.h
index 08b4613f6d25..9237dbada227 100644
--- a/fpicker/source/win32/filepicker/vistatypes.h
+++ b/fpicker/source/win32/filepicker/vistatypes.h
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx
index 776268b6e2d2..ada72efb6eee 100644
--- a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx
+++ b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,14 +31,14 @@
//_________________________________________________________________________________________________________________________
-// interface includes
+// interface includes
//_________________________________________________________________________________________________________________________
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/registry/XSimpleRegistry.hpp>
#include <osl/file.hxx>
//_________________________________________________________________________________________________________________________
-// other includes
+// other includes
//_________________________________________________________________________________________________________________________
#include <cppuhelper/servicefactory.hxx>
@@ -69,21 +69,21 @@
#include "..\FPServiceInfo.hxx"
//
-// namesapces
+// namesapces
//
-using namespace ::rtl ;
-using namespace ::cppu ;
-using namespace ::com::sun::star::uno ;
-using namespace ::com::sun::star::lang ;
-using namespace ::com::sun::star::ui::dialogs ;
+using namespace ::rtl ;
+using namespace ::cppu ;
+using namespace ::com::sun::star::uno ;
+using namespace ::com::sun::star::lang ;
+using namespace ::com::sun::star::ui::dialogs ;
using namespace ::com::sun::star::ui::dialogs::TemplateDescription;
using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds;
using namespace ::com::sun::star::ui::dialogs::ExtendedFilePickerElementIds;
using namespace ::com::sun::star::ui::dialogs::ListboxControlActions;
-using namespace std ;
+using namespace std ;
// forward
@@ -93,10 +93,10 @@ void TestFilterManager( Reference< XFilePicker > xFilePicker );
#define RDB_SYSPATH "D:\\Projects\\gsl\\sysui\\wntmsci7\\bin\\applicat.rdb"
//_________________________________________________________________________________________________________________________
-// global variables
+// global variables
//_________________________________________________________________________________________________________________________
-Reference< XMultiServiceFactory > g_xFactory;
+Reference< XMultiServiceFactory > g_xFactory;
const OUString BMP_EXTENSION = OUString::createFromAscii( "bmp" );
@@ -109,32 +109,32 @@ class FilePickerListener : public WeakImplHelper1< XFilePickerListener >
public:
// XEventListener
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
throw(::com::sun::star::uno::RuntimeException);
// XFilePickerListener
- virtual void SAL_CALL fileSelectionChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
+ virtual void SAL_CALL fileSelectionChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL directoryChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
+ virtual void SAL_CALL directoryChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
throw(::com::sun::star::uno::RuntimeException);
- virtual OUString SAL_CALL helpRequested( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
+ virtual OUString SAL_CALL helpRequested( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL controlStateChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
+ virtual void SAL_CALL controlStateChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL dialogSizeChanged( )
+ virtual void SAL_CALL dialogSizeChanged( )
throw (::com::sun::star::uno::RuntimeException);
};
-void SAL_CALL FilePickerListener::disposing( const ::com::sun::star::lang::EventObject& Source )
+void SAL_CALL FilePickerListener::disposing( const ::com::sun::star::lang::EventObject& Source )
throw(::com::sun::star::uno::RuntimeException)
{
}
-void SAL_CALL FilePickerListener::fileSelectionChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
+void SAL_CALL FilePickerListener::fileSelectionChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
throw(::com::sun::star::uno::RuntimeException)
{
try
@@ -153,13 +153,13 @@ void SAL_CALL FilePickerListener::fileSelectionChanged( const ::com::sun::star::
// detect file extension
sal_Int32 nIndex = FilePath.lastIndexOf( BMP_EXTENSION );
if ( (FilePath.getLength( ) - 3) == nIndex )
- {
+ {
OUString FileSysPath;
- ::osl::FileBase::getSystemPathFromFileURL(
+ ::osl::FileBase::getSystemPathFromFileURL(
FilePath, FileSysPath );
HANDLE hFile = CreateFileW(
- FileSysPath.getStr( ),
+ FileSysPath.getStr( ),
GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL) ;
@@ -176,25 +176,25 @@ void SAL_CALL FilePickerListener::fileSelectionChanged( const ::com::sun::star::
}
Sequence< sal_Int8 > aDIB( dwFileSize );
-
+
DWORD dwBytesRead;
BOOL bSuccess = ReadFile (hFile, aDIB.getArray( ), dwFileSize, &dwBytesRead, NULL) ;
CloseHandle (hFile);
BITMAPFILEHEADER* pbmfh = (BITMAPFILEHEADER*)aDIB.getConstArray( );
- if (!bSuccess || (dwBytesRead != dwFileSize)
- || (pbmfh->bfType != * (WORD *) "BM")
+ if (!bSuccess || (dwBytesRead != dwFileSize)
+ || (pbmfh->bfType != * (WORD *) "BM")
|| (pbmfh->bfSize != dwFileSize))
{
return;
}
-
+
Any aAny;
aAny <<= aDIB;
- rXFilePreview->setImage( 1, aAny );
+ rXFilePreview->setImage( 1, aAny );
}
- }
+ }
}
catch( IllegalArgumentException& ex )
{
@@ -202,27 +202,27 @@ void SAL_CALL FilePickerListener::fileSelectionChanged( const ::com::sun::star::
}
}
-void SAL_CALL FilePickerListener::directoryChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
+void SAL_CALL FilePickerListener::directoryChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
throw(::com::sun::star::uno::RuntimeException)
{
Reference< XFilePickerControlAccess > rFilePickerCtrlAccess( aEvent.Source, UNO_QUERY );
}
-OUString SAL_CALL FilePickerListener::helpRequested( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
+OUString SAL_CALL FilePickerListener::helpRequested( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
throw(::com::sun::star::uno::RuntimeException)
{
return OUString( );
}
-void SAL_CALL FilePickerListener::controlStateChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
+void SAL_CALL FilePickerListener::controlStateChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent )
throw(::com::sun::star::uno::RuntimeException)
{
try
- {
+ {
Reference< XFilePickerControlAccess > rFPCtrlAccess( aEvent.Source, UNO_QUERY );
Any aValue;
-
+
OUString lbString( L"Ein Eintrag 1" );
aValue <<= lbString;
rFPCtrlAccess->setValue( LISTBOX_VERSION, ADD_ITEM, aValue );
@@ -234,14 +234,14 @@ void SAL_CALL FilePickerListener::controlStateChanged( const ::com::sun::star::u
lbString = OUString( L"Ein Eintrag 3" );
aValue <<= lbString;
rFPCtrlAccess->setValue( LISTBOX_VERSION, ADD_ITEM, aValue );
-
+
sal_Int16 nSel = 1;
aValue <<= nSel;
- rFPCtrlAccess->setValue( LISTBOX_VERSION, SET_SELECT_ITEM, aValue );
+ rFPCtrlAccess->setValue( LISTBOX_VERSION, SET_SELECT_ITEM, aValue );
sal_Int32 nDel = 0;
aValue <<= nDel;
- rFPCtrlAccess->setValue( LISTBOX_VERSION, DELETE_ITEM, aValue );
+ rFPCtrlAccess->setValue( LISTBOX_VERSION, DELETE_ITEM, aValue );
}
catch( ... )
{
@@ -254,11 +254,11 @@ void SAL_CALL FilePickerListener::dialogSizeChanged( )
}
//--------------------------------------------------------
-// main
+// main
//--------------------------------------------------------
-int SAL_CALL main(int nArgc, char* Argv[], char* Env[] )
+int SAL_CALL main(int nArgc, char* Argv[], char* Env[] )
{
printf("Starting test of FPS-Service\n");
@@ -281,7 +281,7 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] )
// try to get an Interface to a XFilePicker Service
//-------------------------------------------------
- Sequence< Any > arguments(1);
+ Sequence< Any > arguments(1);
//arguments[0] = makeAny( FILEOPEN_SIMPLE );
//arguments[0] = makeAny( FILESAVE_SIMPLE );
//arguments[0] = makeAny( FILESAVE_AUTOEXTENSION_PASSWORD );
@@ -292,12 +292,12 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] )
//arguments[0] = makeAny( FILEOPEN_PLAY );
arguments[0] = makeAny( FILEOPEN_READONLY_VERSION );
- Reference< XFilePicker > xFilePicker = Reference< XFilePicker >(
- g_xFactory->createInstanceWithArguments(
+ Reference< XFilePicker > xFilePicker = Reference< XFilePicker >(
+ g_xFactory->createInstanceWithArguments(
OUString::createFromAscii( FILE_PICKER_SERVICE_NAME ), arguments ), UNO_QUERY );
// install a FilePicker notifier
- Reference< XFilePickerListener > xFPListener(
+ Reference< XFilePickerListener > xFPListener(
static_cast< XFilePickerListener* >( new FilePickerListener()), UNO_QUERY );
Reference< XFilePickerNotifier > xFPNotifier( xFilePicker, UNO_QUERY );
@@ -307,7 +307,7 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] )
xFilePicker->setTitle( OUString::createFromAscii("FileOpen Simple..."));
xFilePicker->setMultiSelectionMode( sal_True );
xFilePicker->setDefaultName( OUString::createFromAscii("d:\\test2.sxw"));
-
+
OUString aDirURL;
OUString aSysPath = OStringToOUString( "d:\\ueaeoe", osl_getThreadTextEncoding( ) );
::osl::FileBase::getFileURLFromSystemPath( aSysPath, aDirURL );
@@ -319,17 +319,17 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] )
xFilterMgr->appendFilter( L"Alle", L"*.*" );
xFilterMgr->appendFilter( L"BMP", L"*.bmp" );
xFilterMgr->appendFilter( L"SDW", L"*.sdw;*.sdc;*.sdi" );
- xFilterMgr->appendFilter( L"SXW", L"*.sxw;*.sxi" );
+ xFilterMgr->appendFilter( L"SXW", L"*.sxw;*.sxi" );
}
Reference< XFilePickerControlAccess > xFPControlAccess( xFilePicker, UNO_QUERY );
-
+
Any aAny;
sal_Bool bChkState = sal_False;
aAny.setValue( &bChkState, getCppuType( (sal_Bool*)0 ) );
xFPControlAccess->setValue( CHECKBOX_AUTOEXTENSION, 0, aAny );
-
+
OUString aVersion( L"Version 1" );
aAny <<= aVersion;
xFPControlAccess->setValue( LISTBOX_VERSION, ADD_ITEM, aAny );
diff --git a/fpicker/source/win32/folderpicker/FOPServiceInfo.hxx b/fpicker/source/win32/folderpicker/FOPServiceInfo.hxx
index 0f1dd0c0eeb4..0079e0331fd6 100644
--- a/fpicker/source/win32/folderpicker/FOPServiceInfo.hxx
+++ b/fpicker/source/win32/folderpicker/FOPServiceInfo.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,18 +38,18 @@
// defines
//------------------------------------------------------------------------
-// the service name is a description of a set of
+// the service name is a description of a set of
// interfaces (is the same as component categories in COM)
// the service names
#define FOLDER_PICKER_SERVICE_NAME "com.sun.star.ui.dialogs.SystemFolderPicker"
-// the implementation names
+// the implementation names
#define FOLDER_PICKER_IMPL_NAME "com.sun.star.ui.dialogs.Win32FolderPicker"
// the registry key names
// a key under which this service will be registered, Format: -> "/ImplName/UNO/SERVICES/ServiceName"
-// < Implementation-Name ></UNO/SERVICES/>< Service-Name >
+// < Implementation-Name ></UNO/SERVICES/>< Service-Name >
#define FOLDER_PICKER_REGKEY_NAME "/com.sun.star.ui.dialogs.Win32FolderPicker/UNO/SERVICES/com.sun.star.ui.dialogs.SystemFolderPicker"
#endif
diff --git a/fpicker/source/win32/folderpicker/FolderPicker.cxx b/fpicker/source/win32/folderpicker/FolderPicker.cxx
index bccaac0bf418..f75f98f33e0f 100644
--- a/fpicker/source/win32/folderpicker/FolderPicker.cxx
+++ b/fpicker/source/win32/folderpicker/FolderPicker.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -170,7 +170,7 @@ OUString SAL_CALL CFolderPicker::getImplementationName( )
}
// -------------------------------------------------
-// XServiceInfo
+// XServiceInfo
// -------------------------------------------------
sal_Bool SAL_CALL CFolderPicker::supportsService( const OUString& ServiceName )
@@ -186,17 +186,17 @@ sal_Bool SAL_CALL CFolderPicker::supportsService( const OUString& ServiceName )
}
// -------------------------------------------------
-// XServiceInfo
+// XServiceInfo
// -------------------------------------------------
-Sequence< OUString > SAL_CALL CFolderPicker::getSupportedServiceNames( )
+Sequence< OUString > SAL_CALL CFolderPicker::getSupportedServiceNames( )
throw( RuntimeException )
{
return FolderPicker_getSupportedServiceNames();
}
// -------------------------------------------------
-// XCancellable
+// XCancellable
// -------------------------------------------------
void SAL_CALL CFolderPicker::cancel( )
@@ -208,12 +208,12 @@ void SAL_CALL CFolderPicker::cancel( )
}
//------------------------------------------------
-// overwrite base class method, which is called
+// overwrite base class method, which is called
// by base class dispose function
//------------------------------------------------
void SAL_CALL CFolderPicker::disposing()
-{
+{
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/folderpicker/FolderPicker.hxx b/fpicker/source/win32/folderpicker/FolderPicker.hxx
index 0aed9df40630..3276af77d2f2 100644
--- a/fpicker/source/win32/folderpicker/FolderPicker.hxx
+++ b/fpicker/source/win32/folderpicker/FolderPicker.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,7 +30,7 @@
#define _FOLDERPICKER_HXX_
//---------------------------------------------------------
-// includes of other projects
+// includes of other projects
//---------------------------------------------------------
#include <cppuhelper/implbase3.hxx>
@@ -45,12 +45,12 @@
#include "WinFOPImpl.hxx"
//----------------------------------------------------------
-// class declaration
+// class declaration
//----------------------------------------------------------
-class CFolderPicker :
- public cppu::WeakImplHelper3<
- com::sun::star::ui::dialogs::XFolderPicker,
+class CFolderPicker :
+ public cppu::WeakImplHelper3<
+ com::sun::star::ui::dialogs::XFolderPicker,
com::sun::star::lang::XServiceInfo,
com::sun::star::util::XCancellable >
{
@@ -62,23 +62,23 @@ public:
//------------------------------------------------------------------------------------
// XExecutableDialog
//------------------------------------------------------------------------------------
+
+ virtual void SAL_CALL setTitle( const rtl::OUString& aTitle )
+ throw( com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL setTitle( const rtl::OUString& aTitle )
- throw( com::sun::star::uno::RuntimeException );
-
- virtual sal_Int16 SAL_CALL execute( )
+ virtual sal_Int16 SAL_CALL execute( )
throw( com::sun::star::uno::RuntimeException );
//------------------------------------------------------------------------------------
// XFolderPicker functions
//------------------------------------------------------------------------------------
- virtual void SAL_CALL setDisplayDirectory( const rtl::OUString& aDirectory )
+ virtual void SAL_CALL setDisplayDirectory( const rtl::OUString& aDirectory )
throw( com::sun::star::lang::IllegalArgumentException, com::sun::star::uno::RuntimeException );
- virtual rtl::OUString SAL_CALL getDisplayDirectory( )
+ virtual rtl::OUString SAL_CALL getDisplayDirectory( )
throw( com::sun::star::uno::RuntimeException );
-
+
virtual rtl::OUString SAL_CALL getDirectory( )
throw( com::sun::star::uno::RuntimeException );
@@ -87,42 +87,42 @@ public:
//------------------------------------------------
// XServiceInfo
- //------------------------------------------------
+ //------------------------------------------------
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
+ virtual ::rtl::OUString SAL_CALL getImplementationName( )
throw(::com::sun::star::uno::RuntimeException);
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
throw(::com::sun::star::uno::RuntimeException);
//------------------------------------------------
// XCancellable
- //------------------------------------------------
+ //------------------------------------------------
virtual void SAL_CALL cancel( )
throw(::com::sun::star::uno::RuntimeException);
//------------------------------------------------
- // overwrite base class method, which is called
+ // overwrite base class method, which is called
// by base class dispose function
//------------------------------------------------
virtual void SAL_CALL disposing();
-private:
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr;
- std::auto_ptr< CWinFolderPickerImpl > m_pFolderPickerImpl;
+private:
+ com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr;
+ std::auto_ptr< CWinFolderPickerImpl > m_pFolderPickerImpl;
osl::Mutex m_aMutex;
// prevent copy and assignment
private:
- CFolderPicker( const CFolderPicker& );
+ CFolderPicker( const CFolderPicker& );
CFolderPicker& operator=( const CFolderPicker& );
-};
+};
-#endif
+#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/folderpicker/FopEvtDisp.hxx b/fpicker/source/win32/folderpicker/FopEvtDisp.hxx
index 3da34d8f6bf6..edccfc7921af 100644
--- a/fpicker/source/win32/folderpicker/FopEvtDisp.hxx
+++ b/fpicker/source/win32/folderpicker/FopEvtDisp.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +40,7 @@ class CFOPEventDispatcher
public:
// dispatches a FilePickerEvent to wherever
- virtual void SAL_CALL helpRequested( ::com::sun::star::lang::EventObject aEvent ) const = 0;
+ virtual void SAL_CALL helpRequested( ::com::sun::star::lang::EventObject aEvent ) const = 0;
};
#endif
diff --git a/fpicker/source/win32/folderpicker/Fopentry.cxx b/fpicker/source/win32/folderpicker/Fopentry.cxx
index d86fff151a2a..1f71a0771e3c 100644
--- a/fpicker/source/win32/folderpicker/Fopentry.cxx
+++ b/fpicker/source/win32/folderpicker/Fopentry.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,7 +30,7 @@
#include "precompiled_fpicker.hxx"
//-----------------------------------------------------------------------
-// includes of other projects
+// includes of other projects
//-----------------------------------------------------------------------
#include <cppuhelper/factory.hxx>
#include <com/sun/star/container/XSet.hpp>
@@ -45,33 +45,33 @@
// namespace directives
//-----------------------------------------------------------------------
-using namespace ::rtl ;
-using namespace ::com::sun::star::uno ;
-using namespace ::com::sun::star::container ;
-using namespace ::com::sun::star::lang ;
-using namespace ::com::sun::star::registry ;
-using namespace ::cppu ;
+using namespace ::rtl ;
+using namespace ::com::sun::star::uno ;
+using namespace ::com::sun::star::container ;
+using namespace ::com::sun::star::lang ;
+using namespace ::com::sun::star::registry ;
+using namespace ::cppu ;
using com::sun::star::ui::dialogs::XFolderPicker;
-
+
namespace
{
//-----------------------------------------------------------------------
- //
+ //
//-----------------------------------------------------------------------
Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
- {
+ {
return Reference< XInterface >( static_cast< XFolderPicker* >( new CFolderPicker( rServiceManager ) ) );
}
}
//-----------------------------------------------------------------------
-// the 3 important functions which will be exported
+// the 3 important functions which will be exported
//-----------------------------------------------------------------------
-extern "C"
+extern "C"
{
//----------------------------------------------------------------------
@@ -96,12 +96,12 @@ sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey )
{
try
{
- Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
+ Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
pXNewKey->createKey( OUString( RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_REGKEY_NAME ) ) );
}
catch( InvalidRegistryException& )
- {
- OSL_ENSURE(sal_False, "InvalidRegistryException caught");
+ {
+ OSL_ENSURE(sal_False, "InvalidRegistryException caught");
bRetVal = sal_False;
}
}
@@ -110,7 +110,7 @@ sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey )
}
//----------------------------------------------------------------------
-// component_getFactory
+// component_getFactory
// returns a factory to create XFilePicker-Services
//----------------------------------------------------------------------
@@ -121,8 +121,8 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p
if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, FOLDER_PICKER_IMPL_NAME ) ) )
{
Sequence< OUString > aSNS( 1 );
- aSNS.getArray( )[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_SERVICE_NAME ) );
-
+ aSNS.getArray( )[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_SERVICE_NAME ) );
+
Reference< XSingleServiceFactory > xFactory ( createSingleFactory(
reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
OUString::createFromAscii( pImplName ),
@@ -132,7 +132,7 @@ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* p
{
xFactory->acquire();
pRet = xFactory.get();
- }
+ }
}
return pRet;
diff --git a/fpicker/source/win32/folderpicker/MtaFop.cxx b/fpicker/source/win32/folderpicker/MtaFop.cxx
index 2933b0e6614e..db9662c42839 100644
--- a/fpicker/source/win32/folderpicker/MtaFop.cxx
+++ b/fpicker/source/win32/folderpicker/MtaFop.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,7 +44,7 @@ using osl::Condition;
const sal_uInt32 MSG_BROWSEFORFOLDER = WM_USER + 1;
const sal_uInt32 MSG_SHUTDOWN = WM_USER + 2;
-const sal_uInt32 MAX_WAITTIME = 2000; // msec
+const sal_uInt32 MAX_WAITTIME = 2000; // msec
const sal_Bool MANUAL_RESET = sal_True;
const sal_Bool AUTO_RESET = sal_False;
@@ -54,14 +54,14 @@ typedef sal::systools::COMReference<IMalloc> IMallocPtr;
typedef sal::systools::COMReference<IShellFolder> IShellFolderPtr;
namespace
-{
+{
const char* FOLDERPICKER_SRV_DLL_NAME = "fop.dll";
- const char g_szWndClsName[] = "FopStaReqWnd###";
+ const char g_szWndClsName[] = "FopStaReqWnd###";
const char* CURRENT_INSTANCE = "CurrInst";
typedef struct _RequestContext
{
- HANDLE hEvent;
+ HANDLE hEvent;
sal_Bool bRet;
} RequestContext;
@@ -71,7 +71,7 @@ namespace
aRequestContext->hEvent = CreateEventA(
0, AUTO_RESET, INIT_NONSIGNALED, NULL );
-
+
aRequestContext->bRet = sal_False;
return ( 0 != aRequestContext->hEvent );
@@ -82,18 +82,18 @@ namespace
OSL_ASSERT( aRequestContext && aRequestContext->hEvent );
CloseHandle( aRequestContext->hEvent );
}
-
+
//-------------------------------
- // Determine if current thread is
+ // Determine if current thread is
// an MTA or STA thread
//-------------------------------
bool IsMTA()
{
HRESULT hr = CoInitialize(NULL);
-
+
if (RPC_E_CHANGED_MODE == hr)
return true;
-
+
if(SUCCEEDED(hr))
CoUninitialize();
@@ -102,7 +102,7 @@ namespace
}
//----------------------------------------------------------------
-// static member initialization
+// static member initialization
//----------------------------------------------------------------
ATOM CMtaFolderPicker::s_ClassAtom = 0;
@@ -113,12 +113,12 @@ sal_Int32 CMtaFolderPicker::s_StaRequestWndRegisterCount = 0;
// ctor
//--------------------------------------------------------------------
-CMtaFolderPicker::CMtaFolderPicker( sal_uInt32 Flags ) :
+CMtaFolderPicker::CMtaFolderPicker( sal_uInt32 Flags ) :
m_hStaThread( NULL ),
m_uStaThreadId( 0 ),
- m_hEvtThrdReady( NULL ),
+ m_hEvtThrdReady( NULL ),
m_hwndStaRequestWnd( NULL )
-{
+{
m_hInstance = GetModuleHandleA( FOLDERPICKER_SRV_DLL_NAME );
OSL_ENSURE( m_hInstance, "The name of the FolderPicker service dll must have changed" );
@@ -130,20 +130,20 @@ CMtaFolderPicker::CMtaFolderPicker( sal_uInt32 Flags ) :
// through your code in the debugger because if you
// set a break point in the ctor here the debugger
// may become the owner of the FolderBrowse dialog
- // and so it seems that the Visual Studio and the
+ // and so it seems that the Visual Studio and the
// office are hanging
m_bi.hwndOwner = GetForegroundWindow( );
/*
- Flag Available
+ Flag Available
--------------------------------
- BIF_EDITBOX Version 4.71
- BIF_NEWDIALOGSTYLE Version 5.0
- BIF_SHAREABLE Version 5.0
- BIF_VALIDATE Version 4.71
+ BIF_EDITBOX Version 4.71
+ BIF_NEWDIALOGSTYLE Version 5.0
+ BIF_SHAREABLE Version 5.0
+ BIF_VALIDATE Version 4.71
Version 4.71 - Internet Explorer 4.0
- Version 5.0 - Internet Explorer 5.0
+ Version 5.0 - Internet Explorer 5.0
Windows 2000
*/
m_bi.ulFlags = Flags;
@@ -159,29 +159,29 @@ CMtaFolderPicker::CMtaFolderPicker( sal_uInt32 Flags ) :
m_dialogTitle = ResProvider.getResString( 500 );
m_Description = ResProvider.getResString( 501 );
-
+
// signals that the thread was successfully set up
- m_hEvtThrdReady = CreateEventA(
- 0,
- MANUAL_RESET,
- INIT_NONSIGNALED,
- NULL );
+ m_hEvtThrdReady = CreateEventA(
+ 0,
+ MANUAL_RESET,
+ INIT_NONSIGNALED,
+ NULL );
if ( m_hEvtThrdReady )
{
// setup the sta thread
- m_hStaThread = (HANDLE)_beginthreadex(
- NULL,
- 0,
- CMtaFolderPicker::StaThreadProc,
- this,
- 0,
- &m_uStaThreadId );
+ m_hStaThread = (HANDLE)_beginthreadex(
+ NULL,
+ 0,
+ CMtaFolderPicker::StaThreadProc,
+ this,
+ 0,
+ &m_uStaThreadId );
OSL_ASSERT( m_hStaThread );
}
- OSL_ASSERT( m_hEvtThrdReady );
+ OSL_ASSERT( m_hEvtThrdReady );
}
//--------------------------------------------------------------------
@@ -189,7 +189,7 @@ CMtaFolderPicker::CMtaFolderPicker( sal_uInt32 Flags ) :
//--------------------------------------------------------------------
CMtaFolderPicker::~CMtaFolderPicker( )
-{
+{
// only if the is a valid event handle
// there may also be a thread a hidden
// target request window and so on
@@ -199,7 +199,7 @@ CMtaFolderPicker::~CMtaFolderPicker( )
// block calling threads because we
// are about to shutdown
ResetEvent( m_hEvtThrdReady );
-
+
// force the destruction of the sta thread request window
// and the end of the thread
// remeber: DestroyWindow may only be called from within
@@ -208,23 +208,23 @@ CMtaFolderPicker::~CMtaFolderPicker( )
{
SendMessageA( m_hwndStaRequestWnd, MSG_SHUTDOWN, 0, 0 );
- // we place unregister class here because
- // if we have a valid window we must have
+ // we place unregister class here because
+ // if we have a valid window we must have
// sucessfully registered a window class
- // if the creation of the window itself
- // failed after registering the window
+ // if the creation of the window itself
+ // failed after registering the window
// class we have unregistered it immediately
// in createStaRequestWindow below
- UnregisterStaRequestWindowClass( );
+ UnregisterStaRequestWindowClass( );
}
-
+
if ( m_hStaThread )
{
// wait for thread shutdown
sal_uInt32 dwResult = WaitForSingleObject( m_hStaThread, MAX_WAITTIME );
OSL_ENSURE( dwResult == WAIT_OBJECT_0, "sta thread could not terminate" );
-
- // terminate the thread if it
+
+ // terminate the thread if it
// doesn't shutdown itself
if ( WAIT_OBJECT_0 != dwResult )
TerminateThread(
@@ -233,7 +233,7 @@ CMtaFolderPicker::~CMtaFolderPicker( )
CloseHandle( m_hStaThread );
}
- CloseHandle( m_hEvtThrdReady );
+ CloseHandle( m_hEvtThrdReady );
}
}
@@ -244,10 +244,10 @@ CMtaFolderPicker::~CMtaFolderPicker( )
sal_Bool CMtaFolderPicker::browseForFolder( )
{
sal_Bool bRet = sal_False;
-
+
if (IsMTA())
{
-
+
OSL_ASSERT( m_hEvtThrdReady );
if ( WaitForSingleObject( m_hEvtThrdReady, MAX_WAITTIME ) != WAIT_OBJECT_0 )
@@ -255,55 +255,55 @@ sal_Bool CMtaFolderPicker::browseForFolder( )
OSL_ENSURE( sal_False, "sta thread not ready" );
return sal_False;
}
-
- RequestContext aReqCtx;
+
+ RequestContext aReqCtx;
if ( !InitializeRequestContext( &aReqCtx ) )
{
OSL_ASSERT( sal_False );
return sal_False;
}
-
+
// marshall request into the sta thread
- PostMessageA(
- m_hwndStaRequestWnd,
- MSG_BROWSEFORFOLDER,
- 0,
- reinterpret_cast< LPARAM >( &aReqCtx ) );
+ PostMessageA(
+ m_hwndStaRequestWnd,
+ MSG_BROWSEFORFOLDER,
+ 0,
+ reinterpret_cast< LPARAM >( &aReqCtx ) );
- // waiting for the event to be signaled or
+ // waiting for the event to be signaled or
// window messages so that we don't block
// our parent window
sal_Bool bContinue = sal_True;
-
+
while ( bContinue )
{
DWORD dwResult = MsgWaitForMultipleObjects(
1, &aReqCtx.hEvent, FALSE, INFINITE, QS_ALLEVENTS );
-
+
switch ( dwResult )
{
// the request context event is signaled
- case WAIT_OBJECT_0:
+ case WAIT_OBJECT_0:
bContinue = sal_False;
break;
// a window message has arrived
case WAIT_OBJECT_0 + 1:
{
- // dispatching all messages but we expect to
+ // dispatching all messages but we expect to
// receive only paint or timer messages that's
// why we don't need to call TranslateMessage or
// TranslateAccelerator, because keybord or
// mouse messages are for the FolderPicker which
// is in the foreground and should not arrive here
MSG msg;
- while ( PeekMessageA( &msg, NULL, 0, 0, PM_REMOVE ) )
- DispatchMessageA(&msg);
+ while ( PeekMessageA( &msg, NULL, 0, 0, PM_REMOVE ) )
+ DispatchMessageA(&msg);
}
break;
-
+
// should not happen
default:
OSL_ASSERT( sal_False );
@@ -317,12 +317,12 @@ sal_Bool CMtaFolderPicker::browseForFolder( )
{
bRet = onBrowseForFolder();
}
-
+
return bRet;
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
void SAL_CALL CMtaFolderPicker::setDisplayDirectory( const OUString& aDirectory )
@@ -331,7 +331,7 @@ void SAL_CALL CMtaFolderPicker::setDisplayDirectory( const OUString& aDirectory
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
OUString SAL_CALL CMtaFolderPicker::getDisplayDirectory( )
@@ -340,7 +340,7 @@ OUString SAL_CALL CMtaFolderPicker::getDisplayDirectory( )
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
OUString SAL_CALL CMtaFolderPicker::getDirectory( )
@@ -349,7 +349,7 @@ OUString SAL_CALL CMtaFolderPicker::getDirectory( )
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
void SAL_CALL CMtaFolderPicker::setDescription( const rtl::OUString& aDescription )
@@ -358,16 +358,16 @@ void SAL_CALL CMtaFolderPicker::setDescription( const rtl::OUString& aDescriptio
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
-
+
void SAL_CALL CMtaFolderPicker::setTitle( const OUString& aTitle )
{
m_dialogTitle = aTitle;
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
OUString SAL_CALL CMtaFolderPicker::getTitle( )
@@ -378,35 +378,35 @@ OUString SAL_CALL CMtaFolderPicker::getTitle( )
//-----------------------------------------------------
// XCancellable
//-----------------------------------------------------
-
+
void SAL_CALL CMtaFolderPicker::cancel( )
{
if ( IsWindow( m_hwnd ) )
{
- // simulate a mouse click to the
+ // simulate a mouse click to the
// cancel button
- PostMessageA(
- m_hwnd,
- WM_COMMAND,
- MAKEWPARAM( IDCANCEL, BN_CLICKED ),
+ PostMessageA(
+ m_hwnd,
+ WM_COMMAND,
+ MAKEWPARAM( IDCANCEL, BN_CLICKED ),
(LPARAM)GetDlgItem( m_hwnd, IDCANCEL ) );
}
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
sal_Bool SAL_CALL CMtaFolderPicker::onBrowseForFolder( )
-{
+{
sal_Bool bRet;
LPITEMIDLIST lpiid;
-
+
// pre SHBrowseFroFolder
m_bi.pidlRoot = 0;
m_bi.pszDisplayName = reinterpret_cast<LPWSTR>(m_pathBuff.get());
-
+
if ( m_Description.getLength( ) )
m_bi.lpszTitle = reinterpret_cast<LPCWSTR>(m_Description.getStr( ));
@@ -422,22 +422,22 @@ sal_Bool SAL_CALL CMtaFolderPicker::onBrowseForFolder( )
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
void SAL_CALL CMtaFolderPicker::releaseItemIdList( LPITEMIDLIST lpItemIdList )
{
IMallocPtr pIMalloc;
- SHGetMalloc(&pIMalloc);
+ SHGetMalloc(&pIMalloc);
if (pIMalloc.is())
{
- pIMalloc->Free(lpItemIdList);
- lpItemIdList = NULL;
+ pIMalloc->Free(lpItemIdList);
+ lpItemIdList = NULL;
}
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
LPITEMIDLIST SAL_CALL CMtaFolderPicker::getItemIdListFromPath( const rtl::OUString& aDirectory )
@@ -447,7 +447,7 @@ LPITEMIDLIST SAL_CALL CMtaFolderPicker::getItemIdListFromPath( const rtl::OUStri
return NULL;
LPITEMIDLIST lpItemIdList(NULL);
-
+
IShellFolderPtr pIShellFolder;
SHGetDesktopFolder(&pIShellFolder);
@@ -461,12 +461,12 @@ LPITEMIDLIST SAL_CALL CMtaFolderPicker::getItemIdListFromPath( const rtl::OUStri
&lpItemIdList,
NULL );
}
-
+
return lpItemIdList;
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
OUString SAL_CALL CMtaFolderPicker::getPathFromItemIdList( LPCITEMIDLIST lpItemIdList )
@@ -474,7 +474,7 @@ OUString SAL_CALL CMtaFolderPicker::getPathFromItemIdList( LPCITEMIDLIST lpItemI
OUString path;
if ( lpItemIdList )
- {
+ {
bool bRet = SHGetPathFromIDListW( lpItemIdList, reinterpret_cast<LPWSTR>(m_pathBuff.get()) );
if ( bRet )
path = m_pathBuff.get( );
@@ -484,7 +484,7 @@ OUString SAL_CALL CMtaFolderPicker::getPathFromItemIdList( LPCITEMIDLIST lpItemI
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
void SAL_CALL CMtaFolderPicker::enableOk( sal_Bool bEnable )
@@ -499,7 +499,7 @@ void SAL_CALL CMtaFolderPicker::enableOk( sal_Bool bEnable )
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
void SAL_CALL CMtaFolderPicker::setSelection( const rtl::OUString& aDirectory )
@@ -520,22 +520,22 @@ void SAL_CALL CMtaFolderPicker::setSelection( const rtl::OUString& aDirectory )
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
void SAL_CALL CMtaFolderPicker::setStatusText( const rtl::OUString& aStatusText )
{
OSL_ASSERT( IsWindow( m_hwnd ) );
- SendMessageW(
- m_hwnd,
- BFFM_SETSTATUSTEXTW,
- static_cast< WPARAM >( 0 ),
+ SendMessageW(
+ m_hwnd,
+ BFFM_SETSTATUSTEXTW,
+ static_cast< WPARAM >( 0 ),
reinterpret_cast< LPARAM >( aStatusText.getStr( ) ) );
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
void SAL_CALL CMtaFolderPicker::onInitialized( )
@@ -544,18 +544,18 @@ void SAL_CALL CMtaFolderPicker::onInitialized( )
if ( lpiidDisplayDir )
{
- SendMessageA(
- m_hwnd,
- BFFM_SETSELECTION,
- (WPARAM)FALSE,
+ SendMessageA(
+ m_hwnd,
+ BFFM_SETSELECTION,
+ (WPARAM)FALSE,
(LPARAM) lpiidDisplayDir );
- releaseItemIdList( lpiidDisplayDir );
+ releaseItemIdList( lpiidDisplayDir );
}
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
sal_uInt32 CMtaFolderPicker::onValidateFailed()
@@ -565,19 +565,19 @@ sal_uInt32 CMtaFolderPicker::onValidateFailed()
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
int CALLBACK CMtaFolderPicker::FolderPickerCallback( HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData )
{
CMtaFolderPicker* pImpl = reinterpret_cast< CMtaFolderPicker* >( lpData );
OSL_ASSERT( pImpl );
-
+
int nRC = 0;
-
+
switch( uMsg )
{
- case BFFM_INITIALIZED:
+ case BFFM_INITIALIZED:
pImpl->m_hwnd = hwnd;
pImpl->onInitialized( );
SetWindowTextW( hwnd, reinterpret_cast<LPCWSTR>(pImpl->m_dialogTitle.getStr()) );
@@ -585,8 +585,8 @@ int CALLBACK CMtaFolderPicker::FolderPickerCallback( HWND hwnd, UINT uMsg, LPARA
case BFFM_SELCHANGED:
pImpl->m_hwnd = hwnd;
- pImpl->onSelChanged(
- pImpl->getPathFromItemIdList(
+ pImpl->onSelChanged(
+ pImpl->getPathFromItemIdList(
reinterpret_cast< LPITEMIDLIST >( lParam ) ) );
break;
@@ -611,29 +611,29 @@ LRESULT CALLBACK CMtaFolderPicker::StaWndProc( HWND hWnd, UINT uMsg, WPARAM wPar
CMtaFolderPicker* pImpl = NULL;
/*
- we connect to the belonging class instance of this
+ we connect to the belonging class instance of this
window using SetProp, GetProp etc.
this may fail if somehow the class instance destroyed
- before the window
+ before the window
*/
switch( uMsg )
{
case WM_CREATE:
{
- LPCREATESTRUCT lpcs =
+ LPCREATESTRUCT lpcs =
reinterpret_cast< LPCREATESTRUCT >( lParam );
OSL_ASSERT( lpcs->lpCreateParams );
- // connect the instance handle to the window
+ // connect the instance handle to the window
SetPropA( hWnd, CURRENT_INSTANCE, lpcs->lpCreateParams );
}
break;
case WM_NCDESTROY:
// RemoveProp returns the saved value on success
- pImpl = reinterpret_cast< CMtaFolderPicker* >(
+ pImpl = reinterpret_cast< CMtaFolderPicker* >(
RemovePropA( hWnd, CURRENT_INSTANCE ) );
OSL_ASSERT( pImpl && !IsBadReadPtr( pImpl, sizeof( CMtaFolderPicker ) ) );
@@ -648,7 +648,7 @@ LRESULT CALLBACK CMtaFolderPicker::StaWndProc( HWND hWnd, UINT uMsg, WPARAM wPar
GetPropA( hWnd, CURRENT_INSTANCE ) );
OSL_ASSERT( pImpl && !IsBadReadPtr( pImpl, sizeof( CMtaFolderPicker ) ) );
-
+
aReqCtx->bRet = pImpl->onBrowseForFolder( );
SetEvent( aReqCtx->hEvent );
}
@@ -663,7 +663,7 @@ LRESULT CALLBACK CMtaFolderPicker::StaWndProc( HWND hWnd, UINT uMsg, WPARAM wPar
DestroyWindow( pImpl->m_hwndStaRequestWnd );
break;
- case WM_DESTROY:
+ case WM_DESTROY:
PostQuitMessage( 0 );
break;
@@ -676,7 +676,7 @@ LRESULT CALLBACK CMtaFolderPicker::StaWndProc( HWND hWnd, UINT uMsg, WPARAM wPar
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
sal_Bool SAL_CALL CMtaFolderPicker::createStaRequestWindow( )
@@ -685,16 +685,16 @@ sal_Bool SAL_CALL CMtaFolderPicker::createStaRequestWindow( )
if ( RegisterStaRequestWindowClass( ) )
{
- m_hwndStaRequestWnd = CreateWindowA(
- g_szWndClsName, NULL,
- 0, 0, 0, 0, 0,
- NULL, NULL, m_hInstance,
+ m_hwndStaRequestWnd = CreateWindowA(
+ g_szWndClsName, NULL,
+ 0, 0, 0, 0, 0,
+ NULL, NULL, m_hInstance,
(LPVOID)this // provide the instance of the class
);
-
+
bIsWnd = IsWindow( m_hwndStaRequestWnd );
-
- // we do immediately unregister the window class
+
+ // we do immediately unregister the window class
// if the creation of the window fails because we
// don't want to spoil the register class counter
if ( !bIsWnd )
@@ -707,40 +707,40 @@ sal_Bool SAL_CALL CMtaFolderPicker::createStaRequestWindow( )
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
unsigned int CMtaFolderPicker::run( )
-{
+{
OSL_ASSERT( m_hEvtThrdReady );
// setup an sta environment
HRESULT hr = CoInitialize( NULL );
-
- // if we can't setup an sta environment
- // we stop here and return
+
+ // if we can't setup an sta environment
+ // we stop here and return
if ( FAILED( hr ) )
{
OSL_ENSURE( sal_False, "CoInitialize failed" );
return sal::static_int_cast< unsigned int >(-1);
}
-
+
unsigned int nRet;
if ( createStaRequestWindow( ) )
{
SetEvent( m_hEvtThrdReady );
-
+
// pumping messages
- MSG msg;
+ MSG msg;
while( GetMessageA( &msg, NULL, 0, 0 ) )
- DispatchMessageA( &msg );
+ DispatchMessageA( &msg );
- nRet = 0;
+ nRet = 0;
}
else
- {
- OSL_ENSURE( sal_False, "failed to create sta thread" );
+ {
+ OSL_ENSURE( sal_False, "failed to create sta thread" );
nRet = sal::static_int_cast< unsigned int >(-1);
}
@@ -751,19 +751,19 @@ unsigned int CMtaFolderPicker::run( )
}
//--------------------------------------------------------------------
-//
+//
//--------------------------------------------------------------------
unsigned int WINAPI CMtaFolderPicker::StaThreadProc( LPVOID pParam )
{
- CMtaFolderPicker* pInst =
+ CMtaFolderPicker* pInst =
reinterpret_cast<CMtaFolderPicker*>( pParam );
OSL_ASSERT( pInst );
+
+ HRESULT hr = OleInitialize( NULL );
- HRESULT hr = OleInitialize( NULL );
-
- unsigned int result = pInst->run( );
+ unsigned int result = pInst->run( );
if ( SUCCEEDED( hr ) )
OleUninitialize();
@@ -776,30 +776,30 @@ unsigned int WINAPI CMtaFolderPicker::StaThreadProc( LPVOID pParam )
//---------------------------------------------------
ATOM SAL_CALL CMtaFolderPicker::RegisterStaRequestWindowClass( )
-{
+{
osl::MutexGuard aGuard( s_Mutex );
if ( 0 == s_ClassAtom )
{
WNDCLASSEXA wcex;
-
+
ZeroMemory( &wcex, sizeof( WNDCLASSEXA ) );
- wcex.cbSize = sizeof(WNDCLASSEXA);
- wcex.style = 0;
- wcex.lpfnWndProc = static_cast< WNDPROC >( CMtaFolderPicker::StaWndProc );
- wcex.cbClsExtra = 0;
- wcex.cbWndExtra = 0;
- wcex.hInstance = m_hInstance;
- wcex.hIcon = NULL;
- wcex.hCursor = NULL;
- wcex.hbrBackground = NULL;
- wcex.lpszMenuName = NULL;
- wcex.lpszClassName = g_szWndClsName;
- wcex.hIconSm = NULL;
+ wcex.cbSize = sizeof(WNDCLASSEXA);
+ wcex.style = 0;
+ wcex.lpfnWndProc = static_cast< WNDPROC >( CMtaFolderPicker::StaWndProc );
+ wcex.cbClsExtra = 0;
+ wcex.cbWndExtra = 0;
+ wcex.hInstance = m_hInstance;
+ wcex.hIcon = NULL;
+ wcex.hCursor = NULL;
+ wcex.hbrBackground = NULL;
+ wcex.lpszMenuName = NULL;
+ wcex.lpszClassName = g_szWndClsName;
+ wcex.hIconSm = NULL;
s_ClassAtom = RegisterClassExA( &wcex );
- OSL_ASSERT( s_ClassAtom );
+ OSL_ASSERT( s_ClassAtom );
}
// increment the register class counter
@@ -818,10 +818,10 @@ ATOM SAL_CALL CMtaFolderPicker::RegisterStaRequestWindowClass( )
void SAL_CALL CMtaFolderPicker::UnregisterStaRequestWindowClass( )
{
osl::MutexGuard aGuard( s_Mutex );
-
+
OSL_ASSERT( 0 != s_ClassAtom );
- // update the register class counter
+ // update the register class counter
// and unregister the window class if
// counter drops to zero
if ( 0 != s_ClassAtom )
@@ -832,11 +832,11 @@ void SAL_CALL CMtaFolderPicker::UnregisterStaRequestWindowClass( )
if ( 0 == s_StaRequestWndRegisterCount )
{
- UnregisterClass(
+ UnregisterClass(
(LPCTSTR)MAKELONG( s_ClassAtom, 0 ), m_hInstance );
-
+
s_ClassAtom = 0;
- }
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/folderpicker/MtaFop.hxx b/fpicker/source/win32/folderpicker/MtaFop.hxx
index 36e4648b05bd..df7fd4dc5072 100644
--- a/fpicker/source/win32/folderpicker/MtaFop.hxx
+++ b/fpicker/source/win32/folderpicker/MtaFop.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -60,7 +60,7 @@ public:
{
if (0 == size)
size = 32000; // max path length under Win2000
-
+
pBuff = new sal_Unicode[size];
OSL_POSTCOND(pBuff,"Could not allocate path buffer");
@@ -77,7 +77,7 @@ public:
"No path buffer allocated" );
return pBuff;
}
-
+
sal_Unicode* get( )
{
OSL_PRECOND( pBuff, \
@@ -93,7 +93,7 @@ private:
// the Mta-Ole clipboard class is for internal use only!
// only one instance of this class should be created, the
// user has to ensure this!
-// the class is not thread-safe because it will be used
+// the class is not thread-safe because it will be used
// only from within the clipboard service and the methods
// of the clipboard service are already synchronized
//--------------------------------------------------------
@@ -104,9 +104,9 @@ public:
CMtaFolderPicker( sal_uInt32 Flags );
virtual ~CMtaFolderPicker( );
- // shell functions
+ // shell functions
sal_Bool SAL_CALL browseForFolder( );
-
+
virtual void SAL_CALL setDisplayDirectory( const rtl::OUString& aDirectory );
virtual rtl::OUString SAL_CALL getDisplayDirectory( );
virtual rtl::OUString SAL_CALL getDirectory( );
@@ -119,7 +119,7 @@ public:
//-----------------------------------------------------
// XCancellable
//-----------------------------------------------------
-
+
virtual void SAL_CALL cancel( );
protected:
@@ -133,14 +133,14 @@ protected:
private:
sal_uInt32 onValidateFailed();
- // helper functions
+ // helper functions
LPITEMIDLIST SAL_CALL getItemIdListFromPath( const rtl::OUString& aDirectory );
rtl::OUString SAL_CALL getPathFromItemIdList( LPCITEMIDLIST lpItemIdList );
- void SAL_CALL releaseItemIdList( LPITEMIDLIST lpItemIdList );
+ void SAL_CALL releaseItemIdList( LPITEMIDLIST lpItemIdList );
unsigned int run( );
-
- // create a hidden windows which serves as an request
+
+ // create a hidden windows which serves as an request
// target; so we guarantee synchronization
sal_Bool SAL_CALL createStaRequestWindow( );
@@ -149,7 +149,7 @@ private:
// from a different thread context!
//---------------------------------------------------------------
- sal_Bool SAL_CALL onBrowseForFolder( );
+ sal_Bool SAL_CALL onBrowseForFolder( );
static LRESULT CALLBACK StaWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
static unsigned int WINAPI StaThreadProc( LPVOID pParam );
@@ -158,22 +158,22 @@ private:
protected:
HWND m_hwnd;
-
+
private:
ATOM SAL_CALL RegisterStaRequestWindowClass( );
void SAL_CALL UnregisterStaRequestWindowClass( );
private:
- HANDLE m_hStaThread;
- unsigned m_uStaThreadId;
- HANDLE m_hEvtThrdReady;
- HWND m_hwndStaRequestWnd;
- rtl::OUString m_dialogTitle;
+ HANDLE m_hStaThread;
+ unsigned m_uStaThreadId;
+ HANDLE m_hEvtThrdReady;
+ HWND m_hwndStaRequestWnd;
+ rtl::OUString m_dialogTitle;
rtl::OUString m_Description;
- rtl::OUString m_displayDir;
+ rtl::OUString m_displayDir;
rtl::OUString m_SelectedDir;
- BROWSEINFOW m_bi;
- CAutoPathBuff m_pathBuff;
+ BROWSEINFOW m_bi;
+ CAutoPathBuff m_pathBuff;
HINSTANCE m_hInstance;
// the request window class has to be registered only
@@ -186,7 +186,7 @@ private:
// prevent copy and assignment
private:
CMtaFolderPicker( const CMtaFolderPicker& );
- CMtaFolderPicker& operator=( const CMtaFolderPicker& );
+ CMtaFolderPicker& operator=( const CMtaFolderPicker& );
};
#endif
diff --git a/fpicker/source/win32/folderpicker/WinFOPImpl.cxx b/fpicker/source/win32/folderpicker/WinFOPImpl.cxx
index 143d91dc3527..f03251f5fce6 100644
--- a/fpicker/source/win32/folderpicker/WinFOPImpl.cxx
+++ b/fpicker/source/win32/folderpicker/WinFOPImpl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -64,7 +64,7 @@ const OUString BACKSLASH = OUString::createFromAscii( "\\" );
// ctor
//------------------------------------------------------------------------
-CWinFolderPickerImpl::CWinFolderPickerImpl( CFolderPicker* aFolderPicker ) :
+CWinFolderPickerImpl::CWinFolderPickerImpl( CFolderPicker* aFolderPicker ) :
CMtaFolderPicker( BIF_RETURNONLYFSDIRS | BIF_RETURNFSANCESTORS | BIF_EDITBOX | BIF_VALIDATE ),
m_pFolderPicker( aFolderPicker ),
m_nLastDlgResult( ::com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL )
@@ -72,42 +72,42 @@ CWinFolderPickerImpl::CWinFolderPickerImpl( CFolderPicker* aFolderPicker ) :
}
//------------------------------------------------------------------------
-// get directory in URL format, convert it to system format and set the
+// get directory in URL format, convert it to system format and set the
// member variable
-// If the given URL for the directory is invalid the function throws an
+// If the given URL for the directory is invalid the function throws an
// IllegalArgumentException
// If the specified path is well formed but invalid for the underlying
-// OS the FolderPicker starts in the root of the file system hierarchie
+// OS the FolderPicker starts in the root of the file system hierarchie
//------------------------------------------------------------------------
-void SAL_CALL CWinFolderPickerImpl::setDisplayDirectory( const OUString& aDirectory )
+void SAL_CALL CWinFolderPickerImpl::setDisplayDirectory( const OUString& aDirectory )
throw( IllegalArgumentException, RuntimeException )
{
OUString sysDir;
if( aDirectory.getLength( ) )
- {
+ {
// assuming that this function succeeds after successful execution
// of getAbsolutePath
::osl::FileBase::RC rc =
::osl::FileBase::getSystemPathFromFileURL( aDirectory, sysDir );
-
+
if ( ::osl::FileBase::E_None != rc )
- throw IllegalArgumentException(
+ throw IllegalArgumentException(
OUString::createFromAscii( "directory is not a valid file url" ),
static_cast< XFolderPicker* >( m_pFolderPicker ),
- 1 );
-
+ 1 );
+
// we ensure that there is a trailing '/' at the end of
// he given file url, because the windows functions only
// works correctly when providing "c:\" or an environment
- // variable like "=c:=c:\.." etc. is set, else the
- // FolderPicker would stand in the root of the shell
- // hierarchie which is the desktop folder
+ // variable like "=c:=c:\.." etc. is set, else the
+ // FolderPicker would stand in the root of the shell
+ // hierarchie which is the desktop folder
if ( sysDir.lastIndexOf( BACKSLASH ) != (sysDir.getLength( ) - 1) )
sysDir += BACKSLASH;
}
-
+
// call base class method
CMtaFolderPicker::setDisplayDirectory( sysDir );
}
@@ -116,7 +116,7 @@ void SAL_CALL CWinFolderPickerImpl::setDisplayDirectory( const OUString& aDirect
// we return the directory in URL format
//------------------------------------------------------------------------
-OUString CWinFolderPickerImpl::getDisplayDirectory( )
+OUString CWinFolderPickerImpl::getDisplayDirectory( )
throw( RuntimeException )
{
// call base class method to get the directory in system format
@@ -125,12 +125,12 @@ OUString CWinFolderPickerImpl::getDisplayDirectory( )
OUString displayDirectoryURL;
if ( displayDirectory.getLength( ) )
::osl::FileBase::getFileURLFromSystemPath( displayDirectory, displayDirectoryURL );
-
+
return displayDirectoryURL;
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
OUString SAL_CALL CWinFolderPickerImpl::getDirectory( ) throw( RuntimeException )
@@ -145,18 +145,18 @@ OUString SAL_CALL CWinFolderPickerImpl::getDirectory( ) throw( RuntimeException
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Int16 SAL_CALL CWinFolderPickerImpl::execute( ) throw( RuntimeException )
-{
- return m_nLastDlgResult = CMtaFolderPicker::browseForFolder( ) ?
+{
+ return m_nLastDlgResult = CMtaFolderPicker::browseForFolder( ) ?
::com::sun::star::ui::dialogs::ExecutableDialogResults::OK :
::com::sun::star::ui::dialogs::ExecutableDialogResults::CANCEL;
}
//---------------------------------------------------------------------
-//
+//
//---------------------------------------------------------------------
void CWinFolderPickerImpl::onSelChanged( const OUString& aNewPath )
diff --git a/fpicker/source/win32/folderpicker/WinFOPImpl.hxx b/fpicker/source/win32/folderpicker/WinFOPImpl.hxx
index d88531629d03..0dcf37b1abf2 100644
--- a/fpicker/source/win32/folderpicker/WinFOPImpl.hxx
+++ b/fpicker/source/win32/folderpicker/WinFOPImpl.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,7 +39,7 @@
#include "MtaFop.hxx"
//------------------------------------------------------------------------
-// forward
+// forward
//------------------------------------------------------------------------
class CFolderPicker;
@@ -52,16 +52,16 @@ class CWinFolderPickerImpl : public CMtaFolderPicker
{
public:
CWinFolderPickerImpl( CFolderPicker* aFolderPicker );
-
+
//-----------------------------------------------------------------------------------------
// XExecutableDialog
//-----------------------------------------------------------------------------------------
-
- virtual sal_Int16 SAL_CALL execute( )
+
+ virtual sal_Int16 SAL_CALL execute( )
throw( com::sun::star::uno::RuntimeException );
//-----------------------------------------------------
- // XFolderPicker
+ // XFolderPicker
//-----------------------------------------------------
virtual void SAL_CALL setDisplayDirectory( const rtl::OUString& aDirectory )
@@ -75,10 +75,10 @@ public:
protected:
virtual void SAL_CALL onSelChanged( const rtl::OUString& aNewPath );
-
+
private:
- CFolderPicker* m_pFolderPicker;
- sal_Int16 m_nLastDlgResult;
+ CFolderPicker* m_pFolderPicker;
+ sal_Int16 m_nLastDlgResult;
};
#endif
diff --git a/fpicker/source/win32/folderpicker/fop.xml b/fpicker/source/win32/folderpicker/fop.xml
index 7c6835a88cb9..74e678c73ecc 100644
--- a/fpicker/source/win32/folderpicker/fop.xml
+++ b/fpicker/source/win32/folderpicker/fop.xml
@@ -9,32 +9,32 @@
The win32 implementation of the FolderPicker service.
</description>
<loader-name>com.sun.star.loader.SharedLibrary</loader-name>
- <language> c++ </language>
- <status value="beta"/>
- <supported-service> com.sun.star.ui.dialogs.FolderPicker </supported-service>
+ <language> c++ </language>
+ <status value="beta"/>
+ <supported-service> com.sun.star.ui.dialogs.FolderPicker </supported-service>
<service-dependency>...</service-dependency>
- <type> com.sun.star.ui.dialogs.XExecutableDialog </type>
- <type> com.sun.star.ui.dialogs.XFolderPicker </type>
- <type> com.sun.star.ui.dialogs.ExecutableDialogException </type>
- <type> com.sun.star.ui.dialogs.ExecutableDialogResults </type>
+ <type> com.sun.star.ui.dialogs.XExecutableDialog </type>
+ <type> com.sun.star.ui.dialogs.XFolderPicker </type>
+ <type> com.sun.star.ui.dialogs.ExecutableDialogException </type>
+ <type> com.sun.star.ui.dialogs.ExecutableDialogResults </type>
<type> com.sun.star.ui.dialogs.ExtendedFilePickerElementIds </type>
- <type> com.sun.star.ui.dialogs.CommonFilePickerElementIds </type>
- <type> com.sun.star.util.XCancellable </type>
- <type> com.sun.star.lang.XMultiServiceFactory </type>
- <type> com.sun.star.lang.XSingleServiceFactory </type>
- <type> com.sun.star.lang.XServiceInfo </type>
- <type> com.sun.star.lang.XTypeProvider </type>
- <type> com.sun.star.lang.IllegalArgumentException </type>
- <type> com.sun.star.uno.TypeClass </type>
- <type> com.sun.star.uno.XWeak </type>
- <type> com.sun.star.uno.XAggregation </type>
- <type> com.sun.star.registry.XRegistryKey </type>
- <type> com.sun.star.container.XSet </type>
+ <type> com.sun.star.ui.dialogs.CommonFilePickerElementIds </type>
+ <type> com.sun.star.util.XCancellable </type>
+ <type> com.sun.star.lang.XMultiServiceFactory </type>
+ <type> com.sun.star.lang.XSingleServiceFactory </type>
+ <type> com.sun.star.lang.XServiceInfo </type>
+ <type> com.sun.star.lang.XTypeProvider </type>
+ <type> com.sun.star.lang.IllegalArgumentException </type>
+ <type> com.sun.star.uno.TypeClass </type>
+ <type> com.sun.star.uno.XWeak </type>
+ <type> com.sun.star.uno.XAggregation </type>
+ <type> com.sun.star.registry.XRegistryKey </type>
+ <type> com.sun.star.container.XSet </type>
</component-description>
- <project-build-dependency> cppuhelper </project-build-dependency>
- <project-build-dependency> cppu </project-build-dependency>
- <project-build-dependency> sal </project-build-dependency>
- <runtime-module-dependency> cppuhelper </runtime-module-dependency>
- <runtime-module-dependency> cppu2 </runtime-module-dependency>
- <runtime-module-dependency> sal2 </runtime-module-dependency>
+ <project-build-dependency> cppuhelper </project-build-dependency>
+ <project-build-dependency> cppu </project-build-dependency>
+ <project-build-dependency> sal </project-build-dependency>
+ <runtime-module-dependency> cppuhelper </runtime-module-dependency>
+ <runtime-module-dependency> cppu2 </runtime-module-dependency>
+ <runtime-module-dependency> sal2 </runtime-module-dependency>
</module-description>
diff --git a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx
index d4b2aa279697..160d715e825d 100644
--- a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx
+++ b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,14 +31,14 @@
//-----------------------------------------------------------
-// interface includes
+// interface includes
//-----------------------------------------------------------
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/registry/XSimpleRegistry.hpp>
#include <osl/file.hxx>
//--------------------------------------------------------------
-// other includes
+// other includes
//--------------------------------------------------------------
#include <cppuhelper/servicefactory.hxx>
@@ -64,27 +64,27 @@
#include <windows.h>
//--------------------------------------------------------------
-// namesapces
+// namesapces
//--------------------------------------------------------------
-using namespace ::rtl ;
-using namespace ::cppu ;
-using namespace ::com::sun::star::uno ;
-using namespace ::com::sun::star::lang ;
+using namespace ::rtl ;
+using namespace ::cppu ;
+using namespace ::com::sun::star::uno ;
+using namespace ::com::sun::star::lang ;
using namespace ::com::sun::star::ui::dialogs;
-using namespace std ;
+using namespace std ;
//--------------------------------------------------------------
-// defines
+// defines
//--------------------------------------------------------------
#define RDB_SYSPATH "D:\\Projects\\gsl\\sysui\\wntmsci7\\bin\\applicat.rdb"
//--------------------------------------------------------------
-// global variables
+// global variables
//--------------------------------------------------------------
-Reference< XMultiServiceFactory > g_xFactory;
+Reference< XMultiServiceFactory > g_xFactory;
/*
void CreateDeepDirectory( )
@@ -103,16 +103,16 @@ void CreateDeepDirectory( )
OSL_ASSERT( ::osl::FileBase::E_None == \
::osl::FileBase::getNormalizedPathFromFileURL( aPathURL, normalizedPath ) );
}
-
+
}
*/
//--------------------------------------------------------------
-// main
+// main
//--------------------------------------------------------------
-int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ )
+int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ )
{
CoInitializeEx( NULL, COINIT_MULTITHREADED );
@@ -143,14 +143,14 @@ int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ )
Reference< XFolderPicker > xFolderPicker;
- xFolderPicker = Reference< XFolderPicker >(
+ xFolderPicker = Reference< XFolderPicker >(
g_xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM ( FOLDER_PICKER_SERVICE_NAME ) ) ), UNO_QUERY );
-
+
if ( xFolderPicker.is() == sal_False )
{
OSL_ENSURE( sal_False, "Error creating FolderPicker Service" );
return(-1);
- }
+ }
try
{
diff --git a/fpicker/source/win32/misc/AutoBuffer.cxx b/fpicker/source/win32/misc/AutoBuffer.cxx
index 00c0f91fbf42..119926044781 100644
--- a/fpicker/source/win32/misc/AutoBuffer.cxx
+++ b/fpicker/source/win32/misc/AutoBuffer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,19 +50,19 @@
using rtl::OUString;
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CAutoUnicodeBuffer::CAutoUnicodeBuffer( size_t size, sal_Bool bLazyCreation ) :
m_buffSize( size ),
m_pBuff( NULL )
-{
+{
if ( !bLazyCreation )
init( );
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CAutoUnicodeBuffer::~CAutoUnicodeBuffer( )
@@ -71,7 +71,7 @@ CAutoUnicodeBuffer::~CAutoUnicodeBuffer( )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Bool SAL_CALL CAutoUnicodeBuffer::resize( size_t new_size )
@@ -91,7 +91,7 @@ sal_Bool SAL_CALL CAutoUnicodeBuffer::resize( size_t new_size )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CAutoUnicodeBuffer::empty( )
@@ -101,7 +101,7 @@ void SAL_CALL CAutoUnicodeBuffer::empty( )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Bool SAL_CALL CAutoUnicodeBuffer::fill( const sal_Unicode* pContent, size_t nLen )
@@ -122,25 +122,25 @@ sal_Bool SAL_CALL CAutoUnicodeBuffer::fill( const sal_Unicode* pContent, size_t
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
size_t SAL_CALL CAutoUnicodeBuffer::size( ) const
{
return m_buffSize;
}
-
+
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
CAutoUnicodeBuffer::operator sal_Unicode*( )
{
return m_pBuff;
}
-
+
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
sal_Unicode* CAutoUnicodeBuffer::operator&( )
@@ -149,7 +149,7 @@ sal_Unicode* CAutoUnicodeBuffer::operator&( )
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
const sal_Unicode* CAutoUnicodeBuffer::operator&( ) const
@@ -158,13 +158,13 @@ const sal_Unicode* CAutoUnicodeBuffer::operator&( ) const
}
//------------------------------------------------------------------------
-//
+//
//------------------------------------------------------------------------
void SAL_CALL CAutoUnicodeBuffer::init( )
{
if ( !m_pBuff && (m_buffSize > 0) )
- m_pBuff = new sal_Unicode[ m_buffSize ];
+ m_pBuff = new sal_Unicode[ m_buffSize ];
empty( );
}
diff --git a/fpicker/source/win32/misc/AutoBuffer.hxx b/fpicker/source/win32/misc/AutoBuffer.hxx
index 6b287d2556b0..5af6e4c39f22 100644
--- a/fpicker/source/win32/misc/AutoBuffer.hxx
+++ b/fpicker/source/win32/misc/AutoBuffer.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,9 +37,9 @@
#include <rtl/ustring.hxx>
//-------------------------------------------------------------
-// A simple unicode buffer management class, the class itself
-// is responsible for the allocated unicode buffer, any
-// modification of the buffer size outside the class may lead
+// A simple unicode buffer management class, the class itself
+// is responsible for the allocated unicode buffer, any
+// modification of the buffer size outside the class may lead
// to undefined behaviour
//-------------------------------------------------------------
@@ -63,20 +63,20 @@ public:
// returns the size of the buffer
size_t SAL_CALL size( ) const;
-
+
// conversion operator
operator sal_Unicode*( );
-
+
// address operator
sal_Unicode* operator&( );
-
+
const sal_Unicode* operator&( ) const;
private:
void SAL_CALL init( );
private:
- size_t m_buffSize; // the number of unicode chars
+ size_t m_buffSize; // the number of unicode chars
sal_Unicode* m_pBuff;
};
diff --git a/fpicker/source/win32/misc/WinImplHelper.cxx b/fpicker/source/win32/misc/WinImplHelper.cxx
index efd0985d5836..b7f8076f219b 100644
--- a/fpicker/source/win32/misc/WinImplHelper.cxx
+++ b/fpicker/source/win32/misc/WinImplHelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -60,35 +60,35 @@ const rtl::OUString AMPERSAND = OUString::createFromAscii( "&" );
const sal_Unicode AMPERSAND_SIGN = L'&';
//------------------------------------------------------------
-// OS NAME Platform Major Minor
-//
-// Windows NT 3.51 VER_PLATFORM_WIN32_NT 3 51
-// Windows NT 4.0 VER_PLATFORM_WIN32_NT 4 0
-// Windows 2000 VER_PLATFORM_WIN32_NT 5 0
-// Windows XP VER_PLATFORM_WIN32_NT 5 1
-// Windows Vista VER_PLATFORM_WIN32_NT 6 0
-// Windows 7 VER_PLATFORM_WIN32_NT 6 1
-// Windows 95 VER_PLATFORM_WIN32_WINDOWS 4 0
-// Windows 98 VER_PLATFORM_WIN32_WINDOWS 4 10
-// Windows ME VER_PLATFORM_WIN32_WINDOWS 4 90
+// OS NAME Platform Major Minor
+//
+// Windows NT 3.51 VER_PLATFORM_WIN32_NT 3 51
+// Windows NT 4.0 VER_PLATFORM_WIN32_NT 4 0
+// Windows 2000 VER_PLATFORM_WIN32_NT 5 0
+// Windows XP VER_PLATFORM_WIN32_NT 5 1
+// Windows Vista VER_PLATFORM_WIN32_NT 6 0
+// Windows 7 VER_PLATFORM_WIN32_NT 6 1
+// Windows 95 VER_PLATFORM_WIN32_WINDOWS 4 0
+// Windows 98 VER_PLATFORM_WIN32_WINDOWS 4 10
+// Windows ME VER_PLATFORM_WIN32_WINDOWS 4 90
//------------------------------------------------------------
bool SAL_CALL IsWindowsVersion(unsigned int PlatformId, unsigned int MajorVersion, int MinorVersion = -1)
{
- OSVERSIONINFO osvi;
+ OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(osvi);
-
- if(!GetVersionEx(&osvi))
+
+ if(!GetVersionEx(&osvi))
return false;
-
- bool bRet = (PlatformId == osvi.dwPlatformId) &&
+
+ bool bRet = (PlatformId == osvi.dwPlatformId) &&
(MajorVersion == osvi.dwMajorVersion);
if (MinorVersion > -1)
bRet = bRet &&
(sal::static_int_cast< unsigned int >(MinorVersion) ==
- osvi.dwMinorVersion);
-
+ osvi.dwMinorVersion);
+
return bRet;
}
@@ -98,19 +98,19 @@ bool SAL_CALL IsWindowsVersion(unsigned int PlatformId, unsigned int MajorVersio
bool SAL_CALL IsWindowsVistaOrNewer()
{
- OSVERSIONINFO osvi;
+ OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(osvi);
-
- if(!GetVersionEx(&osvi))
+
+ if(!GetVersionEx(&osvi))
return false;
-
- bool bRet = (VER_PLATFORM_WIN32_NT == osvi.dwPlatformId) &&
+
+ bool bRet = (VER_PLATFORM_WIN32_NT == osvi.dwPlatformId) &&
(osvi.dwMajorVersion >= 6);
bRet = bRet &&
- (osvi.dwMinorVersion >=
- sal::static_int_cast< unsigned int >(0));
-
+ (osvi.dwMinorVersion >=
+ sal::static_int_cast< unsigned int >(0));
+
return bRet;
}
@@ -120,7 +120,7 @@ bool SAL_CALL IsWindowsVistaOrNewer()
bool SAL_CALL IsWindows7()
{
- return IsWindowsVersion(VER_PLATFORM_WIN32_NT, 6, 1);
+ return IsWindowsVersion(VER_PLATFORM_WIN32_NT, 6, 1);
}
//------------------------------------------------------------
@@ -129,7 +129,7 @@ bool SAL_CALL IsWindows7()
bool SAL_CALL IsWindowsVista()
{
- return IsWindowsVersion(VER_PLATFORM_WIN32_NT, 6, 0);
+ return IsWindowsVersion(VER_PLATFORM_WIN32_NT, 6, 0);
}
//------------------------------------------------------------
@@ -138,7 +138,7 @@ bool SAL_CALL IsWindowsVista()
bool SAL_CALL IsWindowsXP()
{
- return IsWindowsVersion(VER_PLATFORM_WIN32_NT, 5, 1);
+ return IsWindowsVersion(VER_PLATFORM_WIN32_NT, 5, 1);
}
//------------------------------------------------------------
@@ -147,7 +147,7 @@ bool SAL_CALL IsWindowsXP()
bool SAL_CALL IsWindows2000()
{
- return IsWindowsVersion(VER_PLATFORM_WIN32_NT, 5, 0);
+ return IsWindowsVersion(VER_PLATFORM_WIN32_NT, 5, 0);
}
//------------------------------------------------------------
@@ -165,7 +165,7 @@ bool SAL_CALL IsWindows98()
bool SAL_CALL IsWindowsME()
{
- return IsWindowsVersion(VER_PLATFORM_WIN32_WINDOWS, 4, 90);
+ return IsWindowsVersion(VER_PLATFORM_WIN32_WINDOWS, 4, 90);
}
//------------------------------------------------------------
@@ -195,7 +195,7 @@ bool SAL_CALL IsWindows2000Platform()
void SAL_CALL ListboxAddString( HWND hwnd, const OUString& aString )
{
- LRESULT rc = SendMessageW(
+ LRESULT rc = SendMessageW(
hwnd, CB_ADDSTRING, 0, reinterpret_cast< LPARAM >(aString.getStr( )) );
(void) rc; // avoid warning
OSL_ASSERT( (CB_ERR != rc) && (CB_ERRSPACE != rc) );
@@ -208,30 +208,30 @@ void SAL_CALL ListboxAddString( HWND hwnd, const OUString& aString )
OUString SAL_CALL ListboxGetString( HWND hwnd, sal_Int32 aPosition )
{
OSL_ASSERT( IsWindow( hwnd ) );
-
+
OUString aString;
-
- LRESULT lItem =
- SendMessageW( hwnd, CB_GETLBTEXTLEN, aPosition, 0 );
+
+ LRESULT lItem =
+ SendMessageW( hwnd, CB_GETLBTEXTLEN, aPosition, 0 );
if ( (CB_ERR != lItem) && (lItem > 0) )
{
- // message returns the len of a combobox item
+ // message returns the len of a combobox item
// without trailing '\0' that's why += 1
lItem++;
-
+
CAutoUnicodeBuffer aBuff( lItem );
- LRESULT lRet =
- SendMessageW(
- hwnd, CB_GETLBTEXT, aPosition,
+ LRESULT lRet =
+ SendMessageW(
+ hwnd, CB_GETLBTEXT, aPosition,
reinterpret_cast<LPARAM>(&aBuff) );
OSL_ASSERT( lRet != CB_ERR );
- if ( CB_ERR != lRet )
- aString = OUString( aBuff, lRet );
- }
+ if ( CB_ERR != lRet )
+ aString = OUString( aBuff, lRet );
+ }
return aString;
}
@@ -245,7 +245,7 @@ void SAL_CALL ListboxAddItem( HWND hwnd, const Any& aItem, const Reference< XInt
{
OSL_ASSERT( IsWindow( hwnd ) );
- if ( !aItem.hasValue( ) ||
+ if ( !aItem.hasValue( ) ||
aItem.getValueType( ) != getCppuType((OUString*)0) )
throw IllegalArgumentException(
OUString::createFromAscii( "invalid value type or any has no value" ),
@@ -266,8 +266,8 @@ void SAL_CALL ListboxAddItems( HWND hwnd, const Any& aItemList, const Reference<
throw( IllegalArgumentException )
{
OSL_ASSERT( IsWindow( hwnd ) );
-
- if ( !aItemList.hasValue( ) ||
+
+ if ( !aItemList.hasValue( ) ||
aItemList.getValueType( ) != getCppuType((Sequence<OUString>*)0) )
throw IllegalArgumentException(
OUString::createFromAscii( "invalid value type or any has no value" ),
@@ -293,7 +293,7 @@ void SAL_CALL ListboxDeleteItem( HWND hwnd, const Any& aPosition, const Referenc
{
OSL_ASSERT( IsWindow( hwnd ) );
- if ( !aPosition.hasValue( ) ||
+ if ( !aPosition.hasValue( ) ||
( (aPosition.getValueType( ) != getCppuType((sal_Int32*)0)) &&
(aPosition.getValueType( ) != getCppuType((sal_Int16*)0)) &&
(aPosition.getValueType( ) != getCppuType((sal_Int8*)0)) ) )
@@ -329,11 +329,11 @@ void SAL_CALL ListboxDeleteItems( HWND hwnd, const Any&, const Reference< XInter
do
{
- // the return value on success is the number
- // of remaining elements in the listbox
+ // the return value on success is the number
+ // of remaining elements in the listbox
lRet = SendMessageW( hwnd, CB_DELETESTRING, 0, 0 );
}
- while ( (lRet != CB_ERR) && (lRet > 0) );
+ while ( (lRet != CB_ERR) && (lRet > 0) );
}
//------------------------------------------------------------
@@ -345,7 +345,7 @@ void SAL_CALL ListboxSetSelectedItem( HWND hwnd, const Any& aPosition, const Ref
{
OSL_ASSERT( IsWindow( hwnd ) );
- if ( !aPosition.hasValue( ) ||
+ if ( !aPosition.hasValue( ) ||
( (aPosition.getValueType( ) != getCppuType((sal_Int32*)0)) &&
(aPosition.getValueType( ) != getCppuType((sal_Int16*)0)) &&
(aPosition.getValueType( ) != getCppuType((sal_Int8*)0)) ) )
@@ -381,9 +381,9 @@ Any SAL_CALL ListboxGetItems( HWND hwnd )
OSL_ASSERT( IsWindow( hwnd ) );
LRESULT nItemCount = SendMessageW( hwnd, CB_GETCOUNT, 0, 0 );
-
+
Sequence< OUString > aItemList;
-
+
if ( CB_ERR != nItemCount )
{
aItemList.realloc( nItemCount );
@@ -437,7 +437,7 @@ Any SAL_CALL ListboxGetSelectedItemIndex( HWND hwnd )
//------------------------------------------------------------
Any SAL_CALL CheckboxGetState( HWND hwnd )
-{
+{
OSL_ASSERT( IsWindow( hwnd ) );
LRESULT lChkState = SendMessageW( hwnd, BM_GETCHECK, 0, 0 );
@@ -451,13 +451,13 @@ Any SAL_CALL CheckboxGetState( HWND hwnd )
//
//------------------------------------------------------------
-void SAL_CALL CheckboxSetState(
+void SAL_CALL CheckboxSetState(
HWND hwnd, const ::com::sun::star::uno::Any& aState, const Reference< XInterface >& rXInterface, sal_Int16 aArgPos )
throw( IllegalArgumentException )
{
OSL_ASSERT( IsWindow( hwnd ) );
- if ( !aState.hasValue( ) ||
+ if ( !aState.hasValue( ) ||
aState.getValueType( ) != getCppuType((sal_Bool*)0) )
throw IllegalArgumentException(
OUString::createFromAscii( "invalid value type or any has no value" ),
@@ -466,7 +466,7 @@ void SAL_CALL CheckboxSetState(
sal_Bool bCheckState = *reinterpret_cast< const sal_Bool* >( aState.getValue( ) );
WPARAM wParam = bCheckState ? BST_CHECKED : BST_UNCHECKED;
- SendMessageW( hwnd, BM_SETCHECK, wParam, 0 );
+ SendMessageW( hwnd, BM_SETCHECK, wParam, 0 );
}
//------------------------------------------------------------
@@ -511,8 +511,8 @@ void Replace( const OUString& aLabel, sal_Unicode OldChar, sal_Unicode NewChar,
if ( OldChar == *pCurrent )
{
if ( OldChar == *pNext )
- {
- // two OldChars in line will
+ {
+ // two OldChars in line will
// be replaced by one
// e.g. ~~ -> ~
aBuffer.insert( i, *pCurrent );
@@ -523,28 +523,28 @@ void Replace( const OUString& aLabel, sal_Unicode OldChar, sal_Unicode NewChar,
}
else
{
- // one OldChar will be replace
+ // one OldChar will be replace
// by NexChar
aBuffer.insert( i, NewChar );
}
}
else if ( *pCurrent == NewChar )
- {
+ {
// a NewChar will be replaced by
// two NewChars
// e.g. & -> &&
- aBuffer.insert( i++, *pCurrent );
- aBuffer.insert( i, *pCurrent );
+ aBuffer.insert( i++, *pCurrent );
+ aBuffer.insert( i, *pCurrent );
}
else
- {
+ {
aBuffer.insert( i, *pCurrent );
}
pCurrent++;
pNext++;
- i++;
- }
+ i++;
+ }
}
//------------------------------------------------------------
@@ -569,8 +569,8 @@ OUString SOfficeToWindowsLabel( const rtl::OUString& aSOLabel )
// of memory but how long is a label
// normaly(?)
rtl::OUStringBuffer aBuffer( nStrLen * 2 );
-
- Replace( aWinLabel, TILDE_SIGN, AMPERSAND_SIGN, aBuffer );
+
+ Replace( aWinLabel, TILDE_SIGN, AMPERSAND_SIGN, aBuffer );
aWinLabel = aBuffer.makeStringAndClear( );
}
@@ -600,8 +600,8 @@ OUString WindowsToSOfficeLabel( const rtl::OUString& aWinLabel )
// of memory but how long is a label
// normaly(?)
rtl::OUStringBuffer aBuffer( nStrLen * 2 );
-
- Replace( aSOLabel, AMPERSAND_SIGN, TILDE_SIGN, aBuffer );
+
+ Replace( aSOLabel, AMPERSAND_SIGN, TILDE_SIGN, aBuffer );
aSOLabel = aBuffer.makeStringAndClear( );
}
diff --git a/fpicker/source/win32/misc/WinImplHelper.hxx b/fpicker/source/win32/misc/WinImplHelper.hxx
index 03cefe901124..c6e6c9390477 100644
--- a/fpicker/source/win32/misc/WinImplHelper.hxx
+++ b/fpicker/source/win32/misc/WinImplHelper.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,30 +59,30 @@ bool SAL_CALL IsWindowsXP();
bool SAL_CALL IsWindows98();
bool SAL_CALL IsWindowsME();
-// returns true if the platform is
+// returns true if the platform is
// Windows 2000 or above
bool SAL_CALL IsWindows2000Platform();
#define IsWin2000 IsWindows2000
// set actions
-void SAL_CALL ListboxAddItem(
+void SAL_CALL ListboxAddItem(
HWND hwnd, const ::com::sun::star::uno::Any& aItem, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
throw( ::com::sun::star::lang::IllegalArgumentException );
-void SAL_CALL ListboxAddItems(
+void SAL_CALL ListboxAddItems(
HWND hwnd, const ::com::sun::star::uno::Any& aItemList, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
throw( ::com::sun::star::lang:: IllegalArgumentException );
-void SAL_CALL ListboxDeleteItem(
+void SAL_CALL ListboxDeleteItem(
HWND hwnd, const ::com::sun::star::uno::Any& aPosition, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
throw( ::com::sun::star::lang::IllegalArgumentException );
-void SAL_CALL ListboxDeleteItems(
+void SAL_CALL ListboxDeleteItems(
HWND hwnd, const ::com::sun::star::uno::Any& aUnused, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
throw( ::com::sun::star::lang::IllegalArgumentException );
-void SAL_CALL ListboxSetSelectedItem(
+void SAL_CALL ListboxSetSelectedItem(
HWND hwnd, const ::com::sun::star::uno::Any& aPosition, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
throw( ::com::sun::star::lang::IllegalArgumentException );
@@ -94,7 +94,7 @@ void SAL_CALL ListboxSetSelectedItem(
// checkbox helper functions
::com::sun::star::uno::Any SAL_CALL CheckboxGetState( HWND hwnd );
-void SAL_CALL CheckboxSetState(
+void SAL_CALL CheckboxSetState(
HWND hwnd, const ::com::sun::star::uno::Any& aState, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rXInterface, sal_Int16 aArgPos )
throw( ::com::sun::star::lang::IllegalArgumentException );
diff --git a/fpicker/source/win32/misc/resourceprovider.cxx b/fpicker/source/win32/misc/resourceprovider.cxx
index d0ee330cc170..4b500d7d0487 100644
--- a/fpicker/source/win32/misc/resourceprovider.cxx
+++ b/fpicker/source/win32/misc/resourceprovider.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,14 +53,14 @@ using namespace ::com::sun::star::ui::dialogs::ExtendedFilePickerElementIds;
using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds;
//------------------------------------------------------------
-//
+//
//------------------------------------------------------------
#define FOLDERPICKER_TITLE 500
#define FOLDER_PICKER_DEF_DESCRIPTION 501
//------------------------------------------------------------
-// we have to translate control ids to resource ids
+// we have to translate control ids to resource ids
//------------------------------------------------------------
struct _Entry
@@ -92,7 +92,7 @@ const sal_Int32 SIZE_TABLE = sizeof( CtrlIdToResIdTable ) / sizeof( _Entry );
//------------------------------------------------------------
sal_Int16 CtrlIdToResId( sal_Int32 aControlId )
-{
+{
sal_Int16 aResId = -1;
for ( sal_Int32 i = 0; i < SIZE_TABLE; i++ )
@@ -102,8 +102,8 @@ sal_Int16 CtrlIdToResId( sal_Int32 aControlId )
aResId = CtrlIdToResIdTable[i].resId;
break;
}
- }
-
+ }
+
return aResId;
}
@@ -135,7 +135,7 @@ public:
{
delete m_ResMgr;
}
-
+
//-------------------------------------
//
//-------------------------------------
@@ -147,7 +147,7 @@ public:
try
{
OSL_ASSERT( m_ResMgr );
-
+
// translate the control id to a resource id
sal_Int16 aResId = CtrlIdToResId( aId );
diff --git a/fpicker/source/win32/misc/resourceprovider.hxx b/fpicker/source/win32/misc/resourceprovider.hxx
index 3b887e602a48..967c87d3dc94 100644
--- a/fpicker/source/win32/misc/resourceprovider.hxx
+++ b/fpicker/source/win32/misc/resourceprovider.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/fpicker/test/svdem.cxx b/fpicker/test/svdem.cxx
index 5fb56e148beb..daf57136fca7 100644
--- a/fpicker/test/svdem.cxx
+++ b/fpicker/test/svdem.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,7 +28,7 @@
//_________________________________________________________________________________________________________________________
-// interface includes
+// interface includes
//_________________________________________________________________________________________________________________________
#include <com/sun/star/lang/XComponent.hpp>
@@ -36,7 +36,7 @@
#include <osl/file.hxx>
//_________________________________________________________________________________________________________________________
-// other includes
+// other includes
//_________________________________________________________________________________________________________________________
#include <cppuhelper/servicefactory.hxx>
@@ -90,10 +90,10 @@ SAL_IMPLEMENT_MAIN()
Reference< XMultiServiceFactory > xMS;
xMS = cppu::createRegistryServiceFactory( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "applicat.rdb" ) ), sal_True );
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory> xMSch;
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xComponentContext;
- xComponentContext = cppu::defaultBootstrap_InitialComponentContext();
- xMSch.set(xComponentContext->getServiceManager(), com::sun::star::uno::UNO_QUERY);
+ com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory> xMSch;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xComponentContext;
+ xComponentContext = cppu::defaultBootstrap_InitialComponentContext();
+ xMSch.set(xComponentContext->getServiceManager(), com::sun::star::uno::UNO_QUERY);
comphelper::setProcessServiceFactory(xMSch);
// comphelper::setProcessServiceFactory( xMS);
@@ -112,16 +112,16 @@ class MyWin : public WorkWindow
public:
MyWin( Window* pParent, WinBits nWinStyle );
- void MouseMove( const MouseEvent& rMEvt );
- void MouseButtonDown( const MouseEvent& rMEvt );
- void MouseButtonUp( const MouseEvent& rMEvt );
- void KeyInput( const KeyEvent& rKEvt );
- void KeyUp( const KeyEvent& rKEvt );
- void Paint( const Rectangle& rRect );
- void Resize();
+ void MouseMove( const MouseEvent& rMEvt );
+ void MouseButtonDown( const MouseEvent& rMEvt );
+ void MouseButtonUp( const MouseEvent& rMEvt );
+ void KeyInput( const KeyEvent& rKEvt );
+ void KeyUp( const KeyEvent& rKEvt );
+ void Paint( const Rectangle& rRect );
+ void Resize();
private:
- OKButton aOKBtn;
+ OKButton aOKBtn;
DECL_LINK( Test, PushButton* );
@@ -140,7 +140,7 @@ void Main()
// -----------------------------------------------------------------------
-MyWin::MyWin( Window* pParent, WinBits nWinStyle )
+MyWin::MyWin( Window* pParent, WinBits nWinStyle )
:WorkWindow( pParent, nWinStyle )
,aOKBtn(this)
{