summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/source/app/appfirststart.cxx4
-rw-r--r--framework/inc/framework.hrc25
-rw-r--r--framework/source/services/backingwindow.cxx38
-rw-r--r--framework/source/services/backingwindow.hxx1
-rw-r--r--framework/source/services/fwk_services.src92
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Common.xcu2
-rw-r--r--sfx2/source/doc/guisaveas.cxx89
-rw-r--r--sysui/desktop/mimetypes/extension.desktop2
-rw-r--r--xmloff/source/text/XMLTextNumRuleInfo.cxx9
9 files changed, 167 insertions, 95 deletions
diff --git a/desktop/source/app/appfirststart.cxx b/desktop/source/app/appfirststart.cxx
index c48805fcfe..2f0d4ab9e5 100644
--- a/desktop/source/app/appfirststart.cxx
+++ b/desktop/source/app/appfirststart.cxx
@@ -108,6 +108,9 @@ OUString Desktop::GetLicensePath()
/* Check if we need to accept license. */
sal_Bool Desktop::LicenseNeedsAcceptance()
{
+ // Don't show a license
+ return sal_False;
+/*
sal_Bool bShowLicense = sal_True;
sal_Int32 nOpenSourceContext = 0;
try
@@ -122,6 +125,7 @@ sal_Bool Desktop::LicenseNeedsAcceptance()
bShowLicense = sal_False;
return bShowLicense;
+*/
}
/* Local function - was the wizard completed already? */
diff --git a/framework/inc/framework.hrc b/framework/inc/framework.hrc
index b5a608a141..d4341d95ab 100644
--- a/framework/inc/framework.hrc
+++ b/framework/inc/framework.hrc
@@ -51,19 +51,10 @@
#define STR_BACKING_CREATE 3
#define STR_BACKING_TEMPLATE 4
#define STR_BACKING_FILE 5
-#define BMP_BACKING_WRITER 6
-#define BMP_BACKING_CALC 7
-#define BMP_BACKING_IMPRESS 8
-#define BMP_BACKING_DRAW 9
-#define BMP_BACKING_DATABASE 10
-#define BMP_BACKING_FORMULA 11
-#define BMP_BACKING_OPENFILE 12
-#define BMP_BACKING_OPENTEMPLATE 13
-#define STR_BACKING_EXTHELP 15
-#define STR_BACKING_REGHELP 17
-#define STR_BACKING_INFOHELP 19
-#define STR_BACKING_TPLREP 21
-#define BMP_BACKING_FOLDER 22
+#define STR_BACKING_EXTHELP 6
+#define STR_BACKING_REGHELP 7
+#define STR_BACKING_INFOHELP 8
+#define STR_BACKING_TPLREP 9
#define RES_BACKING_IMAGES (DLG_BACKING+1)
#define RES_BACKING_IMAGES_HC (DLG_BACKING+2)
@@ -77,6 +68,14 @@
#define BMP_BACKING_REG 7
#define BMP_BACKING_INFO 8
#define BMP_BACKING_TPLREP 9
+#define BMP_BACKING_WRITER 10
+#define BMP_BACKING_CALC 11
+#define BMP_BACKING_IMPRESS 12
+#define BMP_BACKING_DRAW 13
+#define BMP_BACKING_DATABASE 14
+#define BMP_BACKING_FORMULA 15
+#define BMP_BACKING_OPENFILE 16
+#define BMP_BACKING_OPENTEMPLATE 17
// Ids of TabWindow
#define WIN_TABWINDOW (RID_FWK_DIALOG_START+101)
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index d178426ecd..32f797666c 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;
@@ -162,16 +163,6 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
{
}
- // get icon images from vcl resource and set them on the appropriate buttons
- loadImage( FwkResId( BMP_BACKING_WRITER ), maWriterButton );
- loadImage( FwkResId( BMP_BACKING_CALC ), maCalcButton );
- loadImage( FwkResId( BMP_BACKING_IMPRESS ), maImpressButton );
- loadImage( FwkResId( BMP_BACKING_DRAW ), maDrawButton );
- loadImage( FwkResId( BMP_BACKING_DATABASE ), maDBButton );
- loadImage( FwkResId( BMP_BACKING_FORMULA ), maMathButton );
- loadImage( FwkResId( BMP_BACKING_FOLDER ), maOpenButton );
- loadImage( FwkResId( BMP_BACKING_FOLDER ), maTemplateButton );
-
String aExtHelpText( FwkResId( STR_BACKING_EXTHELP ) );
String aRegHelpText( FwkResId( STR_BACKING_REGHELP ) );
String aInfoHelpText( FwkResId( STR_BACKING_INFOHELP ) );
@@ -186,10 +177,6 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
SetStyle( GetStyle() | WB_DIALOGCONTROL );
- // add some breathing space for the images
- maButtonImageSize.Width() += 12;
- maButtonImageSize.Height() += 12;
-
// force tab cycling in toolbox
maToolbox.SetStyle( maToolbox.GetStyle() | WB_FORCETABCYCLE );
@@ -235,6 +222,11 @@ BackingWindow::BackingWindow( Window* i_pParent ) :
// init background
initBackground();
+
+ // add some breathing space for the images
+ maButtonImageSize.Width() += 12;
+ maButtonImageSize.Height() += 12;
+
}
@@ -316,6 +308,17 @@ void BackingWindow::initBackground()
else
mnBtnPos = maBackgroundLeft.GetSizePixel().Width() + 40;
}
+
+ // get icon images from fwk resource and set them on the appropriate buttons
+ loadImage( FwkResId( BMP_BACKING_WRITER ), maWriterButton );
+ loadImage( FwkResId( BMP_BACKING_CALC ), maCalcButton );
+ loadImage( FwkResId( BMP_BACKING_IMPRESS ), maImpressButton );
+ loadImage( FwkResId( BMP_BACKING_DRAW ), maDrawButton );
+ loadImage( FwkResId( BMP_BACKING_DATABASE ), maDBButton );
+ loadImage( FwkResId( BMP_BACKING_FORMULA ), maMathButton );
+ loadImage( FwkResId( BMP_BACKING_OPENFILE ), maOpenButton );
+ loadImage( FwkResId( BMP_BACKING_OPENTEMPLATE ), maTemplateButton );
+
}
void BackingWindow::initControls()
@@ -541,7 +544,7 @@ void BackingWindow::layoutButton(
long nTextWidth = i_rBtn.GetTextWidth( i_rBtn.GetText() );
- nTextWidth += maButtonImageSize.Width();
+ nTextWidth += maButtonImageSize.Width() + 8; // add some fuzz to be on the safe side
if( nColumn >= 0 && nColumn < static_cast<int>(sizeof(mnColumnWidth)/sizeof(mnColumnWidth[0])) )
{
if( nTextWidth > mnColumnWidth[nColumn] )
@@ -722,6 +725,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/framework/source/services/fwk_services.src b/framework/source/services/fwk_services.src
index 7e2ee3253e..7ad8b4c3ce 100644
--- a/framework/source/services/fwk_services.src
+++ b/framework/source/services/fwk_services.src
@@ -53,34 +53,6 @@ Window DLG_BACKING
{
Text [ en-US ] = "~Open a document...";
};
- Bitmap BMP_BACKING_WRITER
- {
- File = "odt_32.png";
- };
- Bitmap BMP_BACKING_CALC
- {
- File = "ods_32.png";
- };
- Bitmap BMP_BACKING_IMPRESS
- {
- File = "odp_32.png";
- };
- Bitmap BMP_BACKING_DRAW
- {
- File = "odg_32.png";
- };
- Bitmap BMP_BACKING_DATABASE
- {
- File = "odb_32.png";
- };
- Bitmap BMP_BACKING_FORMULA
- {
- File = "odf_32.png";
- };
- Bitmap BMP_BACKING_FOLDER
- {
- File = "folder_32.png";
- };
String STR_BACKING_EXTHELP
{
Text [ en-US ] = "Add new features to %PRODUCTNAME";
@@ -137,6 +109,38 @@ Resource RES_BACKING_IMAGES
{
File = "addtemplate_32.png";
};
+ Bitmap BMP_BACKING_WRITER
+ {
+ File = "odt_32.png";
+ };
+ Bitmap BMP_BACKING_CALC
+ {
+ File = "ods_32.png";
+ };
+ Bitmap BMP_BACKING_IMPRESS
+ {
+ File = "odp_32.png";
+ };
+ Bitmap BMP_BACKING_DRAW
+ {
+ File = "odg_32.png";
+ };
+ Bitmap BMP_BACKING_DATABASE
+ {
+ File = "odb_32.png";
+ };
+ Bitmap BMP_BACKING_FORMULA
+ {
+ File = "odf_32.png";
+ };
+ Bitmap BMP_BACKING_OPENFILE
+ {
+ File = "folder_32.png";
+ };
+ Bitmap BMP_BACKING_OPENTEMPLATE
+ {
+ File = "templates_32.png";
+ };
};
Resource RES_BACKING_IMAGES_HC
@@ -177,6 +181,38 @@ Resource RES_BACKING_IMAGES_HC
{
File = "template_hc.png";
};
+ Bitmap BMP_BACKING_WRITER
+ {
+ File = "odt_32_hc.png";
+ };
+ Bitmap BMP_BACKING_CALC
+ {
+ File = "ods_32_hc.png";
+ };
+ Bitmap BMP_BACKING_IMPRESS
+ {
+ File = "odp_32_hc.png";
+ };
+ Bitmap BMP_BACKING_DRAW
+ {
+ File = "odg_32_hc.png";
+ };
+ Bitmap BMP_BACKING_DATABASE
+ {
+ File = "odb_32_hc.png";
+ };
+ Bitmap BMP_BACKING_FORMULA
+ {
+ File = "odf_32_hc.png";
+ };
+ Bitmap BMP_BACKING_OPENFILE
+ {
+ File = "folder_32_hc.png";
+ };
+ Bitmap BMP_BACKING_OPENTEMPLATE
+ {
+ File = "templates_32_hc.png";
+ };
};
Window WIN_TABWINDOW
diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 1a98a05d24..d2d32b591e 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -113,7 +113,7 @@
<prop oor:name="TemplateRepositoryURL" oor:type="xs:string">
<value>${STARTCENTER_TEMPLREP_URL}</value>
</prop>
- <prop oor:name="StartCenterLayoutStyle" oor:type="xs:int">
+ <prop oor:name="StartCenterLayoutStyle" oor:type="xs:int" install:module="brand">
<value>${STARTCENTER_LAYOUT_STYLE}</value>
</prop>
</node>
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 7960dfe441..e0d585466b 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -837,9 +837,16 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
::rtl::OUString aAdjustToType;
- // bSetStandardName == true means that user agreed to store document in the default (default default ;-)) format
- if ( !(( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED )) &&
- ( bSetStandardName || GetStorable()->hasLocation() ))
+ if ( ( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED ))
+ {
+ // it is export, set the preselected filter
+ ::rtl::OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault(
+ ::rtl::OUString::createFromAscii( "UIName" ),
+ ::rtl::OUString() );
+ pFileDlg->SetCurrentFilter( aFilterUIName );
+ }
+ // it is no export, bSetStandardName == true means that user agreed to store document in the default (default default ;-)) format
+ else if ( bSetStandardName || GetStorable()->hasLocation() )
{
uno::Sequence< beans::PropertyValue > aOldFilterProps;
::rtl::OUString aOldFilterName = GetDocProps().getUnpackedValueOrDefault(
@@ -1239,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 )
@@ -1260,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 );
@@ -1274,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;
@@ -1326,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 );
@@ -1420,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;
@@ -1571,8 +1580,10 @@ uno::Sequence< beans::PropertyValue > SfxStoringHelper::SearchForFilter(
uno::Reference< container::XEnumeration > xFilterEnum =
xFilterQuery->createSubSetEnumerationByProperties( aSearchRequest );
- // use the first filter that is found
+ // the first default filter will be taken,
+ // if there is no filter with flag default the first acceptable filter will be taken
if ( xFilterEnum.is() )
+ {
while ( xFilterEnum->hasMoreElements() )
{
uno::Sequence< beans::PropertyValue > aProps;
@@ -1583,11 +1594,17 @@ uno::Sequence< beans::PropertyValue > SfxStoringHelper::SearchForFilter(
(sal_Int32)0 );
if ( ( ( nFlags & nMustFlags ) == nMustFlags ) && !( nFlags & nDontFlags ) )
{
- aFilterProps = aProps;
- break;
+ if ( ( nFlags & SFX_FILTER_DEFAULT ) == SFX_FILTER_DEFAULT )
+ {
+ aFilterProps = aProps;
+ break;
+ }
+ else if ( !aFilterProps.getLength() )
+ aFilterProps = aProps;
}
}
}
+ }
return aFilterProps;
}
diff --git a/sysui/desktop/mimetypes/extension.desktop b/sysui/desktop/mimetypes/extension.desktop
index 795e828714..80cadae7e9 100644
--- a/sysui/desktop/mimetypes/extension.desktop
+++ b/sysui/desktop/mimetypes/extension.desktop
@@ -6,4 +6,4 @@ Icon=extension
Type=MimeType
Patterns=*.oxt
MimeType=application/vnd.openofficeorg.extension
-Comment=Extension
+Comment=%PRODUCTNAME Extension
diff --git a/xmloff/source/text/XMLTextNumRuleInfo.cxx b/xmloff/source/text/XMLTextNumRuleInfo.cxx
index 5d37764d57..482d94d058 100644
--- a/xmloff/source/text/XMLTextNumRuleInfo.cxx
+++ b/xmloff/source/text/XMLTextNumRuleInfo.cxx
@@ -120,6 +120,15 @@ void XMLTextNumRuleInfo::Set(
}
// <--
+ // --> OD 2010-01-13 #b6912256#
+ if ( mnListLevel < 0 )
+ {
+ DBG_ASSERT( false,
+ "<XMLTextNumRuleInfo::Set(..)> - unexpected numbering level" );
+ Reset();
+ return;
+ }
+
// --> OD 2006-09-27 #i69627#
bool bSuppressListStyle( false );
if ( mxNumRules.is() )