summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-04-22 10:27:38 +0200
committerobo <obo@openoffice.org>2010-04-22 10:27:38 +0200
commitd7e61179bc19df3b0d19b8a803bdee1efd7dcb08 (patch)
tree2e09e0beb17a36bf10596a0384ecae9088d2697a
parentedaa6f16f0d0802244fd006107719599243dc6cb (diff)
parent9923a1479d8b14bf9d369ae209f56831fe4b7d69 (diff)
CWS-TOOLING: integrate CWS fwk140ooo/OOO320_m16
-rw-r--r--framework/source/services/backingwindow.cxx6
-rw-r--r--framework/source/services/backingwindow.hxx1
-rw-r--r--sfx2/source/doc/guisaveas.cxx62
3 files changed, 38 insertions, 31 deletions
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index d178426ecd..4a0d508dbe 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -132,7 +132,8 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
mbInitControls( false ),
mnLayoutStyle( 0 ),
mpAccExec( NULL ),
- mnBtnPos( 120 )
+ mnBtnPos( 120 ),
+ mnBtnTop( 150 )
{
mnColumnWidth[0] = mnColumnWidth[1] = 0;
mnTextColumnWidth[0] = mnTextColumnWidth[1] = 0;
@@ -722,6 +723,9 @@ void BackingWindow::Resize()
nYPos += nPDelta - nDiff;
nYPos += nWDelta/2 - nDiff;
+
+ if( mnLayoutStyle != 1 )
+ nYPos = maControlRect.Top() + mnBtnTop;
maWriterButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos, nYPos ), Size( mnTextColumnWidth[0], maButtonImageSize.Height() ) );
maDrawButton.SetPosSizePixel( Point( maControlRect.Left() + mnBtnPos + mnColumnWidth[0], nYPos ), Size( mnTextColumnWidth[1], maButtonImageSize.Height() ) );
diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx
index 2c5e75d027..b8fd46073c 100644
--- a/framework/source/services/backingwindow.hxx
+++ b/framework/source/services/backingwindow.hxx
@@ -122,6 +122,7 @@ namespace framework
svt::AcceleratorExecute* mpAccExec;
long mnBtnPos;
+ long mnBtnTop;
static const int nItemId_Extensions = 1;
static const int nItemId_Reg = 2;
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 29b732a2fc..e0d585466b 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1246,6 +1246,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
// parse the slot name
sal_Int8 nStoreMode = getStoreModeFromSlotName( aSlotName );
+ sal_Int8 nStatusSave = STATUS_NO_ACTION;
// handle the special cases
if ( nStoreMode & SAVEAS_REQUESTED )
@@ -1267,7 +1268,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
else if ( nStoreMode & SAVE_REQUESTED )
{
// if saving is not acceptable by the configuration the warning must be shown
- sal_Int8 nStatusSave = aModelData.CheckSaveAcceptable( STATUS_SAVE );
+ nStatusSave = aModelData.CheckSaveAcceptable( STATUS_SAVE );
if ( nStatusSave == STATUS_NO_ACTION )
throw task::ErrorCodeIOException( ::rtl::OUString(), uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT );
@@ -1281,32 +1282,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
{
throw task::ErrorCodeIOException( ::rtl::OUString(), uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT );
}
- else if ( nStatusSave == STATUS_SAVE )
- {
- // Document properties can contain streams that should be freed before storing
- aModelData.FreeDocumentProps();
-
- if ( aModelData.GetStorable2().is() )
- {
- try
- {
- aModelData.GetStorable2()->storeSelf( aModelData.GetMediaDescr().getAsConstPropertyValueList() );
- }
- catch( lang::IllegalArgumentException& )
- {
- OSL_ENSURE( sal_False, "ModelData didn't handle illegal parameters, all the parameters are ignored!\n" );
- aModelData.GetStorable()->store();
- }
- }
- else
- {
- OSL_ENSURE( sal_False, "XStorable2 is not supported by the model!\n" );
- aModelData.GetStorable()->store();
- }
-
- return sal_False;
- }
- else
+ else if ( nStatusSave != STATUS_SAVE )
{
// this should be a usual SaveAs operation
nStoreMode = SAVEAS_REQUESTED;
@@ -1333,6 +1309,32 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
}
}
+ if ( nStoreMode & SAVE_REQUESTED && nStatusSave == STATUS_SAVE )
+ {
+ // Document properties can contain streams that should be freed before storing
+ aModelData.FreeDocumentProps();
+
+ if ( aModelData.GetStorable2().is() )
+ {
+ try
+ {
+ aModelData.GetStorable2()->storeSelf( aModelData.GetMediaDescr().getAsConstPropertyValueList() );
+ }
+ catch( lang::IllegalArgumentException& )
+ {
+ OSL_ENSURE( sal_False, "ModelData didn't handle illegal parameters, all the parameters are ignored!\n" );
+ aModelData.GetStorable()->store();
+ }
+ }
+ else
+ {
+ OSL_ENSURE( sal_False, "XStorable2 is not supported by the model!\n" );
+ aModelData.GetStorable()->store();
+ }
+
+ return sal_False;
+ }
+
// preselect a filter for the storing process
uno::Sequence< beans::PropertyValue > aFilterProps = aModelData.GetPreselectedFilter_Impl( nStoreMode );
@@ -1427,13 +1429,13 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
::rtl::OUString aSelFilterName = aModelData.GetMediaDescr().getUnpackedValueOrDefault(
aFilterNameString,
::rtl::OUString() );
- sal_Int8 nStatusSave = aModelData.CheckFilter( aSelFilterName );
- if ( nStatusSave == STATUS_SAVEAS_STANDARDNAME )
+ sal_Int8 nStatusFilterSave = aModelData.CheckFilter( aSelFilterName );
+ if ( nStatusFilterSave == STATUS_SAVEAS_STANDARDNAME )
{
// switch to best filter
bSetStandardName = sal_True;
}
- else if ( nStatusSave == STATUS_SAVE )
+ else if ( nStatusFilterSave == STATUS_SAVE )
{
// user confirmed alien filter or "good" filter is used
bExit = sal_True;