-- cgit -- cgit From 48adcca2a1e5eb132932f3400d8c54e9ba594993 Mon Sep 17 00:00:00 2001 From: Frank Schönheit Date: Mon, 14 Sep 2009 12:24:04 +0000 Subject: #cr6875455^# pass the SdrModel's reference device to UnoControlModels --- svx/source/form/fmobj.cxx | 84 ++++++++++++++++++++++++++++++----------------- svx/source/inc/fmobj.hxx | 8 ++++- 2 files changed, 60 insertions(+), 32 deletions(-) diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index f2773b7350fa..95b0e151e078 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -81,6 +81,10 @@ FmFormObj::FmFormObj(const ::rtl::OUString& rModelName,sal_Int32 _nType) ,m_pLastKnownRefDevice ( NULL ) { DBG_CTOR(FmFormObj, NULL); + + // normally, this is done in SetUnoControlModel, but if the call happened in the base class ctor, + // then our incarnation of it was not called (since we were not constructed at this time). + impl_checkRefDevice_nothrow( true ); } //------------------------------------------------------------------ @@ -123,6 +127,43 @@ void FmFormObj::ClearObjEnv() m_nPos = -1; } +//------------------------------------------------------------------ +void FmFormObj::impl_checkRefDevice_nothrow( bool _force ) +{ + const FmFormModel* pFormModel = PTR_CAST( FmFormModel, GetModel() ); + OutputDevice* pCurrentRefDevice = pFormModel ? pFormModel->GetRefDevice() : NULL; + + if ( ( m_pLastKnownRefDevice == pCurrentRefDevice ) && !_force ) + return; + + Reference< XControlModel > xControlModel( GetUnoControlModel() ); + if ( !xControlModel.is() ) + return; + + m_pLastKnownRefDevice = pCurrentRefDevice; + if ( m_pLastKnownRefDevice == NULL ) + return; + + try + { + Reference< XPropertySet > xModelProps( GetUnoControlModel(), UNO_QUERY_THROW ); + Reference< XPropertySetInfo > xPropertyInfo( xModelProps->getPropertySetInfo(), UNO_SET_THROW ); + + static const ::rtl::OUString sRefDevicePropName( RTL_CONSTASCII_USTRINGPARAM( "ReferenceDevice" ) ); + if ( xPropertyInfo->hasPropertyByName( sRefDevicePropName ) ) + { + VCLXDevice* pUnoRefDevice = new VCLXDevice; + pUnoRefDevice->SetOutputDevice( m_pLastKnownRefDevice ); + Reference< XDevice > xRefDevice( pUnoRefDevice ); + xModelProps->setPropertyValue( sRefDevicePropName, makeAny( xRefDevice ) ); + } + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } +} + //------------------------------------------------------------------ void FmFormObj::impl_isolateControlModel_nothrow() { @@ -360,38 +401,10 @@ SdrObject* FmFormObj::Clone() const } //------------------------------------------------------------------ -void FmFormObj::ReformatText() +void FmFormObj::NbcReformatText() { - const FmFormModel* pFormModel = PTR_CAST( FmFormModel, GetModel() ); - OutputDevice* pCurrentRefDevice = pFormModel ? pFormModel->GetRefDevice() : NULL; - - if ( m_pLastKnownRefDevice != pCurrentRefDevice ) - { - m_pLastKnownRefDevice = pCurrentRefDevice; - - try - { - Reference< XPropertySet > xModelProps( GetUnoControlModel(), UNO_QUERY ); - Reference< XPropertySetInfo > xPropertyInfo; - if ( xModelProps.is() ) - xPropertyInfo = xModelProps->getPropertySetInfo(); - - const ::rtl::OUString sRefDevicePropName( RTL_CONSTASCII_USTRINGPARAM( "ReferenceDevice" ) ); - if ( xPropertyInfo.is() && xPropertyInfo->hasPropertyByName( sRefDevicePropName ) ) - { - VCLXDevice* pUnoRefDevice = new VCLXDevice; - pUnoRefDevice->SetOutputDevice( m_pLastKnownRefDevice ); - Reference< XDevice > xRefDevice( pUnoRefDevice ); - xModelProps->setPropertyValue( sRefDevicePropName, makeAny( xRefDevice ) ); - } - } - catch( const Exception& ) - { - OSL_ENSURE( sal_False, "FmFormObj::ReformatText: caught an exception!" ); - } - } - - SdrUnoObj::ReformatText(); + impl_checkRefDevice_nothrow( false ); + SdrUnoObj::NbcReformatText(); } //------------------------------------------------------------------ @@ -563,6 +576,13 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface > return Reference< XInterface > (xDestContainer, UNO_QUERY); } +//------------------------------------------------------------------ +void FmFormObj::SetModel( SdrModel* _pNewModel ) +{ + SdrUnoObj::SetModel( _pNewModel ); + impl_checkRefDevice_nothrow(); +} + //------------------------------------------------------------------ FmFormObj* FmFormObj::GetFormObject( SdrObject* _pSdrObject ) { @@ -595,6 +615,8 @@ void FmFormObj::SetUnoControlModel( const Reference< com::sun::star::awt::XContr SdrUnoObj::SetUnoControlModel( _rxModel ); // TODO: call something like formObjectInserted at the form page, to tell it the new model + + impl_checkRefDevice_nothrow( true ); } //------------------------------------------------------------------ diff --git a/svx/source/inc/fmobj.hxx b/svx/source/inc/fmobj.hxx index 4099f241b72a..25f792ed7417 100644 --- a/svx/source/inc/fmobj.hxx +++ b/svx/source/inc/fmobj.hxx @@ -86,12 +86,14 @@ public: virtual sal_uInt32 GetObjInventor() const; virtual sal_uInt16 GetObjIdentifier() const; - virtual void ReformatText(); + virtual void NbcReformatText(); virtual SdrObject* Clone() const; // #116235# virtual SdrObject* Clone(SdrPage* pPage, SdrModel* pModel) const; virtual void operator= (const SdrObject& rObj); + virtual void SetModel(SdrModel* pNewModel); + virtual void clonedFrom(const FmFormObj* _pSource); static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> ensureModelEnv(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rSourceContainer, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer> _rTopLevelDestContainer); @@ -124,6 +126,10 @@ private: its parent. */ void impl_isolateControlModel_nothrow(); + + /** forwards the reference device of our SdrModel to the control model + */ + void impl_checkRefDevice_nothrow( bool _force = false ); }; -- cgit From 5a96967ccd0568fdc2731b182a81f617dc7799da Mon Sep 17 00:00:00 2001 From: Frank Schönheit Date: Wed, 23 Sep 2009 08:48:48 +0000 Subject: #b6875455# added Forms/ControlLayout/UseDocumentTextMetrics, controlling whether form controls should use the document's reference device for text rendering --- .../registry/data/org/openoffice/Office/Common.xcu | 11 + .../schema/org/openoffice/Office/Common.xcs | 12890 ++++++++++--------- 2 files changed, 6465 insertions(+), 6436 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu index 6e25dedba37e..fade7dd29aeb 100644 --- a/officecfg/registry/data/org/openoffice/Office/Common.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu @@ -513,6 +513,9 @@ true + + true + @@ -521,6 +524,14 @@ true + + true + + + + + true + diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index e6218530561c..b3f07f77f108 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -30,6488 +30,6506 @@ ************************************************************************ --> - - Contains common settings which are potentially shared by other components. - - - - - MAV - Contains a container for passwords. - - - - Contains a password encoded with the master password. - - - - - - AS - Contains settings for a history entry in the history list. - - - - Specifies the document URL. - - - - - Specifies the filter name that was chosen to load the document. - - - - - Indicates the title of the URL that is displayed on the user-interface. - - - - - Contains an encoded password used to open the document. - - - - - - AS - Describes a menu entry for configurable office menus (e.g. file new). - - - - Specifies the URL for dispatch. - - - - - Specifies the label of a menu entry. - - - - - Specifies the identifier of an assigned icon. - - - - - Specifies the dispatch target (for example, _blank to open URL in new frame). - - - - - - PB - Contains the width and height of the dialog size. - - - - Contains the height of the dialog [UNIT=pixel]. - - - - - Contains the width of the dialog [UNIT=pixel]. - - - - - - OJ - Describes the characteristics of a font. - - - - Specifies the exact name of the font ("Arial","Courier", "Frutiger"). - - - - - Specifies the height of the font in the measure of the destination. - - - - - Specifies the width of the font in the measure of the destination. - - - - - Specifies the style name of the font ("Bold", "Italic", "Italic Bold"). - - - - - Specifies the general style of the font. - - - - - DONTKNOW - - - - - DECORATIVE - - - - - MODERN - - - - - ROMAN - - - - - SCRIPT - - - - - SWISS - - - - - SYSTEM - - - - - DONTKNOW - - - - - - - Specifies the character set which is supported by the font. - - - - - DONTKNOW - - - - - ANSI - - - - - MAC - - - - - IBMPC_437 - - - - - IBMPC_850 - - - - - IBMPC_860 - - - - - IBMPC_861 - - - - - IBMPC_863 - - - - - IBMPC_865 - - - - - SYSTEM - - - - - SYMBOL - - - - - - - Specifies the pitch of the font. - - - - - DONTKNOW - - - - - FIXED - - - - - VARIABLE - - - - - - - Specifies the character width. Depending on the specified width, a font that supports this width may be selected. [UNIT=%]. - - - - - Specifies the thickness of the line. - - - - - Specifies if there is a character slant (italic). - - - - - NONE - - - - - OBLIQUE - - - - - ITALIC - - - - - DONTKNOW - - - - - REVERSE_OBLIQUE - - - - - REVERSE_ITALIC - - - - - - - Specifies the type of underline. - - - - - NONE - - - - - SINGLE - - - - - DOUBLE - - - - - DOTTED - - - - - DONTKNOW - - - - - DASH - - - - - LONGDASH - - - - - DASHDOT - - - - - DASHDOTDOT - - - - - SMALLWAVE - - - - - WAVE - - - - - DOUBLEWAVE - - - - - BOLD - - - - - BOLDDOTTED - - - - - BOLDDASH - - - - - BOLDLONGDASH - - - - - BOLDDASHDOT - - - - - BOLDDASHDOTDOT - - - - - BOLDWAVE - - - - - - - Specifies the type of strikeout. - - - - - NONE - - - - - SINGLE - - - - - DOUBLE - - - - - DONTKNOW - - - - - BOLD - - - - - SLASH - - - - - X - - - - - - - Specifies the rotation of the font. [UNIT=degree]. - - - - - Specifies if a kerning table is available (for requesting). For selecting, specifies if the kerning table is to be used. - - - - - Specifies if only words get underlined. - - - - - Specifies the technology of the font representation. - - - - - DONTKNOW - - - - - RASTER - - - - - DEVICE - - - - - SCALABLE - - - - - - - - OS - Contains settings for the font replacement. - - - - Contains the name of font that is to be replaced. - - - - - Contains the name of the replacing font. - - - - - Determines if the font pair replacement is applied on the screen. - - false - - - - Determines if the font pair replacement is applied on the printer. - - false - - - - - Use LogicalGraphicSize instead of this. - SJ - Specifies the size of a graphic. [UNIT=1/100 mm]. - - - - Specifies the width of graphic. [UNIT=1/100 mm]. - - - - - Represents the highest value that can be entered in the dialog. - - - - - Represents the lowest value that can be entered in the dialog. - - - - 10000 - - - - Specifies the height of graphic. [UNIT=1/100 mm]. - - - - - Represents the lowest value that can be entered in the dialog. - - - - - Represents the highest value that can be entered in the dialog. - - - - 10000 - - - - - SJ - Specifies the logical size of a graphic. [UNIT=1/100 mm]. - - - - Specifies the logical width of a graphic. [UNIT=1/100 mm]. - - - - - Represents the lowest value that can be entered in the dialog. - - - - - Represents the highest value that can be entered in the dialog. - - - - 10000 - - - - Specifies the logical height of graphic. [UNIT=1/100 mm]. - - - - - Represents the lowest value that can be entered in the dialog. - - - - - Represents the highest value that can be entered in the dialog. - - - - 10000 - - - - - Replaced by org.openoffice.Office.Embedding/ObjectName. - MAV - Deprecated - - - - - MAV - Deprecated - - - - - - MAV - Deprecated - - - - - - AS - Specifies an entry of the recovery list which is then used by CrashGuard to save information about the last opened files. - - - - Specifies an URL that should be recovered after the next Office start. - - - - - Specifies a filter that should be used to open the document referenced by the URL property. - - - - - Contains the name of the temporary file which represents the document. - - - - - - OS - Contains the characters (so called forbidden characters) that are not allowed at the beginning or end of a line. - - - - Contains the characters that are not allowed at the beginning of a line. - - - - - Contains the characters that are not allowed at the end of a line. - - - - - - MBA - Stores an association between a numeric value and a name. - - - - Specifies a name that is associated with a counter. - - - - - Specifies a number that is associated with a name. - - - - - - Without replacement. - OBR - Contains the command line profile for external mail applications. - - - - Contains the different string tokens for "to" and "cc" etc. Addresses will be concatenated to create the command line. - - - - Contains the fixed text (optional) preceding the mail arguments. - - - - - Contains the string token describing the "from" address field. - - - - - Contains the string token describing the "to" address field. - - - - - Contains the string token describing the "cc" address field. - - - - - Contains the string token describing the "bcc" address field. - - - - - Contains the string token describing the subject. - - - - - Contains the string token describing the attachments of the message. - - - - - Contains the string token describing the body of the message. - - - - - - Contains the delimiters used to separate values for various command line parameters of the external mailer. - - - - Contains the delimiter used between the external mailer name and the "to" field. - - - - - Contains the delimiters between different cc addressees. - - - - - Contains the delimiters between different bcc addressees. - - - - - Contains the delimiters between different attachments. - - - - - - - Use cfg package Jobs instead of this. - AS - Use cfg package Jobs instead of this. - - - - Use cfg package Jobs instead of this. - - - - - Use cfg package Jobs instead of this. - - - - - Use cfg package Jobs instead of this. - - - - - Use cfg package Jobs instead of this. - - - - - - GT - All Certificate informations needed to handle and identify the signature. - - - - Subject name of Certificate. - - - - - Serial Number of Certificate. - - - - - Raw of Certificate. - - - - - - FS - specifies, on a per-application-type basis, certain defaults for layouting form controls - - - - specifies the default visual effect for form controls - - - - - specifies no special visual effect - - - - - specifies a flat appearance - - - - - specifies a 3D appearance - - - - - - - specifies whether the controls should use dynamic border coloring, if possible. -Dymamic border coloring means that when the mouse is hovered over a control, and when a control receives the focus, this is indicated with special border colors. - - false - - - - - Stores registration data which is related to a specific product version. - - - - An instance UUID associated with the product version ID. - - - - - - - - - MAV - Contains internal MSExport settings that are common for all apps. - - - - Specifies if an old ( 5.0 format )way instead of a new one ( 6.0 OLE embedded document ) should be used for export of inplace objects in case MS-filters are not used for them. - - false - - - - - MAV - Contains a description of the persistent password container. - - - - Specifies if passwords can be stored persistently. - - false - - - - Specifies if there is a valid master password. - - false - - - - Contains the master password encrypted by itself. - - - - - - Contains a list of passwords encoded with the master password. - - - - - - AW - Specifies settings for the 3D engine. - - - - - - - AW - Specifies if dithering is used to display more colors with few colors available. - - - true - - - - - - - AW - Specifies if 3D graphics from Draw and Impress will be displayed on the user's system using an OpenGL capable hardware. If the system does not have an OpenGL capable hardware, this setting will be ignored. The 3D display is always done per software. - - - false - - - - - - - AW - Specifies whether all geometry data will be simultaneously transferred in an array to the graphic driver. Not every graphic driver correctly supports this OpenGL capability. For this reason, this option can be deactivated in case of presentation errors of 3D output. All geometry data will be then transferred as single components. This option is only available if OpenGL is used, otherwise it is disabled. - - - true - - - - - - - AW - Specifies interaction with full display. If a 3-D object is rotated or moved, the full display is rotated or moved and not a grid frame. - - - false - - - - - AW - Specifies settings for the Drawinglayer. - - - - AW - Specifies if the Overlay pane is allowed to use an own buffer. If on, Overlay is fast but a buffer (graphics memory) is used. If off, Overlay is slow, but no Buffer is needed. This is the global switch which will enable/disable overlay for all Applications. This is the global switch for the whole office. - - - true - - - - AW - Similar to OverlayBuffer, but only for Calc Application - - - true - - - - AW - Similar to OverlayBuffer, but only for Writer Application - - - true - - - - AW - Similar to OverlayBuffer, but only for Draw/Impress Applications - - - true - - - - AW - Specifies if the Application Repaint shall use a buffer for Pre-Rendering. If on, screen flicker is greatly reduced and remote display is fast, but a buffer (graphics memory) is needed. If off, screen flicker will occurr and remote display is slow, but no buffer is needed. This is the global switch for the whole office. - - - true - - - - AW - Similar to PaintBuffer, but only for Calc Application. PaintBuffer is the global switch. - - - true - - - - AW - Similar to PaintBuffer, but only for Writer Application. PaintBuffer is the global switch. - - - true - - - - AW - Similar to PaintBuffer, but only for Draw/Impress Applications. PaintBuffer is the global switch. - - - true - - - - AW - Specifies the first one of two colors used from overlay to display striped lines as helplines. Default is black. - - - 0 - - - - AW - Specifies the second one of two colors used from overlay to display striped lines as helplines. Default is white. - - - 16777215 - - - - AW - Specifies the length in pixels of a single stripe used from overlay to display striped lines as helplines. Default is four. - - - 4 - - - - AW - Specifies the maximum allowed Paper Width for page definitions in cm. Default is 3m, i.e. 300 cm. When this is changed to higher values, it is done on own risk. - - - 300 - - - - AW - Specifies the maximum allowed Paper Height for page definitions in cm. Default is 3m, i.e. 300 cm. When this is changed to higher values, it is done on own risk. - - - 300 - - - - AW - Specifies the maximum allowed Left Margin for the page definitions in 1/100th cm. - - - 9999 - - - - AW - Specifies the maximum allowed Right Margin for the page definitions in 1/100th cm. - - - 9999 - - - - AW - Specifies the maximum allowed Top Margin for the page definitions in 1/100th cm. - - - 9999 - + + Contains common settings which are potentially shared by other components. + + + + + MAV + Contains a container for passwords. + + + + Contains a password encoded with the master password. + + + + + + AS + Contains settings for a history entry in the history list. + + + + Specifies the document URL. + + + + + Specifies the filter name that was chosen to load the document. + + + + + Indicates the title of the URL that is displayed on the user-interface. + + + + + Contains an encoded password used to open the document. + + + + + + AS + Describes a menu entry for configurable office menus (e.g. file new). + + + + Specifies the URL for dispatch. + + + + + Specifies the label of a menu entry. + + + + + Specifies the identifier of an assigned icon. + + + + + Specifies the dispatch target (for example, _blank to open URL in new frame). + + + + + + PB + Contains the width and height of the dialog size. + + + + Contains the height of the dialog [UNIT=pixel]. + + + + + Contains the width of the dialog [UNIT=pixel]. + + + + + + OJ + Describes the characteristics of a font. + + + + Specifies the exact name of the font ("Arial","Courier", "Frutiger"). + + + + + Specifies the height of the font in the measure of the destination. + + + + + Specifies the width of the font in the measure of the destination. + + + + + Specifies the style name of the font ("Bold", "Italic", "Italic Bold"). + + + + + Specifies the general style of the font. + + + + + DONTKNOW + + + + + DECORATIVE + + + + + MODERN + + + + + ROMAN + + + + + SCRIPT + + + + + SWISS + + + + + SYSTEM + + + + + DONTKNOW + + + + + + + Specifies the character set which is supported by the font. + + + + + DONTKNOW + + + + + ANSI + + + + + MAC + + + + + IBMPC_437 + + + + + IBMPC_850 + + + + + IBMPC_860 + + + + + IBMPC_861 + + + + + IBMPC_863 + + + + + IBMPC_865 + + + + + SYSTEM + + + + + SYMBOL + + + + + + + Specifies the pitch of the font. + + + + + DONTKNOW + + + + + FIXED + + + + + VARIABLE + + + + + + + Specifies the character width. Depending on the specified width, a font that supports this width may be selected. [UNIT=%]. + + + + + Specifies the thickness of the line. + + + + + Specifies if there is a character slant (italic). + + + + + NONE + + + + + OBLIQUE + + + + + ITALIC + + + + + DONTKNOW + + + + + REVERSE_OBLIQUE + + + + + REVERSE_ITALIC + + + + + + + Specifies the type of underline. + + + + + NONE + + + + + SINGLE + + + + + DOUBLE + + + + + DOTTED + + + + + DONTKNOW + + + + + DASH + + + + + LONGDASH + + + + + DASHDOT + + + + + DASHDOTDOT + + + + + SMALLWAVE + + + + + WAVE + + + + + DOUBLEWAVE + + + + + BOLD + + + + + BOLDDOTTED + + + + + BOLDDASH + + + + + BOLDLONGDASH + + + + + BOLDDASHDOT + + + + + BOLDDASHDOTDOT + + + + + BOLDWAVE + + + + + + + Specifies the type of strikeout. + + + + + NONE + + + + + SINGLE + + + + + DOUBLE + + + + + DONTKNOW + + + + + BOLD + + + + + SLASH + + + + + X + + + + + + + Specifies the rotation of the font. [UNIT=degree]. + + + + + Specifies if a kerning table is available (for requesting). For selecting, specifies if the kerning table is to be used. + + + + + Specifies if only words get underlined. + + + + + Specifies the technology of the font representation. + + + + + DONTKNOW + + + + + RASTER + + + + + DEVICE + + + + + SCALABLE + + + + + + + + OS + Contains settings for the font replacement. + + + + Contains the name of font that is to be replaced. + + + + + Contains the name of the replacing font. + + + + + Determines if the font pair replacement is applied on the screen. + + false + + + + Determines if the font pair replacement is applied on the printer. + + false + + + + + Use LogicalGraphicSize instead of this. + SJ + Specifies the size of a graphic. [UNIT=1/100 mm]. + + + + Specifies the width of graphic. [UNIT=1/100 mm]. + + + + + Represents the highest value that can be entered in the dialog. + + + + + Represents the lowest value that can be entered in the dialog. + + + + 10000 + + + + Specifies the height of graphic. [UNIT=1/100 mm]. + + + + + Represents the lowest value that can be entered in the dialog. + + + + + Represents the highest value that can be entered in the dialog. + + + + 10000 + + + + + SJ + Specifies the logical size of a graphic. [UNIT=1/100 mm]. + + + + Specifies the logical width of a graphic. [UNIT=1/100 mm]. + + + + + Represents the lowest value that can be entered in the dialog. + + + + + Represents the highest value that can be entered in the dialog. + + + + 10000 + + + + Specifies the logical height of graphic. [UNIT=1/100 mm]. + + + + + Represents the lowest value that can be entered in the dialog. + + + + + Represents the highest value that can be entered in the dialog. + + + + 10000 + + + + + Replaced by org.openoffice.Office.Embedding/ObjectName. + MAV + Deprecated + + + + + MAV + Deprecated + + + + + + MAV + Deprecated + + + + + + AS + Specifies an entry of the recovery list which is then used by CrashGuard to save information about the last opened files. + + + + Specifies an URL that should be recovered after the next Office start. + + + + + Specifies a filter that should be used to open the document referenced by the URL property. + + + + + Contains the name of the temporary file which represents the document. + + + + + + OS + Contains the characters (so called forbidden characters) that are not allowed at the beginning or end of a line. + + + + Contains the characters that are not allowed at the beginning of a line. + + + + + Contains the characters that are not allowed at the end of a line. + + + + + + MBA + Stores an association between a numeric value and a name. + + + + Specifies a name that is associated with a counter. + + + + + Specifies a number that is associated with a name. + + + + + + Without replacement. + OBR + Contains the command line profile for external mail applications. + + + + Contains the different string tokens for "to" and "cc" etc. Addresses will be concatenated to create the command line. + + + + Contains the fixed text (optional) preceding the mail arguments. + + + + + Contains the string token describing the "from" address field. + + + + + Contains the string token describing the "to" address field. + + + + + Contains the string token describing the "cc" address field. + + + + + Contains the string token describing the "bcc" address field. + + + + + Contains the string token describing the subject. + + + + + Contains the string token describing the attachments of the message. + + + + + Contains the string token describing the body of the message. + + + + + + Contains the delimiters used to separate values for various command line parameters of the external mailer. + + + + Contains the delimiter used between the external mailer name and the "to" field. + + + + + Contains the delimiters between different cc addressees. + + + + + Contains the delimiters between different bcc addressees. + + + + + Contains the delimiters between different attachments. + + + + + + + Use cfg package Jobs instead of this. + AS + Use cfg package Jobs instead of this. + + + + Use cfg package Jobs instead of this. + + + + + Use cfg package Jobs instead of this. + + + + + Use cfg package Jobs instead of this. + + + + + Use cfg package Jobs instead of this. + + + + + + GT + All Certificate informations needed to handle and identify the signature. + + + + Subject name of Certificate. + + + + + Serial Number of Certificate. + + + + + Raw of Certificate. + + + + + + FS + specifies, on a per-application-type basis, certain defaults for layouting form controls + + + + specifies the default visual effect for form controls + + + + + specifies no special visual effect + + + + + specifies a flat appearance + + + + + specifies a 3D appearance + + + + + + + + specifies whether the controls should use dynamic border coloring, if possible. + Dymamic border coloring means that when the mouse is hovered over a control, and when a control receives the focus, this is indicated with special border colors. + + + false + + + + + controls whether form controls, when they render their text, use the same metrics as the document + does. If this is set to <true>, then the control text's appearance better matches the text + in the surrounding document.</p> + <p>Technically, documents use a reference device for formatting, which usually has a higher + resolution than the actual output device. The option decides whether form controls should use + the same reference device as the surrounding document. However, some of OOo's document implementations + do not properly use their reference device in all situations, in which case the option might better + be disabled.<p> + + + false + + + + + Stores registration data which is related to a specific product version. + + + + An instance UUID associated with the product version ID. + + + + + + + + + MAV + Contains internal MSExport settings that are common for all apps. + + + + Specifies if an old ( 5.0 format )way instead of a new one ( 6.0 OLE embedded document ) should be used for export of inplace objects in case MS-filters are not used for them. + + false + + + + + MAV + Contains a description of the persistent password container. + + + + Specifies if passwords can be stored persistently. + + false + + + + Specifies if there is a valid master password. + + false + + + + Contains the master password encrypted by itself. + + + + + + Contains a list of passwords encoded with the master password. + + + + + + AW + Specifies settings for the 3D engine. + + + + + + + AW + Specifies if dithering is used to display more colors with few colors available. + + + true + + + + + + + AW + Specifies if 3D graphics from Draw and Impress will be displayed on the user's system using an OpenGL capable hardware. If the system does not have an OpenGL capable hardware, this setting will be ignored. The 3D display is always done per software. + + + false + + + + + + + AW + Specifies whether all geometry data will be simultaneously transferred in an array to the graphic driver. Not every graphic driver correctly supports this OpenGL capability. For this reason, this option can be deactivated in case of presentation errors of 3D output. All geometry data will be then transferred as single components. This option is only available if OpenGL is used, otherwise it is disabled. + + + true + + + + + + + AW + Specifies interaction with full display. If a 3-D object is rotated or moved, the full display is rotated or moved and not a grid frame. + + + false + + + + + AW + Specifies settings for the Drawinglayer. + + + + AW + Specifies if the Overlay pane is allowed to use an own buffer. If on, Overlay is fast but a buffer (graphics memory) is used. If off, Overlay is slow, but no Buffer is needed. This is the global switch which will enable/disable overlay for all Applications. This is the global switch for the whole office. + + + true + + + + AW + Similar to OverlayBuffer, but only for Calc Application + + + true + + + + AW + Similar to OverlayBuffer, but only for Writer Application + + + true + + + + AW + Similar to OverlayBuffer, but only for Draw/Impress Applications + + + true + + + + AW + Specifies if the Application Repaint shall use a buffer for Pre-Rendering. If on, screen flicker is greatly reduced and remote display is fast, but a buffer (graphics memory) is needed. If off, screen flicker will occurr and remote display is slow, but no buffer is needed. This is the global switch for the whole office. + + + true + + + + AW + Similar to PaintBuffer, but only for Calc Application. PaintBuffer is the global switch. + + + true + + + + AW + Similar to PaintBuffer, but only for Writer Application. PaintBuffer is the global switch. + + + true + + + + AW + Similar to PaintBuffer, but only for Draw/Impress Applications. PaintBuffer is the global switch. + + + true + + + + AW + Specifies the first one of two colors used from overlay to display striped lines as helplines. Default is black. + + + 0 + + + + AW + Specifies the second one of two colors used from overlay to display striped lines as helplines. Default is white. + + + 16777215 + + + + AW + Specifies the length in pixels of a single stripe used from overlay to display striped lines as helplines. Default is four. + + + 4 + + + + AW + Specifies the maximum allowed Paper Width for page definitions in cm. Default is 3m, i.e. 300 cm. When this is changed to higher values, it is done on own risk. + + + 300 + + + + AW + Specifies the maximum allowed Paper Height for page definitions in cm. Default is 3m, i.e. 300 cm. When this is changed to higher values, it is done on own risk. + + + 300 + + + + AW + Specifies the maximum allowed Left Margin for the page definitions in 1/100th cm. + + + 9999 + + + + AW + Specifies the maximum allowed Right Margin for the page definitions in 1/100th cm. + + + 9999 + + + + AW + Specifies the maximum allowed Top Margin for the page definitions in 1/100th cm. + + + 9999 + - AW - Specifies the maximum allowed Bottom Margin for the page definitions in 1/100th cm. - + AW + Specifies the maximum allowed Bottom Margin for the page definitions in 1/100th cm. + + + 9999 + + + + AW + + This switch allows to switch DrawingLayer based views to be rendered using AntiAliasing or not. + Of course this takes only effect when AntiAliasing is supported for the System OOo is running on. + + + + true + + + + AW + + This switch allows to enhance visualisation of graphics which use Horizontal or Vertical Hairlines + combined with AntiAliased mode (e.g. in 2D charts). When not used, those lines will be AntiAliased + as everything else. Since this is not pleasing for the eye, this option allows to force those lines + to snap to discrete points (pixels) when activated and thus avoids AntiAliasing of pure Horizontal or + Vertical Hairlines. + + + + true + + + + AW + + This switch determines if the decorations of decorated text portions (e.g. underline, strike through) + are rendered using VCL direct rendering or if the primitive is decomposed into simple text and the + corresponding geometrical representations of the decorations. Default is true since VCL's usage + of the diverse System's hinting possibilities for decorations is useful. + + + + true + + + + AW + + This switch determines if simple text is directly rendered using VCL or not. If not, the simple text + is decomposed into PolyPolygons which will be painted then. Default is true, since VCL will use the + hinting for font rendering on the diverse supported systems, which gives better quality than rendering + the text as Polygons. + + + + true + + + + AW + + This switch decides if Interactions in the DrawingLayer are visualized using Wireframe or Full-Object + previews. If false, only Wireframe will be used. If true, Full-Object preview which gives a much better + feedback about the object interaction will be used. This mode is used for modification and creation of + objects. During interaction, a geometric copy of the object(s) is shown with 50% transparence in the + foreground. That copy shows exactly what You will get when You end the interaction. + + + + true + + + + AW + + This defines a Limitation for the default raster conversion from 3D Scenes to Bitmaps. + The number is the maximum number of pixels to use, e.g. 1000x1000 Pixels is allowed as default. + When Scenes would need more Pixels than this, the Bitmap will be limited and scaled to the needed pixel size at paint time. + + + + 1000000 + + + + AW + + This defines a Limitation for the default raster conversion of FormControls in edit mode. + These have the ability to be displayed using this fallback to Bitmaps. + The number is the maximum number of pixels to use, e.g. 300x150 Pixels is allowed as default. + When FormControls would need more Pixels than this, the Bitmap will be limited and scaled to the needed pixel size at paint time. + + + + 45000 + + + + AW + + This switch defines if the selections in the applications (text or cells) are visualized using + inverse (XOR) when set to false (the old selection method, also used when in HighContrast mode) + or a transparent overlay selection using the system's selection color. + + + + true + + + + AW + + Specifies the degree of transparence to be used when transparent selection is used. The value is a percent + value. Since neither no transparence nor complete transparence makes sense, the value is limited to a range + of 10% - 90%. If the given value is outside this range, it is cropped to it. + + + + 75 + + + + AW + + Specifies the maximum allowed luminance the system's selection color may have. When the color + fetched from the system is brighter (luminacne is bigger), it will be scaled to a luminance + of exactly this given value. + + + + 70 + + + + + OS + Contains miscellaneous settings for the auto correction. + + + + + + + OS + Specifies if the replacement table should be used to replace letter combinations with defined text + + + true + + + + + + + OS + Specifies if two initial capitals should be corrected automatically. + + + true + + + + + + + OS + Specifies if the letter at the beginning of a sentence should be capitalized automatically. + + + true + + + + + + + OS + Specifies if text should be formatted in bold or underlined when the corresponding characters are entered (*bold*, _underline_). + + + true + + + + + + + OS + Specifies if character strings which could represent an URL should be converted to a hyperlink. + + + true + + + + + + + OS + Specifies if ordinal numbers should be displayed with raised endings. + + + true + + + + + + + OS + Specifies if character combinations for fractions should be replaced with a corresponding single character. + + + true + + + + + + + OS + Specifies if minus signs should be replaced by dashes automatically. + + + true + + + + + + + OS + Specifies if multiple spaces should be combined into one. + + + false + + + + + + + OS + Specifies if single quotes should be replaced. + + + false + + + + + + + OS + Specifies the start single quote. + + + + + + + + + OS + Specifies the end single quote. + + + + + + + + + OS + Specifies if double quotes should be replaced. + + + true + + + + + + + OS + Specifies the start quote. + + + + + + + + + OS + Specifies the end quote. + + + + + + Contains settings to apply replacement rules and exceptions. + + + + + + + OS + Specifies if defined words with two initial capital letters should not be included in the AutoCorrect replacement. + + + true + + + + + + + OS + Specifies if defined abbreviations should be taken into account to exclude a preceding capital letter. + + + true + + + + + + AF + Specifies cache related options. + + + + AF + Specifies the cache related options for the drawing engine. + + + + + + + AF + Determines the maximum number of OLE objects that can be held in RAM for drawings, presentations and inserted drawing objects. The fewer OLE objects contained in RAM, the more space is available for other functions. The more OLE objects in RAM, the faster you can page through the objects since they do not always need to be loaded from the hard drive. + + 20 + + + + + AF + Specifies the cache related options for Writer. + + + + + + + AF + Determines the maximum number of OLE objects that can be held in RAM for the writer. The fewer OLE objects contained in RAM, the more space is available for other functions. The more OLE objects in RAM, the faster you can page through the objects since they do not always need to be loaded from the hard drive. + + 20 + + + + + Specifies a group of graphic manager cache options. + + + + + AF + Specifies the maximum cache size for all graphical display objects. + + + 22000000 + + + + AF + Specifies the maximum cache size for a single graphic display object. + + + 5500000 + + + + AF + Specifies the time in seconds after which a cached object is freed from the cache. + + + 600 + + + + + + + + + MBA + Contains the current and default path settings used by the Office. + + + + CD + Contains various properties information purpose only. + + + + A flag which is set by the tools options dialog whenever a user changed the work path. + + true + + + + + MBA + Contains the global path settings, mainly those of the Options dialog. + + + + + + MBA + Contains the Office installation path. + + + + + + + + + MBA + Contains the Office installation path in URL notation. Must match the UCB configuration. + + + + + + + NN + Specifies the directory that contains spreadsheet add-ins which use the old add-in API. + + $(progpath)/addin + + + + OS + Specifies the settings of the AutoCorrect dialog. + + $(insturl)/share/autocorr:$(userurl)/autocorr + + + + OS + Contains the directory which contains the AutoText modules. + + $(insturl)/share/autotext/$(vlang):$(userurl)/autotext + + + + MBA + Stores the automatic backup copies of documents. + + $(userurl)/backup + + + + MBA + Contains the Basic files, which are used by the AutoPilots. + + $(insturl)/share/basic:$(userurl)/basic + + + + MBA + Contains the bitmap files which can be used for menu and toolbar icons. + + $(insturl)/share/config/symbol + + + + MBA + Contains the configuration files. This value cannot be changed through the user interface. + + $(insturl)/share/config + + + + TL + Contains the provided dictionaries. + + $(insturl)/share/wordbook/$(vlang) + + + + PB + Specifies the path to save folder bookmarks. + + $(userurl)/config/folders + + + + MBA + Specifies the directory where all the filters are stored. + + $(progpath)/filter + + + + AF + Specifies the directory which contains the Gallery database and multimedia files. + + $(insturl)/share/gallery:$(userurl)/gallery + + + + DL + Specifies the directory that is displayed when the dialog for opening a graphic or for saving a new graphic is called. + + $(userurl)/gallery + + + + ABI + Specifies the path to the Office help files. + + $(instpath)/help + + + + TL + Contains the files that are necessary for the spellcheck. + + $(insturl)/share/dict + + + + MBA + Contains the Office modules. + + $(progpath) + + + + DL + Specifies the path to the palette files *.SOB to *.SOF containing user-defined colors and patterns. + + $(userurl)/config + + + + MBA + Specifies the directory in which the plugins are saved. + + $(progpath)/plugin + + + + Without replacement. + ABI + Specifies the location where misc data are stored. + + $(userpath)/store + + + + MBA + Specifies the base directory used by the Office to store temp files. + + $(temp) + + + + MBA + Specifies the templates originate from these folders and sub-folders. + + $(insturl)/share/template/$(vlang):$(userurl)/template + + + + MBA + Specifies additional folders containing a global user interface configuration. The final user interface configuration is merged from UserConfig and from these folders. + + $(insturl)/share/config + + + + MBA + Specifies the folder with the user settings. + + $(userurl)/config + + + + TL + Contains the custom dictionaries. + + $(userurl)/wordbook + + + + MBA + Specifies the path of the work folder, which can be modified according to the user's needs. The path specified here can be seen in the Open or Save dialog. + + $(work) + + + + + MBA + Contains the default values of all the paths, which can be modified according to the user's needs. They are used when pressing the Standard-button in the Options dialog. + + + + Specifies the default directory that contains spreadsheet add-ins which use the old add-in API. + + $(progpath)/addin + + + + Specifies the default directory for the settings of the AutoCorrect dialog. + + $(insturl)/share/autocorr:$(userurl)/autocorr + + + + Specifies the default directory where the AutoText modules are located. + + $(insturl)/share/autotext/$(vlang):$(userurl)/autotext + + + + Specifies the default directory for the automatic backup copies of documents. + + $(userurl)/backup + + + + Specifies the default directory where the Basic files, used by the AutoPilots, are located. + + $(insturl)/share/basic:$(userurl)/basic + + + + Specifies the default directory where the bitmap files, which can be used for the menu and toolbar icons, are located. + + $(insturl)/share/config/symbol + + + + Specifies the default directory where the configuration files are stored. + + $(insturl)/share/config + + + + Specifies the default directory where the provided dictionaries are located. + + $(insturl)/share/wordbook/$(vlang) + + + + Specifies the default directory where folder bookmarks are stored. + + $(userurl)/config/folders + + + + Specifies the default directory where all the filters are stored. + + $(progpath)/filter + + + + Specifies the default directory where the Gallery database and multimedia files are located. + + $(insturl)/share/gallery:$(userurl)/gallery + + + + Specifies the default directory used by the dialog for opening a graphic or for saving a new graphic. + + $(userurl)/gallery + + + + Specifies the default directory where Office help files are located. + + $(instpath)/help + + + + Specifies the default directory where the files that are necessary for the spellcheck are saved. + + $(insturl)/share/dict + + + + Specifies the default directory which contains the Office modules. + + $(progpath) + + + + Specifies the default directory for the palette files *.SOB to *.SOF containing user-defined colors and patterns. + + $(userurl)/config + + + + Specifies the default directory where the Office plugins are located. + + $(progpath)/plugin + + + + Specifies the default directory that is used as a base directory for all temporary Office files. + + $(temp) + + + + Specifies the default directory where all provided templates are located in folders and sub-folders. + + $(insturl)/share/template/$(vlang):$(userurl)/template + + + + Specifies the default directories for the global user interface configuration. The final user interface configuration is merged from UserConfig and from these folders. + + + + + + Specifies the default directory which stores the user settings. + + $(userurl)/config + + + + Specifies the default directory which stores the custom dictionaries. + + $(userurl)/wordbook + + + + Specifies the default working directory where user stores documents. + + $(work) + + + + + + OS + Contains some common settings for fonts. + + + + OS + Contains settings for the font substitution. + + + + + + + OS + Determines if the list of font replacements is applied or not + + + false + + + + + + + OS + Specifies a substitution of the requested font, even if this font is available on the user's system. + + + + + + PB + Contains the settings for the font selection box in the object bar. + + + + + + + PB + Contains the last five fonts, which are shown on the top of a list, beginning with the last one. This list will be displayed on the font-name-box of the object bar. + + true + + + + + + + PB + Specifies that the names of the selectable fonts will be displayed with this font. + + true + + + + + OS + Specifies the font name and height used in HTML source view + + + + Specifies the name of the font that is used in source views (HTML source view or BASIC IDE) + + + + + Specifies the height, in points, of the font that is used in source views (HTML source view or BASIC IDE) + + 10 + + + + Specifies whether only non-proportional font should be presented on the dialog page. + + true + + + + + + AF + Specifies Gallery options. + + + + + + + + + AF + Deprecated. + + false + + + + + AS + Contains information about configurable menus. + + + + Contains all entries of new menu. + + + + + Contains all entries of wizard menu. + + + + + PB + Contains all help bookmarks. + + + + + + + AS + Contains history information. + + + + PB + Describes the range and current size of the help bookmark history list. + + + + + Defines the minimum range of the help bookmark history list. + + + + + Defines the maximum range of the help bookmark history list. + + + + 10000 + + + + Describes the range and current size of the history list. + + + + + Defines the min range for the history size. + + + + + Defines the max range for the history size. + + + + 100 + + + + + Describes the range and current size of the picklist shown inside the menu. + + + + + Defines the min range for the picklist size. + + + + + Defines the max range for the picklist size. + + + + 10 + + + + Contains the most recently opened help documents. + + + + + Contains the most recently opened documents. + + + + + + Contains the most recently used documents displayed in the file menu. + + + + + + MBA + Contains settings which are used during the Office startup to check for unfinished work. + + + + + + + MBA + Sends a mail that includes the stack trace after a crash. + + false + + + + + MBA + Enables UI for sending document as e-mail + + false + + + + + + + MBA + Enables mechanism for centralized disabling of functionality + + false + + + + BM + Specifies that If this option is set to true, the new development chart library is used instead of the standard one. Do not set this option to true unless you know exactly what to do. This new library will be unstable and incomplete most of the time. This flag will be removed when the new library is in a stable state. + + false + + + + CD + Specifies the current or last temp directory. This directory will be removed during shutdown or next office start. + + + + + + + AS + Contains the documents that were opened when the office crashed. + + + + + + MBA + Contains general settings about the saving process. + + + + + + + MBA + Specifies if the all open windows and documents should be saved. If set to true, the URLs of all open documents and all view properties of all open views are saved when terminating the application. + + + false + + + + MBA + Contains settings which specify how documents are saved. + + + + + MBA + Saves OOo 6.0 XML file documents unpacked into a directory. Documents are represented by the directory content and not by a single file. + + + false + + + + + + PB + Specifies if the user's name should be written into the Properties dialog of the document when saving the document. + + + true + + + + + + + MBA + Specifies whether all modified documents are automatically saved in a time interval. + + + false + + + + + + + MBA + Specifies whether to create a backup copy when a modified document is saved. + + + false + + + + + + + MBA + Specifies if the document properties dialog will be opened for editing every time a document is saved under a new filename. + + + false + + + + + + + MBA + Shows a prompt during AutoSave,even when the document has a filename. + + + true + + + + + + + MBA + Specifies the AutoSave time interval in minutes. + + + + + + Specifies that the minimum time interval is 1 minute. + + + + + Specifies that the maximum time interval is 60 minutes. + + + + 15 + + + + + + + MBA + Saves view properties of last active document view when saving a document. + + + true + + + + + + + MBA + Specifies whether all currently open windows of a document should be saved. If true the view properties for all open document views of that document are saved. + + + false + + + + + + MBA + Specifies if files saved in the OOo 6.0 XML file formats should be in pretty printing format. Saving and loading the document takes more time in pretty printing format. + + + false + + + + + MBA + Specifies if a warning message is shown if a file is going to be saved to an alien format. + + + true + + + + MAV + If the option is set, every time a user triggers a plain Save operation, SaveAs operation with possible additional user notifications will be started. + + false + + + + PB + If the value is "true", then the ODF that is saved by OpenOffice.org will be backward compatible to previous minor versions. + + true + + + + + PB + Specifies if the printer settings will be loaded with the document. + + true + + + + + MBA + Contains settings on how graphics contained in a document should be saved. + + + + + + + AF + Specifies how graphics contained in a document are saved. + + + + + + Normal + + + + + Compressed + + + + + Original format + + + + 1 + + + + + MBA + Specifies how URLs in documents should be processed during save. + + + + + + + MBA + Specifies whether URLs in documents should be saved relative to the file system. + + + true + + + + + + + MBA + Specifies if URLs in documents should be saved relative to the Internet. + + + true + + + + + PB + Specifies ODF settings. + + + + + PB + Specifies the default ODF version for saving documents. + + + + + ODFVER_UNKNOWN + + + + + ODFVER_010 + + + + + ODFVER_011 + + + + + ODFVER_012 + + + + 3 + + + + + + MBA + Contains settings regarding the loading of documents. + + + + + MBA + Specifies whether the user defined configuration settings are loaded together with the document. + + + true + + + + MAV + Specifies whether the office update dialog should be shown in case the loaded document has newer ODF version than the maximal supported one. + + true + + + + + MBA + Contains security specific Office settings. + + + + MBA + Contains security settings regarding Basic scripts. + + + + + + + MBA + Lists all trustworthy URLs: file: All scripts from the local file system including a LAN; private:explorer: Scripts from the Explorer; private:help: Scripts in the help system; private:newmenu: Scripts that are executed by the commands File-New and AutoPilot; private:schedule: Scripts of the scheduler; private:searchfolder: Scripts of the searchfolder; private:user: Scripts that are entered in the URL field. + + + + + + + + + MBA + Determines how Office Basic scripts should be handled. + + + + + Never + + + + + According to Path List + + + + + Always + + + + 1 + + + + MBA + Specifies whether execution of plugins found inside a document is allowed. + + true + + + + MBA + Specifies whether a warning box should be displayed before executing a script. + + false + + + + MBA + Specifies whether the user must confirm before a basic script can be executed. + + true + + + + GT + Specifies wether to warn when saving or sending documents with personal/hidden data. + + false + + + + GT + Specifies wether to warn when signing documents with personal/hidden data. + + true + + + + GT + Specifies wether to warn when printing documents with personal/hidden data. + + false + + + + GT + Specifies wether to warn when creating PDF documents with personal/hidden data. + + false + + + + GT + Specifies wether to remove personal information on saving. + + false + + + + GT + Specifies wether to recommend password protection when saving documents. + + false + + + + PB + Specifies whether ctrl-click is required to follow hyperlinks. + + true + + + + GT + Level of Macro security. + + + + + Lowest level. + + + + + Highest level. + + + + 2 + + + + MAV + Specifies whether the macro execution is disabled in general. If it is set to true, the "MacroSecurityLevel" is ignored. If it is set to false, the mentioned entry specified the level of macro security. + + false + + + + GT + List with trusted authors. + + + + + + + MBA + Contains window and dialog settings. + + + + + + + PB + Specifies the scaling only of the screen representation [UNIT=%]. + + + + + + PB + Specifies the minimum range of the scaling. + + + + + PB + Specifies the maximum range of the scaling. + + + + 100 + + + + + + + PB + Determines the look and feel of the application. + + + + + + Standard + + + + + Macintosh + + + + + X Window + + + + + OS/2 + + + + 0 + + + + MBA + Contains settings on how the application window should be displayed. + + + + + + MBA + Specifies whether the application window should be opened in Fullscreen mode. + + false + + + + + + MBA + Specifies the preferred view of the application window. + + + + + Use last setting + + + + + Show in task bar + + + + + Open in Fullscreen mode + + + + 0 + + + + + MBA + Contains settings which specify how dialogs and toolbars should be displayed. + + + + + + + MBA + Specifies whether toolbar buttons should be drawn large or small. True means large. + + + false + + + + + + + MBA + Specifies whether toolbox buttons should be drawn with a flat or 3D design. True means flat design. + + + true + + + + + + + PB + Specifies TabDialogs with colored tab control (True) + + + false + + + + + + + PB + Determines the automatic mouse positioning on dialogs: 0 - Default button 1 - Dialog center 2 - No automatic positioning + + + + + + Snap To Button + + + + + Snap To Middle + + + + + No Snap + + + + 2 + + + + + + OS + Determines the action assigned to the middle mouse button: 0 - No action 1 -Auto scroll 2 - Paste selection. + + + + + + No action + + + + + Auto scroll + + + + + Paste selection + + + + 1 + + + + + + + PB + Specifies TabDialogs with single line tab control (True). + + + false + + + + + SSA + Contains localization specific settings. + + + + + + SSA + Specifies if shortcuts are assigned automatically. + + + + + + + SSA + Specifies the percentage for enlarging controls. + + + + + SSA + Specifies the upper limit for enlarging the controls is 100%. + + + + + SSA + Specifies the upper limit for enlarging the controls is 100%. + + + + + + + + PB + Contains menu view settings. + + + + + + + PB + Shows all deactivated menu entries. Menu commands that are normally not necessary are hidden by default. + + true + + + + CMC + Indicates whether icons in the office menus should shown/hidden by following the System theme. + + true + + + + + + CD + Indicates whether icons in the office menus should be displayed. + + true + + + + + + + PB + Specifies automatic selection while moving the mouse over a menu (True). + + + true + + + + + MBA + Contains settings for general windows used by the Office. + + + + + + + PB + Specifies the representation of the window while dragging. + + + + + + With window contents + + + + + Frame only + + + + + From system settings + + + + 2 + + + + + + + + MBA + Deprecated. + + + + + + + + + Deprecated. + + + + + + + + + + + Deprecated. + + false + + + + + + + + Deprecated. + + + + + ZoomIn + + + + + Small + + + + + ForceDock + + + + + AutoHide + + + + + Task + + + + + CantGetFocus + + + + + + + + + + + Deprecated. + + + + + + + + + MBA + Specifies the properties of window containers for docked windows. + + + + + + + + MBA + Deprecated. + + + + + + + + + + + MBA + Deprecated. + + + + + + + + MBA + Deprecated. + + + + + Stick/Hidden + + + + + Floating/Hidden + + + + + Stick/Visible + + + + + Floating/Visible + + + + + + + + Deprecated. + + + + + + + + + Deprecated. + + + + + + + + + Font antialiasing properties + + + + Specifies font antialiasing properties + + + true + + + + Specifies an additional limit if Font Antialiasing is enabled. Fonts that are smaller than the specified limit are not anti-aliased. + + + 8 + + + + + + MBA + Contains the settings regarding the undo operation in the Office. + + + + + + + MBA + Specifies how many operations can be undone in a row. + + + + + + Specifies the lowest number of undo steps possible. + + + + + Specifies the highest number of undo steps possible. + + + + 100 + + + + + PB + Specifies options related to the setup. + + + + Specifies options related to the installed languages. + + + + + + + Contains the installed Office languages for the menus and dialogs. + + + + + + + AF + Specifies options related to printing. + + + + + MBA + Specifies if printing a document can modify a document due to reformatting + + + false + + + + OS + Contains settings for print specific warnings. + + + + + + + OS + Specifies if a warning should be displayed in case the printout requires a specific paper size + + + false + + + + + + + OS + Specifies if a warning should be displayed in case the printout requires a specific paper orientation + + + false + + + + + + + OS + Specifies if a warning should be displayed in case the printer defined in the document was not found + + + false + + + + + AF + Specifies if a warning should be displayed in case the printout contains transparent objects. + + + true + + + + + AF + Specifies the options related to printing. + + + + Specifies the options related to printing. + + + + + AF + Indicates whether to ignore transparency for the output of objects. + + + false + + + + + AF + Specifies type of transparency reduction: 0 - Automatically determine reduction, 1 - Always disabled. + + + 0 + + + + + AF + Indicates whether to reduce memory usage for output of gradients by limiting the number of gradient steps. + + + false + + + + + AF + Specifies type of gradient reduction: 0 - reduce the number of stripes, 1 - reduce to color. + + + 0 + + + + + AF + Specifies the maximum number stripes used for output of gradients. + + + 64 + + + + + AF + Indicates whether to reduce the memory usage of bitmaps for print process by limiting the resolution. + + + false + + + + + AF + Specifies type of bitmap reduction: 0 - Automatically determine optimal resolution, 1 - Use original resolution, 2 - User defined resolution. + + + 1 + + + + + AF + Specifies resolution of reduced bitmaps: 0 - 72DPI, 1 - 96DPI, 2 - 150DPI, 3 - 200DPI, 4 - 300DPI, 5 - 600DPI. + + + 3 + + + + + AF + Indicates whether to reduce the resolution of automatically created substitution bitmaps of transparent objects. + + + true + + + + + AF + Indicates whether to create only grayscale output of all objects. + + + false + + + + + Specifies the options for printing to a file. + + + + + + AF + Indicates whether to ignore transparency for the output of objects. + + + false + + + + + AF + Indicates the type of transparency reduction: 0 - Automatically determine reduction, 1 - Always disabled. + + + 0 + + + + + AF + Indicates whether to reduce memory usage for output of gradients by limiting the number of gradient steps. + + + false + + + + + AF + Indicates the type of gradient reduction: 0 - Reduce the number of stripes, 1 - Reduce to color. + + + 0 + + + + + AF + Specifies the maximum number stripes used for output of gradients. + + + 64 + + + + + AF + Indicates whether to reduce the memory usage of bitmaps for the print process by limiting the resolution. + + + false + + + + + AF + Specifies the type of bitmap reduction: 0 - Automatically determine optimal resolution, 1 - Use original resolution, 2 - User defined resolution. + + + 1 + + + + + AF + Specifies the resolution of reduced bitmaps: 0 - 72DPI, 1 - 96DPI, 2 - 150DPI, 3 - 200DPI, 4 - 300DPI, 5 - 600DPI. + + + 3 + + + + + AF + Indicates whether to reduce the resolution of automatically created substitution bitmaps of transparent objects. + + + true + + + + + AF + Indicates whether to create only grayscale output of all objects. + + + false + + + + + + + + MBA + Lists open documents or windows. + + + + + + + + MBA + Lists open documents or windows. + + + + + + OS + Contains settings specifying if a XML package is added to the applications binary files. + + + + + + + OS + Defines if a XML package is added to the Writer binary files. + + + + + + + + OS + Defines if a XML package is added to the Calc binary files. + + + + + + + + OS + Defines if a XML package is added to the Impress binary files. + + + + + + + + OS + Defines if a XML package is added to the Draw binary files. + + + + + + FS + Contains settings that specify the common help settings. + + + + ABI + Determines wether basic help should be shown. + + true + + + + ABI + Determines the locale for the help pages. + + + + + + + ABI + Determines the operating system on which the help system is displayed. + + + + + + + + + MBA + Activates the Tip help. + + + true + + + + + + MBA + Activates the Extended help. + + + false + + + + ABI + Specifies the name of the stylesheet used to display help content. + + Default + + + + MBA + Specifies the properties of the HelpAgent. + + + + Specifies whether the HelpAgent is enabled. + + + true + + + + Specifies the time-out value in seconds after which the HelpAgent is closed automatically if ignored by the user. + + + 30 + + + + Specifies how often the user must ignore a given HelpAgent topic until it is disregarded in the future (any requests for this topic will be dropped silently). + + + 3 + + + + Contains the help URLs which have been ignored at least once by the user, together with a counter of how often they have been ignored. + + + + + + + PL + Contains settings for the start center. + + + + Contains a string specifying the URL to be browsed for additional features (e.g. extensions) + + + + + + Contains a string specifying the URL to be browsed for information about the product + + + + + + Contains a string specifying the URL to be browsed for additional template documents + + + + + + + FS + Contains various settings regarding the product registration feature. + + + + Contains a string specifying the URL with placeholders to be used for online registration. + + + + + + + Contains a string specifying the real URL to be used for online registration. + + + + + + + Contains a string representation of the date on which the user receives a reminder (e.g. "13.02.2002"). + + + + + + + Contains the number used internally to determine when the dialog should be started. + + 1 + + + + Contains a Boolean that specifies if the "Registration..." menu item is available. + + true + + + + CD/OBR + Current product ID. + This data is saved in a dedicated file since OOo 3.0 FCS + + + + + CD/OBR + Specifies product specific IDs and associated instance UUIDs + This data is saved in a dedicated file since OOo 3.0 FCS + + + + + + + JL + Contains Java related settings. + + + + Contains Applet related settings. + + + + + + + Enables/disables Java applets in Office documents. + + + false + + + + + + AF + Specifies the options related to the vectorization of bitmaps. + + + + + + + AF + Specifies the number of colors that are used to create a vector graphic in Draw/Impress [UNIT=count]. + + + + + + Specifies that the lowest number that can be used to create a vector graphic is 8. + + + + + Specifies that the lowest number that can be used to create a vector graphic is 32. + + + + 8 + + + + + + + AF + Specifies the number of pixels that you want to combine as a single pixel when creating a vector graphic. + + + + + + Specifies the minimum value to reduce point is 0 pixels. + + + + + Specifies the maximum value to reduce point is 32 pixels. + + + + 0 + + + + + + + AF + Indicates whether to create a tiled background before vectorizing. + + + false + + + + + + + AF + Specifies the extent of background tiles that are used for vectorizing [UNIT=pixel]. + + + + + + Specifies that the minimum extent is 8 pixels. + + + + + Specifies that the maximum extent is 128 pixels. + + + + 32 + + + + + AF + Specifies the options for images. + + + + + Specifies the color options for images. + + + + + + + + + AF + Deprecated. + + + + + + Deprecated. + + + + + Deprecated. + + + + 256 + + + + + + + + AF + Deprecated. + + + + + + Deprecated. + + + + + Deprecated. + + + + 16 + + + + + + + + AF + Deprecated. + + + + + + Deprecated. + + + + + Deprecated. + + + + 10 + + + + + + + + AF + Deprecated. + + + + + + Deprecated. + + + + + Deprecated. + + + + 10 + + + + + + + + AF + Deprecated. + + + + + + Deprecated. + + + + + Deprecated. + + + + 4500 + + + + + + + + AF + Deprecated. + + + true + + + + + + + + AF + Deprecated. + + + + + + Deprecated. + + + + + Deprecated. + + + + 50 + + + + Specifies the RGB color options for images. + + + + + + + + + AF + Deprecated. + + + + + + Deprecated. + + + + + Deprecated. + + + + 10 + + + + + + + + AF + Deprecated. + + + + + + Deprecated. + + + + + Deprecated. + + + + 10 + + + + + + + + AF + Deprecated. + + + + + + Deprecated. + + + + + Deprecated. + + + + 10 + + + + + + Specifies the effects options for images. + + + + + + + + + AF + Deprecated. + + + + + + Deprecated. + + + + + Deprecated. + + + + 4 + + + + + + + + AF + Deprecated. + + + + + + Deprecated. + + + + + Deprecated. + + + + 4 + + + + + + + + AF + Deprecated. + + + + + + Deprecated + + + + + Deprecated + + + + + Deprecated + + + + + Deprecated + + + + 2 + + + + + + + + AF + Deprecated. + + + + + + Deprecated. + + + + + Deprecated. + + + + 10 + + + + + + + + AF + Deprecated. + + + false + + + + + + + + AF + Deprecated. + + + + + + Deprecated. + + + + + Deprecated. + + + + 4 + + + + + + + + AF + Deprecated. + + + + + + Deprecated. + + + + + Deprecated. + + + + 4 + + + + + + + + + AF + Deprecated. + + + + + + Deprecated + + + + + Deprecated + + + + + Deprecated + + + + + Deprecated + + + + 2 + + + + + + + + AF + Deprecated. + + + + + + Specifies that the minimum intensity is 0. + + + + + Specifies that the maximum intensity is 100. + + + + 10 + + + + + + NN + Specifies settings for the date formats used. + + + + + + + NN + Specifies the first year that can be entered using two-digit-year date formats. + + + 1930 + + + + + SJ / OS / KA + Specifies default settings of Microsoft-, Graphic- and HTML filters. + + + + SJ + Specifies default settings of Microsoft filters. + + + + Specifies default settings of Microsoft import filters. + + + + Specifies if convertible MathType OLE objects are converted into Math objects. + + false + + + + Specifies if convertible WinWord OLE objects are converted into Writer objects. + + false + + + + Specifies if convertible Excel OLE objects are converted into Calc objects. + + false + + + + Specifies if convertible PowerPoint OLE objects are converted into Impress objects. + + false + + + + Flag to control use of enhanced fields. + + true + + + + + Specifies default settings of Microsoft export filters. + + + + Specifies if embedded Math objects are converted into MathType objects. + + false + + + + Specifies if embedded Writer objects are converted into WinWord objects. + + false + + + + Specifies if embedded Calc objects are converted into Excel objects. + + false + + + + Specifies if embedded Impress objects are converted into PowerPoint objects. + + false + + + + SJ + Specifies if previews are created when saving PowerPoint documents. + + true + + + + SJ + Specifies if previews are created when saving Excel documents. + + false + + + + SJ + Specifies if previews are created when saving Word documents. + + false + + + + + + SJ + Specifies default settings of graphic import and export dialogs. + + + + Specifies default settings of graphic import dialogs. + + + + Specifies default settings of the PCD - Photo CD Base import dialog. + + + + + + Specifies import resolution of PCD graphics. + + + + + + PCD-Base16, 192*128 PCD graphic. + + + + + PCD-Base4, 384*256 PCD graphic. + + + + + PCD-Base, 768*512 PCD graphic. + + + + 2 + + + + + + Specifies default settings of graphic export dialogs. + + + + Specifies default settings of the Windows Bitmap export dialog. + + + + + + + Specifies usable export modes. + + + + + + Original size + + + + + Logical size (dpi/pixel ratio) + + + + + Given size + + + + 0 + + + + + + + Specifies resolution which is to be used if export mode is 1. [UNIT=dpi] + + + + + + 75 + + + + + 150 + + + + + 300 + + + + + 600 + + + + 75 + + + + + + Specifies the number of colors that are to be used for the export. + + + + + + Original + + + + + 1 bit, 1 bit threshold + + + + + 1 bit, 1 bit dithered + + + + + 4 bit, 4 bit grayscale + + + + + 4 bit, 4 bit color palette + + + + + 8 bit, 8 bit grayscale color + + + + + 8 bit, 8 bit color palette + + + + + 24 bit, 24 bit true color + + + + 0 + + + + + + + Specifies if Run-Length-Encoding should be used in the export. + + + true + + + + Specifies the logical size of a graphic. [UNIT=1/100 mm]. + + + + + + + + + + Specifies default settings of the EPS - Encapsulated Postscript export dialog. + + + + Specifies if a preview graphic should be exported together with the Encapsulated PostScript file. Due to the fact that most programs can't render eps graphics, it is useful to provide a preview that can be displayed as replacement. The preview graphic will also be printed if the printer is not capable of Postscript. + + + + + + None + + + + + TIFF + + + + + Interchange (EPSI) - 1 bit color resolution + + + + + TIFF and EPSI + + + + 0 + + + + Specifies the PostScript version that has to be used for the EPS export. Because not every PostScript printer is capable of version 2 PostScript, it is sometimes necessary to create version 1 PostScript graphics. PostScript Level 1 does not support color and bitmap compression. + + + + + + Version 1 PostScript + + + + + Version 2 PostScript + + + + 2 + + + + Specifies if color or grayscale format is used for the EPS export. This option is not available for version 1 PostScript files. + + + + + + Color format + + + + + Grayscale format + + + + 2 + + + + Specifies if bitmaps are exported by using the LZW (Lempel - Ziv - Welch) compression algorithm. Compression is only available for level 2 PostScript files. + + + + + + LZW compression + + + + + No compression + + + + 2 + + + + Specifies if glyph outlines are exported. They produce the highest quality and it is the only possible way to create EPS files that are CJK compliant. Not using glyphs will produce smaller files, but it might lead to problems if not all fonts are available during printing. + + + + + + Glyph outlines + + + + + No glyph outlines + + + + 0 + + + + + Specifies default settings of the GIF - Graphics Interchange export dialog. + + + + + + + Specifies if graphics should be exported using interlace. It is recommended for big pictures to activate interlace, so the content can be displayed immediately when loading the picture. + + + + + Deactivate + + + + + Activate + + + + 1 + + + + + + + Specifies if the graphic background is stored as transparent. + + + + + No transparency + + + + + Transparency + + + + 1 + + + + + Specifies default settings of the JPEG - Joint Photographic Experts Group export dialog. + + + + + + + Specifies quality of the JPG export. A higher value results in higher quality and file size. + + + + + Represents lowest value that can be used. The lower the value, the less good is the compression quality and the bigger is be the file size. + + + + + Represents highest value that can be used. The higher the value, the better is the compression quality and the smaller is the file size. + + + + 75 + + + + + + + Specifies if graphics are exported using true color or grayscale. + + + + + True colors + + + + + Grayscale + + + + 0 + + + + + Specifies if graphics are exported with the original- or selected size. + + + + + + + Specifies if graphics are exported with the original- or selected size. + + + + + Original size + + + + + Given size + + + + 0 + + + + Specifies the logical size of a graphic. [UNIT=1/100 mm]. + + + + + + + + Specifies default settings of the PCT - Mac Pict export dialog. + + + + + + + Specifies if graphics are exported with original- or selected size. + + + + + Original size + + + + + Given size + + + + 0 + + + + Specifies the logical size of a graphic. [UNIT=1/100 mm]. + + + + + + + + Specifies default settings of the PBM - Portable Bitmap export dialog. + + + + + + + Specifies if graphics are exported to binary- or ASCII format. + + + + + Binary + + + + + ASCII + + + + 1 + + + + + Specifies default settings of the PGM - Portable Graymap export dialog. + + + + + + + Specifies if graphics are exported to a binary- or ASCII format. + + + + + Binary + + + + + ASCII + + + + 1 + + + + + Specifies default settings of the PPM - Portable Pixelmap export dialog. + + + + + + + Specifies if graphics are exported to a binary- or ASCII format. + + + + + Binary + + + + + ASCII + + + + 1 + + + + + Specifies default settings of the SVM - StarView Meta File export dialog. + + + + + + + Specifies if graphics should be exported with the original- or selected size. + + + + + Original size + + + + + Given size + + + + 0 + + + + Specifies the logical size of a graphic. [UNIT=1/100 mm]. + + + + + + + + Specifies default settings of the WMF - Windows Metafile export dialog. + + + + + + + Specifies if graphics should be exported with the original- or selected size. + + + + + Original size + + + + + Given size + + + + 0 + + + + Specifies the logical size of a graphic. [UNIT=1/100 mm]. + + + + + + + + Specifies default settings of the EMF - Enhanced Metafile export dialog. + + + + + + + Specifies if graphics should be exported with the original- or selected size. + + + + + Original size + + + + + Given size + + + + 0 + + + + Specifies the logical size of a graphic. [UNIT=1/100 mm]. + + + + + + + + Specifies default settings of the PNG - Portable Network Graphic export dialog. + + + + + + + Specifies export compression settings which ranges from 0 (no compression) to 9 (maximum compression). The calculating time increases with an ascending compression value. + + + + + Represents lowest value that can be used. The lower the value, the lower the compression quality and the larger the file size. + + + + + Represents the highest value that can be used. The higher the value, the higher the compression quality and the smaller the file size. + + + + 6 + + + + + + + Specifies if graphics should be exported using interlace. It is recommended for big pictures to activate interlace, so the content can be displayed immediately when loading the picture. + + + + + Deactivate interlace mode + + + + + Activate interlace mode + + + + 1 + + + + + + + OS + Contains settings for HTML import/export. + + + + Contains settings for HTML import. + + + + + ER + Specifies if numbers should be parsed according to the en-US locale instead of the user's locale. + + + false + + + + + + + OS + Specifies if unknown tags should be imported as fields. + + + false + + + + + + + OS + Specifies if font settings should be ignored when importing. + + + false + + + + Specifies font size for HTML. + + + + + + + OS + Specifies font size for HTML as Token Font 1. + + + 7 + + + + + + + OS + Specifies font size for HTML as Token Font 2. + + + 10 + + + + + + + OS + Specifies font size for HTML as Token Font 3. + + + 12 + + + + + + + OS + Specifies font size for HTML as Token Font 4. + + + 14 + + + + + + + OS + Specifies font size for HTML as Token Font 5. + + + 18 + + + + + + + OS + Specifies font size for HTML as Token Font 6. + + + 24 + + + + + + + OS + Specifies font size for HTML as Token Font 7. + + + 36 + + + + + + Contains settings for HTML export. + + + + + + + OS + Specifies the browser for which the HTML export should be optimized + + + + + + Html 3.2 + + + + + MSIE 4.0 + + + + + Netscape 3.0 + + + + + Writer + + + + + Netscape 4.0 + + + + 4 + + + + + + + OS + Specifies if Office Basic instructions are considered when exporting in HTML format. + + + false + + + + + + + OS + Specifies if the print layout of the current document should also be exported. + + + false + + + + + + + OS + Specifies if graphics are copied to the Internet server when uploading via FTP. + + + true + + + + + + + OS + Specifies if a warning should be displayed to point out that the available Basic macros will be lost when exporting in HTML format. + + + true + + + + + OS + Specifies the mimetype for the text encoding. + + + + + + + + + KA + Specifies default settings of PDF export dialog. + + + + + Specifies default settings of PDF export dialog. + + + + Use following properties instead: UseLosslessCompression, Quality, UseResolutionReduction, ResolutionReduction + SJ + Deprecated. + + 1 + + + + SJ + Specifies if graphics are exported to PDF using a lossless compression eg. PNG or if they are compressed using the JPEG format. + + false + + + + SJ + Specifies quality of the JPG export. A higher value results in higher quality and file size. + + + + + Represents lowest value that can be used. The lower the value, the less good is the compression quality and the bigger is be the file size. + + + + + Represents highest value that can be used. The higher the value, the better is the compression quality and the smaller is the file size. + + + + 90 + + + + SJ + Specifies if the resolution of each image is reduced to the resolution specified by the property MaxImageResolution. + + false + + + + If the property ReduceImageResolution is set to true all images will be reduced to the given value in DPI. + + + + + 75 + + + + + 150 + + + + + 300 + + + + + 600 + + + + + 1200 + + + + 300 + + + + SJ + Determines if PDF are created by using special tags also known as Tagged PDF. + + false + + + + SJ + Specifies if notes are exported to PDF. + + false + + + + PL + Specifies if bookmarks are exported to PDF. + + true + + + + PL + Specifies how many bookmark levels should be opened in the reader application when the PDF gets opened. + + -1 + + + + SJ + Specifies if notes pages are exported to PDF. (Notes pages are available in Impress documents only). + + false + + + + SJ + Specifies slide transitions are exported to PDF. This option is active only if storing Impress documents. + + true + + + + pl + Specifies whether form fields are exported as widgets or only their fixed print representation is exported. + + true + + + + Specifies the submitted format of a PDF form. + + + + + Specifies that forms type FDF is used. + + + + + Specifies that forms type PDF is used. + + + + + Specifies that forms type HTML is used. + + + + + Specifies that forms type XML is used. + + + + 0 + + + + FME + Specifies that automatically inserted empty pages are suppressed. This option is active only if storing Writer documents. + + true + + + + PL + Specifies that a stream is inserted to the PDF file which contains the original document for archiving purposes. + + false + + + + beppec56 + Specifies whether to hide the PDF viewer menubar when the document is active. + + false + + + + beppec56 + Specifies whether to hide the PDF viewer toolbar when the document is active. + + false + + + + beppec56 + Specifies whether to hide the PDF viewer controls when the document is active. + + false + + + + beppec56 + Specifies that the PDF viewer window is opened full screen when the document is opened. + + false + + + + beppec56 + Specifies that the PDF viewer window is centered to the screen when the PDF document is opened. + + false + + + + beppec56 + Specifies that the PDF viewer window is opened full screen, on top of all windows.. + + false + + + + beppec56 + Specifies that the title of the document, if present in the document properties, is displayed in the PDF viewer window title bar. + + true + + + + beppec56 + Specifies how the PDF document should be displayed when opened. + + + + + Select the default viewer mode, neither outlines or thumbnails. + + + + + The document is opened with outline pane opened + + + + + The document is opened with thumbnail pane opened + + + + 0 + + + + beppec56 + Specifies the action to be performed when the PDF document is opened. + + + + + Opens with default zoom magnification. + + + + + Opens magnified to fit the entire page within the window. + + + + + Opens magnified to fit the entire page width within the window. + + + + + Opens magnified to fit the entire width of its boundig box within the window (cuts out margins). + + + + + Opens with the zoom level specified in the Zoom property. + + + + 0 + + + + pl + specifies the zoom level a PDF document is opened with. Only valid if "Magnification" is set to "4". + + 100 + + + + pl + Specifies the page on which a PDF document should be opened in the viewer application. + + 1 + + + + beppec56 + Specifies the page layout to be used when the document is opened. + + + + + Display the pages according to the reader configuration. + + + + + Display one page at a time. + + + + + Display the pages in one column. + + + + + Display the pages in two columns odd pages on the right, to have the odd pages on the left the FirstPageOnLeft property should be used as well. + + + + 0 + + + + beppec56 + Used with the value 3 of the PageLayout property above, true if the first page (odd) should be on the left side of the screen. + + false + + + + + beppec56 + Specifies what printing is allowed. + + + + + The document cannot be printed. + + + + + The document can be printed at low resolution only. + + + + + The document can be printed at maximum resolution. + + + + 2 + + + + beppec56 + Specifies the change allowed to the document. + + + + + The document cannot be changed. + + + + + Inserting deleting and rotating pages is allowed. + + + + + Filling of form field is allowed. + + + + + Both filling of form field and commenting is allowed. + + + + + All the changes of the previous selections are permitted, with the only exclusion of page extraction (copy). + + + + 4 + + + + beppec56 + Specifies that the pages and the document content can be extracted to be used in other documents (copy and paste). + + true + + + + beppec56 + Specifies that the document content can be extracted to be used in accessibility applications. + + true + + + + + + beppec56 + Specifies the version of PDF to emit. + + + + + PDF 1.4 (default selection). + + + + + PDF/A-1 (ISO 19005-1:2005) + + + + 0 + + + + + + beppec56 + Specifies that the file system related hyperlinks (file:// protocol) present in the document will be exported as relative to the source document location. + + false + + + + beppec56 + Specifies the way the exported PDF will be viewed (experienced) by the user. + + + + + Specifies that the PDF will be exported with all the links external to the document treated as URI. This is the Default + + + + + Specifies that the PDF will be exported in order to be viewed through a PDF reader application only. Valid only if not exporting to PDF/A-1 (e.g. SelectPdfVersion not set to 1). + + + + + Specifies that the PDF will be exported in order to be viewed through an Internet browser, using the PDF plug-in provided with it. The bookmark of the URI will be rendered compatible with the target bookmark generated with OOo PDF Export feature (see ExportBookmarksToPDFDestination, below). + + + + 0 + + + + beppec56 + Specifies that the target documents with .od[tpgs] extension, will have that extension changed to .pdf when the link is exported to PDF. The source document remains untouched. + + false + + + + beppec56 + Specifies that the bookmarks contained in the source OpenOffice.org file should be exported to the PDF file as Named Destination (see PDF 1.4 section 8.2.1). + + false + + + + + + + + MBA + Determines the miscellaneous entries for the common group. + + + + AS + Determines the maximum count of documents, which are allowed to be open at the same time. NIL will be interpreted as infinite! + + + + + + + + PB + Enables/Disables Plugins. + + + true + + + + FS + Determines if the system's file and folder pickers should be used. If false, the proprietary file/folder picker implementations will be used. Relevant on platforms where file/folder picker integration is implemented. + + true + + + + MAV + Allows to specify whether the OOo document file locking mechanics should use the system file locking. + + true + + + + MAV + Allows to specify whether the OOo document file locking mechanics should use the lock file for locking. + + true + + + + PL + Determines if the system's print dialog should be used. If false, the platform independent print dialog implementation will be used. Relevant on platforms where print dialog integration is implemented. + + false + + + + + MBA + Specifies which size of the symbols is used for the toolbars. + + + + + 16x16 pixel icons + + + + + 32x32 pixel icons + + + + 0 + + + + + kendy + Specifies which style of the symbols is used for the toolbars, menus, etc. + + + + + Automatic, chosen according to the desktop + + + + + Default - the OpenOffice.org default theme + + + + + HiContrast + + + + + Industrial + + + + + Crystal - the KDE default theme + + + + + Tango - the Gnome default theme + + + + + Classic - the OpenOffice.org 2.0 default theme + + + + auto + + + + + MBA + Specifies which button style the toolbars should use. + + + + + 3D style + + + + + Flat style + + + + 1 + + + + FS + Enables/Disables the usage of AutoPilots for form controls. + + true + + + + MBA + Specifies if the office has never before been started. + + + true + + + + + FS + contains settings for the form layer of the applications. + + + + specifies certain default layout settings for form controls. All those settings can be overruled in concrete documents, they specify creation-time defaults only. + + + + specifies certain default layout settings for form controls in text documents + + + + + specifies certain default layout settings for form controls in web pages + + + + + specifies certain default layout settings for form controls in spreadsheet documents + + + + + specifies certain default layout settings for form controls in drawing documents + + + + + specifies certain default layout settings for form controls in presentation documents + + + + + specifies certain default layout settings for form controls in XML form documents + + + + + specifies certain default layout settings for form controls in database form documents + + + + + specifies certain default layout settings for form controls in database text report documents. + + + + + + specifies settings for the property browser used for forms and form controls. + + + + FS + Enables or disables the property browser's access to form/control properties which are not officially supported. + + false + + + + FS + Enables or disables a help section at the bottom of the property browser, which shows the help of the currently active property. + + false + + + + + + OS + Contains layout specific settings for Asian languages. + + + + + + + OS + Determines the kerning of western text and/or punctuation inside of Asian text. + + + true + + + + + + + OS + Determines the type of character distance compression in Asian text: 0 - no compression; 1 - compress punctuation only; 2 - compress interpunction an japanese kana. + + + 0 + + + + OS + Contains the characters at which lines are not allowed to begin or to end. For each locale there is a separate entry with the locale as its node name. + + + + + + + OS / PB + Contains all options for search. + + + + + + + PB + Specifies search for whole words only. + + false + + + + + + + PB + Specifies search backwards. + + false + + + + + + + PB + Specifies search with the use of regular expressions. + + false + + + + + + + PB + Specifies search for styles only. + + false + + + + + + + PB + Specifies search with similarity. + + false + + + + + + + PB + Specifies search as case sensitive. + + false + + + + + + + PB + Specifies search with the use of Asian options. + + false + + + + + OS + Specifies the divider label in case of a component-based search extension. + + + + + + OS + Specifies the label of the first component-based search command. + + + + + + OS + Specifies the label of the second component-based search command. + + + + + + mod + Specifies if search includes notes(SwPostItFields) + + false + + + + OS + Contains search options for the Japanese language. + + + + + + + OS + Does not distinguish between full-width and half-width characters. + + true + + + + + + + OS + Does not distinguish between hiragana and katakana characters. + + true + + + + + + + OS + Specifies search without distinguishing between characters with diphthongs and double consonants and plain characters. + + true + + + + + + + OS + Specifies search without distinguishing between minus signs, dashes, and long vowel sounds. + + true + + + + + + + OS + Specifies search without distinguishing between repeat character marks. + + true + + + + + + + OS + Specifies search without distinguishing between standard and nonstandard ideography. + + true + + + + + + + OS + Specifies search without distinguishing between standard and nonstandard ideography. + + true + + + + + + + OS + Specifies search without distinguishing between 'Di' and 'Zi' or 'Du' and 'Zu'. + + true + + + + + + + OS + Specifies search without distinguishing between 'Ba' and 'Va' or 'Ha' and 'Fa'. + + true + + + + + + + OS + Specifies search without distinguishing between 'Tsi', 'Thi' and 'Chi' or 'Dhi' and 'Zi'. + + true + + + + + + + OS + Specifies search without distinguishing between 'Hyu' and 'Fyu' or 'Byu' and 'Vyu'. + + true + + + + + + + OS + Specifies search without distinguishing between 'Se' and 'She' or 'Ze' and 'Je'. + + true + + + + + + + OS + Specifies search without distinguishing between 'Ia' and 'Iya'. + + true + + + + + + + OS + Specifies search without distinguishing between 'Ki' and 'Ku'. + + true + + + + + + + OS + Specifies search without distinguishing between punctuation characters. + + true + + + + + + + OS + Specifies search without distinguishing between characters used as blank spaces, such as full-width spaces, half-width spaces, and tabs. + + true + + + + + + + OS + Specifies search without distinguishing between prolonged sound marks. + + true + + + + + + + OS + Specifies search without distinguishing between normal dots and middle dots. + + true + + + + + + OS + Specifies settings for the accessibility options. + + + + FS + Enables the automatic detection of a high contrast mode set for your desktop. Some OS' do not provide this option explicitly, but allow the user to choose a color scheme that is HC-compliant implicitly, which is recognized if the option is set. + - 9999 + true - + - AW - - This switch allows to switch DrawingLayer based views to be rendered using AntiAliasing or not. - Of course this takes only effect when AntiAliasing is supported for the System OOo is running on. - - + OS + Enables the use of high contrast colors, instead of displaying the normal/original WYSIWYG colors. + true - + - AW - - This switch allows to enhance visualisation of graphics which use Horizontal or Vertical Hairlines - combined with AntiAliased mode (e.g. in 2D charts). When not used, those lines will be AntiAliased - as everything else. Since this is not pleasing for the eye, this option allows to force those lines - to snap to discrete points (pixels) when activated and thus avoids AntiAliasing of pure Horizontal or - Vertical Hairlines. - - + OS + Enables or disables the automatic time out of help tips. You can specify a duration (n) of 1 to 99 seconds. If this option is disabled, press the Esc key to dismiss the help tip. + true - + - AW - - This switch determines if the decorations of decorated text portions (e.g. underline, strike through) - are rendered using VCL direct rendering or if the primitive is decomposed into simple text and the - corresponding geometrical representations of the decorations. Default is true since VCL's usage - of the diverse System's hinting possibilities for decorations is useful. - - + OS + Enables or disables the automatic time out of help tips. You can specify a duration (n) of 1 to 99 seconds. If this option is disabled, press the Esc key to dismiss the help tip. + - true + + + + Specifies the number of seconds to wait before displaying a help tip. + + + + + Specifies the number of seconds to display a help tip. + + + + 4 - + - AW - - This switch determines if simple text is directly rendered using VCL or not. If not, the simple text - is decomposed into PolyPolygons which will be painted then. Default is true, since VCL will use the - hinting for font rendering on the diverse supported systems, which gives better quality than rendering - the text as Polygons. - - + AF + Indicates whether to allow the graphical animation in all SO/OO applications (i.e. animated GIFs and objects in Impress during presentation, animated graphical previews (Gallery, Insert-Graphics-From File, Animation Tool in Impress.) + true - + - AW - - This switch decides if Interactions in the DrawingLayer are visualized using Wireframe or Full-Object - previews. If false, only Wireframe will be used. If true, Full-Object preview which gives a much better - feedback about the object interaction will be used. This mode is used for modification and creation of - objects. During interaction, a geometric copy of the object(s) is shown with 50% transparence in the - foreground. That copy shows exactly what You will get when You end the interaction. - - + AF + Indicates whether to allow all textual animation like blinking and scrolling in all SO/OO applications. + true - + - AW - - This defines a Limitation for the default raster conversion from 3D Scenes to Bitmaps. - The number is the maximum number of pixels to use, e.g. 1000x1000 Pixels is allowed as default. - When Scenes would need more Pixels than this, the Bitmap will be limited and scaled to the needed pixel size at paint time. - - + OS + Overrides all text color attributes set in a SO/OO document for display only. + - 1000000 + false - + - AW - This defines a Limitation for the default raster conversion of FormControls in edit mode. - These have the ability to be displayed using this fallback to Bitmaps. - The number is the maximum number of pixels to use, e.g. 300x150 Pixels is allowed as default. - When FormControls would need more Pixels than this, the Bitmap will be limited and scaled to the needed pixel size at paint time. - - + OS + Allows the user to change the UI font to the system default. + - 45000 + true - + - AW - - This switch defines if the selections in the applications (text or cells) are visualized using - inverse (XOR) when set to false (the old selection method, also used when in HighContrast mode) - or a transparent overlay selection using the system's selection color. - - + OS + Indicates whether the cursor is displayed in read-only texts. + - true + false - + + + + Replaced by org.openoffice.Office.Embedding/ObjectNames. + MAV + Deprecated + + + + + Without replacement. + OBR + Specifies external helper applications / protocol handlers. + + + + + OBR + Specifies an external mail application to be used for Send as email. + + - AW - - Specifies the degree of transparence to be used when transparent selection is used. The value is a percent - value. Since neither no transparence nor complete transparence makes sense, the value is limited to a range - of 10% - 90%. If the given value is outside this range, it is cropped to it. - - + Without replacement. + Indicates if the mail application in the OS specific user settings should be used. - 75 - + - AW - - Specifies the maximum allowed luminance the system's selection color may have. When the color - fetched from the system is brighter (luminacne is bigger), it will be scaled to a luminance - of exactly this given value. - - + Specifies the external mail application to be used. - 70 + + + + + Without replacement. + Specifies the default external mail application. + + Mozilla 1.0 - 1.2 + + + Without replacement. + Contains a set of supported command line profiles. + + - - - OS - Contains miscellaneous settings for the auto correction. - - - - - - - OS - Specifies if the replacement table should be used to replace letter combinations with defined text - - - true - - - - - - - OS - Specifies if two initial capitals should be corrected automatically. - - - true - - - - - - - OS - Specifies if the letter at the beginning of a sentence should be capitalized automatically. - - - true - - - - - - - OS - Specifies if text should be formatted in bold or underlined when the corresponding characters are entered (*bold*, _underline_). - - - true - - - - - - - OS - Specifies if character strings which could represent an URL should be converted to a hyperlink. - - - true - - - - - - - OS - Specifies if ordinal numbers should be displayed with raised endings. - - - true - - - - - - - OS - Specifies if character combinations for fractions should be replaced with a corresponding single character. - - - true - - - - - - - OS - Specifies if minus signs should be replaced by dashes automatically. - - - true - - - - - - - OS - Specifies if multiple spaces should be combined into one. - - - false - - - - - - - OS - Specifies if single quotes should be replaced. - - - false - - - - - - - OS - Specifies the start single quote. - - - - - - - - - OS - Specifies the end single quote. - - - - - - - - - OS - Specifies if double quotes should be replaced. - - - true - - - - - - - OS - Specifies the start quote. - - - - - - - - - OS - Specifies the end quote. - - - - - - Contains settings to apply replacement rules and exceptions. - - - - - - - OS - Specifies if defined words with two initial capital letters should not be included in the AutoCorrect replacement. - - - true - - - - - - - OS - Specifies if defined abbreviations should be taken into account to exclude a preceding capital letter. - - - true - - - - - - AF - Specifies cache related options. - - - - AF - Specifies the cache related options for the drawing engine. - - - - - - - AF - Determines the maximum number of OLE objects that can be held in RAM for drawings, presentations and inserted drawing objects. The fewer OLE objects contained in RAM, the more space is available for other functions. The more OLE objects in RAM, the faster you can page through the objects since they do not always need to be loaded from the hard drive. - - 20 - - - - - AF - Specifies the cache related options for Writer. - - - - - - - AF - Determines the maximum number of OLE objects that can be held in RAM for the writer. The fewer OLE objects contained in RAM, the more space is available for other functions. The more OLE objects in RAM, the faster you can page through the objects since they do not always need to be loaded from the hard drive. - - 20 - - - - - Specifies a group of graphic manager cache options. - - - - - AF - Specifies the maximum cache size for all graphical display objects. - - - 22000000 - - - - AF - Specifies the maximum cache size for a single graphic display object. - - - 5500000 - - - - AF - Specifies the time in seconds after which a cached object is freed from the cache. - - - 600 - - - - - - - - - MBA - Contains the current and default path settings used by the Office. - - + + + OS + Contains various language/localization specific settings. + + - CD - Contains various properties information purpose only. + PL + Contains settings for (language/localization specific) input methods. - + - A flag which is set by the tools options dialog whenever a user changed the work path. + Controls the behavior of the IIIMP status window on Unix. If true, the status window is always displayed. If false, the status window is never displayed. If nil (the default), the status window is displayed depending on the current locale. + + + + + + Contains settings for the Asian languages (Chinese, Japanese, Korean,...) layout. + + + + + Specifies, whether CJK font settings are available (true) or not (false). + + false + + + + + Specifies, whether vertical text is available (true) or not (false). + + false + + + + + Specifies, whether Asian typography options like compression and forbidden characters are available (true) or not (false). + + false + + + + + Specifies, whether Japanese find options are selectable for search and replace (true) or not (false). + + false + + + + + Specifies whether Rubys are available (true) or not (false). + + false + + + + + Specifies whether case mapping to half and full width, hiragana and katagana are available (true) or not (false). + + false + + + + + Specifies whether writing in double lines is available (true) or not (false). + + false + + + + + Specifies whether emphasis marks are available (true) or not (false). + + false + + + + + Specifies whether vertical call out objects are available (true) or not (false). + + false + + + + + Contains settings for the languages with complex text layout (Hebrew, Arabic, Thai,...). + + + + + Specifies whether CTL font settings are available (true) or not (false). + + false + + + + + Specifies whether CTL strings are checked for the correct input sequence(true) or not (false). + + false + + + + + Specifies whether CTL strings are checked restricted for the correct input sequence(true) or not (false). Is only effective when CTLSequenceChecking is true. + + false + + + + + Specifies whether CTL input sequences are corrected while typing. Is only effective when CTLSequenceChecking is true. + + false + + + + + Specifies the type of text cursor movement (logical (0) or visual (1)) within mixed text (RTL and LTR). + + 0 + + + + + Specifies the type of numerals (Arabic (0), Hindi (1), system settings (2) or Context(3)) is used per default in all applications. + + 0 + + + + SSA + Specifies whether the whole user interface (UI) will be mirrored. If true, the UI will be right-to-left. If false, the UI will be left-to-right. If nil (the default), the UI will be mirrored depending on the office locale. + + + + + + + Use cfg package Jobs instead of this. + AS + Uses cfg package Jobs instead of this component. + + + + Use cfg package Jobs instead of this. + Uses cfg package Jobs instead of this component. + + + + + Use cfg package Jobs instead of this. + Uses cfg package Jobs instead of this component. + + + + + + FME + Contains settings for smart tags. + + + + FME + Contains Writer specific settings for smart tags. + + + + FME + Specifies whether smart tag recognization is enabled. true + + + FME + A list of excluded smart tag types. + + - - - MBA - Contains the global path settings, mainly those of the Options dialog. - - - - - - MBA - Contains the Office installation path. - - - - - - - - - MBA - Contains the Office installation path in URL notation. Must match the UCB configuration. - - - - - - - NN - Specifies the directory that contains spreadsheet add-ins which use the old add-in API. - - $(progpath)/addin - - - - OS - Specifies the settings of the AutoCorrect dialog. - - $(insturl)/share/autocorr:$(userurl)/autocorr - - - - OS - Contains the directory which contains the AutoText modules. - - $(insturl)/share/autotext/$(vlang):$(userurl)/autotext - - - - MBA - Stores the automatic backup copies of documents. - - $(userurl)/backup - - - - MBA - Contains the Basic files, which are used by the AutoPilots. - - $(insturl)/share/basic:$(userurl)/basic - - - - MBA - Contains the bitmap files which can be used for menu and toolbar icons. - - $(insturl)/share/config/symbol - - - - MBA - Contains the configuration files. This value cannot be changed through the user interface. - - $(insturl)/share/config - - - - TL - Contains the provided dictionaries. - - $(insturl)/share/wordbook/$(vlang) - - - - PB - Specifies the path to save folder bookmarks. - - $(userurl)/config/folders - - - - MBA - Specifies the directory where all the filters are stored. - - $(progpath)/filter - - - - AF - Specifies the directory which contains the Gallery database and multimedia files. - - $(insturl)/share/gallery:$(userurl)/gallery - - - - DL - Specifies the directory that is displayed when the dialog for opening a graphic or for saving a new graphic is called. - - $(userurl)/gallery - - - - ABI - Specifies the path to the Office help files. - - $(instpath)/help - - - - TL - Contains the files that are necessary for the spellcheck. - - $(insturl)/share/dict - - - - MBA - Contains the Office modules. - - $(progpath) - - - - DL - Specifies the path to the palette files *.SOB to *.SOF containing user-defined colors and patterns. - - $(userurl)/config - - - - MBA - Specifies the directory in which the plugins are saved. - - $(progpath)/plugin - - - - Without replacement. - ABI - Specifies the location where misc data are stored. - - $(userpath)/store - - - - MBA - Specifies the base directory used by the Office to store temp files. - - $(temp) - - - - MBA - Specifies the templates originate from these folders and sub-folders. - - $(insturl)/share/template/$(vlang):$(userurl)/template - - - - MBA - Specifies additional folders containing a global user interface configuration. The final user interface configuration is merged from UserConfig and from these folders. - - $(insturl)/share/config - - - - MBA - Specifies the folder with the user settings. - - $(userurl)/config - - - - TL - Contains the custom dictionaries. - - $(userurl)/wordbook - - - - MBA - Specifies the path of the work folder, which can be modified according to the user's needs. The path specified here can be seen in the Open or Save dialog. - - $(work) - - - - - MBA - Contains the default values of all the paths, which can be modified according to the user's needs. They are used when pressing the Standard-button in the Options dialog. - - - - Specifies the default directory that contains spreadsheet add-ins which use the old add-in API. - - $(progpath)/addin - - - - Specifies the default directory for the settings of the AutoCorrect dialog. - - $(insturl)/share/autocorr:$(userurl)/autocorr - - - - Specifies the default directory where the AutoText modules are located. - - $(insturl)/share/autotext/$(vlang):$(userurl)/autotext - - - - Specifies the default directory for the automatic backup copies of documents. - - $(userurl)/backup - - - - Specifies the default directory where the Basic files, used by the AutoPilots, are located. - - $(insturl)/share/basic:$(userurl)/basic - - - - Specifies the default directory where the bitmap files, which can be used for the menu and toolbar icons, are located. - - $(insturl)/share/config/symbol - - - - Specifies the default directory where the configuration files are stored. - - $(insturl)/share/config - - - - Specifies the default directory where the provided dictionaries are located. - - $(insturl)/share/wordbook/$(vlang) - - - - Specifies the default directory where folder bookmarks are stored. - - $(userurl)/config/folders - - - - Specifies the default directory where all the filters are stored. - - $(progpath)/filter - - - - Specifies the default directory where the Gallery database and multimedia files are located. - - $(insturl)/share/gallery:$(userurl)/gallery - - - - Specifies the default directory used by the dialog for opening a graphic or for saving a new graphic. - - $(userurl)/gallery - - - - Specifies the default directory where Office help files are located. - - $(instpath)/help - - - - Specifies the default directory where the files that are necessary for the spellcheck are saved. - - $(insturl)/share/dict - - - - Specifies the default directory which contains the Office modules. - - $(progpath) - - - - Specifies the default directory for the palette files *.SOB to *.SOF containing user-defined colors and patterns. - - $(userurl)/config - - - - Specifies the default directory where the Office plugins are located. - - $(progpath)/plugin - - - - Specifies the default directory that is used as a base directory for all temporary Office files. - - $(temp) - - - - Specifies the default directory where all provided templates are located in folders and sub-folders. - - $(insturl)/share/template/$(vlang):$(userurl)/template - - - - Specifies the default directories for the global user interface configuration. The final user interface configuration is merged from UserConfig and from these folders. - - - - - - Specifies the default directory which stores the user settings. - - $(userurl)/config - - - - Specifies the default directory which stores the custom dictionaries. - - $(userurl)/wordbook - - - - Specifies the default working directory where user stores documents. - - $(work) - - - - - - OS - Contains some common settings for fonts. - - - - OS - Contains settings for the font substitution. - - - - - - - OS - Determines if the list of font replacements is applied or not - - - false - - - - - - - OS - Specifies a substitution of the requested font, even if this font is available on the user's system. - - - - - - PB - Contains the settings for the font selection box in the object bar. - - - - - - - PB - Contains the last five fonts, which are shown on the top of a list, beginning with the last one. This list will be displayed on the font-name-box of the object bar. - - true - - - - - - - PB - Specifies that the names of the selectable fonts will be displayed with this font. - - true - - - - - OS - Specifies the font name and height used in HTML source view - - - - Specifies the name of the font that is used in source views (HTML source view or BASIC IDE) - - - - - Specifies the height, in points, of the font that is used in source views (HTML source view or BASIC IDE) - - 10 - - - - Specifies whether only non-proportional font should be presented on the dialog page. - - true - - - - - - AF - Specifies Gallery options. - - - - - - - - - AF - Deprecated. - - false - - - - - AS - Contains information about configurable menus. - - - - Contains all entries of new menu. - - - - - Contains all entries of wizard menu. - - - - - PB - Contains all help bookmarks. - - - - - - - AS - Contains history information. - - - - PB - Describes the range and current size of the help bookmark history list. - - - - - Defines the minimum range of the help bookmark history list. - - - - - Defines the maximum range of the help bookmark history list. - - - - 10000 - - - - Describes the range and current size of the history list. - - - - - Defines the min range for the history size. - - - - - Defines the max range for the history size. - - - - 100 - - - - - Describes the range and current size of the picklist shown inside the menu. - - - - - Defines the min range for the picklist size. - - - - - Defines the max range for the picklist size. - - - - 10 - - - - Contains the most recently opened help documents. - - - - - Contains the most recently opened documents. - - - - - - Contains the most recently used documents displayed in the file menu. - - - - - - MBA - Contains settings which are used during the Office startup to check for unfinished work. - - - - - - - MBA - Sends a mail that includes the stack trace after a crash. - - false - - - - - MBA - Enables UI for sending document as e-mail - - false - - - - - - - MBA - Enables mechanism for centralized disabling of functionality - - false - - - - BM - Specifies that If this option is set to true, the new development chart library is used instead of the standard one. Do not set this option to true unless you know exactly what to do. This new library will be unstable and incomplete most of the time. This flag will be removed when the new library is in a stable state. - - false - - - - CD - Specifies the current or last temp directory. This directory will be removed during shutdown or next office start. - - - - - - - AS - Contains the documents that were opened when the office crashed. - - - - - - MBA - Contains general settings about the saving process. - - - - - - - MBA - Specifies if the all open windows and documents should be saved. If set to true, the URLs of all open documents and all view properties of all open views are saved when terminating the application. - - - false - - - - MBA - Contains settings which specify how documents are saved. - - - - - MBA - Saves OOo 6.0 XML file documents unpacked into a directory. Documents are represented by the directory content and not by a single file. - - - false - - - - - - PB - Specifies if the user's name should be written into the Properties dialog of the document when saving the document. - - - true - - - - - - - MBA - Specifies whether all modified documents are automatically saved in a time interval. - - - false - - - - - - - MBA - Specifies whether to create a backup copy when a modified document is saved. - - - false - - - - - - - MBA - Specifies if the document properties dialog will be opened for editing every time a document is saved under a new filename. - - - false - - - - - - - MBA - Shows a prompt during AutoSave,even when the document has a filename. - - - true - - - - - - - MBA - Specifies the AutoSave time interval in minutes. - - - - - - Specifies that the minimum time interval is 1 minute. - - - - - Specifies that the maximum time interval is 60 minutes. - - - - 15 - - - - - - - MBA - Saves view properties of last active document view when saving a document. - - - true - - - - - - - MBA - Specifies whether all currently open windows of a document should be saved. If true the view properties for all open document views of that document are saved. - - - false - - - - - - MBA - Specifies if files saved in the OOo 6.0 XML file formats should be in pretty printing format. Saving and loading the document takes more time in pretty printing format. - - - false - - - - - MBA - Specifies if a warning message is shown if a file is going to be saved to an alien format. - - - true - - - - MAV - If the option is set, every time a user triggers a plain Save operation, SaveAs operation with possible additional user notifications will be started. - - false - - - - PB - If the value is "true", then the ODF that is saved by OpenOffice.org will be backward compatible to previous minor versions. - - true - - - - - PB - Specifies if the printer settings will be loaded with the document. - - true - - - - - MBA - Contains settings on how graphics contained in a document should be saved. - - - - - - - AF - Specifies how graphics contained in a document are saved. - - - - - - Normal - - - - - Compressed - - - - - Original format - - - - 1 - - - - - MBA - Specifies how URLs in documents should be processed during save. - - - - - - - MBA - Specifies whether URLs in documents should be saved relative to the file system. - - - true - - - - - - - MBA - Specifies if URLs in documents should be saved relative to the Internet. - - - true - - - - - PB - Specifies ODF settings. - - - - - PB - Specifies the default ODF version for saving documents. - - - - - ODFVER_UNKNOWN - - - - - ODFVER_010 - - - - - ODFVER_011 - - - - - ODFVER_012 - - - - 3 - - - - - - MBA - Contains settings regarding the loading of documents. - - - - - MBA - Specifies whether the user defined configuration settings are loaded together with the document. - - - true - - - - MAV - Specifies whether the office update dialog should be shown in case the loaded document has newer ODF version than the maximal supported one. - - true - - - - - MBA - Contains security specific Office settings. - - - - MBA - Contains security settings regarding Basic scripts. - - - - - - - MBA - Lists all trustworthy URLs: file: All scripts from the local file system including a LAN; private:explorer: Scripts from the Explorer; private:help: Scripts in the help system; private:newmenu: Scripts that are executed by the commands File-New and AutoPilot; private:schedule: Scripts of the scheduler; private:searchfolder: Scripts of the searchfolder; private:user: Scripts that are entered in the URL field. - - - - - - - - - MBA - Determines how Office Basic scripts should be handled. - - - - - Never - - - - - According to Path List - - - - - Always - - - - 1 - - - - MBA - Specifies whether execution of plugins found inside a document is allowed. - - true - - - - MBA - Specifies whether a warning box should be displayed before executing a script. - - false - - - - MBA - Specifies whether the user must confirm before a basic script can be executed. - - true - - - - GT - Specifies wether to warn when saving or sending documents with personal/hidden data. - - false - - - - GT - Specifies wether to warn when signing documents with personal/hidden data. - - true - - - - GT - Specifies wether to warn when printing documents with personal/hidden data. - - false - - - - GT - Specifies wether to warn when creating PDF documents with personal/hidden data. - - false - - - - GT - Specifies wether to remove personal information on saving. - - false - - - - GT - Specifies wether to recommend password protection when saving documents. - - false - - - - PB - Specifies whether ctrl-click is required to follow hyperlinks. - - true - - - - GT - Level of Macro security. - - - - - Lowest level. - - - - - Highest level. - - - - 2 - - - - MAV - Specifies whether the macro execution is disabled in general. If it is set to true, the "MacroSecurityLevel" is ignored. If it is set to false, the mentioned entry specified the level of macro security. - - false - - - - GT - List with trusted authors. - - - - - - - MBA - Contains window and dialog settings. - - - - - - - PB - Specifies the scaling only of the screen representation [UNIT=%]. - - - - - - PB - Specifies the minimum range of the scaling. - - - - - PB - Specifies the maximum range of the scaling. - - - - 100 - - - - - - - PB - Determines the look and feel of the application. - - - - - - Standard - - - - - Macintosh - - - - - X Window - - - - - OS/2 - - - - 0 - - - - MBA - Contains settings on how the application window should be displayed. - - - - - - MBA - Specifies whether the application window should be opened in Fullscreen mode. - - false - - - - - - MBA - Specifies the preferred view of the application window. - - - - - Use last setting - - - - - Show in task bar - - - - - Open in Fullscreen mode - - - - 0 - - - - - MBA - Contains settings which specify how dialogs and toolbars should be displayed. - - - - - - - MBA - Specifies whether toolbar buttons should be drawn large or small. True means large. - - - false - - - - - - - MBA - Specifies whether toolbox buttons should be drawn with a flat or 3D design. True means flat design. - - - true - - - - - - - PB - Specifies TabDialogs with colored tab control (True) - - - false - - - - - - - PB - Determines the automatic mouse positioning on dialogs: 0 - Default button 1 - Dialog center 2 - No automatic positioning - - - - - - Snap To Button - - - - - Snap To Middle - - - - - No Snap - - - - 2 - - - - - - OS - Determines the action assigned to the middle mouse button: 0 - No action 1 -Auto scroll 2 - Paste selection. - - - - - - No action - - - - - Auto scroll - - - - - Paste selection - - - - 1 - - - - - - - PB - Specifies TabDialogs with single line tab control (True). - - - false - - - - - SSA - Contains localization specific settings. - - - - - - SSA - Specifies if shortcuts are assigned automatically. - - - - - - - SSA - Specifies the percentage for enlarging controls. - - - - - SSA - Specifies the upper limit for enlarging the controls is 100%. - - - - - SSA - Specifies the upper limit for enlarging the controls is 100%. - - - - - - - - PB - Contains menu view settings. - - - - - - - PB - Shows all deactivated menu entries. Menu commands that are normally not necessary are hidden by default. - - true - - - - CMC - Indicates whether icons in the office menus should shown/hidden by following the System theme. - - true - - - - - - CD - Indicates whether icons in the office menus should be displayed. - - true - - - - - - - PB - Specifies automatic selection while moving the mouse over a menu (True). - - - true - - - - - MBA - Contains settings for general windows used by the Office. - - - - - - - PB - Specifies the representation of the window while dragging. - - - - - - With window contents - - - - - Frame only - - - - - From system settings - - - - 2 - - - - - - - - MBA - Deprecated. - - - - - - - - - Deprecated. - - - - - - - - - - - Deprecated. - - false - - - - - - - - Deprecated. - - - - - ZoomIn - - - - - Small - - - - - ForceDock - - - - - AutoHide - - - - - Task - - - - - CantGetFocus - - - - - - - - - - - Deprecated. - - - - - - - - - MBA - Specifies the properties of window containers for docked windows. - - - - - - - - MBA - Deprecated. - - - - - - - - - - - MBA - Deprecated. - - - - - - - - MBA - Deprecated. - - - - - Stick/Hidden - - - - - Floating/Hidden - - - - - Stick/Visible - - - - - Floating/Visible - - - - - - - - Deprecated. - - - - - - - - - Deprecated. - - - - - - - - - Font antialiasing properties - - - - Specifies font antialiasing properties - - - true - - - - Specifies an additional limit if Font Antialiasing is enabled. Fonts that are smaller than the specified limit are not anti-aliased. - - - 8 - - - - - - MBA - Contains the settings regarding the undo operation in the Office. - - - - - - - MBA - Specifies how many operations can be undone in a row. - - - - - - Specifies the lowest number of undo steps possible. - - - - - Specifies the highest number of undo steps possible. - - - - 100 - - - - - PB - Specifies options related to the setup. - - - - Specifies options related to the installed languages. - - - - - - - Contains the installed Office languages for the menus and dialogs. - - - - - - - AF - Specifies options related to printing. - - - - - MBA - Specifies if printing a document can modify a document due to reformatting - - - false - - - - OS - Contains settings for print specific warnings. - - - - - - - OS - Specifies if a warning should be displayed in case the printout requires a specific paper size - - - false - - - - - - - OS - Specifies if a warning should be displayed in case the printout requires a specific paper orientation - - - false - - - - - - - OS - Specifies if a warning should be displayed in case the printer defined in the document was not found - - - false - - - - - AF - Specifies if a warning should be displayed in case the printout contains transparent objects. - - - true - - - - - AF - Specifies the options related to printing. - - - - Specifies the options related to printing. - - - - - AF - Indicates whether to ignore transparency for the output of objects. - - - false - - - - - AF - Specifies type of transparency reduction: 0 - Automatically determine reduction, 1 - Always disabled. - - - 0 - - - - - AF - Indicates whether to reduce memory usage for output of gradients by limiting the number of gradient steps. - - - false - - - - - AF - Specifies type of gradient reduction: 0 - reduce the number of stripes, 1 - reduce to color. - - - 0 - - - - - AF - Specifies the maximum number stripes used for output of gradients. - - - 64 - - - - - AF - Indicates whether to reduce the memory usage of bitmaps for print process by limiting the resolution. - - - false - - - - - AF - Specifies type of bitmap reduction: 0 - Automatically determine optimal resolution, 1 - Use original resolution, 2 - User defined resolution. - - - 1 - - - - - AF - Specifies resolution of reduced bitmaps: 0 - 72DPI, 1 - 96DPI, 2 - 150DPI, 3 - 200DPI, 4 - 300DPI, 5 - 600DPI. - - - 3 - - - - - AF - Indicates whether to reduce the resolution of automatically created substitution bitmaps of transparent objects. - - - true - - - - - AF - Indicates whether to create only grayscale output of all objects. - - - false - - - - - Specifies the options for printing to a file. - - - - - - AF - Indicates whether to ignore transparency for the output of objects. - - - false - - - - - AF - Indicates the type of transparency reduction: 0 - Automatically determine reduction, 1 - Always disabled. - - - 0 - - - - - AF - Indicates whether to reduce memory usage for output of gradients by limiting the number of gradient steps. - - - false - - - - - AF - Indicates the type of gradient reduction: 0 - Reduce the number of stripes, 1 - Reduce to color. - - - 0 - - - - - AF - Specifies the maximum number stripes used for output of gradients. - - - 64 - - - - - AF - Indicates whether to reduce the memory usage of bitmaps for the print process by limiting the resolution. - - - false - - - - - AF - Specifies the type of bitmap reduction: 0 - Automatically determine optimal resolution, 1 - Use original resolution, 2 - User defined resolution. - - - 1 - - - - - AF - Specifies the resolution of reduced bitmaps: 0 - 72DPI, 1 - 96DPI, 2 - 150DPI, 3 - 200DPI, 4 - 300DPI, 5 - 600DPI. - - - 3 - - - - - AF - Indicates whether to reduce the resolution of automatically created substitution bitmaps of transparent objects. - - - true - - - - - AF - Indicates whether to create only grayscale output of all objects. - - - false - - - - - - - - MBA - Lists open documents or windows. - - - - - - - - MBA - Lists open documents or windows. - - - - - - OS - Contains settings specifying if a XML package is added to the applications binary files. - - - - - - - OS - Defines if a XML package is added to the Writer binary files. - - - - - - - - OS - Defines if a XML package is added to the Calc binary files. - - - - - - - - OS - Defines if a XML package is added to the Impress binary files. - - - - - - - - OS - Defines if a XML package is added to the Draw binary files. - - - - - - FS - Contains settings that specify the common help settings. - - - - ABI - Determines wether basic help should be shown. - - true - - - - ABI - Determines the locale for the help pages. - - - - - - - ABI - Determines the operating system on which the help system is displayed. - - - - - - - - - MBA - Activates the Tip help. - - - true - - - - - - MBA - Activates the Extended help. - - - false - - - - ABI - Specifies the name of the stylesheet used to display help content. - - Default - - - - MBA - Specifies the properties of the HelpAgent. - - - - Specifies whether the HelpAgent is enabled. - - - true - - - - Specifies the time-out value in seconds after which the HelpAgent is closed automatically if ignored by the user. - - - 30 - - - - Specifies how often the user must ignore a given HelpAgent topic until it is disregarded in the future (any requests for this topic will be dropped silently). - - - 3 - - - - Contains the help URLs which have been ignored at least once by the user, together with a counter of how often they have been ignored. - - - - - - - PL - Contains settings for the start center. - - - - Contains a string specifying the URL to be browsed for additional features (e.g. extensions) - - - - - - Contains a string specifying the URL to be browsed for information about the product - - - - - - Contains a string specifying the URL to be browsed for additional template documents - - - - - - - FS - Contains various settings regarding the product registration feature. - - - - Contains a string specifying the URL with placeholders to be used for online registration. - - - - - - - Contains a string specifying the real URL to be used for online registration. - - - - - - - Contains a string representation of the date on which the user receives a reminder (e.g. "13.02.2002"). - - - - - - - Contains the number used internally to determine when the dialog should be started. - - 1 - - - - Contains a Boolean that specifies if the "Registration..." menu item is available. - - true - - - - CD/OBR - Current product ID. - This data is saved in a dedicated file since OOo 3.0 FCS - - - - - CD/OBR - Specifies product specific IDs and associated instance UUIDs - This data is saved in a dedicated file since OOo 3.0 FCS - - - - - - - JL - Contains Java related settings. - - - - Contains Applet related settings. - - - - - - - Enables/disables Java applets in Office documents. - - - false - - - - - - AF - Specifies the options related to the vectorization of bitmaps. - - - - - - - AF - Specifies the number of colors that are used to create a vector graphic in Draw/Impress [UNIT=count]. - - - - - - Specifies that the lowest number that can be used to create a vector graphic is 8. - - - - - Specifies that the lowest number that can be used to create a vector graphic is 32. - - - - 8 - - - - - - - AF - Specifies the number of pixels that you want to combine as a single pixel when creating a vector graphic. - - - - - - Specifies the minimum value to reduce point is 0 pixels. - - - - - Specifies the maximum value to reduce point is 32 pixels. - - - - 0 - - - - - - - AF - Indicates whether to create a tiled background before vectorizing. - - - false - - - - - - - AF - Specifies the extent of background tiles that are used for vectorizing [UNIT=pixel]. - - - - - - Specifies that the minimum extent is 8 pixels. - - - - - Specifies that the maximum extent is 128 pixels. - - - - 32 - - - - - AF - Specifies the options for images. - - - - - Specifies the color options for images. - - - - - - - - - AF - Deprecated. - - - - - - Deprecated. - - - - - Deprecated. - - - - 256 - - - - - - - - AF - Deprecated. - - - - - - Deprecated. - - - - - Deprecated. - - - - 16 - - - - - - - - AF - Deprecated. - - - - - - Deprecated. - - - - - Deprecated. - - - - 10 - - - - - - - - AF - Deprecated. - - - - - - Deprecated. - - - - - Deprecated. - - - - 10 - - - - - - - - AF - Deprecated. - - - - - - Deprecated. - - - - - Deprecated. - - - - 4500 - - - - - - - - AF - Deprecated. - - - true - - - - - - - - AF - Deprecated. - - - - - - Deprecated. - - - - - Deprecated. - - - - 50 - - - - Specifies the RGB color options for images. - - - - - - - - - AF - Deprecated. - - - - - - Deprecated. - - - - - Deprecated. - - - - 10 - - - - - - - - AF - Deprecated. - - - - - - Deprecated. - - - - - Deprecated. - - - - 10 - - - - - - - - AF - Deprecated. - - - - - - Deprecated. - - - - - Deprecated. - - - - 10 - - - - - - Specifies the effects options for images. - - - - - - - - - AF - Deprecated. - - - - - - Deprecated. - - - - - Deprecated. - - - - 4 - - - - - - - - AF - Deprecated. - - - - - - Deprecated. - - - - - Deprecated. - - - - 4 - - - - - - - - AF - Deprecated. - - - - - - Deprecated - - - - - Deprecated - - - - - Deprecated - - - - - Deprecated - - - - 2 - - - - - - - - AF - Deprecated. - - - - - - Deprecated. - - - - - Deprecated. - - - - 10 - - - - - - - - AF - Deprecated. - - - false - - - - - - - - AF - Deprecated. - - - - - - Deprecated. - - - - - Deprecated. - - - - 4 - - - - - - - - AF - Deprecated. - - - - - - Deprecated. - - - - - Deprecated. - - - - 4 - - - - - - - - - AF - Deprecated. - - - - - - Deprecated - - - - - Deprecated - - - - - Deprecated - - - - - Deprecated - - - - 2 - - - - - - - - AF - Deprecated. - - - - - - Specifies that the minimum intensity is 0. - - - - - Specifies that the maximum intensity is 100. - - - - 10 - - - - - - NN - Specifies settings for the date formats used. - - - - - - - NN - Specifies the first year that can be entered using two-digit-year date formats. - - - 1930 - - - - - SJ / OS / KA - Specifies default settings of Microsoft-, Graphic- and HTML filters. - - - - SJ - Specifies default settings of Microsoft filters. - - - - Specifies default settings of Microsoft import filters. - - - - Specifies if convertible MathType OLE objects are converted into Math objects. - - false - - - - Specifies if convertible WinWord OLE objects are converted into Writer objects. - - false - - - - Specifies if convertible Excel OLE objects are converted into Calc objects. - - false - - - - Specifies if convertible PowerPoint OLE objects are converted into Impress objects. - - false - - - - Flag to control use of enhanced fields. - - true - - - - - Specifies default settings of Microsoft export filters. - - - - Specifies if embedded Math objects are converted into MathType objects. - - false - - - - Specifies if embedded Writer objects are converted into WinWord objects. - - false - - - - Specifies if embedded Calc objects are converted into Excel objects. - - false - - - - Specifies if embedded Impress objects are converted into PowerPoint objects. - - false - - - - SJ - Specifies if previews are created when saving PowerPoint documents. - - true - - - - SJ - Specifies if previews are created when saving Excel documents. - - false - - - - SJ - Specifies if previews are created when saving Word documents. - - false - - - - - - SJ - Specifies default settings of graphic import and export dialogs. - - - - Specifies default settings of graphic import dialogs. - - - - Specifies default settings of the PCD - Photo CD Base import dialog. - - - - - - Specifies import resolution of PCD graphics. - - - - - - PCD-Base16, 192*128 PCD graphic. - - - - - PCD-Base4, 384*256 PCD graphic. - - - - - PCD-Base, 768*512 PCD graphic. - - - - 2 - - - - - - Specifies default settings of graphic export dialogs. - - - - Specifies default settings of the Windows Bitmap export dialog. - - - - - - - Specifies usable export modes. - - - - - - Original size - - - - - Logical size (dpi/pixel ratio) - - - - - Given size - - - - 0 - - - - - - - Specifies resolution which is to be used if export mode is 1. [UNIT=dpi] - - - - - - 75 - - - - - 150 - - - - - 300 - - - - - 600 - - - - 75 - - - - - - Specifies the number of colors that are to be used for the export. - - - - - - Original - - - - - 1 bit, 1 bit threshold - - - - - 1 bit, 1 bit dithered - - - - - 4 bit, 4 bit grayscale - - - - - 4 bit, 4 bit color palette - - - - - 8 bit, 8 bit grayscale color - - - - - 8 bit, 8 bit color palette - - - - - 24 bit, 24 bit true color - - - - 0 - - - - - - - Specifies if Run-Length-Encoding should be used in the export. - - - true - - - - Specifies the logical size of a graphic. [UNIT=1/100 mm]. - - - - - - - - - - Specifies default settings of the EPS - Encapsulated Postscript export dialog. - - - - Specifies if a preview graphic should be exported together with the Encapsulated PostScript file. Due to the fact that most programs can't render eps graphics, it is useful to provide a preview that can be displayed as replacement. The preview graphic will also be printed if the printer is not capable of Postscript. - - - - - - None - - - - - TIFF - - - - - Interchange (EPSI) - 1 bit color resolution - - - - - TIFF and EPSI - - - - 0 - - - - Specifies the PostScript version that has to be used for the EPS export. Because not every PostScript printer is capable of version 2 PostScript, it is sometimes necessary to create version 1 PostScript graphics. PostScript Level 1 does not support color and bitmap compression. - - - - - - Version 1 PostScript - - - - - Version 2 PostScript - - - - 2 - - - - Specifies if color or grayscale format is used for the EPS export. This option is not available for version 1 PostScript files. - - - - - - Color format - - - - - Grayscale format - - - - 2 - - - - Specifies if bitmaps are exported by using the LZW (Lempel - Ziv - Welch) compression algorithm. Compression is only available for level 2 PostScript files. - - - - - - LZW compression - - - - - No compression - - - - 2 - - - - Specifies if glyph outlines are exported. They produce the highest quality and it is the only possible way to create EPS files that are CJK compliant. Not using glyphs will produce smaller files, but it might lead to problems if not all fonts are available during printing. - - - - - - Glyph outlines - - - - - No glyph outlines - - - - 0 - - - - - Specifies default settings of the GIF - Graphics Interchange export dialog. - - - - - - - Specifies if graphics should be exported using interlace. It is recommended for big pictures to activate interlace, so the content can be displayed immediately when loading the picture. - - - - - Deactivate - - - - - Activate - - - - 1 - - - - - - - Specifies if the graphic background is stored as transparent. - - - - - No transparency - - - - - Transparency - - - - 1 - - - - - Specifies default settings of the JPEG - Joint Photographic Experts Group export dialog. - - - - - - - Specifies quality of the JPG export. A higher value results in higher quality and file size. - - - - - Represents lowest value that can be used. The lower the value, the less good is the compression quality and the bigger is be the file size. - - - - - Represents highest value that can be used. The higher the value, the better is the compression quality and the smaller is the file size. - - - - 75 - - - - - - - Specifies if graphics are exported using true color or grayscale. - - - - - True colors - - - - - Grayscale - - - - 0 - - - - - Specifies if graphics are exported with the original- or selected size. - - - - - - - Specifies if graphics are exported with the original- or selected size. - - - - - Original size - - - - - Given size - - - - 0 - - - - Specifies the logical size of a graphic. [UNIT=1/100 mm]. - - - - - - - - Specifies default settings of the PCT - Mac Pict export dialog. - - - - - - - Specifies if graphics are exported with original- or selected size. - - - - - Original size - - - - - Given size - - - - 0 - - - - Specifies the logical size of a graphic. [UNIT=1/100 mm]. - - - - - - - - Specifies default settings of the PBM - Portable Bitmap export dialog. - - - - - - - Specifies if graphics are exported to binary- or ASCII format. - - - - - Binary - - - - - ASCII - - - - 1 - - - - - Specifies default settings of the PGM - Portable Graymap export dialog. - - - - - - - Specifies if graphics are exported to a binary- or ASCII format. - - - - - Binary - - - - - ASCII - - - - 1 - - - - - Specifies default settings of the PPM - Portable Pixelmap export dialog. - - - - - - - Specifies if graphics are exported to a binary- or ASCII format. - - - - - Binary - - - - - ASCII - - - - 1 - - - - - Specifies default settings of the SVM - StarView Meta File export dialog. - - - - - - - Specifies if graphics should be exported with the original- or selected size. - - - - - Original size - - - - - Given size - - - - 0 - - - - Specifies the logical size of a graphic. [UNIT=1/100 mm]. - - - - - - - - Specifies default settings of the WMF - Windows Metafile export dialog. - - - - - - - Specifies if graphics should be exported with the original- or selected size. - - - - - Original size - - - - - Given size - - - - 0 - - - - Specifies the logical size of a graphic. [UNIT=1/100 mm]. - - - - - - - - Specifies default settings of the EMF - Enhanced Metafile export dialog. - - - - - - - Specifies if graphics should be exported with the original- or selected size. - - - - - Original size - - - - - Given size - - - - 0 - - - - Specifies the logical size of a graphic. [UNIT=1/100 mm]. - - - - - - - - Specifies default settings of the PNG - Portable Network Graphic export dialog. - - - - - - - Specifies export compression settings which ranges from 0 (no compression) to 9 (maximum compression). The calculating time increases with an ascending compression value. - - - - - Represents lowest value that can be used. The lower the value, the lower the compression quality and the larger the file size. - - - - - Represents the highest value that can be used. The higher the value, the higher the compression quality and the smaller the file size. - - - - 6 - - - - - - - Specifies if graphics should be exported using interlace. It is recommended for big pictures to activate interlace, so the content can be displayed immediately when loading the picture. - - - - - Deactivate interlace mode - - - - - Activate interlace mode - - - - 1 - - - - - - - OS - Contains settings for HTML import/export. - - - - Contains settings for HTML import. - - - - - ER - Specifies if numbers should be parsed according to the en-US locale instead of the user's locale. - - - false - - - - - - - OS - Specifies if unknown tags should be imported as fields. - - - false - - - - - - - OS - Specifies if font settings should be ignored when importing. - - - false - - - - Specifies font size for HTML. - - - - - - - OS - Specifies font size for HTML as Token Font 1. - - - 7 - - - - - - - OS - Specifies font size for HTML as Token Font 2. - - - 10 - - - - - - - OS - Specifies font size for HTML as Token Font 3. - - - 12 - - - - - - - OS - Specifies font size for HTML as Token Font 4. - - - 14 - - - - - - - OS - Specifies font size for HTML as Token Font 5. - - - 18 - - - - - - - OS - Specifies font size for HTML as Token Font 6. - - - 24 - - - - - - - OS - Specifies font size for HTML as Token Font 7. - - - 36 - - - - - - Contains settings for HTML export. - - - - - - - OS - Specifies the browser for which the HTML export should be optimized - - - - - - Html 3.2 - - - - - MSIE 4.0 - - - - - Netscape 3.0 - - - - - Writer - - - - - Netscape 4.0 - - - - 4 - - - - - - - OS - Specifies if Office Basic instructions are considered when exporting in HTML format. - - - false - - - - - - - OS - Specifies if the print layout of the current document should also be exported. - - - false - - - - - - - OS - Specifies if graphics are copied to the Internet server when uploading via FTP. - - - true - - - - - - - OS - Specifies if a warning should be displayed to point out that the available Basic macros will be lost when exporting in HTML format. - - - true - - - - - OS - Specifies the mimetype for the text encoding. - - - - - - - - - KA - Specifies default settings of PDF export dialog. - - - - - Specifies default settings of PDF export dialog. - - - - Use following properties instead: UseLosslessCompression, Quality, UseResolutionReduction, ResolutionReduction - SJ - Deprecated. - - 1 - - - - SJ - Specifies if graphics are exported to PDF using a lossless compression eg. PNG or if they are compressed using the JPEG format. - - false - - - - SJ - Specifies quality of the JPG export. A higher value results in higher quality and file size. - - - - - Represents lowest value that can be used. The lower the value, the less good is the compression quality and the bigger is be the file size. - - - - - Represents highest value that can be used. The higher the value, the better is the compression quality and the smaller is the file size. - - - - 90 - - - - SJ - Specifies if the resolution of each image is reduced to the resolution specified by the property MaxImageResolution. - - false - - - - If the property ReduceImageResolution is set to true all images will be reduced to the given value in DPI. - - - - - 75 - - - - - 150 - - - - - 300 - - - - - 600 - - - - - 1200 - - - - 300 - - - - SJ - Determines if PDF are created by using special tags also known as Tagged PDF. - - false - - - - SJ - Specifies if notes are exported to PDF. - - false - - - - PL - Specifies if bookmarks are exported to PDF. - - true - - - - PL - Specifies how many bookmark levels should be opened in the reader application when the PDF gets opened. - - -1 - - - - SJ - Specifies if notes pages are exported to PDF. (Notes pages are available in Impress documents only). - - false - - - - SJ - Specifies slide transitions are exported to PDF. This option is active only if storing Impress documents. - - true - - - - pl - Specifies whether form fields are exported as widgets or only their fixed print representation is exported. - - true - - - - Specifies the submitted format of a PDF form. - - - - - Specifies that forms type FDF is used. - - - - - Specifies that forms type PDF is used. - - - - - Specifies that forms type HTML is used. - - - - - Specifies that forms type XML is used. - - - - 0 - - - - FME - Specifies that automatically inserted empty pages are suppressed. This option is active only if storing Writer documents. - - true - - - - PL - Specifies that a stream is inserted to the PDF file which contains the original document for archiving purposes. - - false - - - - beppec56 - Specifies whether to hide the PDF viewer menubar when the document is active. - - false - - - - beppec56 - Specifies whether to hide the PDF viewer toolbar when the document is active. - - false - - - - beppec56 - Specifies whether to hide the PDF viewer controls when the document is active. - - false - - - - beppec56 - Specifies that the PDF viewer window is opened full screen when the document is opened. - - false - - - - beppec56 - Specifies that the PDF viewer window is centered to the screen when the PDF document is opened. - - false - - - - beppec56 - Specifies that the PDF viewer window is opened full screen, on top of all windows.. - - false - - - - beppec56 - Specifies that the title of the document, if present in the document properties, is displayed in the PDF viewer window title bar. - - true - - - - beppec56 - Specifies how the PDF document should be displayed when opened. - - - - - Select the default viewer mode, neither outlines or thumbnails. - - - - - The document is opened with outline pane opened - - - - - The document is opened with thumbnail pane opened - - - - 0 - - - - beppec56 - Specifies the action to be performed when the PDF document is opened. - - - - - Opens with default zoom magnification. - - - - - Opens magnified to fit the entire page within the window. - - - - - Opens magnified to fit the entire page width within the window. - - - - - Opens magnified to fit the entire width of its boundig box within the window (cuts out margins). - - - - - Opens with the zoom level specified in the Zoom property. - - - - 0 - - - - pl - specifies the zoom level a PDF document is opened with. Only valid if "Magnification" is set to "4". - - 100 - - - - pl - Specifies the page on which a PDF document should be opened in the viewer application. - - 1 - - - - beppec56 - Specifies the page layout to be used when the document is opened. - - - - - Display the pages according to the reader configuration. - - - - - Display one page at a time. - - - - - Display the pages in one column. - - - - - Display the pages in two columns odd pages on the right, to have the odd pages on the left the FirstPageOnLeft property should be used as well. - - - - 0 - - - - beppec56 - Used with the value 3 of the PageLayout property above, true if the first page (odd) should be on the left side of the screen. - - false - - - - - beppec56 - Specifies what printing is allowed. - - - - - The document cannot be printed. - - - - - The document can be printed at low resolution only. - - - - - The document can be printed at maximum resolution. - - - - 2 - - - - beppec56 - Specifies the change allowed to the document. - - - - - The document cannot be changed. - - - - - Inserting deleting and rotating pages is allowed. - - - - - Filling of form field is allowed. - - - - - Both filling of form field and commenting is allowed. - - - - - All the changes of the previous selections are permitted, with the only exclusion of page extraction (copy). - - - - 4 - - - - beppec56 - Specifies that the pages and the document content can be extracted to be used in other documents (copy and paste). - - true - - - - beppec56 - Specifies that the document content can be extracted to be used in accessibility applications. - - true - - - - - - beppec56 - Specifies the version of PDF to emit. - - - - - PDF 1.4 (default selection). - - - - - PDF/A-1 (ISO 19005-1:2005) - - - - 0 - - - - - - beppec56 - Specifies that the file system related hyperlinks (file:// protocol) present in the document will be exported as relative to the source document location. - - false - - - - beppec56 - Specifies the way the exported PDF will be viewed (experienced) by the user. - - - - - Specifies that the PDF will be exported with all the links external to the document treated as URI. This is the Default - - - - - Specifies that the PDF will be exported in order to be viewed through a PDF reader application only. Valid only if not exporting to PDF/A-1 (e.g. SelectPdfVersion not set to 1). - - - - - Specifies that the PDF will be exported in order to be viewed through an Internet browser, using the PDF plug-in provided with it. The bookmark of the URI will be rendered compatible with the target bookmark generated with OOo PDF Export feature (see ExportBookmarksToPDFDestination, below). - - - - 0 - - - - beppec56 - Specifies that the target documents with .od[tpgs] extension, will have that extension changed to .pdf when the link is exported to PDF. The source document remains untouched. - - false - - - - beppec56 - Specifies that the bookmarks contained in the source OpenOffice.org file should be exported to the PDF file as Named Destination (see PDF 1.4 section 8.2.1). - - false - - - - - - - - MBA - Determines the miscellaneous entries for the common group. - - - - AS - Determines the maximum count of documents, which are allowed to be open at the same time. NIL will be interpreted as infinite! - - - - - - - - PB - Enables/Disables Plugins. - - - true - - - - FS - Determines if the system's file and folder pickers should be used. If false, the proprietary file/folder picker implementations will be used. Relevant on platforms where file/folder picker integration is implemented. - - true - - - - MAV - Allows to specify whether the OOo document file locking mechanics should use the system file locking. - - true - - - - MAV - Allows to specify whether the OOo document file locking mechanics should use the lock file for locking. - - true - - - - PL - Determines if the system's print dialog should be used. If false, the platform independent print dialog implementation will be used. Relevant on platforms where print dialog integration is implemented. - - false - - - - - MBA - Specifies which size of the symbols is used for the toolbars. - - - - - 16x16 pixel icons - - - - - 32x32 pixel icons - - - - 0 - - - - - kendy - Specifies which style of the symbols is used for the toolbars, menus, etc. - - - - - Automatic, chosen according to the desktop - - - - - Default - the OpenOffice.org default theme - - - - - HiContrast - - - - - Industrial - - - - - Crystal - the KDE default theme - - - - - Tango - the Gnome default theme - - - - - Classic - the OpenOffice.org 2.0 default theme - - - - auto - - - - - MBA - Specifies which button style the toolbars should use. - - - - - 3D style - - - - - Flat style - - - - 1 - - - - FS - Enables/Disables the usage of AutoPilots for form controls. - - true - - - - MBA - Specifies if the office has never before been started. - - - true - - - - - FS - contains settings for the form layer of the applications. - - - - specifies certain default layout settings for form controls. All those settings can be overruled in concrete documents, they specify creation-time defaults only. - - - - specifies certain default layout settings for form controls in text documents - - - - - specifies certain default layout settings for form controls in web pages - - - - - specifies certain default layout settings for form controls in spreadsheet documents - - - - - specifies certain default layout settings for form controls in drawing documents - - - - - specifies certain default layout settings for form controls in presentation documents - - - - - specifies certain default layout settings for form controls in XML form documents - - - - - specifies certain default layout settings for form controls in database form documents - - - - - specifies certain default layout settings for form controls in database text report documents. - - - - - - specifies settings for the property browser used for forms and form controls. - - - - FS - Enables or disables the property browser's access to form/control properties which are not officially supported. - - false - - - - FS - Enables or disables a help section at the bottom of the property browser, which shows the help of the currently active property. - - false - - - - - - OS - Contains layout specific settings for Asian languages. - - - - - - - OS - Determines the kerning of western text and/or punctuation inside of Asian text. - - - true - - - - - - - OS - Determines the type of character distance compression in Asian text: 0 - no compression; 1 - compress punctuation only; 2 - compress interpunction an japanese kana. - - - 0 - - - - OS - Contains the characters at which lines are not allowed to begin or to end. For each locale there is a separate entry with the locale as its node name. - - - - - - - OS / PB - Contains all options for search. - - - - - - - PB - Specifies search for whole words only. - - false - - - - - - - PB - Specifies search backwards. - - false - - - - - - - PB - Specifies search with the use of regular expressions. - - false - - - - - - - PB - Specifies search for styles only. - - false - - - - - - - PB - Specifies search with similarity. - - false - - - - - - - PB - Specifies search as case sensitive. - - false - - - - - - - PB - Specifies search with the use of Asian options. - - false - - - - - OS - Specifies the divider label in case of a component-based search extension. - - - - - - OS - Specifies the label of the first component-based search command. - - - - - - OS - Specifies the label of the second component-based search command. - - - - - - mod - Specifies if search includes notes(SwPostItFields) - - false - - - - OS - Contains search options for the Japanese language. - - - - - - - OS - Does not distinguish between full-width and half-width characters. - - true - - - - - - - OS - Does not distinguish between hiragana and katakana characters. - - true - - - - - - - OS - Specifies search without distinguishing between characters with diphthongs and double consonants and plain characters. - - true - - - - - - - OS - Specifies search without distinguishing between minus signs, dashes, and long vowel sounds. - - true - - - - - - - OS - Specifies search without distinguishing between repeat character marks. - - true - - - - - - - OS - Specifies search without distinguishing between standard and nonstandard ideography. - - true - - - - - - - OS - Specifies search without distinguishing between standard and nonstandard ideography. - - true - - - - - - - OS - Specifies search without distinguishing between 'Di' and 'Zi' or 'Du' and 'Zu'. - - true - - - - - - - OS - Specifies search without distinguishing between 'Ba' and 'Va' or 'Ha' and 'Fa'. - - true - - - - - - - OS - Specifies search without distinguishing between 'Tsi', 'Thi' and 'Chi' or 'Dhi' and 'Zi'. - - true - - - - - - - OS - Specifies search without distinguishing between 'Hyu' and 'Fyu' or 'Byu' and 'Vyu'. - - true - - - - - - - OS - Specifies search without distinguishing between 'Se' and 'She' or 'Ze' and 'Je'. - - true - - - - - - - OS - Specifies search without distinguishing between 'Ia' and 'Iya'. - - true - - - - - - - OS - Specifies search without distinguishing between 'Ki' and 'Ku'. - - true - - - - - - - OS - Specifies search without distinguishing between punctuation characters. - - true - - - - - - - OS - Specifies search without distinguishing between characters used as blank spaces, such as full-width spaces, half-width spaces, and tabs. - - true - - - - - - - OS - Specifies search without distinguishing between prolonged sound marks. - - true - - - - - - - OS - Specifies search without distinguishing between normal dots and middle dots. - - true - - - - - - OS - Specifies settings for the accessibility options. - - - - FS - Enables the automatic detection of a high contrast mode set for your desktop. Some OS' do not provide this option explicitly, but allow the user to choose a color scheme that is HC-compliant implicitly, which is recognized if the option is set. - - - true - - - - OS - Enables the use of high contrast colors, instead of displaying the normal/original WYSIWYG colors. - - - true - - - - OS - Enables or disables the automatic time out of help tips. You can specify a duration (n) of 1 to 99 seconds. If this option is disabled, press the Esc key to dismiss the help tip. - - - true - - - - OS - Enables or disables the automatic time out of help tips. You can specify a duration (n) of 1 to 99 seconds. If this option is disabled, press the Esc key to dismiss the help tip. - - - - - - Specifies the number of seconds to wait before displaying a help tip. - - - - - Specifies the number of seconds to display a help tip. - - - - 4 - - - - AF - Indicates whether to allow the graphical animation in all SO/OO applications (i.e. animated GIFs and objects in Impress during presentation, animated graphical previews (Gallery, Insert-Graphics-From File, Animation Tool in Impress.) - - - true - - - - AF - Indicates whether to allow all textual animation like blinking and scrolling in all SO/OO applications. - - - true - - - - OS - Overrides all text color attributes set in a SO/OO document for display only. - - - false - - - - OS - Allows the user to change the UI font to the system default. - - - true - - - - OS - Indicates whether the cursor is displayed in read-only texts. - - - false - - - - - Replaced by org.openoffice.Office.Embedding/ObjectNames. - MAV - Deprecated - - - - - Without replacement. - OBR - Specifies external helper applications / protocol handlers. - - - - - OBR - Specifies an external mail application to be used for Send as email. - - - - Without replacement. - Indicates if the mail application in the OS specific user settings should be used. - - - - - Specifies the external mail application to be used. - - - - - - Without replacement. - Specifies the default external mail application. - - Mozilla 1.0 - 1.2 - - - - Without replacement. - Contains a set of supported command line profiles. - - - - - - OS - Contains various language/localization specific settings. - - - - PL - Contains settings for (language/localization specific) input methods. - - - - Controls the behavior of the IIIMP status window on Unix. If true, the status window is always displayed. If false, the status window is never displayed. If nil (the default), the status window is displayed depending on the current locale. - - - - - - Contains settings for the Asian languages (Chinese, Japanese, Korean,...) layout. - - - - - Specifies, whether CJK font settings are available (true) or not (false). - - false - - - - - Specifies, whether vertical text is available (true) or not (false). - - false - - - - - Specifies, whether Asian typography options like compression and forbidden characters are available (true) or not (false). - - false - - - - - Specifies, whether Japanese find options are selectable for search and replace (true) or not (false). - - false - - - - - Specifies whether Rubys are available (true) or not (false). - - false - - - - - Specifies whether case mapping to half and full width, hiragana and katagana are available (true) or not (false). - - false - - - - - Specifies whether writing in double lines is available (true) or not (false). - - false - - - - - Specifies whether emphasis marks are available (true) or not (false). - - false - - - - - Specifies whether vertical call out objects are available (true) or not (false). - - false - - - - - Contains settings for the languages with complex text layout (Hebrew, Arabic, Thai,...). - - - - - Specifies whether CTL font settings are available (true) or not (false). - - false - - - - - Specifies whether CTL strings are checked for the correct input sequence(true) or not (false). - - false - - - - - Specifies whether CTL strings are checked restricted for the correct input sequence(true) or not (false). Is only effective when CTLSequenceChecking is true. - - false - - - - - Specifies whether CTL input sequences are corrected while typing. Is only effective when CTLSequenceChecking is true. - - false - - - - - Specifies the type of text cursor movement (logical (0) or visual (1)) within mixed text (RTL and LTR). - - 0 - - - - - Specifies the type of numerals (Arabic (0), Hindi (1), system settings (2) or Context(3)) is used per default in all applications. - - 0 - - - - SSA - Specifies whether the whole user interface (UI) will be mirrored. If true, the UI will be right-to-left. If false, the UI will be left-to-right. If nil (the default), the UI will be mirrored depending on the office locale. - - - - - - - Use cfg package Jobs instead of this. - AS - Uses cfg package Jobs instead of this component. - - - - Use cfg package Jobs instead of this. - Uses cfg package Jobs instead of this component. - - - - - Use cfg package Jobs instead of this. - Uses cfg package Jobs instead of this component. - - - - - - FME - Contains settings for smart tags. - - - - FME - Contains Writer specific settings for smart tags. - - - - FME - Specifies whether smart tag recognization is enabled. - - true - - - - FME - A list of excluded smart tag types. - - - - - + + -- cgit From cae80de04529d2d44c84b5f8950f92b6eb737e09 Mon Sep 17 00:00:00 2001 From: Frank Schönheit Date: Wed, 23 Sep 2009 08:51:57 +0000 Subject: #b6875455# make reference device usage for form controls depend on a configuration setting (per document type) --- svx/inc/svx/fmmodel.hxx | 10 ++++++---- svx/source/form/fmcontrollayout.cxx | 10 ++++++++++ svx/source/form/fmmodel.cxx | 40 +++++++++++++++++++++++++------------ svx/source/form/fmobj.cxx | 4 +++- svx/source/inc/fmcontrollayout.hxx | 5 +++++ 5 files changed, 51 insertions(+), 18 deletions(-) diff --git a/svx/inc/svx/fmmodel.hxx b/svx/inc/svx/fmmodel.hxx index 2f61967bc3ac..f831729b5006 100644 --- a/svx/inc/svx/fmmodel.hxx +++ b/svx/inc/svx/fmmodel.hxx @@ -89,14 +89,16 @@ public: /** check whether the OpenInDesignMode has been set explicitly or been loaded () or if it still has the default value from construction () */ - sal_Bool OpenInDesignModeIsDefaulted( ); + sal_Bool OpenInDesignModeIsDefaulted(); -//#if 0 // _SOLAR__PRIVATE - void implSetOpenInDesignMode( sal_Bool _bOpenDesignMode, sal_Bool _bForce ); + /** determines whether form controls should use the SdrModel's reference device for text rendering + */ + sal_Bool ControlsUseRefDevice() const; FmXUndoEnvironment& GetUndoEnv(); -//#endif +private: + void implSetOpenInDesignMode( sal_Bool _bOpenDesignMode, sal_Bool _bForce ); }; #endif // _FM_FMMODEL_HXX diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx index 92e987db796c..8cf6ccd2a84d 100644 --- a/svx/source/form/fmcontrollayout.cxx +++ b/svx/source/form/fmcontrollayout.cxx @@ -141,6 +141,16 @@ namespace svxform return bDynamicBorderColor; } + //-------------------------------------------------------------------- + bool ControlLayouter::useDocumentReferenceDevice( DocumentType _eDocType ) + { + OConfigurationNode aConfig = getLayoutSettings( _eDocType ); + Any aUseRefDevice = aConfig.getNodeValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UseDocumentTextMetrics" ) ) ); + bool bUseRefDevice = false; + OSL_VERIFY( aUseRefDevice >>= bUseRefDevice ); + return bUseRefDevice; + } + //........................................................................ } // namespace svxform //........................................................................ diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx index 09008ae220b9..15932d4d93cc 100644 --- a/svx/source/form/fmmodel.cxx +++ b/svx/source/form/fmmodel.cxx @@ -30,30 +30,27 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" + +#include "fmundo.hxx" +#include "fmdocumentclassification.hxx" +#include "fmcontrollayout.hxx" + +#include +#include +#include #include #ifndef SVX_LIGHT -#ifndef _SFX_OBJSH_HXX //autogen #include -#endif #else class SfxObjectShell; #endif -#ifndef _FM_FMMODEL_HXX -#include -#endif - -#ifndef _FM_PAGE_HXX -#include -#endif -#include "fmundo.hxx" -#ifndef _SVX_SVDOBJ_HXX -#include -#endif +#include using ::com::sun::star::uno::Reference; using ::com::sun::star::container::XNameContainer; +using namespace svxform; TYPEINIT1(FmFormModel, SdrModel); @@ -62,11 +59,14 @@ struct FmFormModelImplData FmXUndoEnvironment* pUndoEnv; sal_Bool bOpenInDesignIsDefaulted; sal_Bool bMovingPage; + ::boost::optional< sal_Bool > + aControlsUseRefDevice; FmFormModelImplData() :pUndoEnv( NULL ) ,bOpenInDesignIsDefaulted( sal_True ) ,bMovingPage( sal_False ) + ,aControlsUseRefDevice() { } }; @@ -313,6 +313,20 @@ sal_Bool FmFormModel::OpenInDesignModeIsDefaulted( ) } #endif +//------------------------------------------------------------------------ +sal_Bool FmFormModel::ControlsUseRefDevice() const +{ + if ( !m_pImpl->aControlsUseRefDevice ) + { + OSL_PRECOND( m_pObjShell, "FmFormModel::ControlsUseRefDevice: no object shell -> no document -> no document type -> no way!" ); + DocumentType eDocType = eUnknownDocumentType; + if ( m_pObjShell ) + eDocType = DocumentClassification::classifyHostDocument( m_pObjShell->GetModel() ); + m_pImpl->aControlsUseRefDevice.reset( ControlLayouter::useDocumentReferenceDevice( eDocType ) ); + } + return *m_pImpl->aControlsUseRefDevice; +} + //------------------------------------------------------------------------ void FmFormModel::SetAutoControlFocus( sal_Bool _bAutoControlFocus ) { diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index 95b0e151e078..b5a055730f71 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -131,8 +131,10 @@ void FmFormObj::ClearObjEnv() void FmFormObj::impl_checkRefDevice_nothrow( bool _force ) { const FmFormModel* pFormModel = PTR_CAST( FmFormModel, GetModel() ); - OutputDevice* pCurrentRefDevice = pFormModel ? pFormModel->GetRefDevice() : NULL; + if ( !pFormModel || !pFormModel->ControlsUseRefDevice() ) + return; + OutputDevice* pCurrentRefDevice = pFormModel ? pFormModel->GetRefDevice() : NULL; if ( ( m_pLastKnownRefDevice == pCurrentRefDevice ) && !_force ) return; diff --git a/svx/source/inc/fmcontrollayout.hxx b/svx/source/inc/fmcontrollayout.hxx index 1110c274b9f8..c370e8547f0e 100644 --- a/svx/source/inc/fmcontrollayout.hxx +++ b/svx/source/inc/fmcontrollayout.hxx @@ -62,6 +62,11 @@ namespace svxform */ static bool useDynamicBorderColor( DocumentType _eDocType ); + /** determines whether for the given document type, form controls should use the document's reference device + for text rendering + */ + static bool useDocumentReferenceDevice( DocumentType _eDocType ); + private: ControlLayouter(); // never implemented -- cgit From faef6c92ce013e10eb238cafa47376c35683e698 Mon Sep 17 00:00:00 2001 From: Frank Schönheit Date: Wed, 23 Sep 2009 11:54:09 +0000 Subject: #b6875455# introduce lcl_initializeControlFont: set an explicit font at the control. Previously, we relied on the implicit font used by the underlying VCL controls, which could differ heavily when you changed the platform or even only the desktop theme. Now, we use the default font of the document we live in, taken from the proper style family. --- svx/source/form/formcontrolfactory.cxx | 158 ++++++++++++++++++++++++++------- 1 file changed, 125 insertions(+), 33 deletions(-) diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index 50434af4917b..6ffa6775a34c 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -48,10 +48,13 @@ #include #include #include +#include #include #include #include #include +#include +#include /** === end UNO includes === **/ #include @@ -96,6 +99,7 @@ namespace svxform using ::com::sun::star::uno::TypeClass_LONG; using ::com::sun::star::util::XNumberFormats; using ::com::sun::star::util::XNumberFormatTypes; + using ::com::sun::star::awt::FontDescriptor; /** === end UNO using === **/ namespace FormComponentType = ::com::sun::star::form::FormComponentType; namespace ScrollBarOrientation = ::com::sun::star::awt::ScrollBarOrientation; @@ -104,6 +108,8 @@ namespace svxform namespace DataType = ::com::sun::star::sdbc::DataType; namespace ColumnValue = ::com::sun::star::sdbc::ColumnValue; namespace WritingMode2 = ::com::sun::star::text::WritingMode2; + namespace FontEmphasis = ::com::sun::star::text::FontEmphasis; + namespace FontEmphasisMark = ::com::sun::star::awt::FontEmphasisMark; //==================================================================== //= FormControlFactory_Data @@ -427,43 +433,32 @@ namespace svxform }; //.................................................................... - static void lcl_initializeCharacterAttributes( const Reference< XPropertySet >& _rxModel ) + Reference< XPropertySet > lcl_getDefaultDocumentTextStyle_throw( const Reference< XPropertySet >& _rxModel ) { - // need to initialize the attributes from the "Default" style of the document we live in + // the style family collection + Reference< XStyleFamiliesSupplier > xSuppStyleFamilies( getTypedModelNode< XStyleFamiliesSupplier >( _rxModel.get() ), UNO_SET_THROW ); + Reference< XNameAccess > xStyleFamilies( xSuppStyleFamilies->getStyleFamilies(), UNO_SET_THROW ); + + // the names of the family, and the style - depends on the document type we live in + ::rtl::OUString sFamilyName, sStyleName; + if ( !lcl_getDocumentDefaultStyleAndFamily( xSuppStyleFamilies.get(), sFamilyName, sStyleName ) ) + throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unknown document type!" ) ), NULL ); + + // the concrete style + Reference< XNameAccess > xStyleFamily( xStyleFamilies->getByName( sFamilyName ), UNO_QUERY_THROW ); + return Reference< XPropertySet >( xStyleFamily->getByName( sStyleName ), UNO_QUERY_THROW ); + } + //.................................................................... + static void lcl_initializeCharacterAttributes( const Reference< XPropertySet >& _rxModel ) + { try { - // the style family collection - Reference< XStyleFamiliesSupplier > xSuppStyleFamilies = getTypedModelNode< XStyleFamiliesSupplier >( _rxModel.get() ); - Reference< XNameAccess > xStyleFamilies; - if ( xSuppStyleFamilies.is() ) - xStyleFamilies = xSuppStyleFamilies->getStyleFamilies(); - OSL_ENSURE( xStyleFamilies.is(), "lcl_initializeCharacterAttributes: could not obtain the style families!" ); - if ( !xStyleFamilies.is() ) - return; - - // the names of the family, and the style - depends on the document type we live in - ::rtl::OUString sFamilyName, sStyleName; - bool bKnownDocumentType = lcl_getDocumentDefaultStyleAndFamily( xSuppStyleFamilies.get(), sFamilyName, sStyleName ); - OSL_ENSURE( bKnownDocumentType, "lcl_initializeCharacterAttributes: Huh? What document type is this?" ); - if ( !bKnownDocumentType ) - return; - - // the concrete style - Reference< XNameAccess > xStyleFamily( xStyleFamilies->getByName( sFamilyName ), UNO_QUERY ); - Reference< XPropertySet > xStyle; - if ( xStyleFamily.is() ) - xStyleFamily->getByName( sStyleName ) >>= xStyle; - OSL_ENSURE( xStyle.is(), "lcl_initializeCharacterAttributes: could not retrieve the style!" ); - if ( !xStyle.is() ) - return; - - // transfer all properties which are described by the com.sun.star.style. - Reference< XPropertySetInfo > xSourcePropInfo( xStyle->getPropertySetInfo() ); - Reference< XPropertySetInfo > xDestPropInfo( _rxModel->getPropertySetInfo() ); - OSL_ENSURE( xSourcePropInfo.is() && xDestPropInfo.is(), "lcl_initializeCharacterAttributes: no property set info!" ); - if ( !xSourcePropInfo.is() || !xDestPropInfo.is() ) - return; + Reference< XPropertySet > xStyle( lcl_getDefaultDocumentTextStyle_throw( _rxModel ), UNO_SET_THROW ); + + // transfer all properties which are described by the style + Reference< XPropertySetInfo > xSourcePropInfo( xStyle->getPropertySetInfo(), UNO_SET_THROW ); + Reference< XPropertySetInfo > xDestPropInfo( _rxModel->getPropertySetInfo(), UNO_SET_THROW ); ::rtl::OUString sPropertyName; const sal_Char** pCharacterProperty = aCharacterAndParagraphProperties; @@ -482,6 +477,99 @@ namespace svxform DBG_UNHANDLED_EXCEPTION(); } } + + //.................................................................... + /// translates a css.text.FontEmphasis into a css.awt.FontEmphasisMark + Any lcl_translateFontEmphasis( const Any& _rTextFontEmphasis ) + { + sal_Int16 nTextFontEmphasis( FontEmphasis::NONE ); + OSL_VERIFY( _rTextFontEmphasis >>= nTextFontEmphasis ); + + sal_Int16 nFontEmphasisMark = FontEmphasisMark::NONE; + switch ( nTextFontEmphasis ) + { + case FontEmphasis::NONE : nFontEmphasisMark = FontEmphasisMark::NONE; break; + case FontEmphasis::DOT_ABOVE : nFontEmphasisMark = FontEmphasisMark::DOT | FontEmphasisMark::ABOVE; break; + case FontEmphasis::CIRCLE_ABOVE : nFontEmphasisMark = FontEmphasisMark::CIRCLE | FontEmphasisMark::ABOVE; break; + case FontEmphasis::DISK_ABOVE : nFontEmphasisMark = FontEmphasisMark::DISC | FontEmphasisMark::ABOVE; break; + case FontEmphasis::ACCENT_ABOVE : nFontEmphasisMark = FontEmphasisMark::ACCENT | FontEmphasisMark::ABOVE; break; + case FontEmphasis::DOT_BELOW : nFontEmphasisMark = FontEmphasisMark::DOT | FontEmphasisMark::BELOW; break; + case FontEmphasis::CIRCLE_BELOW : nFontEmphasisMark = FontEmphasisMark::CIRCLE | FontEmphasisMark::BELOW; break; + case FontEmphasis::DISK_BELOW : nFontEmphasisMark = FontEmphasisMark::DISC | FontEmphasisMark::BELOW; break; + case FontEmphasis::ACCENT_BELOW : nFontEmphasisMark = FontEmphasisMark::ACCENT | FontEmphasisMark::BELOW; break; + default: + OSL_ENSURE( false, "lcl_translateFontEmphasis: invalid text emphasis!" ); + break; + } + return makeAny( nFontEmphasisMark ); + } + + //.................................................................... + template< typename SIMPLE_TYPE > + void lcl_transferPropertyValue( const Reference< XPropertySet >& _rxSource, const Reference< XPropertySetInfo >& _rxCachedPSI, + const sal_Char* _pAsciiPropertyName, SIMPLE_TYPE& _out_rDest ) + { + const ::rtl::OUString sPropertyName( ::rtl::OUString::createFromAscii( _pAsciiPropertyName ) ); + if ( !_rxCachedPSI->hasPropertyByName( sPropertyName ) ) + return; + Any aValue = _rxSource->getPropertyValue( sPropertyName ); + OSL_VERIFY( aValue >>= _out_rDest ); + } + + //.................................................................... + static void lcl_initializeControlFont( const Reference< XPropertySet >& _rxModel ) + { + try + { + Reference< XPropertySet > xStyle( lcl_getDefaultDocumentTextStyle_throw( _rxModel ), UNO_SET_THROW ); + Reference< XPropertySetInfo > xStylePSI( xStyle->getPropertySetInfo(), UNO_SET_THROW ); + FontDescriptor aFont; + + lcl_transferPropertyValue( xStyle, xStylePSI, "CharFontName", aFont.Name ); + lcl_transferPropertyValue( xStyle, xStylePSI, "CharFontStyleName", aFont.StyleName ); + lcl_transferPropertyValue( xStyle, xStylePSI, "CharFontFamily", aFont.Family ); + lcl_transferPropertyValue( xStyle, xStylePSI, "CharFontCharSet", aFont.CharSet ); + lcl_transferPropertyValue( xStyle, xStylePSI, "CharFontPitch", aFont.Pitch ); + lcl_transferPropertyValue( xStyle, xStylePSI, "CharUnderline", aFont.Underline ); + lcl_transferPropertyValue( xStyle, xStylePSI, "CharWeight", aFont.Weight ); + lcl_transferPropertyValue( xStyle, xStylePSI, "CharPosture", aFont.Slant ); + lcl_transferPropertyValue( xStyle, xStylePSI, "CharStrikeout", aFont.Strikeout ); + lcl_transferPropertyValue( xStyle, xStylePSI, "CharWordMode", aFont.WordLineMode ); + lcl_transferPropertyValue( xStyle, xStylePSI, "CharFontType", aFont.Type ); + lcl_transferPropertyValue( xStyle, xStylePSI, "CharAutoKerning", aFont.Kerning ); + + short nCharScaleWidth = 100; + lcl_transferPropertyValue( xStyle, xStylePSI, "CharScaleWidth", nCharScaleWidth ); + if ( nCharScaleWidth ) + aFont.CharacterWidth = (float)nCharScaleWidth; + + float nCharHeight = 0; + lcl_transferPropertyValue( xStyle, xStylePSI, "CharHeight", nCharHeight ); + aFont.Height = (short)nCharHeight; + + _rxModel->setPropertyValue( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontDescriptor" ) ), + makeAny( aFont ) + ); + + _rxModel->setPropertyValue( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontEmphasisMark" ) ), + lcl_translateFontEmphasis( xStyle->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEmphasis" ) ) ) ) + ); + _rxModel->setPropertyValue( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontRelief" ) ), + xStyle->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharRelief" ) ) ) + ); + _rxModel->setPropertyValue( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextLineColor" ) ), + xStyle->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharUnderlineColor" ) ) ) + ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } } //-------------------------------------------------------------------- @@ -558,6 +646,10 @@ namespace svxform break; } + // let the control have the same font as the host document uses by default + // #b6875455# / 2009-09-23 / frank.schoenheit@sun.com + lcl_initializeControlFont( _rxControlModel ); + // initial default label for the control if ( xPSI->hasPropertyByName( FM_PROP_LABEL ) ) { -- cgit From b8078a18ca44ec9f437e0f48fb63d413c53648ae Mon Sep 17 00:00:00 2001 From: Frank Schönheit Date: Wed, 23 Sep 2009 12:13:14 +0000 Subject: make the 'use document font for form controls' dependent on some conditions ... --- svx/source/form/formcontrolfactory.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index 6ffa6775a34c..30be3e46e160 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -648,7 +648,12 @@ namespace svxform // let the control have the same font as the host document uses by default // #b6875455# / 2009-09-23 / frank.schoenheit@sun.com - lcl_initializeControlFont( _rxControlModel ); + if ( xPSI->hasPropertyByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ReferenceDevice" ) ) ) + && ControlLayouter::useDocumentReferenceDevice( _eDocType ) + ) + // the above is a somewhat weak heuristics for "when to use the document font", admittedly. + // However, /me thinks this can only be solved with real "Form Control Styles" in each application. + lcl_initializeControlFont( _rxControlModel ); // initial default label for the control if ( xPSI->hasPropertyByName( FM_PROP_LABEL ) ) -- cgit From 19e777390c8dabeafe2caeeac391f46c0a4578da Mon Sep 17 00:00:00 2001 From: Frank Schönheit Date: Wed, 23 Sep 2009 12:33:04 +0000 Subject: enable UseDocumentTextMetrics in all document types except spreadsheets - there it doesn't really work reliably, since Calc does not properly pass its own reference device to the drawing layer --- officecfg/registry/data/org/openoffice/Office/Common.xcu | 10 ++-------- officecfg/registry/schema/org/openoffice/Office/Common.xcs | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu index fade7dd29aeb..aa5af16a7eae 100644 --- a/officecfg/registry/data/org/openoffice/Office/Common.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu @@ -513,9 +513,6 @@ true - - true - @@ -524,13 +521,10 @@ true - - true - - + - true + false diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index b3f07f77f108..72a296f4eb1b 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -864,7 +864,7 @@ be disabled.<p> - false + true -- cgit -- cgit From e787f1d25468ea1f0de99907eb73ad5ae778573f Mon Sep 17 00:00:00 2001 From: Frank Schönheit Date: Fri, 25 Sep 2009 09:02:17 +0000 Subject: #b6875455# try another heuristics for the default control font --- svx/source/form/formcontrolfactory.cxx | 140 ++++++++++++++------------------- 1 file changed, 57 insertions(+), 83 deletions(-) diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index 30be3e46e160..170604b49dd8 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -55,13 +55,17 @@ #include #include #include +#include +#include /** === end UNO includes === **/ #include #include +#include #include #include #include +#include #include @@ -100,6 +104,7 @@ namespace svxform using ::com::sun::star::util::XNumberFormats; using ::com::sun::star::util::XNumberFormatTypes; using ::com::sun::star::awt::FontDescriptor; + using ::com::sun::star::lang::Locale; /** === end UNO using === **/ namespace FormComponentType = ::com::sun::star::form::FormComponentType; namespace ScrollBarOrientation = ::com::sun::star::awt::ScrollBarOrientation; @@ -110,6 +115,7 @@ namespace svxform namespace WritingMode2 = ::com::sun::star::text::WritingMode2; namespace FontEmphasis = ::com::sun::star::text::FontEmphasis; namespace FontEmphasisMark = ::com::sun::star::awt::FontEmphasisMark; + namespace ScriptType = ::com::sun::star::i18n::ScriptType; //==================================================================== //= FormControlFactory_Data @@ -478,44 +484,6 @@ namespace svxform } } - //.................................................................... - /// translates a css.text.FontEmphasis into a css.awt.FontEmphasisMark - Any lcl_translateFontEmphasis( const Any& _rTextFontEmphasis ) - { - sal_Int16 nTextFontEmphasis( FontEmphasis::NONE ); - OSL_VERIFY( _rTextFontEmphasis >>= nTextFontEmphasis ); - - sal_Int16 nFontEmphasisMark = FontEmphasisMark::NONE; - switch ( nTextFontEmphasis ) - { - case FontEmphasis::NONE : nFontEmphasisMark = FontEmphasisMark::NONE; break; - case FontEmphasis::DOT_ABOVE : nFontEmphasisMark = FontEmphasisMark::DOT | FontEmphasisMark::ABOVE; break; - case FontEmphasis::CIRCLE_ABOVE : nFontEmphasisMark = FontEmphasisMark::CIRCLE | FontEmphasisMark::ABOVE; break; - case FontEmphasis::DISK_ABOVE : nFontEmphasisMark = FontEmphasisMark::DISC | FontEmphasisMark::ABOVE; break; - case FontEmphasis::ACCENT_ABOVE : nFontEmphasisMark = FontEmphasisMark::ACCENT | FontEmphasisMark::ABOVE; break; - case FontEmphasis::DOT_BELOW : nFontEmphasisMark = FontEmphasisMark::DOT | FontEmphasisMark::BELOW; break; - case FontEmphasis::CIRCLE_BELOW : nFontEmphasisMark = FontEmphasisMark::CIRCLE | FontEmphasisMark::BELOW; break; - case FontEmphasis::DISK_BELOW : nFontEmphasisMark = FontEmphasisMark::DISC | FontEmphasisMark::BELOW; break; - case FontEmphasis::ACCENT_BELOW : nFontEmphasisMark = FontEmphasisMark::ACCENT | FontEmphasisMark::BELOW; break; - default: - OSL_ENSURE( false, "lcl_translateFontEmphasis: invalid text emphasis!" ); - break; - } - return makeAny( nFontEmphasisMark ); - } - - //.................................................................... - template< typename SIMPLE_TYPE > - void lcl_transferPropertyValue( const Reference< XPropertySet >& _rxSource, const Reference< XPropertySetInfo >& _rxCachedPSI, - const sal_Char* _pAsciiPropertyName, SIMPLE_TYPE& _out_rDest ) - { - const ::rtl::OUString sPropertyName( ::rtl::OUString::createFromAscii( _pAsciiPropertyName ) ); - if ( !_rxCachedPSI->hasPropertyByName( sPropertyName ) ) - return; - Any aValue = _rxSource->getPropertyValue( sPropertyName ); - OSL_VERIFY( aValue >>= _out_rDest ); - } - //.................................................................... static void lcl_initializeControlFont( const Reference< XPropertySet >& _rxModel ) { @@ -523,46 +491,57 @@ namespace svxform { Reference< XPropertySet > xStyle( lcl_getDefaultDocumentTextStyle_throw( _rxModel ), UNO_SET_THROW ); Reference< XPropertySetInfo > xStylePSI( xStyle->getPropertySetInfo(), UNO_SET_THROW ); - FontDescriptor aFont; - - lcl_transferPropertyValue( xStyle, xStylePSI, "CharFontName", aFont.Name ); - lcl_transferPropertyValue( xStyle, xStylePSI, "CharFontStyleName", aFont.StyleName ); - lcl_transferPropertyValue( xStyle, xStylePSI, "CharFontFamily", aFont.Family ); - lcl_transferPropertyValue( xStyle, xStylePSI, "CharFontCharSet", aFont.CharSet ); - lcl_transferPropertyValue( xStyle, xStylePSI, "CharFontPitch", aFont.Pitch ); - lcl_transferPropertyValue( xStyle, xStylePSI, "CharUnderline", aFont.Underline ); - lcl_transferPropertyValue( xStyle, xStylePSI, "CharWeight", aFont.Weight ); - lcl_transferPropertyValue( xStyle, xStylePSI, "CharPosture", aFont.Slant ); - lcl_transferPropertyValue( xStyle, xStylePSI, "CharStrikeout", aFont.Strikeout ); - lcl_transferPropertyValue( xStyle, xStylePSI, "CharWordMode", aFont.WordLineMode ); - lcl_transferPropertyValue( xStyle, xStylePSI, "CharFontType", aFont.Type ); - lcl_transferPropertyValue( xStyle, xStylePSI, "CharAutoKerning", aFont.Kerning ); - - short nCharScaleWidth = 100; - lcl_transferPropertyValue( xStyle, xStylePSI, "CharScaleWidth", nCharScaleWidth ); - if ( nCharScaleWidth ) - aFont.CharacterWidth = (float)nCharScaleWidth; - - float nCharHeight = 0; - lcl_transferPropertyValue( xStyle, xStylePSI, "CharHeight", nCharHeight ); - aFont.Height = (short)nCharHeight; - _rxModel->setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontDescriptor" ) ), - makeAny( aFont ) - ); + // determine the script type associated with the system locale + const LocaleDataWrapper& rSysLocaleData = SvtSysLocale().GetLocaleData(); + const sal_Int16 eSysLocaleScriptType = MsLangId::getScriptType( MsLangId::convertLocaleToLanguage( rSysLocaleData.getLocale() ) ); + // depending on this script type, use the right property from the document's style which controls the + // default locale for document content + const sal_Char* pCharLocalePropertyName = "CharLocale"; + switch ( eSysLocaleScriptType ) + { + case ScriptType::LATIN: + // already defaulted above + break; + case ScriptType::ASIAN: + pCharLocalePropertyName = "CharLocaleAsian"; + break; + case ScriptType::COMPLEX: + pCharLocalePropertyName = "CharLocaleComplex"; + break; + default: + OSL_ENSURE( false, "lcl_initializeControlFont: unexpected script type for system locale!" ); + break; + } + + ::rtl::OUString sCharLocalePropertyName = ::rtl::OUString::createFromAscii( pCharLocalePropertyName ); + Locale aDocumentCharLocale; + if ( xStylePSI->hasPropertyByName( sCharLocalePropertyName ) ) + { + OSL_VERIFY( xStyle->getPropertyValue( sCharLocalePropertyName ) >>= aDocumentCharLocale ); + } + // fall back to CharLocale property at the style + if ( !aDocumentCharLocale.Language.getLength() ) + { + sCharLocalePropertyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharLocale" ) ); + if ( xStylePSI->hasPropertyByName( sCharLocalePropertyName ) ) + { + OSL_VERIFY( xStyle->getPropertyValue( sCharLocalePropertyName ) >>= aDocumentCharLocale ); + } + } + // fall back to the system locale + if ( !aDocumentCharLocale.Language.getLength() ) + { + aDocumentCharLocale = rSysLocaleData.getLocale(); + } + + // retrieve a default font for this locale, and set it at the control + Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS, MsLangId::convertLocaleToLanguage( aDocumentCharLocale ), DEFAULTFONT_FLAGS_ONLYONE ); + FontDescriptor aFontDesc = VCLUnoHelper::CreateFontDescriptor( aFont ); _rxModel->setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontEmphasisMark" ) ), - lcl_translateFontEmphasis( xStyle->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharEmphasis" ) ) ) ) - ); - _rxModel->setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontRelief" ) ), - xStyle->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharRelief" ) ) ) - ); - _rxModel->setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextLineColor" ) ), - xStyle->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharUnderlineColor" ) ) ) + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontDescriptor" ) ), + makeAny( aFontDesc ) ); } catch( const Exception& ) @@ -646,14 +625,9 @@ namespace svxform break; } - // let the control have the same font as the host document uses by default - // #b6875455# / 2009-09-23 / frank.schoenheit@sun.com - if ( xPSI->hasPropertyByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ReferenceDevice" ) ) ) - && ControlLayouter::useDocumentReferenceDevice( _eDocType ) - ) - // the above is a somewhat weak heuristics for "when to use the document font", admittedly. - // However, /me thinks this can only be solved with real "Form Control Styles" in each application. - lcl_initializeControlFont( _rxControlModel ); + // some default font, to not rely on the implicit font, which differs across platforms and desktop + // themes + lcl_initializeControlFont( _rxControlModel ); // initial default label for the control if ( xPSI->hasPropertyByName( FM_PROP_LABEL ) ) -- cgit From 3ed9bf8421dcb5fe574b9985bf102798d7e7cf73 Mon Sep 17 00:00:00 2001 From: Frank Schönheit Date: Fri, 25 Sep 2009 10:07:49 +0000 Subject: moved the code for initializing a new control model\'s font from the FormControlFactory to the ControlLayouter --- svx/source/form/fmcontrollayout.cxx | 193 +++++++++++++++++++++++++++++++-- svx/source/form/formcontrolfactory.cxx | 162 +-------------------------- svx/source/inc/fmcontrollayout.hxx | 11 ++ 3 files changed, 194 insertions(+), 172 deletions(-) diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx index 8cf6ccd2a84d..74bb7f41ba40 100644 --- a/svx/source/form/fmcontrollayout.cxx +++ b/svx/source/form/fmcontrollayout.cxx @@ -30,17 +30,28 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" + #include "fmcontrollayout.hxx" -#ifndef _SVX_FMPROP_HRC #include "fmprop.hrc" -#endif /** === begin UNO includes === **/ #include #include +#include +#include +#include +#include +#include +#include /** === end UNO includes === **/ -#include + #include +#include +#include +#include +#include +#include +#include //........................................................................ namespace svxform @@ -48,14 +59,170 @@ namespace svxform //........................................................................ using namespace ::utl; - using namespace ::com::sun::star::uno; - using namespace ::com::sun::star::awt; - using namespace ::com::sun::star::beans; - using namespace ::com::sun::star::form; + /** === begin UNO using === **/ + using ::com::sun::star::uno::Reference; + using ::com::sun::star::uno::XInterface; + using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_QUERY_THROW; + using ::com::sun::star::uno::UNO_SET_THROW; + using ::com::sun::star::uno::Exception; + using ::com::sun::star::uno::RuntimeException; + using ::com::sun::star::uno::Any; + using ::com::sun::star::uno::makeAny; + using ::com::sun::star::uno::Sequence; + using ::com::sun::star::uno::Type; + using ::com::sun::star::beans::XPropertySet; + using ::com::sun::star::beans::XPropertySetInfo; + using ::com::sun::star::lang::Locale; + using ::com::sun::star::awt::FontDescriptor; + using ::com::sun::star::style::XStyleFamiliesSupplier; + using ::com::sun::star::lang::XServiceInfo; + using ::com::sun::star::container::XNameAccess; + using ::com::sun::star::container::XChild; + /** === end UNO using === **/ + namespace FormComponentType = ::com::sun::star::form::FormComponentType; + namespace VisualEffect = ::com::sun::star::awt::VisualEffect; + namespace ScriptType = ::com::sun::star::i18n::ScriptType; + + //-------------------------------------------------------------------- + namespace + { + //.................................................................... + template< class INTERFACE_TYPE > + Reference< INTERFACE_TYPE > getTypedModelNode( const Reference< XInterface >& _rxModelNode ) + { + Reference< INTERFACE_TYPE > xTypedNode( _rxModelNode, UNO_QUERY ); + if ( xTypedNode.is() ) + return xTypedNode; + else + { + Reference< XChild > xChild( _rxModelNode, UNO_QUERY ); + if ( xChild.is() ) + return getTypedModelNode< INTERFACE_TYPE >( xChild->getParent() ); + else + return NULL; + } + } + + //.................................................................... + static bool lcl_getDocumentDefaultStyleAndFamily( const Reference< XInterface >& _rxDocument, ::rtl::OUString& _rFamilyName, ::rtl::OUString& _rStyleName ) SAL_THROW(( Exception )) + { + bool bSuccess = true; + Reference< XServiceInfo > xDocumentSI( _rxDocument, UNO_QUERY ); + if ( xDocumentSI.is() ) + { + if ( xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) ) ) + || xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.WebDocument" ) ) ) + ) + { + _rFamilyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParagraphStyles" ) ); + _rStyleName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) ); + } + else if ( xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) ) ) ) + { + _rFamilyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CellStyles" ) ); + _rStyleName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Default" ) ); + } + else if ( xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) ) + || xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ) + ) + { + _rFamilyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "graphics" ) ); + _rStyleName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "standard" ) ); + } + else + bSuccess = false; + } + return bSuccess; + } + + //.................................................................... + static void lcl_initializeControlFont( const Reference< XPropertySet >& _rxModel ) + { + try + { + Reference< XPropertySet > xStyle( ControlLayouter::getDefaultDocumentTextStyle( _rxModel ), UNO_SET_THROW ); + Reference< XPropertySetInfo > xStylePSI( xStyle->getPropertySetInfo(), UNO_SET_THROW ); + + // determine the script type associated with the system locale + const LocaleDataWrapper& rSysLocaleData = SvtSysLocale().GetLocaleData(); + const sal_Int16 eSysLocaleScriptType = MsLangId::getScriptType( MsLangId::convertLocaleToLanguage( rSysLocaleData.getLocale() ) ); + + // depending on this script type, use the right property from the document's style which controls the + // default locale for document content + const sal_Char* pCharLocalePropertyName = "CharLocale"; + switch ( eSysLocaleScriptType ) + { + case ScriptType::LATIN: + // already defaulted above + break; + case ScriptType::ASIAN: + pCharLocalePropertyName = "CharLocaleAsian"; + break; + case ScriptType::COMPLEX: + pCharLocalePropertyName = "CharLocaleComplex"; + break; + default: + OSL_ENSURE( false, "lcl_initializeControlFont: unexpected script type for system locale!" ); + break; + } + + ::rtl::OUString sCharLocalePropertyName = ::rtl::OUString::createFromAscii( pCharLocalePropertyName ); + Locale aDocumentCharLocale; + if ( xStylePSI->hasPropertyByName( sCharLocalePropertyName ) ) + { + OSL_VERIFY( xStyle->getPropertyValue( sCharLocalePropertyName ) >>= aDocumentCharLocale ); + } + // fall back to CharLocale property at the style + if ( !aDocumentCharLocale.Language.getLength() ) + { + sCharLocalePropertyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharLocale" ) ); + if ( xStylePSI->hasPropertyByName( sCharLocalePropertyName ) ) + { + OSL_VERIFY( xStyle->getPropertyValue( sCharLocalePropertyName ) >>= aDocumentCharLocale ); + } + } + // fall back to the system locale + if ( !aDocumentCharLocale.Language.getLength() ) + { + aDocumentCharLocale = rSysLocaleData.getLocale(); + } + + // retrieve a default font for this locale, and set it at the control + Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS, MsLangId::convertLocaleToLanguage( aDocumentCharLocale ), DEFAULTFONT_FLAGS_ONLYONE ); + FontDescriptor aFontDesc = VCLUnoHelper::CreateFontDescriptor( aFont ); + _rxModel->setPropertyValue( + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontDescriptor" ) ), + makeAny( aFontDesc ) + ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + } + } //==================================================================== //= ControlLayouter //==================================================================== + //-------------------------------------------------------------------- + Reference< XPropertySet > ControlLayouter::getDefaultDocumentTextStyle( const Reference< XPropertySet >& _rxModel ) + { + // the style family collection + Reference< XStyleFamiliesSupplier > xSuppStyleFamilies( getTypedModelNode< XStyleFamiliesSupplier >( _rxModel.get() ), UNO_SET_THROW ); + Reference< XNameAccess > xStyleFamilies( xSuppStyleFamilies->getStyleFamilies(), UNO_SET_THROW ); + + // the names of the family, and the style - depends on the document type we live in + ::rtl::OUString sFamilyName, sStyleName; + if ( !lcl_getDocumentDefaultStyleAndFamily( xSuppStyleFamilies.get(), sFamilyName, sStyleName ) ) + throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unknown document type!" ) ), NULL ); + + // the concrete style + Reference< XNameAccess > xStyleFamily( xStyleFamilies->getByName( sFamilyName ), UNO_QUERY_THROW ); + return Reference< XPropertySet >( xStyleFamily->getByName( sStyleName ), UNO_QUERY_THROW ); + } + //-------------------------------------------------------------------- void ControlLayouter::initializeControlLayout( const Reference< XPropertySet >& _rxControlModel, DocumentType _eDocType ) { @@ -65,10 +232,7 @@ namespace svxform try { - Reference< XPropertySetInfo > xPSI( _rxControlModel->getPropertySetInfo() ); - if ( !xPSI.is() ) - // can't do anything - return; + Reference< XPropertySetInfo > xPSI( _rxControlModel->getPropertySetInfo(), UNO_SET_THROW ); // the control type sal_Int16 nClassId = FormComponentType::CONTROL; @@ -114,6 +278,13 @@ namespace svxform if ( xPSI->hasPropertyByName( FM_PROP_VISUALEFFECT ) ) _rxControlModel->setPropertyValue( FM_PROP_VISUALEFFECT, makeAny( nVisualEffect ) ); } + + // the font (only if we use the document's ref devices for rendering control text, otherwise, the + // default font of VCL controls is assumed to be fine) + if ( useDocumentReferenceDevice( _eDocType ) + && xPSI->hasPropertyByName( FM_PROP_FONT ) + ) + lcl_initializeControlFont( _rxControlModel ); } catch( const Exception& ) { diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index 170604b49dd8..c440ffd0608b 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -43,29 +43,21 @@ #include #include #include -#include -#include #include #include #include -#include #include #include #include #include -#include #include -#include -#include /** === end UNO includes === **/ #include #include -#include #include #include #include -#include #include @@ -94,9 +86,6 @@ namespace svxform using ::com::sun::star::beans::PropertyValue; using ::com::sun::star::container::XChild; using ::com::sun::star::form::XGridColumnFactory; - using ::com::sun::star::lang::XServiceInfo; - using ::com::sun::star::style::XStyleFamiliesSupplier; - using ::com::sun::star::container::XNameAccess; using ::com::sun::star::style::VerticalAlignment_MIDDLE; using ::com::sun::star::beans::Property; using ::com::sun::star::uno::TypeClass_DOUBLE; @@ -113,9 +102,6 @@ namespace svxform namespace DataType = ::com::sun::star::sdbc::DataType; namespace ColumnValue = ::com::sun::star::sdbc::ColumnValue; namespace WritingMode2 = ::com::sun::star::text::WritingMode2; - namespace FontEmphasis = ::com::sun::star::text::FontEmphasis; - namespace FontEmphasisMark = ::com::sun::star::awt::FontEmphasisMark; - namespace ScriptType = ::com::sun::star::i18n::ScriptType; //==================================================================== //= FormControlFactory_Data @@ -247,65 +233,6 @@ namespace svxform } return aInfo; } - /* - ATTENTION! - Broken for solaris? It seems that the old used template argument TYPE was already - defined as a macro ... which expand to ... "TYPE "!? - All platforms are OK - excepting Solaris. There the line "template< class TYPE >" - was expanded to "template < class TYPE " where the closing ">" was missing. - */ - #ifdef MYTYPE - #error "Who defines the macro MYTYPE, which is used as template argument here?" - #endif - - //.................................................................... - template< class MYTYPE > - Reference< MYTYPE > getTypedModelNode( const Reference< XInterface >& _rxModelNode ) - { - Reference< MYTYPE > xTypedNode( _rxModelNode, UNO_QUERY ); - if ( xTypedNode.is() ) - return xTypedNode; - else - { - Reference< XChild > xChild( _rxModelNode, UNO_QUERY ); - if ( xChild.is() ) - return getTypedModelNode< MYTYPE >( xChild->getParent() ); - else - return NULL; - } - } - - //.................................................................... - static bool lcl_getDocumentDefaultStyleAndFamily( const Reference< XInterface >& _rxDocument, ::rtl::OUString& _rFamilyName, ::rtl::OUString& _rStyleName ) SAL_THROW(( Exception )) - { - bool bSuccess = true; - Reference< XServiceInfo > xDocumentSI( _rxDocument, UNO_QUERY ); - if ( xDocumentSI.is() ) - { - if ( xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) ) ) - || xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.WebDocument" ) ) ) - ) - { - _rFamilyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParagraphStyles" ) ); - _rStyleName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) ); - } - else if ( xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) ) ) ) - { - _rFamilyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CellStyles" ) ); - _rStyleName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Default" ) ); - } - else if ( xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) ) - || xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ) - ) - { - _rFamilyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "graphics" ) ); - _rStyleName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "standard" ) ); - } - else - bSuccess = false; - } - return bSuccess; - } //.................................................................... static const sal_Char* aCharacterAndParagraphProperties[] = @@ -438,29 +365,12 @@ namespace svxform NULL }; - //.................................................................... - Reference< XPropertySet > lcl_getDefaultDocumentTextStyle_throw( const Reference< XPropertySet >& _rxModel ) - { - // the style family collection - Reference< XStyleFamiliesSupplier > xSuppStyleFamilies( getTypedModelNode< XStyleFamiliesSupplier >( _rxModel.get() ), UNO_SET_THROW ); - Reference< XNameAccess > xStyleFamilies( xSuppStyleFamilies->getStyleFamilies(), UNO_SET_THROW ); - - // the names of the family, and the style - depends on the document type we live in - ::rtl::OUString sFamilyName, sStyleName; - if ( !lcl_getDocumentDefaultStyleAndFamily( xSuppStyleFamilies.get(), sFamilyName, sStyleName ) ) - throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unknown document type!" ) ), NULL ); - - // the concrete style - Reference< XNameAccess > xStyleFamily( xStyleFamilies->getByName( sFamilyName ), UNO_QUERY_THROW ); - return Reference< XPropertySet >( xStyleFamily->getByName( sStyleName ), UNO_QUERY_THROW ); - } - //.................................................................... static void lcl_initializeCharacterAttributes( const Reference< XPropertySet >& _rxModel ) { try { - Reference< XPropertySet > xStyle( lcl_getDefaultDocumentTextStyle_throw( _rxModel ), UNO_SET_THROW ); + Reference< XPropertySet > xStyle( ControlLayouter::getDefaultDocumentTextStyle( _rxModel ), UNO_SET_THROW ); // transfer all properties which are described by the style Reference< XPropertySetInfo > xSourcePropInfo( xStyle->getPropertySetInfo(), UNO_SET_THROW ); @@ -483,72 +393,6 @@ namespace svxform DBG_UNHANDLED_EXCEPTION(); } } - - //.................................................................... - static void lcl_initializeControlFont( const Reference< XPropertySet >& _rxModel ) - { - try - { - Reference< XPropertySet > xStyle( lcl_getDefaultDocumentTextStyle_throw( _rxModel ), UNO_SET_THROW ); - Reference< XPropertySetInfo > xStylePSI( xStyle->getPropertySetInfo(), UNO_SET_THROW ); - - // determine the script type associated with the system locale - const LocaleDataWrapper& rSysLocaleData = SvtSysLocale().GetLocaleData(); - const sal_Int16 eSysLocaleScriptType = MsLangId::getScriptType( MsLangId::convertLocaleToLanguage( rSysLocaleData.getLocale() ) ); - - // depending on this script type, use the right property from the document's style which controls the - // default locale for document content - const sal_Char* pCharLocalePropertyName = "CharLocale"; - switch ( eSysLocaleScriptType ) - { - case ScriptType::LATIN: - // already defaulted above - break; - case ScriptType::ASIAN: - pCharLocalePropertyName = "CharLocaleAsian"; - break; - case ScriptType::COMPLEX: - pCharLocalePropertyName = "CharLocaleComplex"; - break; - default: - OSL_ENSURE( false, "lcl_initializeControlFont: unexpected script type for system locale!" ); - break; - } - - ::rtl::OUString sCharLocalePropertyName = ::rtl::OUString::createFromAscii( pCharLocalePropertyName ); - Locale aDocumentCharLocale; - if ( xStylePSI->hasPropertyByName( sCharLocalePropertyName ) ) - { - OSL_VERIFY( xStyle->getPropertyValue( sCharLocalePropertyName ) >>= aDocumentCharLocale ); - } - // fall back to CharLocale property at the style - if ( !aDocumentCharLocale.Language.getLength() ) - { - sCharLocalePropertyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharLocale" ) ); - if ( xStylePSI->hasPropertyByName( sCharLocalePropertyName ) ) - { - OSL_VERIFY( xStyle->getPropertyValue( sCharLocalePropertyName ) >>= aDocumentCharLocale ); - } - } - // fall back to the system locale - if ( !aDocumentCharLocale.Language.getLength() ) - { - aDocumentCharLocale = rSysLocaleData.getLocale(); - } - - // retrieve a default font for this locale, and set it at the control - Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS, MsLangId::convertLocaleToLanguage( aDocumentCharLocale ), DEFAULTFONT_FLAGS_ONLYONE ); - FontDescriptor aFontDesc = VCLUnoHelper::CreateFontDescriptor( aFont ); - _rxModel->setPropertyValue( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontDescriptor" ) ), - makeAny( aFontDesc ) - ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - } } //-------------------------------------------------------------------- @@ -625,10 +469,6 @@ namespace svxform break; } - // some default font, to not rely on the implicit font, which differs across platforms and desktop - // themes - lcl_initializeControlFont( _rxControlModel ); - // initial default label for the control if ( xPSI->hasPropertyByName( FM_PROP_LABEL ) ) { diff --git a/svx/source/inc/fmcontrollayout.hxx b/svx/source/inc/fmcontrollayout.hxx index c370e8547f0e..c5abe43f3228 100644 --- a/svx/source/inc/fmcontrollayout.hxx +++ b/svx/source/inc/fmcontrollayout.hxx @@ -67,6 +67,17 @@ namespace svxform */ static bool useDocumentReferenceDevice( DocumentType _eDocType ); + /** gets the "default" style in a document which can be used if some default text format is needed + + It depends on the type document type which concrete kind of style is returned, but it is expected to support + the css.style.CharacterProperties service. + + @param _rxModel + a form component. + */ + static ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > + getDefaultDocumentTextStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel ); + private: ControlLayouter(); // never implemented -- cgit From f523884a3b6f29784ae88c6b86bc1e1d8217d04f Mon Sep 17 00:00:00 2001 From: Frank Schönheit Date: Fri, 25 Sep 2009 10:47:45 +0000 Subject: don't use document's reference device for form documents --- officecfg/registry/data/org/openoffice/Office/Common.xcu | 3 +++ 1 file changed, 3 insertions(+) diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu index aa5af16a7eae..a638a78d069d 100644 --- a/officecfg/registry/data/org/openoffice/Office/Common.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu @@ -521,6 +521,9 @@ true + + false + -- cgit From f2eeb84bfca2f47336dd05164c76d35638d8f9d4 Mon Sep 17 00:00:00 2001 From: Frank Schönheit Date: Fri, 25 Sep 2009 10:50:32 +0000 Subject: merging changes from m60 herein --- configmgr/source/tree/localizedtreeactions.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configmgr/source/tree/localizedtreeactions.cxx b/configmgr/source/tree/localizedtreeactions.cxx index 8cd40c4da79f..b2ed23a730b3 100644 --- a/configmgr/source/tree/localizedtreeactions.cxx +++ b/configmgr/source/tree/localizedtreeactions.cxx @@ -178,8 +178,11 @@ namespace // -- ----------------------------- OSL_ENSURE( aValueType != uno::Type(), "VOID result type found"); - OSL_ENSURE( aValueType == parseTemplateName(_aSubtree.getElementTemplateName()), +#if OSL_DEBUG_LEVEL > 0 + uno::Type aTemplateType = parseTemplateName( _aSubtree.getElementTemplateName() ); + OSL_ENSURE( ( aValueType == aTemplateType ) || ( aTemplateType.getTypeClass() == uno::TypeClass_ANY ), "ERROR: Found Value Type doesn't match encoded value type in pseudo template name"); +#endif OSL_POSTCOND( static_cast(*pResult).getValueType() == aValueType, "ERROR: Resulting Value Type doesn't match original value type" ); -- cgit From b5fb85c6253501f340a669ff02f64553a6e09ae7 Mon Sep 17 00:00:00 2001 From: Frank Schönheit Date: Fri, 25 Sep 2009 11:43:51 +0000 Subject: do not assert when we do not have an ObjectShell, this is valid in clipboard scenarios --- svx/source/form/fmcontrollayout.cxx | 2 ++ svx/source/form/fmmodel.cxx | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx index 74bb7f41ba40..9748426c0b26 100644 --- a/svx/source/form/fmcontrollayout.cxx +++ b/svx/source/form/fmcontrollayout.cxx @@ -315,6 +315,8 @@ namespace svxform //-------------------------------------------------------------------- bool ControlLayouter::useDocumentReferenceDevice( DocumentType _eDocType ) { + if ( _eDocType == eUnknownDocumentType ) + return false; OConfigurationNode aConfig = getLayoutSettings( _eDocType ); Any aUseRefDevice = aConfig.getNodeValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UseDocumentTextMetrics" ) ) ); bool bUseRefDevice = false; diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx index 15932d4d93cc..a09d0f78173a 100644 --- a/svx/source/form/fmmodel.cxx +++ b/svx/source/form/fmmodel.cxx @@ -318,7 +318,6 @@ sal_Bool FmFormModel::ControlsUseRefDevice() const { if ( !m_pImpl->aControlsUseRefDevice ) { - OSL_PRECOND( m_pObjShell, "FmFormModel::ControlsUseRefDevice: no object shell -> no document -> no document type -> no way!" ); DocumentType eDocType = eUnknownDocumentType; if ( m_pObjShell ) eDocType = DocumentClassification::classifyHostDocument( m_pObjShell->GetModel() ); -- cgit From fcac7b7672113ec68f90ab4443bc8a920a59ab34 Mon Sep 17 00:00:00 2001 From: Frank Schönheit Date: Wed, 7 Oct 2009 06:16:52 +0000 Subject: #i10000# --- svx/source/form/formcontrolfactory.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index 5fa145f61e59..da3c2634b63c 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -95,6 +95,8 @@ namespace svxform using ::com::sun::star::util::XNumberFormatTypes; using ::com::sun::star::awt::FontDescriptor; using ::com::sun::star::lang::Locale; + using ::com::sun::star::lang::XServiceInfo; + using ::com::sun::star::container::XNameAccess; /** === end UNO using === **/ namespace FormComponentType = ::com::sun::star::form::FormComponentType; namespace ScrollBarOrientation = ::com::sun::star::awt::ScrollBarOrientation; -- cgit From 8be417c210fdb1597079fe8eb8232c8c15c6531a Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 9 Oct 2009 11:16:17 +0200 Subject: #i105649#: SfxDocumentInfoItem::UpdateDocumentInfo(): do not remove non-removeable properties --- sfx2/source/dialog/dinfdlg.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 484e953f1cf4..e0a57c2e5e9e 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -269,8 +269,12 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const String& rFile, for ( sal_Int32 i = 0; i < nCount; ++i ) { // "fix" property? => not a custom property => ignore it! - if ( !(pProps[i].Attributes & ::com::sun::star::beans::PropertyAttribute::REMOVABLE) ) + if (!(pProps[i].Attributes & + ::com::sun::star::beans::PropertyAttribute::REMOVABLE)) + { + DBG_ASSERT(false, "non-removable user-defined property?"); continue; + } uno::Any aValue = xSet->getPropertyValue(pProps[i].Name); CustomProperty* pProp = new CustomProperty( pProps[i].Name, aValue ); @@ -424,7 +428,13 @@ void SfxDocumentInfoItem::UpdateDocumentInfo( const beans::Property* pProps = lProps.getConstArray(); sal_Int32 nCount = lProps.getLength(); for ( sal_Int32 j = 0; j < nCount; ++j ) - xContainer->removeProperty( pProps[j].Name ); + { + if ((pProps[j].Attributes & + ::com::sun::star::beans::PropertyAttribute::REMOVABLE)) + { + xContainer->removeProperty( pProps[j].Name ); + } + } for ( sal_uInt32 k = 0; k < m_aCustomProperties.size(); ++k ) { -- cgit From ae6f81cd682da97b159a1dbef44e9dcee6c4f38c Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 12 Oct 2009 19:16:31 +0200 Subject: #i105826#: SfxDocumentMetaData.cxx: fix re-initialization of user-defined props --- sfx2/source/doc/SfxDocumentMetaData.cxx | 66 ++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 1423e712242e..ef36831ab681 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -79,6 +79,7 @@ #include "comphelper/storagehelper.hxx" #include "comphelper/mediadescriptor.hxx" #include "comphelper/sequenceasvector.hxx" +#include "comphelper/stlunosequence.hxx" #include "sot/storage.hxx" #include "sfx2/docfile.hxx" #include "sax/tools/converter.hxx" @@ -322,7 +323,7 @@ private: /// standard meta data (multiple occurrences) std::map< ::rtl::OUString, std::vector > > m_metaList; - /// user-defined meta data (meta:user-defined) + /// user-defined meta data (meta:user-defined) @ATTENTION may be null! css::uno::Reference m_xUserDefined; // now for some meta-data attributes; these are not updated directly in the // DOM because updates (detecting "empty" elements) would be quite messy @@ -998,9 +999,12 @@ SfxDocumentMetaData::updateElement(const char *i_name, void SAL_CALL SfxDocumentMetaData::updateUserDefinedAndAttributes() { createUserDefined(); - css::uno::Reference xPSet(m_xUserDefined,css::uno::UNO_QUERY_THROW); - std::pair, AttrVector> udStringsAttrs = propsToStrings(xPSet); - (void) setMetaList("meta:user-defined", udStringsAttrs.first,&udStringsAttrs.second); + const css::uno::Reference xPSet(m_xUserDefined, + css::uno::UNO_QUERY_THROW); + const std::pair, AttrVector> + udStringsAttrs( propsToStrings(xPSet) ); + (void) setMetaList("meta:user-defined", udStringsAttrs.first, + &udStringsAttrs.second); // update elements with attributes std::vector > attributes; @@ -1217,15 +1221,13 @@ void SAL_CALL SfxDocumentMetaData::init( std::vector > & vec = m_metaList[::rtl::OUString::createFromAscii("meta:user-defined")]; - // user-defined meta data: create PropertyBag which only accepts property - // values of allowed types + m_xUserDefined.clear(); // #i105826#: reset (may be re-initialization) if ( !vec.empty() ) { createUserDefined(); } // user-defined meta data: initialize PropertySet from DOM nodes - for (std::vector >::iterator it = vec.begin(); it != vec.end(); ++it) { css::uno::Reference xElem(*it, @@ -1301,10 +1303,14 @@ void SAL_CALL SfxDocumentMetaData::init( //////////////////////////////////////////////////////////////////////////// SfxDocumentMetaData::SfxDocumentMetaData( - css::uno::Reference< css::uno::XComponentContext > const & context) : - BaseMutex(), SfxDocumentMetaData_Base(m_aMutex), - m_xContext(context), m_NotifyListeners(m_aMutex), - m_isInitialized(false), m_isModified(false) + css::uno::Reference< css::uno::XComponentContext > const & context) + : BaseMutex() + , SfxDocumentMetaData_Base(m_aMutex) + , m_xContext(context) + , m_NotifyListeners(m_aMutex) + , m_isInitialized(false) + , m_isModified(false) + , m_AutoloadSecs(0) { DBG_ASSERT(context.is(), "SfxDocumentMetaData: context is null"); DBG_ASSERT(context->getServiceManager().is(), @@ -2168,7 +2174,7 @@ void SAL_CALL SfxDocumentMetaData::setModified( ::sal_Bool bModified ) ::osl::MutexGuard g(m_aMutex); checkInit(); m_isModified = bModified; - if ( !bModified ) + if ( !bModified && m_xUserDefined.is() ) { xMB.set(m_xUserDefined, css::uno::UNO_QUERY); DBG_ASSERT(xMB.is(), @@ -2241,6 +2247,8 @@ void SAL_CALL SfxDocumentMetaData::serialize( void SfxDocumentMetaData::createUserDefined() { + // user-defined meta data: create PropertyBag which only accepts property + // values of allowed types if ( !m_xUserDefined.is() ) { css::uno::Sequence types(10); @@ -2258,29 +2266,37 @@ void SfxDocumentMetaData::createUserDefined() args[0] <<= css::beans::NamedValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllowedTypes")), css::uno::makeAny(types)); - // #i94175#: ODF 1.1 allows empty user-defined property names! - args[1] <<= css::beans::NamedValue( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllowEmptyPropertyName")), + // #i94175#: ODF allows empty user-defined property names! + args[1] <<= css::beans::NamedValue( ::rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("AllowEmptyPropertyName")), css::uno::makeAny(sal_True)); - css::uno::Reference xMsf (m_xContext->getServiceManager()); + const css::uno::Reference xMsf( + m_xContext->getServiceManager()); m_xUserDefined.set( - xMsf->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.PropertyBag")), m_xContext), + xMsf->createInstanceWithContext( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.beans.PropertyBag")), m_xContext), css::uno::UNO_QUERY_THROW); - css::uno::Reference xInit(m_xUserDefined, - css::uno::UNO_QUERY); + const css::uno::Reference xInit( + m_xUserDefined, css::uno::UNO_QUERY); if (xInit.is()) { xInit->initialize(args); } - css::uno::Reference xMB(m_xUserDefined,css::uno::UNO_QUERY); + const css::uno::Reference xMB( + m_xUserDefined, css::uno::UNO_QUERY); if (xMB.is()) { - css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > aListener = m_NotifyListeners.getElements(); - const css::uno::Reference< css::uno::XInterface >* pIter = aListener.getConstArray(); - const css::uno::Reference< css::uno::XInterface >* pEnd = pIter + aListener.getLength(); - for(;pIter != pEnd;++pIter ) - xMB->addModifyListener(css::uno::Reference< css::util::XModifyListener >(*pIter,css::uno::UNO_QUERY)); + const css::uno::Sequence > + listeners(m_NotifyListeners.getElements()); + for (css::uno::Reference< css::uno::XInterface > const * iter = + ::comphelper::stl_begin(listeners); + iter != ::comphelper::stl_end(listeners); ++iter) { + xMB->addModifyListener( + css::uno::Reference< css::util::XModifyListener >(*iter, + css::uno::UNO_QUERY)); + } } } } -- cgit From 62ca52de9fdef795974d38073a36d64ed75f0991 Mon Sep 17 00:00:00 2001 From: Philipp Lohmann Date: Tue, 13 Oct 2009 17:06:46 +0000 Subject: #i105753# fix quickstart mode on Mac --- desktop/source/app/app.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index d4e0a91c1d17..efc689b54ff8 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1738,8 +1738,15 @@ sal_Bool Desktop::InitializeQuickstartMode( Reference< XMultiServiceFactory >& r aSeq[0] <<= bQuickstart; // Try to instanciate quickstart service. This service is not mandatory, so - // do nothing if service is not available. + // do nothing if service is not available + + // #i105753# the following if was invented for performance + // unfortunately this broke the QUARTZ behavior which is to always run + // in quickstart mode since Mac applications do not usually quit + // when the last document closes + #ifndef QUARTZ if ( bQuickstart ) + #endif { Reference < XComponent > xQuickstart( rSMgr->createInstanceWithArguments( DEFINE_CONST_UNICODE( "com.sun.star.office.Quickstart" ), aSeq ), -- cgit From 804477d542dbd713a74e9f70997620c403321f2f Mon Sep 17 00:00:00 2001 From: hdu Date: Thu, 15 Oct 2009 09:48:47 +0200 Subject: #i105815# define default fonts for sinhala-script --- officecfg/registry/data/org/openoffice/VCL.xcu | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu index 9d145fbcc831..cc5bd13ae7d1 100644 --- a/officecfg/registry/data/org/openoffice/VCL.xcu +++ b/officecfg/registry/data/org/openoffice/VCL.xcu @@ -1022,6 +1022,26 @@ + + + LKLUG;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + -- cgit From 8023c47ecd9ad61c677978351ff1ef08f3796ae5 Mon Sep 17 00:00:00 2001 From: hdu Date: Thu, 15 Oct 2009 09:50:10 +0200 Subject: #i105815# define default fonts for some indic scripts (thanks dtardon!) --- officecfg/registry/data/org/openoffice/VCL.xcu | 140 +++++++++++++++++++++++++ 1 file changed, 140 insertions(+) diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu index cc5bd13ae7d1..48f6fdf8d187 100644 --- a/officecfg/registry/data/org/openoffice/VCL.xcu +++ b/officecfg/registry/data/org/openoffice/VCL.xcu @@ -825,6 +825,46 @@ Lohit Nepali;Kalimati;Samanata;Sans + + + Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + + + Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif @@ -865,6 +905,86 @@ Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + + + Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + + + Meera;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + + + Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + utkal;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif @@ -925,6 +1045,26 @@ Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + -- cgit From 9168edda9d8de34b2fe84aa77d51520ef6f5f811 Mon Sep 17 00:00:00 2001 From: hdu Date: Thu, 15 Oct 2009 09:56:01 +0200 Subject: #i105914# define default fonts for some indic scripts (thanks dtardon!) --- officecfg/registry/data/org/openoffice/VCL.xcu | 140 ------------------------- 1 file changed, 140 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu index 48f6fdf8d187..cc5bd13ae7d1 100644 --- a/officecfg/registry/data/org/openoffice/VCL.xcu +++ b/officecfg/registry/data/org/openoffice/VCL.xcu @@ -825,46 +825,6 @@ Lohit Nepali;Kalimati;Samanata;Sans - - - Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif - - - Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - - - Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif - - - Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif @@ -905,86 +865,6 @@ Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif - - - Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - - - Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif - - - Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - - - Meera;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif - - - Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - - - Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif - - - Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - utkal;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif @@ -1045,26 +925,6 @@ Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif - - - Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - - Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - - -- cgit From 1d2669b5859875b91dfbe916855adeef2552bf95 Mon Sep 17 00:00:00 2001 From: hdu Date: Thu, 15 Oct 2009 09:56:33 +0200 Subject: #i105914# define default fonts for some indic scripts (thanks dtardon!) --- officecfg/registry/data/org/openoffice/VCL.xcu | 140 +++++++++++++++++++++++++ 1 file changed, 140 insertions(+) diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu index cc5bd13ae7d1..48f6fdf8d187 100644 --- a/officecfg/registry/data/org/openoffice/VCL.xcu +++ b/officecfg/registry/data/org/openoffice/VCL.xcu @@ -825,6 +825,46 @@ Lohit Nepali;Kalimati;Samanata;Sans + + + Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + + + Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif @@ -865,6 +905,86 @@ Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + + + Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + + + Meera;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + + + Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + utkal;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif @@ -925,6 +1045,26 @@ Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + + + Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + -- cgit From 548995fefe670c546f314750560989f4253226bb Mon Sep 17 00:00:00 2001 From: hdu Date: Thu, 15 Oct 2009 11:45:27 +0200 Subject: #i105914# #i105815# extend indic default fonts with WIN fonts --- officecfg/registry/data/org/openoffice/VCL.xcu | 103 ++++++++++++------------- 1 file changed, 50 insertions(+), 53 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu index 48f6fdf8d187..3ce6c64d0907 100644 --- a/officecfg/registry/data/org/openoffice/VCL.xcu +++ b/officecfg/registry/data/org/openoffice/VCL.xcu @@ -7,9 +7,6 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: VCL.xcu,v $ - * $Revision: 1.62.116.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -827,7 +824,7 @@ - Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS @@ -847,82 +844,82 @@ - Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU - Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Bengali;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU - Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU - Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU - Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Kannada;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS @@ -947,7 +944,7 @@ - Meera;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + Meera;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS @@ -967,7 +964,7 @@ - Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS @@ -987,22 +984,22 @@ - utkal;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + utkal;Kalinga;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU - utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + utkal;Kalinga;Lucidasans;Lucida Sans;Arial Unicode MS - utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + utkal;Kalinga;Lucidasans;Lucida Sans;Arial Unicode MS - utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + utkal;Kalinga;Lucidasans;Lucida Sans;Arial Unicode MS - utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + utkal;Kalinga;Lucidasans;Lucida Sans;Arial Unicode MS - utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + utkal;Kalinga;Lucidasans;Lucida Sans;Arial Unicode MS @@ -1027,42 +1024,42 @@ - Lohit Tamil;Tahoma;Sans Serif + Lohit Tamil;Latha;Sans Serif - Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU - Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS - Lohit Telugu;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS @@ -1167,19 +1164,19 @@ LKLUG;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif - LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS - LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS -- cgit From 7b2ea69d78dda0f2c7af5f892efd5b7561b8faa8 Mon Sep 17 00:00:00 2001 From: hdu Date: Thu, 15 Oct 2009 11:52:24 +0200 Subject: #i105815# extend sinhala default fonts with WIN fonts --- officecfg/registry/data/org/openoffice/VCL.xcu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu index 3ce6c64d0907..c2c6926382c1 100644 --- a/officecfg/registry/data/org/openoffice/VCL.xcu +++ b/officecfg/registry/data/org/openoffice/VCL.xcu @@ -1161,7 +1161,7 @@ - LKLUG;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + LKLUG;Iskoola Pota;Lucidasans;Lucida Sans;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS -- cgit From 4d00cd23c9ba13a9a6d3901178a066fa6940e7d2 Mon Sep 17 00:00:00 2001 From: hdu Date: Thu, 15 Oct 2009 13:17:23 +0200 Subject: #i105914# add default fonts for Urdu --- officecfg/registry/data/org/openoffice/VCL.xcu | 34 ++++++++++++++++++++------ 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu index c2c6926382c1..b30a43202300 100644 --- a/officecfg/registry/data/org/openoffice/VCL.xcu +++ b/officecfg/registry/data/org/openoffice/VCL.xcu @@ -924,7 +924,7 @@ - Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif + Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS @@ -984,22 +984,22 @@ - utkal;Kalinga;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU + utkal;Kalinga;Lohit Oriya;Samyak Oriya;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU - utkal;Kalinga;Lucidasans;Lucida Sans;Arial Unicode MS + utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS - utkal;Kalinga;Lucidasans;Lucida Sans;Arial Unicode MS + utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS - utkal;Kalinga;Lucidasans;Lucida Sans;Arial Unicode MS + utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS - utkal;Kalinga;Lucidasans;Lucida Sans;Arial Unicode MS + utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS - utkal;Kalinga;Lucidasans;Lucida Sans;Arial Unicode MS + utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS @@ -1062,6 +1062,26 @@ Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS + + + PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU + + + PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + + PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS + + -- cgit From 2eb7dd0deb70e9f120a2a38b56b9a38891c3ae83 Mon Sep 17 00:00:00 2001 From: Philipp Lohmann Date: Thu, 15 Oct 2009 13:52:22 +0200 Subject: #i105377# redirect output into correct metafile --- .../processor2d/vclmetafileprocessor2d.hxx | 2 +- .../source/processor2d/vclmetafileprocessor2d.cxx | 44 ++++++++++++---------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx index f0d0ff881bc5..38e7e5143b8a 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx @@ -97,7 +97,7 @@ namespace drawinglayer basegfx::B2DPolyPolygon maClipPolyPolygon; // the target MetaFile - GDIMetaFile& mrMetaFile; + GDIMetaFile* mpMetaFile; // do not allow embedding SvtGraphicFills into each other, // use a counter to prevent that diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index 1c040545eedd..d1190c2d9179 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -113,6 +113,7 @@ namespace drawinglayer { // Prepare VDev, MetaFile and connections OutputDevice* pLastOutputDevice = mpOutputDevice; + GDIMetaFile* pLastMetafile = mpMetaFile; basegfx::B2DRange aPrimitiveRange(primitive2d::getB2DRangeFromPrimitive2DSequence(rContent, getViewInformation2D())); // transform primitive range with current transformation (e.g shadow offset) @@ -125,6 +126,7 @@ namespace drawinglayer MapMode aNewMapMode(pLastOutputDevice->GetMapMode()); mpOutputDevice = &aContentVDev; + mpMetaFile = &o_rContentMetafile; aContentVDev.EnableOutput(false); aContentVDev.SetMapMode(pLastOutputDevice->GetMapMode()); o_rContentMetafile.Record(&aContentVDev); @@ -145,6 +147,7 @@ namespace drawinglayer o_rContentMetafile.SetPrefMapMode(aNewMapMode); o_rContentMetafile.SetPrefSize(aPrimitiveRectangle.GetSize()); mpOutputDevice = pLastOutputDevice; + mpMetaFile = pLastMetafile; return aPrimitiveRectangle; } @@ -219,7 +222,7 @@ namespace drawinglayer SvMemoryStream aMemStm; aMemStm << *pSvtGraphicFill; - mrMetaFile.AddAction(new MetaCommentAction("XPATHFILL_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); + mpMetaFile->AddAction(new MetaCommentAction("XPATHFILL_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); mnSvtGraphicFillCount++; } } @@ -229,7 +232,7 @@ namespace drawinglayer if(pSvtGraphicFill && mnSvtGraphicFillCount) { mnSvtGraphicFillCount--; - mrMetaFile.AddAction(new MetaCommentAction("XPATHFILL_SEQ_END")); + mpMetaFile->AddAction(new MetaCommentAction("XPATHFILL_SEQ_END")); delete pSvtGraphicFill; } } @@ -372,7 +375,7 @@ namespace drawinglayer SvMemoryStream aMemStm; aMemStm << *pSvtGraphicStroke; - mrMetaFile.AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); + mpMetaFile->AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END))); mnSvtGraphicStrokeCount++; } } @@ -382,7 +385,7 @@ namespace drawinglayer if(pSvtGraphicStroke && mnSvtGraphicStrokeCount) { mnSvtGraphicStrokeCount--; - mrMetaFile.AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_END")); + mpMetaFile->AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_END")); delete pSvtGraphicStroke; } } @@ -392,7 +395,7 @@ namespace drawinglayer VclMetafileProcessor2D::VclMetafileProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev) : VclProcessor2D(rViewInformation, rOutDev), - mrMetaFile(*rOutDev.GetConnectMetaFile()), + mpMetaFile(rOutDev.GetConnectMetaFile()), mnSvtGraphicFillCount(0), mnSvtGraphicStrokeCount(0), mfCurrentUnifiedTransparence(0.0), @@ -816,19 +819,19 @@ namespace drawinglayer { default : // case drawinglayer::primitive2d::FIELD_TYPE_COMMON : { - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringCommon)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon)); break; } case drawinglayer::primitive2d::FIELD_TYPE_PAGE : { - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringPage)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringPage)); break; } case drawinglayer::primitive2d::FIELD_TYPE_URL : { const rtl::OUString& rURL = rFieldPrimitive.getString(); const String aOldString(rURL); - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const BYTE* >(aOldString.GetBuffer()), 2 * aOldString.Len())); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const BYTE* >(aOldString.GetBuffer()), 2 * aOldString.Len())); break; } } @@ -838,7 +841,7 @@ namespace drawinglayer process(rContent); // for the end comment the type is not relevant yet, they are all the same. Just add. - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringEnd)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringEnd)); if(mpPDFExtOutDevData && drawinglayer::primitive2d::FIELD_TYPE_URL == rFieldPrimitive.getType()) { @@ -863,7 +866,7 @@ namespace drawinglayer // process recursively and add MetaFile comment process(rLinePrimitive.get2DDecomposition(getViewInformation2D())); - mrMetaFile.AddAction(new MetaCommentAction(aCommentString)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentString)); break; } @@ -876,7 +879,7 @@ namespace drawinglayer // process recursively and add MetaFile comment process(rBulletPrimitive.get2DDecomposition(getViewInformation2D())); - mrMetaFile.AddAction(new MetaCommentAction(aCommentString)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentString)); break; } @@ -893,7 +896,7 @@ namespace drawinglayer // process recursively and add MetaFile comment process(rParagraphPrimitive.get2DDecomposition(getViewInformation2D())); - mrMetaFile.AddAction(new MetaCommentAction(aCommentString)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentString)); if(mpPDFExtOutDevData) { @@ -910,9 +913,9 @@ namespace drawinglayer static const ByteString aCommentStringB("XTEXT_PAINTSHAPE_END"); // add MetaFile comment, process recursively and add MetaFile comment - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringA)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringA)); process(rBlockPrimitive.get2DDecomposition(getViewInformation2D())); - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringB)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringB)); break; } @@ -965,17 +968,17 @@ namespace drawinglayer // create the entries for the respective break positions if(i == nNextCellBreak) { - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringA, i - nTextPosition)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringA, i - nTextPosition)); nNextCellBreak = mxBreakIterator->nextCharacters(rTxt, i, rLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, 1, nDone); } if(i == nNextWordBoundary.endPos) { - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringB, i - nTextPosition)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringB, i - nTextPosition)); nNextWordBoundary = mxBreakIterator->getWordBoundary(rTxt, i + 1, rLocale, ::com::sun::star::i18n::WordType::ANY_WORD, sal_True); } if(i == nNextSentenceBreak) { - mrMetaFile.AddAction(new MetaCommentAction(aCommentStringC, i - nTextPosition)); + mpMetaFile->AddAction(new MetaCommentAction(aCommentStringC, i - nTextPosition)); nNextSentenceBreak = mxBreakIterator->endOfSentence(rTxt, i + 1, rLocale); } } @@ -1057,7 +1060,7 @@ namespace drawinglayer { const Polygon aToolsPolygon(aCandidate); - mrMetaFile.AddAction(new MetaPolyLineAction(aToolsPolygon, aLineInfo)); + mpMetaFile->AddAction(new MetaPolyLineAction(aToolsPolygon, aLineInfo)); } } @@ -1500,7 +1503,10 @@ namespace drawinglayer // svae old mfCurrentUnifiedTransparence and set new one // so that contained SvtGraphicStroke may use the current one const double fLastCurrentUnifiedTransparence(mfCurrentUnifiedTransparence); - mfCurrentUnifiedTransparence = rUniAlphaCandidate.getAlpha(); + // #i105377# paint the content metafile opaque as the transparency gets + // split of into the gradient below + // mfCurrentUnifiedTransparence = rUniAlphaCandidate.getAlpha(); + mfCurrentUnifiedTransparence = 0; // various content, create content-metafile GDIMetaFile aContentMetafile; -- cgit -- cgit From 630c13b2536453d67fe5b9b253ed9f80987aec2d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 20 Oct 2009 08:55:11 +0000 Subject: CWS-TOOLING: rebase CWS cmcfixes64 to trunk@277035 (milestone: DEV300:m62) --- connectivity/inc/connectivity/DriversConfig.hxx | 179 +-- connectivity/inc/connectivity/dbmetadata.hxx | 6 + connectivity/source/commontools/DriversConfig.cxx | 60 +- connectivity/source/commontools/dbmetadata.cxx | 16 + connectivity/source/drivers/jdbc/jdbc.xcu | 2 +- formula/prj/CVS/Entries | 4 - formula/prj/CVS/Repository | 1 - formula/prj/CVS/Root | 1 - formula/prj/CVS/Tag | 1 - formula/prj/CVS/Template | 42 - .../moduleuiconfigurationmanager.hxx | 92 +- .../inc/uiconfiguration/uiconfigurationmanager.hxx | 81 +- framework/source/jobs/job.cxx | 2 - framework/source/uiconfiguration/makefile.mk | 1 - .../moduleuiconfigurationmanager.cxx | 1428 +++++++++++++++++++- .../uiconfiguration/uiconfigurationmanager.cxx | 1157 +++++++++++++++- .../uiconfiguration/uiconfigurationmanagerimpl.cxx | 8 +- framework/util/makefile.mk | 1 - oovbaapi/ooo/vba/constants/makefile.mk | 2 +- oovbaapi/ooo/vba/makefile.mk | 3 +- sfx2/source/view/viewimp.hxx | 10 +- sfx2/source/view/viewsh.cxx | 53 +- svx/inc/svx/msdffimp.hxx | 1 + .../sdr/contact/viewobjectcontactofunocontrol.hxx | 48 +- .../svx/sdr/primitive2d/sdrdecompositiontools.hxx | 3 +- svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx | 5 +- svx/source/fmcomp/gridctrl.cxx | 15 +- svx/source/form/fmtextcontrolshell.cxx | 2 +- svx/source/msfilter/msdffimp.cxx | 70 +- svx/source/outliner/outliner.cxx | 27 +- svx/source/outliner/outlvw.cxx | 8 + svx/source/sdr/contact/viewcontactofgraphic.cxx | 1 + svx/source/sdr/contact/viewcontactofunocontrol.cxx | 40 +- .../sdr/contact/viewobjectcontactofunocontrol.cxx | 161 ++- .../sdr/primitive2d/sdrcaptionprimitive2d.cxx | 1 + .../sdr/primitive2d/sdrconnectorprimitive2d.cxx | 2 +- .../sdr/primitive2d/sdrcustomshapeprimitive2d.cxx | 5 +- .../sdr/primitive2d/sdrdecompositiontools.cxx | 6 +- .../sdr/primitive2d/sdrellipseprimitive2d.cxx | 4 +- svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx | 2 +- .../sdr/primitive2d/sdrmeasureprimitive2d.cxx | 1 + svx/source/sdr/primitive2d/sdrole2primitive2d.cxx | 2 +- svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx | 2 +- .../sdr/primitive2d/sdrrectangleprimitive2d.cxx | 2 +- svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx | 12 +- svx/source/svdraw/svdfppt.cxx | 12 +- svx/source/svdraw/svdotextdecomposition.cxx | 41 +- svx/source/table/viewcontactoftableobj.cxx | 2 +- xmloff/source/core/xmlimp.cxx | 20 +- 49 files changed, 3165 insertions(+), 480 deletions(-) delete mode 100644 formula/prj/CVS/Entries delete mode 100644 formula/prj/CVS/Repository delete mode 100644 formula/prj/CVS/Root delete mode 100644 formula/prj/CVS/Tag delete mode 100644 formula/prj/CVS/Template diff --git a/connectivity/inc/connectivity/DriversConfig.hxx b/connectivity/inc/connectivity/DriversConfig.hxx index bd86e9ce4397..da68443bb68e 100755 --- a/connectivity/inc/connectivity/DriversConfig.hxx +++ b/connectivity/inc/connectivity/DriversConfig.hxx @@ -1,92 +1,95 @@ -/************************************************************************* - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: makefile,v $ - * - * $Revision: 1.1 $ - * - * last change: $Author: st $ $Date: 2000/11/22 02:32:00 $ - * - * The Contents of this file are made available subject to - * the terms of GNU Lesser General Public License Version 2.1. - * - * - * GNU Lesser General Public License Version 2.1 - * ============================================= - * Copyright 2005 by Sun Microsystems, Inc. - * 901 San Antonio Road, Palo Alto, CA 94303, USA - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - * - ************************************************************************/ -#ifndef CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED -#define CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED - -#include -#include -#include -#include -#include "connectivity/dbtoolsdllapi.hxx" -#include -#include -#include - -namespace connectivity -{ - typedef struct - { - ::comphelper::NamedValueCollection aProperties; - ::comphelper::NamedValueCollection aFeatures; - ::comphelper::NamedValueCollection aMetaData; - ::rtl::OUString sDriverFactory; - ::rtl::OUString sDriverTypeDisplayName; - } TInstalledDriver; - DECLARE_STL_USTRINGACCESS_MAP( TInstalledDriver, TInstalledDrivers); - +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: makefile,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: st $ $Date: 2000/11/22 02:32:00 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ +#ifndef CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED +#define CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED + +#include +#include +#include +#include +#include "connectivity/dbtoolsdllapi.hxx" +#include +#include +#include + +namespace connectivity +{ + typedef struct + { + ::comphelper::NamedValueCollection aProperties; + ::comphelper::NamedValueCollection aFeatures; + ::comphelper::NamedValueCollection aMetaData; + ::rtl::OUString sDriverFactory; + ::rtl::OUString sDriverTypeDisplayName; + } TInstalledDriver; + DECLARE_STL_USTRINGACCESS_MAP( TInstalledDriver, TInstalledDrivers); + class DriversConfigImpl { - ::utl::OConfigurationTreeRoot m_aInstalled; + mutable ::utl::OConfigurationTreeRoot m_aInstalled; + mutable TInstalledDrivers m_aDrivers; + void Load(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB) const; public: DriversConfigImpl(); - void Load(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,TInstalledDrivers& _rDrivers); - }; - // - // Allows to access all driver which are located in the configuration - // - class OOO_DLLPUBLIC_DBTOOLS DriversConfig - { - typedef salhelper::SingletonRef OSharedConfigNode; - - const ::comphelper::NamedValueCollection& impl_get(const ::rtl::OUString& _sURL,sal_Int32 _nProps) const; - public: - DriversConfig(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB); - ~DriversConfig(); - - DriversConfig( const DriversConfig& ); - DriversConfig& operator=( const DriversConfig& ); - - ::rtl::OUString getDriverFactoryName(const ::rtl::OUString& _sUrl) const; - ::rtl::OUString getDriverTypeDisplayName(const ::rtl::OUString& _sUrl) const; - const ::comphelper::NamedValueCollection& getProperties(const ::rtl::OUString& _sURL) const; - const ::comphelper::NamedValueCollection& getFeatures(const ::rtl::OUString& _sURL) const; - const ::comphelper::NamedValueCollection& getMetaData(const ::rtl::OUString& _sURL) const; - ::com::sun::star::uno::Sequence< ::rtl::OUString > getURLs() const; - private: - TInstalledDrivers m_aDrivers; - OSharedConfigNode m_aNode; - }; -} -#endif // CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED + + const TInstalledDrivers& getInstalledDrivers(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB) const { Load(_rxORB); return m_aDrivers; } + }; + // + // Allows to access all driver which are located in the configuration + // + class OOO_DLLPUBLIC_DBTOOLS DriversConfig + { + typedef salhelper::SingletonRef OSharedConfigNode; + + const ::comphelper::NamedValueCollection& impl_get(const ::rtl::OUString& _sURL,sal_Int32 _nProps) const; + public: + DriversConfig(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB); + ~DriversConfig(); + + DriversConfig( const DriversConfig& ); + DriversConfig& operator=( const DriversConfig& ); + + ::rtl::OUString getDriverFactoryName(const ::rtl::OUString& _sUrl) const; + ::rtl::OUString getDriverTypeDisplayName(const ::rtl::OUString& _sUrl) const; + const ::comphelper::NamedValueCollection& getProperties(const ::rtl::OUString& _sURL) const; + const ::comphelper::NamedValueCollection& getFeatures(const ::rtl::OUString& _sURL) const; + const ::comphelper::NamedValueCollection& getMetaData(const ::rtl::OUString& _sURL) const; + ::com::sun::star::uno::Sequence< ::rtl::OUString > getURLs() const; + private: + OSharedConfigNode m_aNode; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB; + }; +} +#endif // CONNECTIVITY_DRIVERSCONFIG_HXX_INCLUDED diff --git a/connectivity/inc/connectivity/dbmetadata.hxx b/connectivity/inc/connectivity/dbmetadata.hxx index 32662c5c157a..1ee1718247ae 100644 --- a/connectivity/inc/connectivity/dbmetadata.hxx +++ b/connectivity/inc/connectivity/dbmetadata.hxx @@ -177,6 +177,12 @@ namespace dbtools /** determines whether in the application UI, empty table folders (aka catalogs/schemas) should be displayed */ bool displayEmptyTableFolders() const; + + /** determines that threads are supported. + * + * \return when threads are supported, otherwise + */ + bool supportsThreads() const; }; //........................................................................ diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx index a72816d6427b..30c822b6f169 100755 --- a/connectivity/source/commontools/DriversConfig.cxx +++ b/connectivity/source/commontools/DriversConfig.cxx @@ -112,32 +112,35 @@ DriversConfigImpl::DriversConfigImpl() { } // ----------------------------------------------------------------------------- -void DriversConfigImpl::Load(const uno::Reference< lang::XMultiServiceFactory >& _rxORB,TInstalledDrivers& _rDrivers) +void DriversConfigImpl::Load(const uno::Reference< lang::XMultiServiceFactory >& _rxORB) const { - if ( !m_aInstalled.isValid() ) + if ( m_aDrivers.empty() ) { - static const ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess.Drivers/Installed")); ///Installed - m_aInstalled = ::utl::OConfigurationTreeRoot::createWithServiceFactory(_rxORB, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY); - } - - if ( m_aInstalled.isValid() ) - { - const uno::Sequence< ::rtl::OUString > aURLPatterns = m_aInstalled.getNodeNames(); - const ::rtl::OUString* pPatternIter = aURLPatterns.getConstArray(); - const ::rtl::OUString* pPatternEnd = pPatternIter + aURLPatterns.getLength(); - for (;pPatternIter != pPatternEnd ; ++pPatternIter) + if ( !m_aInstalled.isValid() ) { - TInstalledDriver aInstalledDriver; - lcl_readURLPatternNode(m_aInstalled,*pPatternIter,aInstalledDriver); - if ( aInstalledDriver.sDriverFactory.getLength() ) - _rDrivers.insert(TInstalledDrivers::value_type(*pPatternIter,aInstalledDriver)); + static const ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess.Drivers/Installed")); ///Installed + m_aInstalled = ::utl::OConfigurationTreeRoot::createWithServiceFactory(_rxORB, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY); } + + if ( m_aInstalled.isValid() ) + { + const uno::Sequence< ::rtl::OUString > aURLPatterns = m_aInstalled.getNodeNames(); + const ::rtl::OUString* pPatternIter = aURLPatterns.getConstArray(); + const ::rtl::OUString* pPatternEnd = pPatternIter + aURLPatterns.getLength(); + for (;pPatternIter != pPatternEnd ; ++pPatternIter) + { + TInstalledDriver aInstalledDriver; + lcl_readURLPatternNode(m_aInstalled,*pPatternIter,aInstalledDriver); + if ( aInstalledDriver.sDriverFactory.getLength() ) + m_aDrivers.insert(TInstalledDrivers::value_type(*pPatternIter,aInstalledDriver)); + } + } // if ( m_aInstalled.isValid() ) } } // ----------------------------------------------------------------------------- DriversConfig::DriversConfig(const uno::Reference< lang::XMultiServiceFactory >& _rxORB) +:m_xORB(_rxORB) { - m_aNode->Load(_rxORB,m_aDrivers); } // ----------------------------------------------------------------------------- @@ -156,7 +159,6 @@ DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs ) { if ( this != &_rhs ) { - m_aDrivers = _rhs.m_aDrivers; m_aNode = _rhs.m_aNode; } return *this; @@ -165,10 +167,11 @@ DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs ) // ----------------------------------------------------------------------------- ::rtl::OUString DriversConfig::getDriverFactoryName(const ::rtl::OUString& _sURL) const { + const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); ::rtl::OUString sRet; ::rtl::OUString sOldPattern; - TInstalledDrivers::const_iterator aIter = m_aDrivers.begin(); - TInstalledDrivers::const_iterator aEnd = m_aDrivers.end(); + TInstalledDrivers::const_iterator aIter = rDrivers.begin(); + TInstalledDrivers::const_iterator aEnd = rDrivers.end(); for(;aIter != aEnd;++aIter) { WildCard aWildCard(aIter->first); @@ -184,10 +187,11 @@ DriversConfig& DriversConfig::operator=( const DriversConfig& _rhs ) // ----------------------------------------------------------------------------- ::rtl::OUString DriversConfig::getDriverTypeDisplayName(const ::rtl::OUString& _sURL) const { + const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); ::rtl::OUString sRet; ::rtl::OUString sOldPattern; - TInstalledDrivers::const_iterator aIter = m_aDrivers.begin(); - TInstalledDrivers::const_iterator aEnd = m_aDrivers.end(); + TInstalledDrivers::const_iterator aIter = rDrivers.begin(); + TInstalledDrivers::const_iterator aEnd = rDrivers.end(); for(;aIter != aEnd;++aIter) { WildCard aWildCard(aIter->first); @@ -218,10 +222,11 @@ const ::comphelper::NamedValueCollection& DriversConfig::getMetaData(const ::rtl // ----------------------------------------------------------------------------- const ::comphelper::NamedValueCollection& DriversConfig::impl_get(const ::rtl::OUString& _sURL,sal_Int32 _nProps) const { + const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); const ::comphelper::NamedValueCollection* pRet = NULL; ::rtl::OUString sOldPattern; - TInstalledDrivers::const_iterator aIter = m_aDrivers.begin(); - TInstalledDrivers::const_iterator aEnd = m_aDrivers.end(); + TInstalledDrivers::const_iterator aIter = rDrivers.begin(); + TInstalledDrivers::const_iterator aEnd = rDrivers.end(); for(;aIter != aEnd;++aIter) { WildCard aWildCard(aIter->first); @@ -252,10 +257,11 @@ const ::comphelper::NamedValueCollection& DriversConfig::impl_get(const ::rtl::O // ----------------------------------------------------------------------------- uno::Sequence< ::rtl::OUString > DriversConfig::getURLs() const { - uno::Sequence< ::rtl::OUString > aRet(m_aDrivers.size()); + const TInstalledDrivers& rDrivers = m_aNode->getInstalledDrivers(m_xORB); + uno::Sequence< ::rtl::OUString > aRet(rDrivers.size()); ::rtl::OUString* pIter = aRet.getArray(); - TInstalledDrivers::const_iterator aIter = m_aDrivers.begin(); - TInstalledDrivers::const_iterator aEnd = m_aDrivers.end(); + TInstalledDrivers::const_iterator aIter = rDrivers.begin(); + TInstalledDrivers::const_iterator aEnd = rDrivers.end(); for(;aIter != aEnd;++aIter,++pIter) { *pIter = aIter->first; diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx index 70220b1cd563..c5b65a9d113b 100644 --- a/connectivity/source/commontools/dbmetadata.cxx +++ b/connectivity/source/commontools/dbmetadata.cxx @@ -407,6 +407,22 @@ namespace dbtools #endif return doDisplay; } + //-------------------------------------------------------------------- + bool DatabaseMetaData::supportsThreads() const + { + bool bSupported( true ); + try + { + Reference< XDatabaseMetaData > xMeta( m_pImpl->xConnectionMetaData, UNO_SET_THROW ); + ::rtl::OUString sConnectionURL( xMeta->getURL() ); + bSupported = sConnectionURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "sdbc:mysql:mysqlc" ) ) != 0; + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return bSupported; + } //........................................................................ } // namespace dbtools diff --git a/connectivity/source/drivers/jdbc/jdbc.xcu b/connectivity/source/drivers/jdbc/jdbc.xcu index 73fe2e9adc55..ae1bbad227e7 100755 --- a/connectivity/source/drivers/jdbc/jdbc.xcu +++ b/connectivity/source/drivers/jdbc/jdbc.xcu @@ -174,7 +174,7 @@ - false + true diff --git a/formula/prj/CVS/Entries b/formula/prj/CVS/Entries deleted file mode 100644 index 3ae75e3153ff..000000000000 --- a/formula/prj/CVS/Entries +++ /dev/null @@ -1,4 +0,0 @@ -/build.lst/1.10/Wed Aug 20 14:15:04 2008//Tcws_dev300_frmdlg -/d.lst/1.6/Fri Aug 17 11:27:10 2007//Tcws_dev300_frmdlg -/rpt.xml/1.2/Mon Jul 09 11:56:12 2007//Tcws_dev300_frmdlg -D diff --git a/formula/prj/CVS/Repository b/formula/prj/CVS/Repository deleted file mode 100644 index 573341612fc8..000000000000 --- a/formula/prj/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -/cvs/dba/reportdesign/prj diff --git a/formula/prj/CVS/Root b/formula/prj/CVS/Root deleted file mode 100644 index ed0df2a21830..000000000000 --- a/formula/prj/CVS/Root +++ /dev/null @@ -1 +0,0 @@ -:pserver:oj@so-cvs-tunnel.germany.sun.com:/cvs diff --git a/formula/prj/CVS/Tag b/formula/prj/CVS/Tag deleted file mode 100644 index 9ff93ee1efdd..000000000000 --- a/formula/prj/CVS/Tag +++ /dev/null @@ -1 +0,0 @@ -Tcws_dev300_frmdlg diff --git a/formula/prj/CVS/Template b/formula/prj/CVS/Template deleted file mode 100644 index eec9bab36d48..000000000000 --- a/formula/prj/CVS/Template +++ /dev/null @@ -1,42 +0,0 @@ -Issue number: -Submitted by: -Reviewed by: -CVS: ---------------------------------------------------------------------- -CVS: Issue number: -CVS: If this change addresses one or more issues, -CVS: then enter the issue number(s) here. -CVS: Submitted by: -CVS: If this code has been contributed to the project by someone else; i.e., -CVS: they sent us a patch or a set of diffs, then include their name/email -CVS: address here. If this is your work then delete this line. -CVS: Reviewed by: -CVS: If we are doing pre-commit code reviews and someone else has -CVS: reviewed your changes, include their name(s) here. -CVS: If you have not had it reviewed then delete this line. -CVS: ---------------------------------------------------------------------- -CVS: Committers, -CVS: -CVS: Please follow these protocols: -CVS: -CVS: * Please include in the log message -CVS: reference(s) by ID / number and/or URL -CVS: to any and all relevant OpenOffice.org issue(s). -CVS: -CVS: * If the code is contributed from outside Sun -CVS: then please verify using the list at the following URL -CVS: http://www.openoffice.org/copyright/copyrightapproved.html -CVS: that Sun has received a signed Copyright Assignment Form -CVS: from the submitter. -CVS: -CVS: Otherwise, -CVS: please send an email TO: the submitter; and CC: OOCRequest@eng.sun.com -CVS: the letter (CopyRightRequest.txt) to request assignment of copyright to Sun -CVS: (http://www.openoffice.org/copyright/assign_copyright.html). -CVS: -CVS: Please do NOT commit code until you have verified (as detailed above) that -CVS: Sun has received a signed Copyright Assignment Form from the submitter. -CVS: -CVS: * Please send an email TO: the submitter -CVS: (particularly, if from outside Sun) -CVS: advising that the code has been committed, -CVS: and gratefully recognizing the contribution. diff --git a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx index 62c0477a5169..a0dc92ae50d3 100644 --- a/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx +++ b/framework/inc/uiconfiguration/moduleuiconfigurationmanager.hxx @@ -38,7 +38,6 @@ #include #include #include -#include //_________________________________________________________________________________________________________________ // my own includes @@ -78,7 +77,6 @@ namespace framework { - class UIConfigurationManagerImpl; class ModuleUIConfigurationManager : public com::sun::star::lang::XTypeProvider , public com::sun::star::lang::XServiceInfo , public com::sun::star::lang::XComponent , @@ -87,6 +85,7 @@ namespace framework public ::com::sun::star::ui::XUIConfigurationManager , public ::com::sun::star::ui::XModuleUIConfigurationManager , public ::com::sun::star::ui::XUIConfigurationPersistence , + private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. public ::cppu::OWeakObject { public: @@ -135,7 +134,94 @@ namespace framework virtual sal_Bool SAL_CALL isReadOnly() throw (::com::sun::star::uno::RuntimeException); private: - ::std::auto_ptr m_pImpl; + // private data types + enum Layer + { + LAYER_DEFAULT, + LAYER_USERDEFINED, + LAYER_COUNT + }; + + enum NotifyOp + { + NotifyOp_Remove, + NotifyOp_Insert, + NotifyOp_Replace + }; + + struct UIElementInfo + { + UIElementInfo( const rtl::OUString& rResourceURL, const rtl::OUString& rUIName ) : + aResourceURL( rResourceURL), aUIName( rUIName ) {} + rtl::OUString aResourceURL; + rtl::OUString aUIName; + }; + + struct UIElementData + { + UIElementData() : bModified( false ), bDefault( true ), bDefaultNode( true ) {}; + + rtl::OUString aResourceURL; + rtl::OUString aName; + bool bModified; // has been changed since last storing + bool bDefault; // default settings + bool bDefaultNode; // this is a default layer element data + com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > xSettings; + }; + + struct UIElementType; + friend struct UIElementType; + typedef ::std::hash_map< rtl::OUString, UIElementData, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementDataHashMap; + + struct UIElementType + { + UIElementType() : bModified( false ), + bLoaded( false ), + bDefaultLayer( false ), + nElementType( ::com::sun::star::ui::UIElementType::UNKNOWN ) {} + + + bool bModified; + bool bLoaded; + bool bDefaultLayer; + sal_Int16 nElementType; + UIElementDataHashMap aElementsHashMap; + com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage; + }; + + typedef ::std::vector< UIElementType > UIElementTypesVector; + typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer; + typedef ::std::hash_map< rtl::OUString, UIElementInfo, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementInfoHashMap; + + // private methods + void impl_Initialize(); + void implts_notifyContainerListener( const ::com::sun::star::ui::ConfigurationEvent& aEvent, NotifyOp eOp ); + void impl_fillSequenceWithElementTypeInfo( UIElementInfoHashMap& aUIElementInfoCollection, sal_Int16 nElementType ); + void impl_preloadUIElementTypeList( Layer eLayer, sal_Int16 nElementType ); + UIElementData* impl_findUIElementData( const rtl::OUString& aResourceURL, sal_Int16 nElementType, bool bLoad = true ); + void impl_requestUIElementData( sal_Int16 nElementType, Layer eLayer, UIElementData& aUIElementData ); + void impl_storeElementTypeData( com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage, UIElementType& rElementType, bool bResetModifyState = true ); + void impl_resetElementTypeData( UIElementType& rUserElementType, UIElementType& rDefaultElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer, ConfigEventNotifyContainer& rReplaceNotifyContainer ); + void impl_reloadElementTypeData( UIElementType& rUserElementType, UIElementType& rDefaultElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer, ConfigEventNotifyContainer& rReplaceNotifyContainer ); + + UIElementTypesVector m_aUIElements[LAYER_COUNT]; + PresetHandler* m_pStorageHandler[::com::sun::star::ui::UIElementType::COUNT]; + com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xDefaultConfigStorage; + com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserConfigStorage; + bool m_bReadOnly; + bool m_bInitialized; + bool m_bModified; + bool m_bConfigRead; + bool m_bDisposed; + rtl::OUString m_aXMLPostfix; + rtl::OUString m_aPropUIName; + rtl::OUString m_aPropResourceURL; + rtl::OUString m_aModuleIdentifier; + rtl::OUString m_aModuleShortName; + com::sun::star::uno::Reference< com::sun::star::embed::XTransactedObject > m_xUserRootCommit; + com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; + ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener + com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xModuleImageManager; }; } diff --git a/framework/inc/uiconfiguration/uiconfigurationmanager.hxx b/framework/inc/uiconfiguration/uiconfigurationmanager.hxx index 39f1d9503513..e7ecec183570 100644 --- a/framework/inc/uiconfiguration/uiconfigurationmanager.hxx +++ b/framework/inc/uiconfiguration/uiconfigurationmanager.hxx @@ -38,7 +38,6 @@ #include #include #include -#include //_________________________________________________________________________________________________________________ // my own includes @@ -78,7 +77,6 @@ namespace framework { - class UIConfigurationManagerImpl; class UIConfigurationManager : public com::sun::star::lang::XTypeProvider , public com::sun::star::lang::XServiceInfo , public com::sun::star::lang::XComponent , @@ -86,6 +84,7 @@ namespace framework public ::com::sun::star::ui::XUIConfigurationManager , public ::com::sun::star::ui::XUIConfigurationPersistence , public ::com::sun::star::ui::XUIConfigurationStorage , + private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. public ::cppu::OWeakObject { public: @@ -131,7 +130,83 @@ namespace framework virtual sal_Bool SAL_CALL hasStorage() throw (::com::sun::star::uno::RuntimeException); private: - ::std::auto_ptr m_pImpl; + // private data types + enum NotifyOp + { + NotifyOp_Remove, + NotifyOp_Insert, + NotifyOp_Replace + }; + + struct UIElementInfo + { + UIElementInfo( const rtl::OUString& rResourceURL, const rtl::OUString& rUIName ) : + aResourceURL( rResourceURL), aUIName( rUIName ) {} + rtl::OUString aResourceURL; + rtl::OUString aUIName; + }; + + struct UIElementData + { + UIElementData() : bModified( false ), bDefault( true ) {}; + + rtl::OUString aResourceURL; + rtl::OUString aName; + bool bModified; // has been changed since last storing + bool bDefault; // default settings + com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > xSettings; + }; + + struct UIElementType; + friend struct UIElementType; + typedef ::std::hash_map< rtl::OUString, UIElementData, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementDataHashMap; + + struct UIElementType + { + UIElementType() : bModified( false ), + bLoaded( false ), + bDefaultLayer( false ), + nElementType( ::com::sun::star::ui::UIElementType::UNKNOWN ) {} + + + bool bModified; + bool bLoaded; + bool bDefaultLayer; + sal_Int16 nElementType; + UIElementDataHashMap aElementsHashMap; + com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage; + }; + + typedef ::std::vector< UIElementType > UIElementTypesVector; + typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer; + typedef ::std::hash_map< rtl::OUString, UIElementInfo, OUStringHashCode, ::std::equal_to< rtl::OUString > > UIElementInfoHashMap; + + // private methods + void impl_Initialize(); + void implts_notifyContainerListener( const ::com::sun::star::ui::ConfigurationEvent& aEvent, NotifyOp eOp ); + void impl_fillSequenceWithElementTypeInfo( UIElementInfoHashMap& aUIElementInfoCollection, sal_Int16 nElementType ); + void impl_preloadUIElementTypeList( sal_Int16 nElementType ); + UIElementData* impl_findUIElementData( const rtl::OUString& aResourceURL, sal_Int16 nElementType, bool bLoad = true ); + void impl_requestUIElementData( sal_Int16 nElementType, UIElementData& aUIElementData ); + void impl_storeElementTypeData( com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xStorage, UIElementType& rElementType, bool bResetModifyState = true ); + void impl_resetElementTypeData( UIElementType& rDocElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer ); + void impl_reloadElementTypeData( UIElementType& rDocElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer, ConfigEventNotifyContainer& rReplaceNotifyContainer ); + + UIElementTypesVector m_aUIElements; + com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xDocConfigStorage; + bool m_bReadOnly; + bool m_bInitialized; + bool m_bModified; + bool m_bConfigRead; + bool m_bDisposed; + rtl::OUString m_aXMLPostfix; + rtl::OUString m_aPropUIName; + rtl::OUString m_aPropResourceURL; + rtl::OUString m_aModuleIdentifier; + com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; + ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener + com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xImageManager; + com::sun::star::uno::Reference< com::sun::star::uno::XInterface > m_xAccConfig; }; } diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx index 40d36f9a65f8..c0c5c90d45b3 100644 --- a/framework/source/jobs/job.cxx +++ b/framework/source/jobs/job.cxx @@ -51,7 +51,6 @@ // includes of other projects #include #include -#include //________________________________ // namespace @@ -238,7 +237,6 @@ void Job::execute( /*IN*/ const css::uno::Sequence< css::beans::NamedValue >& lD // Otherwhise we might die by ref count ... css::uno::Reference< css::task::XJobListener > xThis(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY); - if ( ::comphelper::UiEventsLogger::isEnabled() ) try { // create the job diff --git a/framework/source/uiconfiguration/makefile.mk b/framework/source/uiconfiguration/makefile.mk index c7d6eb435d4f..3ef9006072a2 100644 --- a/framework/source/uiconfiguration/makefile.mk +++ b/framework/source/uiconfiguration/makefile.mk @@ -43,7 +43,6 @@ ENABLE_EXCEPTIONS= TRUE SLOFILES= \ $(SLO)$/uiconfigurationmanager.obj \ - $(SLO)$/uiconfigurationmanagerimpl.obj \ $(SLO)$/moduleuiconfigurationmanager.obj \ $(SLO)$/moduleuicfgsupplier.obj \ $(SLO)$/windowstateconfiguration.obj \ diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 04c87a2c3946..663c2d0d6dd8 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -38,7 +38,6 @@ #include #include #include -#include #ifndef __FRAMEWORK_XML_STATUSBARCONFIGURATION_HXX_ #include @@ -114,127 +113,1292 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( ModuleUIConfigurationManager DEFINE_INIT_SERVICE ( ModuleUIConfigurationManager, {} ) -ModuleUIConfigurationManager::ModuleUIConfigurationManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager ) -: m_pImpl( new UIConfigurationManagerImpl(xServiceManager,static_cast< OWeakObject* >(this),true) ) +// important: The order and position of the elements must match the constant +// definition of "::com::sun::star::ui::UIElementType" +static const char* UIELEMENTTYPENAMES[] = { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::ModuleUIConfigurationManager" ); + "", // Dummy value for unknown! + UIELEMENTTYPE_MENUBAR_NAME, + UIELEMENTTYPE_POPUPMENU_NAME, + UIELEMENTTYPE_TOOLBAR_NAME, + UIELEMENTTYPE_STATUSBAR_NAME, + UIELEMENTTYPE_FLOATINGWINDOW_NAME, + UIELEMENTTYPE_PROGRESSBAR_NAME +}; + +static const char RESOURCEURL_PREFIX[] = "private:resource/"; +static const sal_Int32 RESOURCEURL_PREFIX_SIZE = 17; +static const char RESOURCEURL_CUSTOM_ELEMENT[] = "custom_"; + +static sal_Int16 RetrieveTypeFromResourceURL( const rtl::OUString& aResourceURL ) +{ + + if (( aResourceURL.indexOf( OUString( RTL_CONSTASCII_USTRINGPARAM( RESOURCEURL_PREFIX ))) == 0 ) && + ( aResourceURL.getLength() > RESOURCEURL_PREFIX_SIZE )) + { + OUString aTmpStr = aResourceURL.copy( RESOURCEURL_PREFIX_SIZE ); + sal_Int32 nIndex = aTmpStr.indexOf( '/' ); + if (( nIndex > 0 ) && ( aTmpStr.getLength() > nIndex )) + { + OUString aTypeStr( aTmpStr.copy( 0, nIndex )); + for ( int i = 0; i < UIElementType::COUNT; i++ ) + { + if ( aTypeStr.equalsAscii( UIELEMENTTYPENAMES[i] )) + return sal_Int16( i ); + } + } + } + + return UIElementType::UNKNOWN; +} + +static OUString RetrieveNameFromResourceURL( const rtl::OUString& aResourceURL ) +{ + if (( aResourceURL.indexOf( OUString( RTL_CONSTASCII_USTRINGPARAM( RESOURCEURL_PREFIX ))) == 0 ) && + ( aResourceURL.getLength() > RESOURCEURL_PREFIX_SIZE )) + { + sal_Int32 nIndex = aResourceURL.lastIndexOf( '/' ); + if (( nIndex > 0 ) && (( nIndex+1 ) < aResourceURL.getLength())) + return aResourceURL.copy( nIndex+1 ); + } + + return OUString(); +} + +void ModuleUIConfigurationManager::impl_fillSequenceWithElementTypeInfo( UIElementInfoHashMap& aUIElementInfoCollection, sal_Int16 nElementType ) +{ + // preload list of element types on demand + impl_preloadUIElementTypeList( LAYER_USERDEFINED, nElementType ); + impl_preloadUIElementTypeList( LAYER_DEFAULT, nElementType ); + + UIElementDataHashMap& rUserElements = m_aUIElements[LAYER_USERDEFINED][nElementType].aElementsHashMap; + UIElementDataHashMap::const_iterator pUserIter = rUserElements.begin(); + + OUString aCustomUrlPrefix( RTL_CONSTASCII_USTRINGPARAM( RESOURCEURL_CUSTOM_ELEMENT )); + while ( pUserIter != rUserElements.end() ) + { + sal_Int32 nIndex = pUserIter->second.aResourceURL.indexOf( aCustomUrlPrefix, RESOURCEURL_PREFIX_SIZE ); + if ( nIndex > RESOURCEURL_PREFIX_SIZE ) + { + // Performance: Retrieve user interface name only for custom user interface elements. + // It's only used by them! + UIElementData* pDataSettings = impl_findUIElementData( pUserIter->second.aResourceURL, nElementType ); + if ( pDataSettings ) + { + // Retrieve user interface name from XPropertySet interface + rtl::OUString aUIName; + Reference< XPropertySet > xPropSet( pDataSettings->xSettings, UNO_QUERY ); + if ( xPropSet.is() ) + { + Any a = xPropSet->getPropertyValue( m_aPropUIName ); + a >>= aUIName; + } + + UIElementInfo aInfo( pUserIter->second.aResourceURL, aUIName ); + aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pUserIter->second.aResourceURL, aInfo )); + } + } + else + { + // The user interface name for standard user interface elements is stored in the WindowState.xcu file + UIElementInfo aInfo( pUserIter->second.aResourceURL, OUString() ); + aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pUserIter->second.aResourceURL, aInfo )); + } + ++pUserIter; + } + + UIElementDataHashMap& rDefaultElements = m_aUIElements[LAYER_DEFAULT][nElementType].aElementsHashMap; + UIElementDataHashMap::const_iterator pDefIter = rDefaultElements.begin(); + + while ( pDefIter != rDefaultElements.end() ) + { + UIElementInfoHashMap::const_iterator pIterInfo = aUIElementInfoCollection.find( pDefIter->second.aResourceURL ); + if ( pIterInfo == aUIElementInfoCollection.end() ) + { + sal_Int32 nIndex = pDefIter->second.aResourceURL.indexOf( aCustomUrlPrefix, RESOURCEURL_PREFIX_SIZE ); + if ( nIndex > RESOURCEURL_PREFIX_SIZE ) + { + // Performance: Retrieve user interface name only for custom user interface elements. + // It's only used by them! + UIElementData* pDataSettings = impl_findUIElementData( pDefIter->second.aResourceURL, nElementType ); + if ( pDataSettings ) + { + // Retrieve user interface name from XPropertySet interface + rtl::OUString aUIName; + Reference< XPropertySet > xPropSet( pDataSettings->xSettings, UNO_QUERY ); + if ( xPropSet.is() ) + { + Any a = xPropSet->getPropertyValue( m_aPropUIName ); + a >>= aUIName; + } + + UIElementInfo aInfo( pDefIter->second.aResourceURL, aUIName ); + aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pDefIter->second.aResourceURL, aInfo )); + } + } + else + { + // The user interface name for standard user interface elements is stored in the WindowState.xcu file + UIElementInfo aInfo( pDefIter->second.aResourceURL, OUString() ); + aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pDefIter->second.aResourceURL, aInfo )); + } + } + + ++pDefIter; + } +} + +void ModuleUIConfigurationManager::impl_preloadUIElementTypeList( Layer eLayer, sal_Int16 nElementType ) +{ + UIElementType& rElementTypeData = m_aUIElements[eLayer][nElementType]; + + if ( !rElementTypeData.bLoaded ) + { + Reference< XStorage > xElementTypeStorage = rElementTypeData.xStorage; + if ( xElementTypeStorage.is() ) + { + rtl::OUStringBuffer aBuf( RESOURCEURL_PREFIX_SIZE ); + aBuf.appendAscii( RESOURCEURL_PREFIX ); + aBuf.appendAscii( UIELEMENTTYPENAMES[ nElementType ] ); + aBuf.appendAscii( "/" ); + OUString aResURLPrefix( aBuf.makeStringAndClear() ); + + UIElementDataHashMap& rHashMap = rElementTypeData.aElementsHashMap; + Reference< XNameAccess > xNameAccess( xElementTypeStorage, UNO_QUERY ); + Sequence< OUString > aUIElementNames = xNameAccess->getElementNames(); + for ( sal_Int32 n = 0; n < aUIElementNames.getLength(); n++ ) + { + UIElementData aUIElementData; + + // Resource name must be without ".xml" + sal_Int32 nIndex = aUIElementNames[n].lastIndexOf( '.' ); + if (( nIndex > 0 ) && ( nIndex < aUIElementNames[n].getLength() )) + { + OUString aExtension( aUIElementNames[n].copy( nIndex+1 )); + OUString aUIElementName( aUIElementNames[n].copy( 0, nIndex )); + + if (( aUIElementName.getLength() > 0 ) && + ( aExtension.equalsIgnoreAsciiCaseAsciiL( "xml", 3 ))) + { + aUIElementData.aResourceURL = aResURLPrefix + aUIElementName; + aUIElementData.aName = aUIElementNames[n]; + + if ( eLayer == LAYER_USERDEFINED ) + { + aUIElementData.bModified = false; + aUIElementData.bDefault = false; + aUIElementData.bDefaultNode = false; + } + + // Create hash_map entries for all user interface elements inside the storage. We don't load the + // settings to speed up the process. + rHashMap.insert( UIElementDataHashMap::value_type( aUIElementData.aResourceURL, aUIElementData )); + } + } + } + } + } + + rElementTypeData.bLoaded = true; +} + +void ModuleUIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType, Layer eLayer, UIElementData& aUIElementData ) +{ + UIElementType& rElementTypeData = m_aUIElements[eLayer][nElementType]; + + Reference< XStorage > xElementTypeStorage = rElementTypeData.xStorage; + if ( xElementTypeStorage.is() && aUIElementData.aName.getLength() ) + { + try + { + Reference< XStream > xStream = xElementTypeStorage->openStreamElement( aUIElementData.aName, ElementModes::READ ); + Reference< XInputStream > xInputStream = xStream->getInputStream(); + + if ( xInputStream.is() ) + { + switch ( nElementType ) + { + case ::com::sun::star::ui::UIElementType::UNKNOWN: + break; + + case ::com::sun::star::ui::UIElementType::MENUBAR: + { + try + { + MenuConfiguration aMenuCfg( m_xServiceManager ); + Reference< XIndexAccess > xContainer( aMenuCfg.CreateMenuBarConfigurationFromXML( xInputStream )); + RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xContainer ); + if ( pRootItemContainer ) + aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, sal_True ) ), UNO_QUERY ); + else + aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( xContainer, sal_True ) ), UNO_QUERY ); + return; + } + catch ( ::com::sun::star::lang::WrappedTargetException& ) + { + } + } + break; + + case ::com::sun::star::ui::UIElementType::POPUPMENU: + { + break; + } + + case ::com::sun::star::ui::UIElementType::TOOLBAR: + { + try + { + Reference< XIndexContainer > xIndexContainer( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY ); + ToolBoxConfiguration::LoadToolBox( m_xServiceManager, xInputStream, xIndexContainer ); + RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xIndexContainer ); + aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, sal_True ) ), UNO_QUERY ); + return; + } + catch ( ::com::sun::star::lang::WrappedTargetException& ) + { + } + + break; + } + + case ::com::sun::star::ui::UIElementType::STATUSBAR: + { + try + { + Reference< XIndexContainer > xIndexContainer( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY ); + StatusBarConfiguration::LoadStatusBar( m_xServiceManager, xInputStream, xIndexContainer ); + RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xIndexContainer ); + aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, sal_True ) ), UNO_QUERY ); + return; + } + catch ( ::com::sun::star::lang::WrappedTargetException& ) + { + } + + break; + } + + case ::com::sun::star::ui::UIElementType::FLOATINGWINDOW: + { + break; + } + } + } + } + catch ( ::com::sun::star::embed::InvalidStorageException& ) + { + } + catch ( ::com::sun::star::lang::IllegalArgumentException& ) + { + } + catch ( ::com::sun::star::io::IOException& ) + { + } + catch ( ::com::sun::star::embed::StorageWrappedTargetException& ) + { + } + } + + // At least we provide an empty settings container! + aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer() ), UNO_QUERY ); +} + +ModuleUIConfigurationManager::UIElementData* ModuleUIConfigurationManager::impl_findUIElementData( const rtl::OUString& aResourceURL, sal_Int16 nElementType, bool bLoad ) +{ + // preload list of element types on demand + impl_preloadUIElementTypeList( LAYER_USERDEFINED, nElementType ); + impl_preloadUIElementTypeList( LAYER_DEFAULT, nElementType ); + + // first try to look into our user-defined vector/hash_map combination + UIElementDataHashMap& rUserHashMap = m_aUIElements[LAYER_USERDEFINED][nElementType].aElementsHashMap; + UIElementDataHashMap::iterator pIter = rUserHashMap.find( aResourceURL ); + if ( pIter != rUserHashMap.end() ) + { + // Default data settings data must be retrieved from the default layer! + if ( !pIter->second.bDefault ) + { + if ( !pIter->second.xSettings.is() && bLoad ) + impl_requestUIElementData( nElementType, LAYER_USERDEFINED, pIter->second ); + return &(pIter->second); + } + } + + // Not successfull, we have to look into our default vector/hash_map combination + UIElementDataHashMap& rDefaultHashMap = m_aUIElements[LAYER_DEFAULT][nElementType].aElementsHashMap; + pIter = rDefaultHashMap.find( aResourceURL ); + if ( pIter != rDefaultHashMap.end() ) + { + if ( !pIter->second.xSettings.is() && bLoad ) + impl_requestUIElementData( nElementType, LAYER_DEFAULT, pIter->second ); + return &(pIter->second); + } + + // Nothing has been found! + return NULL; +} + +void ModuleUIConfigurationManager::impl_storeElementTypeData( Reference< XStorage > xStorage, UIElementType& rElementType, bool bResetModifyState ) +{ + UIElementDataHashMap& rHashMap = rElementType.aElementsHashMap; + UIElementDataHashMap::iterator pIter = rHashMap.begin(); + + while ( pIter != rHashMap.end() ) + { + UIElementData& rElement = pIter->second; + if ( rElement.bModified ) + { + if ( rElement.bDefault ) + { + xStorage->removeElement( rElement.aName ); + rElement.bModified = sal_False; // mark as not modified + } + else + { + Reference< XStream > xStream( xStorage->openStreamElement( rElement.aName, ElementModes::WRITE|ElementModes::TRUNCATE ), UNO_QUERY ); + Reference< XOutputStream > xOutputStream( xStream->getOutputStream() ); + + if ( xOutputStream.is() ) + { + switch( rElementType.nElementType ) + { + case ::com::sun::star::ui::UIElementType::MENUBAR: + { + try + { + MenuConfiguration aMenuCfg( m_xServiceManager ); + aMenuCfg.StoreMenuBarConfigurationToXML( rElement.xSettings, xOutputStream ); + } + catch ( ::com::sun::star::lang::WrappedTargetException& ) + { + } + } + break; + + case ::com::sun::star::ui::UIElementType::TOOLBAR: + { + try + { + ToolBoxConfiguration::StoreToolBox( m_xServiceManager, xOutputStream, rElement.xSettings ); + } + catch ( ::com::sun::star::lang::WrappedTargetException& ) + { + } + } + break; + + case ::com::sun::star::ui::UIElementType::STATUSBAR: + { + try + { + StatusBarConfiguration::StoreStatusBar( m_xServiceManager, xOutputStream, rElement.xSettings ); + } + catch ( ::com::sun::star::lang::WrappedTargetException& ) + { + } + } + break; + + default: + break; + } + } + + // mark as not modified if we store to our own storage + if ( bResetModifyState ) + rElement.bModified = sal_False; + } + } + + ++pIter; + } + + // commit element type storage + Reference< XTransactedObject > xTransactedObject( xStorage, UNO_QUERY ); + if ( xTransactedObject.is() ) + xTransactedObject->commit(); + + // mark UIElementType as not modified if we store to our own storage + if ( bResetModifyState ) + rElementType.bModified = sal_False; +} + +// This is only allowed to be called on the LAYER_USER_DEFINED! +void ModuleUIConfigurationManager::impl_resetElementTypeData( + UIElementType& rUserElementType, + UIElementType& rDefaultElementType, + ConfigEventNotifyContainer& rRemoveNotifyContainer, + ConfigEventNotifyContainer& rReplaceNotifyContainer ) +{ + UIElementDataHashMap& rHashMap = rUserElementType.aElementsHashMap; + UIElementDataHashMap::iterator pIter = rHashMap.begin(); + + Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY ); + Reference< XInterface > xIfac( xThis, UNO_QUERY ); + Reference< XNameAccess > xDefaultNameAccess( rDefaultElementType.xStorage, UNO_QUERY ); + sal_Int16 nType = rUserElementType.nElementType; + + // Make copies of the event structures to be thread-safe. We have to unlock our mutex before calling + // our listeners! + while ( pIter != rHashMap.end() ) + { + UIElementData& rElement = pIter->second; + if ( !rElement.bDefault ) + { + if ( xDefaultNameAccess->hasByName( rElement.aName )) + { + // Replace settings with data from default layer + Reference< XIndexAccess > xOldSettings( rElement.xSettings ); + impl_requestUIElementData( nType, LAYER_DEFAULT, rElement ); + + ConfigurationEvent aReplaceEvent; + aReplaceEvent.ResourceURL = rElement.aResourceURL; + aReplaceEvent.Accessor <<= xThis; + aReplaceEvent.Source = xIfac; + aReplaceEvent.ReplacedElement <<= xOldSettings; + aReplaceEvent.Element <<= rElement.xSettings; + + rReplaceNotifyContainer.push_back( aReplaceEvent ); + + // Mark element as default and not modified. That means "not active" + // in the user layer anymore. + rElement.bModified = false; + rElement.bDefault = true; + } + else + { + // Remove user-defined settings from user layer + ConfigurationEvent aEvent; + aEvent.ResourceURL = rElement.aResourceURL; + aEvent.Accessor <<= xThis; + aEvent.Source = xIfac; + aEvent.Element <<= rElement.xSettings; + + rRemoveNotifyContainer.push_back( aEvent ); + + // Mark element as default and not modified. That means "not active" + // in the user layer anymore. + rElement.bModified = false; + rElement.bDefault = true; + } + } + + ++pIter; + } + + // Remove all settings from our user interface elements + rHashMap.clear(); +} + +void ModuleUIConfigurationManager::impl_reloadElementTypeData( + UIElementType& rUserElementType, + UIElementType& rDefaultElementType, + ConfigEventNotifyContainer& rRemoveNotifyContainer, + ConfigEventNotifyContainer& rReplaceNotifyContainer ) +{ + UIElementDataHashMap& rHashMap = rUserElementType.aElementsHashMap; + UIElementDataHashMap::iterator pIter = rHashMap.begin(); + Reference< XStorage > xUserStorage( rUserElementType.xStorage ); + Reference< XStorage > xDefaultStorage( rDefaultElementType.xStorage ); + Reference< XNameAccess > xUserNameAccess( rUserElementType.xStorage, UNO_QUERY ); + Reference< XNameAccess > xDefaultNameAccess( rDefaultElementType.xStorage, UNO_QUERY ); + + Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY ); + Reference< XInterface > xIfac( xThis, UNO_QUERY ); + sal_Int16 nType = rUserElementType.nElementType; + + while ( pIter != rHashMap.end() ) + { + UIElementData& rElement = pIter->second; + if ( rElement.bModified ) + { + if ( xUserNameAccess->hasByName( rElement.aName )) + { + // Replace settings with data from user layer + Reference< XIndexAccess > xOldSettings( rElement.xSettings ); + + impl_requestUIElementData( nType, LAYER_USERDEFINED, rElement ); + + ConfigurationEvent aReplaceEvent; + + aReplaceEvent.ResourceURL = rElement.aResourceURL; + aReplaceEvent.Accessor <<= xThis; + aReplaceEvent.Source = xIfac; + aReplaceEvent.ReplacedElement <<= xOldSettings; + aReplaceEvent.Element <<= rElement.xSettings; + rReplaceNotifyContainer.push_back( aReplaceEvent ); + + rElement.bModified = false; + } + else if ( xDefaultNameAccess->hasByName( rElement.aName )) + { + // Replace settings with data from default layer + Reference< XIndexAccess > xOldSettings( rElement.xSettings ); + + impl_requestUIElementData( nType, LAYER_DEFAULT, rElement ); + + ConfigurationEvent aReplaceEvent; + + aReplaceEvent.ResourceURL = rElement.aResourceURL; + aReplaceEvent.Accessor <<= xThis; + aReplaceEvent.Source = xIfac; + aReplaceEvent.ReplacedElement <<= xOldSettings; + aReplaceEvent.Element <<= rElement.xSettings; + rReplaceNotifyContainer.push_back( aReplaceEvent ); + + // Mark element as default and not modified. That means "not active" + // in the user layer anymore. + rElement.bModified = false; + rElement.bDefault = true; + } + else + { + // Element settings are not in any storage => remove + ConfigurationEvent aRemoveEvent; + + aRemoveEvent.ResourceURL = rElement.aResourceURL; + aRemoveEvent.Accessor <<= xThis; + aRemoveEvent.Source = xIfac; + aRemoveEvent.Element <<= rElement.xSettings; + + rRemoveNotifyContainer.push_back( aRemoveEvent ); + + // Mark element as default and not modified. That means "not active" + // in the user layer anymore. + rElement.bModified = false; + rElement.bDefault = true; + } + } + ++pIter; + } + + rUserElementType.bModified = sal_False; +} + +void ModuleUIConfigurationManager::impl_Initialize() +{ + // Initialize the top-level structures with the storage data + if ( m_xUserConfigStorage.is() ) + { + // Try to access our module sub folder + for ( sal_Int16 i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; + i++ ) + { + Reference< XStorage > xElementTypeStorage; + try + { + if ( m_pStorageHandler[i] ) + xElementTypeStorage = m_pStorageHandler[i]->getWorkingStorageUser(); + } + catch ( com::sun::star::container::NoSuchElementException& ) + { + } + catch ( ::com::sun::star::embed::InvalidStorageException& ) + { + } + catch ( ::com::sun::star::lang::IllegalArgumentException& ) + { + } + catch ( ::com::sun::star::io::IOException& ) + { + } + catch ( ::com::sun::star::embed::StorageWrappedTargetException& ) + { + } + + m_aUIElements[LAYER_USERDEFINED][i].nElementType = i; + m_aUIElements[LAYER_USERDEFINED][i].bModified = false; + m_aUIElements[LAYER_USERDEFINED][i].xStorage = xElementTypeStorage; + m_aUIElements[LAYER_USERDEFINED][i].bDefaultLayer = false; + } + } + + if ( m_xDefaultConfigStorage.is() ) + { + Reference< XNameAccess > xNameAccess( m_xDefaultConfigStorage, UNO_QUERY_THROW ); + + // Try to access our module sub folder + for ( sal_Int16 i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; + i++ ) + { + Reference< XStorage > xElementTypeStorage; + try + { + Any a = xNameAccess->getByName( OUString::createFromAscii( UIELEMENTTYPENAMES[i] )); + a >>= xElementTypeStorage; + } + catch ( com::sun::star::container::NoSuchElementException& ) + { + } + + m_aUIElements[LAYER_DEFAULT][i].nElementType = i; + m_aUIElements[LAYER_DEFAULT][i].bModified = false; + m_aUIElements[LAYER_DEFAULT][i].xStorage = xElementTypeStorage; + m_aUIElements[LAYER_DEFAULT][i].bDefaultLayer = true; + } + } +} + +ModuleUIConfigurationManager::ModuleUIConfigurationManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager ) : + ThreadHelpBase( &Application::GetSolarMutex() ) + , m_xDefaultConfigStorage( 0 ) + , m_xUserConfigStorage( 0 ) + , m_bReadOnly( true ) + , m_bInitialized( false ) + , m_bModified( false ) + , m_bConfigRead( false ) + , m_bDisposed( false ) + , m_aXMLPostfix( RTL_CONSTASCII_USTRINGPARAM( ".xml" )) + , m_aPropUIName( RTL_CONSTASCII_USTRINGPARAM( "UIName" )) + , m_aPropResourceURL( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" )) + , m_xServiceManager( xServiceManager ) + , m_aListenerContainer( m_aLock.getShareableOslMutex() ) +{ + for ( int i = 0; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) + m_pStorageHandler[i] = 0; + + // Make sure we have a default initialized entry for every layer and user interface element type! + // The following code depends on this! + m_aUIElements[LAYER_DEFAULT].resize( ::com::sun::star::ui::UIElementType::COUNT ); + m_aUIElements[LAYER_USERDEFINED].resize( ::com::sun::star::ui::UIElementType::COUNT ); } ModuleUIConfigurationManager::~ModuleUIConfigurationManager() { + for ( int i = 0; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) + delete m_pStorageHandler[i]; } // XComponent void SAL_CALL ModuleUIConfigurationManager::dispose() throw (::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::dispose" ); - m_pImpl->dispose(); + Reference< XComponent > xThis( static_cast< OWeakObject* >(this), UNO_QUERY ); + + css::lang::EventObject aEvent( xThis ); + m_aListenerContainer.disposeAndClear( aEvent ); + + { + ResetableGuard aGuard( m_aLock ); + try + { + if ( m_xModuleImageManager.is() ) + m_xModuleImageManager->dispose(); + } + catch ( Exception& ) + { + } + + m_xModuleImageManager.clear(); + m_aUIElements[LAYER_USERDEFINED].clear(); + m_aUIElements[LAYER_DEFAULT].clear(); + m_xDefaultConfigStorage.clear(); + m_xUserConfigStorage.clear(); + m_xUserRootCommit.clear(); + m_bConfigRead = false; + m_bModified = false; + m_bDisposed = true; + } } void SAL_CALL ModuleUIConfigurationManager::addEventListener( const Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::addEventListener" ); - m_pImpl->addEventListener(xListener); + { + ResetableGuard aGuard( m_aLock ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + if ( m_bDisposed ) + throw DisposedException(); + } + + m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); } void SAL_CALL ModuleUIConfigurationManager::removeEventListener( const Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::removeEventListener" ); - m_pImpl->removeEventListener(xListener); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); } // XInitialization void SAL_CALL ModuleUIConfigurationManager::initialize( const Sequence< Any >& aArguments ) throw ( Exception, RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::initialize" ); - m_pImpl->initialize(aArguments); + ResetableGuard aLock( m_aLock ); + + if ( !m_bInitialized ) + { + ::comphelper::SequenceAsHashMap lArgs(aArguments); + m_aModuleIdentifier = lArgs.getUnpackedValueOrDefault(::rtl::OUString::createFromAscii("ModuleIdentifier"), ::rtl::OUString()); + m_aModuleShortName = lArgs.getUnpackedValueOrDefault(::rtl::OUString::createFromAscii("ModuleShortName"), ::rtl::OUString()); + + for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) + { + rtl::OUString aResourceType; + if ( i == ::com::sun::star::ui::UIElementType::MENUBAR ) + aResourceType = PresetHandler::RESOURCETYPE_MENUBAR(); + else if ( i == ::com::sun::star::ui::UIElementType::TOOLBAR ) + aResourceType = PresetHandler::RESOURCETYPE_TOOLBAR(); + else if ( i == ::com::sun::star::ui::UIElementType::STATUSBAR ) + aResourceType = PresetHandler::RESOURCETYPE_STATUSBAR(); + + if ( aResourceType.getLength() > 0 ) + { + m_pStorageHandler[i] = new PresetHandler( m_xServiceManager ); + m_pStorageHandler[i]->connectToResource( PresetHandler::E_MODULES, + aResourceType, // this path wont be used later ... seee next lines! + m_aModuleShortName, + css::uno::Reference< css::embed::XStorage >()); // no document root used here! + } + } + + // initialize root storages for all resource types + m_xUserRootCommit = css::uno::Reference< css::embed::XTransactedObject >( + m_pStorageHandler[::com::sun::star::ui::UIElementType::MENUBAR]->getOrCreateRootStorageUser(), css::uno::UNO_QUERY); // can be empty + m_xDefaultConfigStorage = m_pStorageHandler[::com::sun::star::ui::UIElementType::MENUBAR]->getParentStorageShare( + m_pStorageHandler[::com::sun::star::ui::UIElementType::MENUBAR]->getWorkingStorageShare()); + m_xUserConfigStorage = m_pStorageHandler[::com::sun::star::ui::UIElementType::MENUBAR]->getParentStorageUser( + m_pStorageHandler[::com::sun::star::ui::UIElementType::MENUBAR]->getWorkingStorageUser()); + + if ( m_xUserConfigStorage.is() ) + { + Reference< XPropertySet > xPropSet( m_xUserConfigStorage, UNO_QUERY ); + if ( xPropSet.is() ) + { + long nOpenMode = 0; + Any a = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenMode" ))); + if ( a >>= nOpenMode ) + m_bReadOnly = !( nOpenMode & ElementModes::WRITE ); + } + } + + impl_Initialize(); + + m_bInitialized = true; + } } // XUIConfiguration void SAL_CALL ModuleUIConfigurationManager::addConfigurationListener( const Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::addConfigurationListener" ); - m_pImpl->addConfigurationListener(xListener); + { + ResetableGuard aGuard( m_aLock ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + if ( m_bDisposed ) + throw DisposedException(); + } + + m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XUIConfigurationListener >* ) NULL ), xListener ); } void SAL_CALL ModuleUIConfigurationManager::removeConfigurationListener( const Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::removeConfigurationListener" ); - m_pImpl->removeConfigurationListener(xListener); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XUIConfigurationListener >* ) NULL ), xListener ); } // XUIConfigurationManager void SAL_CALL ModuleUIConfigurationManager::reset() throw (::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::reset" ); - m_pImpl->reset(); + ResetableGuard aGuard( m_aLock ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + if ( m_bDisposed ) + throw DisposedException(); + + bool bResetStorage( false ); + + if ( !isReadOnly() ) + { + // Remove all elements from our user-defined storage! + try + { + for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) + { + UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][i]; + Reference< XStorage > xSubStorage( rElementType.xStorage, UNO_QUERY ); + + if ( xSubStorage.is() ) + { + bool bCommitSubStorage( false ); + Reference< XNameAccess > xSubStorageNameAccess( xSubStorage, UNO_QUERY ); + Sequence< OUString > aUIElementStreamNames = xSubStorageNameAccess->getElementNames(); + for ( sal_Int32 j = 0; j < aUIElementStreamNames.getLength(); j++ ) + { + xSubStorage->removeElement( aUIElementStreamNames[j] ); + bCommitSubStorage = true; + } + + if ( bCommitSubStorage ) + { + Reference< XTransactedObject > xTransactedObject( xSubStorage, UNO_QUERY ); + if ( xTransactedObject.is() ) + xTransactedObject->commit(); + m_pStorageHandler[i]->commitUserChanges(); + } + } + } + + bResetStorage = true; + + // remove settings from user defined layer and notify listener about removed settings data! + ConfigEventNotifyContainer aRemoveEventNotifyContainer; + ConfigEventNotifyContainer aReplaceEventNotifyContainer; + for ( sal_Int16 j = 1; j < ::com::sun::star::ui::UIElementType::COUNT; j++ ) + { + try + { + UIElementType& rUserElementType = m_aUIElements[LAYER_USERDEFINED][j]; + UIElementType& rDefaultElementType = m_aUIElements[LAYER_DEFAULT][j]; + + impl_resetElementTypeData( rUserElementType, rDefaultElementType, aRemoveEventNotifyContainer, aReplaceEventNotifyContainer ); + rUserElementType.bModified = sal_False; + } + catch ( Exception& ) + { + throw IOException(); + } + } + + m_bModified = sal_False; + + // Unlock mutex before notify our listeners + aGuard.unlock(); + + // Notify our listeners + sal_uInt32 k = 0; + for ( k = 0; k < aRemoveEventNotifyContainer.size(); k++ ) + implts_notifyContainerListener( aRemoveEventNotifyContainer[k], NotifyOp_Remove ); + for ( k = 0; k < aReplaceEventNotifyContainer.size(); k++ ) + implts_notifyContainerListener( aReplaceEventNotifyContainer[k], NotifyOp_Replace ); + } + catch ( ::com::sun::star::lang::IllegalArgumentException& ) + { + } + catch ( ::com::sun::star::container::NoSuchElementException& ) + { + } + catch ( ::com::sun::star::embed::InvalidStorageException& ) + { + } + catch ( ::com::sun::star::embed::StorageWrappedTargetException& ) + { + } + } } Sequence< Sequence< PropertyValue > > SAL_CALL ModuleUIConfigurationManager::getUIElementsInfo( sal_Int16 ElementType ) throw ( IllegalArgumentException, RuntimeException ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::getUIElementsInfo" ); - return m_pImpl->getUIElementsInfo(ElementType); + if (( ElementType < 0 ) || ( ElementType >= ::com::sun::star::ui::UIElementType::COUNT )) + throw IllegalArgumentException(); + + ResetableGuard aGuard( m_aLock ); + if ( m_bDisposed ) + throw DisposedException(); + + Sequence< Sequence< PropertyValue > > aElementInfoSeq; + UIElementInfoHashMap aUIElementInfoCollection; + + if ( ElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) + { + for ( sal_Int16 i = 0; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) + impl_fillSequenceWithElementTypeInfo( aUIElementInfoCollection, sal_Int16( i ) ); + } + else + impl_fillSequenceWithElementTypeInfo( aUIElementInfoCollection, ElementType ); + + Sequence< PropertyValue > aUIElementInfo( 2 ); + aUIElementInfo[0].Name = m_aPropResourceURL; + aUIElementInfo[1].Name = m_aPropUIName; + + aElementInfoSeq.realloc( aUIElementInfoCollection.size() ); + UIElementInfoHashMap::const_iterator pIter = aUIElementInfoCollection.begin(); + + sal_Int32 n = 0; + while ( pIter != aUIElementInfoCollection.end() ) + { + aUIElementInfo[0].Value <<= pIter->second.aResourceURL; + aUIElementInfo[1].Value <<= pIter->second.aUIName; + aElementInfoSeq[n++] = aUIElementInfo; + ++pIter; + } + + return aElementInfoSeq; } Reference< XIndexContainer > SAL_CALL ModuleUIConfigurationManager::createSettings() throw (::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::createSettings" ); + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); // Creates an empty item container which can be filled from outside - return m_pImpl->createSettings(); + return Reference< XIndexContainer >( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY ); } sal_Bool SAL_CALL ModuleUIConfigurationManager::hasSettings( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::hasSettings" ); - return m_pImpl->hasSettings(ResourceURL); + sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL ); + + if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) || + ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT )) + throw IllegalArgumentException(); + else + { + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType, false ); + if ( pDataSettings ) + return sal_True; + } + + return sal_False; } Reference< XIndexAccess > SAL_CALL ModuleUIConfigurationManager::getSettings( const ::rtl::OUString& ResourceURL, sal_Bool bWriteable ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::getSettings" ); - return m_pImpl->getSettings(ResourceURL,bWriteable); + sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL ); + + if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) || + ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT )) + throw IllegalArgumentException(); + else + { + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType ); + if ( pDataSettings ) + { + // Create a copy of our data if someone wants to change the data. + if ( bWriteable ) + return Reference< XIndexAccess >( static_cast< OWeakObject * >( new RootItemContainer( pDataSettings->xSettings ) ), UNO_QUERY ); + else + return pDataSettings->xSettings; + } + } + + throw NoSuchElementException(); } void SAL_CALL ModuleUIConfigurationManager::replaceSettings( const ::rtl::OUString& ResourceURL, const Reference< ::com::sun::star::container::XIndexAccess >& aNewData ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::replaceSettings" ); - return m_pImpl->replaceSettings(ResourceURL,aNewData); + sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL ); + + if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) || + ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT )) + throw IllegalArgumentException(); + else if ( m_bReadOnly ) + throw IllegalAccessException(); + else + { + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType ); + if ( pDataSettings ) + { + if ( !pDataSettings->bDefaultNode ) + { + // we have a settings entry in our user-defined layer - replace + Reference< XIndexAccess > xOldSettings = pDataSettings->xSettings; + + // Create a copy of the data if the container is not const + Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY ); + if ( xReplace.is() ) + pDataSettings->xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY ); + else + pDataSettings->xSettings = aNewData; + pDataSettings->bDefault = false; + pDataSettings->bModified = true; + m_bModified = true; + + // Modify type container + UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][nElementType]; + rElementType.bModified = true; + + Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY ); + + // Create event to notify listener about replaced element settings + ConfigurationEvent aEvent; + Reference< XInterface > xIfac( xThis, UNO_QUERY ); + + aEvent.ResourceURL = ResourceURL; + aEvent.Accessor <<= xThis; + aEvent.Source = xIfac; + aEvent.ReplacedElement <<= xOldSettings; + aEvent.Element <<= pDataSettings->xSettings; + + aGuard.unlock(); + + implts_notifyContainerListener( aEvent, NotifyOp_Replace ); + } + else + { + // we have no settings in our user-defined layer - insert + UIElementData aUIElementData; + + aUIElementData.bDefault = false; + aUIElementData.bDefaultNode = false; + aUIElementData.bModified = true; + + // Create a copy of the data if the container is not const + Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY ); + if ( xReplace.is() ) + aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY ); + else + aUIElementData.xSettings = aNewData; + aUIElementData.aName = RetrieveNameFromResourceURL( ResourceURL ) + m_aXMLPostfix; + aUIElementData.aResourceURL = ResourceURL; + m_bModified = true; + + // Modify type container + UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][nElementType]; + rElementType.bModified = true; + + UIElementDataHashMap& rElements = rElementType.aElementsHashMap; + + // Check our user element settings hash map as it can already contain settings that have been set to default! + // If no node can be found, we have to insert it. + UIElementDataHashMap::iterator pIter = rElements.find( ResourceURL ); + if ( pIter != rElements.end() ) + pIter->second = aUIElementData; + else + rElements.insert( UIElementDataHashMap::value_type( ResourceURL, aUIElementData )); + + Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY ); + Reference< XInterface > xIfac( xThis, UNO_QUERY ); + + // Create event to notify listener about replaced element settings + ConfigurationEvent aEvent; + + aEvent.ResourceURL = ResourceURL; + aEvent.Accessor <<= xThis; + aEvent.Source = xIfac; + aEvent.ReplacedElement <<= pDataSettings->xSettings; + aEvent.Element <<= aUIElementData.xSettings; + + aGuard.unlock(); + + implts_notifyContainerListener( aEvent, NotifyOp_Replace ); + } + } + else + throw NoSuchElementException(); + } } void SAL_CALL ModuleUIConfigurationManager::removeSettings( const ::rtl::OUString& ResourceURL ) throw ( NoSuchElementException, IllegalArgumentException, IllegalAccessException, RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::removeSettings" ); - m_pImpl->removeSettings(ResourceURL); + sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL ); + + if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) || + ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT )) + throw IllegalArgumentException(); + else if ( m_bReadOnly ) + throw IllegalAccessException(); + else + { + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType ); + if ( pDataSettings ) + { + // If element settings are default, we don't need to change anything! + if ( pDataSettings->bDefault ) + return; + else + { + Reference< XIndexAccess > xRemovedSettings = pDataSettings->xSettings; + pDataSettings->bDefault = true; + + // check if this is a default layer node + if ( !pDataSettings->bDefaultNode ) + pDataSettings->bModified = true; // we have to remove this node from the user layer! + pDataSettings->xSettings.clear(); + m_bModified = true; // user layer must be written + + // Modify type container + UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][nElementType]; + rElementType.bModified = true; + + Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY ); + Reference< XInterface > xIfac( xThis, UNO_QUERY ); + + // Check if we have settings in the default layer which replaces the user-defined one! + UIElementData* pDefaultDataSettings = impl_findUIElementData( ResourceURL, nElementType ); + if ( pDefaultDataSettings ) + { + // Create event to notify listener about replaced element settings + ConfigurationEvent aEvent; + + aEvent.ResourceURL = ResourceURL; + aEvent.Accessor <<= xThis; + aEvent.Source = xIfac; + aEvent.Element <<= xRemovedSettings; + aEvent.ReplacedElement <<= pDefaultDataSettings->xSettings; + + aGuard.unlock(); + + implts_notifyContainerListener( aEvent, NotifyOp_Replace ); + } + else + { + // Create event to notify listener about removed element settings + ConfigurationEvent aEvent; + + aEvent.ResourceURL = ResourceURL; + aEvent.Accessor <<= xThis; + aEvent.Source = xIfac; + aEvent.Element <<= xRemovedSettings; + + aGuard.unlock(); + + implts_notifyContainerListener( aEvent, NotifyOp_Remove ); + } + } + } + else + throw NoSuchElementException(); + } } void SAL_CALL ModuleUIConfigurationManager::insertSettings( const ::rtl::OUString& NewResourceURL, const Reference< XIndexAccess >& aNewData ) throw ( ElementExistException, IllegalArgumentException, IllegalAccessException, RuntimeException ) { - m_pImpl->insertSettings(NewResourceURL,aNewData); + sal_Int16 nElementType = RetrieveTypeFromResourceURL( NewResourceURL ); + + if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) || + ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT )) + throw IllegalArgumentException(); + else if ( m_bReadOnly ) + throw IllegalAccessException(); + else + { + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + UIElementData* pDataSettings = impl_findUIElementData( NewResourceURL, nElementType ); + if ( !pDataSettings ) + { + UIElementData aUIElementData; + + aUIElementData.bDefault = false; + aUIElementData.bDefaultNode = false; + aUIElementData.bModified = true; + + // Create a copy of the data if the container is not const + Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY ); + if ( xReplace.is() ) + aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY ); + else + aUIElementData.xSettings = aNewData; + aUIElementData.aName = RetrieveNameFromResourceURL( NewResourceURL ) + m_aXMLPostfix; + aUIElementData.aResourceURL = NewResourceURL; + m_bModified = true; + + UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][nElementType]; + rElementType.bModified = true; + + UIElementDataHashMap& rElements = rElementType.aElementsHashMap; + rElements.insert( UIElementDataHashMap::value_type( NewResourceURL, aUIElementData )); + + Reference< XIndexAccess > xInsertSettings( aUIElementData.xSettings ); + Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY ); + Reference< XInterface > xIfac( xThis, UNO_QUERY ); + + // Create event to notify listener about removed element settings + ConfigurationEvent aEvent; + + aEvent.ResourceURL = NewResourceURL; + aEvent.Accessor <<= xThis; + aEvent.Source = xIfac; + aEvent.Element <<= xInsertSettings; + + aGuard.unlock(); + + implts_notifyContainerListener( aEvent, NotifyOp_Insert ); + } + else + throw ElementExistException(); + } } Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getImageManager() throw (::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::getImageManager" ); - return m_pImpl->getImageManager(); + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + if ( !m_xModuleImageManager.is() ) + { + m_xModuleImageManager = Reference< XComponent >( static_cast< cppu::OWeakObject *>( new ModuleImageManager( m_xServiceManager )), + UNO_QUERY ); + Reference< XInitialization > xInit( m_xModuleImageManager, UNO_QUERY ); + + Sequence< Any > aPropSeq( 3 ); + PropertyValue aPropValue; + aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UserConfigStorage" )); + aPropValue.Value = makeAny( m_xUserConfigStorage ); + aPropSeq[0] = makeAny( aPropValue ); + aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleIdentifier" )); + aPropValue.Value = makeAny( m_aModuleIdentifier ); + aPropSeq[1] = makeAny( aPropValue ); + aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UserRootCommit" )); + aPropValue.Value = makeAny( m_xUserRootCommit ); + aPropSeq[2] = makeAny( aPropValue ); + + xInit->initialize( aPropSeq ); + } + + return Reference< XInterface >( m_xModuleImageManager, UNO_QUERY ); + +// return Reference< XInterface >(); } Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getShortCutManager() throw (::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::getShortCutManager" ); - return m_pImpl->getShortCutManager(); + ResetableGuard aGuard( m_aLock ); + Reference< XMultiServiceFactory > xSMGR = m_xServiceManager; + ::rtl::OUString aModule = /*m_aModuleShortName*/m_aModuleIdentifier; + aGuard.unlock(); + + Reference< XInterface > xManager = xSMGR->createInstance(SERVICENAME_MODULEACCELERATORCONFIGURATION); + Reference< XInitialization > xInit (xManager, UNO_QUERY_THROW); + + PropertyValue aProp; + aProp.Name = ::rtl::OUString::createFromAscii("ModuleIdentifier"); + aProp.Value <<= aModule; + + Sequence< Any > lArgs(1); + lArgs[0] <<= aProp; + + xInit->initialize(lArgs); + + return xManager; } Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getEventsManager() throw (::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::getEventsManager" ); return Reference< XInterface >(); } @@ -242,46 +1406,210 @@ Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getEventsManager( sal_Bool SAL_CALL ModuleUIConfigurationManager::isDefaultSettings( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::isDefaultSettings" ); - return m_pImpl->isDefaultSettings(ResourceURL); + sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL ); + + if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) || + ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT )) + throw IllegalArgumentException(); + else + { + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType, false ); + if ( pDataSettings && pDataSettings->bDefaultNode ) + return sal_True; + } + + return sal_False; } Reference< XIndexAccess > SAL_CALL ModuleUIConfigurationManager::getDefaultSettings( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::getDefaultSettings" ); - return m_pImpl->getDefaultSettings(ResourceURL); + sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL ); + + if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) || + ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT )) + throw IllegalArgumentException(); + else + { + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + // preload list of element types on demand + impl_preloadUIElementTypeList( LAYER_DEFAULT, nElementType ); + + // Look into our default vector/hash_map combination + UIElementDataHashMap& rDefaultHashMap = m_aUIElements[LAYER_DEFAULT][nElementType].aElementsHashMap; + UIElementDataHashMap::iterator pIter = rDefaultHashMap.find( ResourceURL ); + if ( pIter != rDefaultHashMap.end() ) + { + if ( !pIter->second.xSettings.is() ) + impl_requestUIElementData( nElementType, LAYER_DEFAULT, pIter->second ); + return pIter->second.xSettings; + } + } + + // Nothing has been found! + throw NoSuchElementException(); } // XUIConfigurationPersistence void SAL_CALL ModuleUIConfigurationManager::reload() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::reload" ); - m_pImpl->reload(); + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + if ( m_xUserConfigStorage.is() && m_bModified && !m_bReadOnly ) + { + // Try to access our module sub folder + ConfigEventNotifyContainer aRemoveNotifyContainer; + ConfigEventNotifyContainer aReplaceNotifyContainer; + for ( sal_Int16 i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) + { + try + { + UIElementType& rUserElementType = m_aUIElements[LAYER_USERDEFINED][i]; + UIElementType& rDefaultElementType = m_aUIElements[LAYER_DEFAULT][i]; + + if ( rUserElementType.bModified ) + impl_reloadElementTypeData( rUserElementType, rDefaultElementType, aRemoveNotifyContainer, aReplaceNotifyContainer ); + } + catch ( Exception& ) + { + throw IOException(); + } + } + + m_bModified = sal_False; + + // Unlock mutex before notify our listeners + aGuard.unlock(); + + // Notify our listeners + for ( sal_uInt32 j = 0; j < aRemoveNotifyContainer.size(); j++ ) + implts_notifyContainerListener( aRemoveNotifyContainer[j], NotifyOp_Remove ); + for ( sal_uInt32 k = 0; k < aReplaceNotifyContainer.size(); k++ ) + implts_notifyContainerListener( aReplaceNotifyContainer[k], NotifyOp_Replace ); + } } void SAL_CALL ModuleUIConfigurationManager::store() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::store" ); - m_pImpl->store(); + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + if ( m_xUserConfigStorage.is() && m_bModified && !m_bReadOnly ) + { + // Try to access our module sub folder + for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) + { + try + { + UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][i]; + Reference< XStorage > xStorage( rElementType.xStorage, UNO_QUERY ); + + if ( rElementType.bModified && xStorage.is() ) + { + impl_storeElementTypeData( xStorage, rElementType ); + m_pStorageHandler[i]->commitUserChanges(); + } + } + catch ( Exception& ) + { + throw IOException(); + } + } + + m_bModified = false; + } } void SAL_CALL ModuleUIConfigurationManager::storeToStorage( const Reference< XStorage >& Storage ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::storeToStorage" ); - m_pImpl->storeToStorage(Storage); + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + if ( m_xUserConfigStorage.is() && m_bModified && !m_bReadOnly ) + { + // Try to access our module sub folder + for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) + { + try + { + Reference< XStorage > xElementTypeStorage( Storage->openStorageElement( + OUString::createFromAscii( UIELEMENTTYPENAMES[i] ), ElementModes::READWRITE )); + UIElementType& rElementType = m_aUIElements[LAYER_USERDEFINED][i]; + + if ( rElementType.bModified && xElementTypeStorage.is() ) + impl_storeElementTypeData( xElementTypeStorage, rElementType, false ); // store data to storage, but don't reset modify flag! + } + catch ( Exception& ) + { + throw IOException(); + } + } + + Reference< XTransactedObject > xTransactedObject( Storage, UNO_QUERY ); + if ( xTransactedObject.is() ) + xTransactedObject->commit(); + } } sal_Bool SAL_CALL ModuleUIConfigurationManager::isModified() throw (::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::isModified" ); - return m_pImpl->isModified(); + ResetableGuard aGuard( m_aLock ); + + return m_bModified; } sal_Bool SAL_CALL ModuleUIConfigurationManager::isReadOnly() throw (::com::sun::star::uno::RuntimeException) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "framework", "Ocke.Janssen@sun.com", "ModuleUIConfigurationManager::isReadOnly" ); - return m_pImpl->isReadOnly(); + ResetableGuard aGuard( m_aLock ); + + return m_bReadOnly; +} + +void ModuleUIConfigurationManager::implts_notifyContainerListener( const ConfigurationEvent& aEvent, NotifyOp eOp ) +{ + ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >*) NULL ) ); + if ( pContainer != NULL ) + { + ::cppu::OInterfaceIteratorHelper pIterator( *pContainer ); + while ( pIterator.hasMoreElements() ) + { + try + { + switch ( eOp ) + { + case NotifyOp_Replace: + ((::com::sun::star::ui::XUIConfigurationListener*)pIterator.next())->elementReplaced( aEvent ); + break; + case NotifyOp_Insert: + ((::com::sun::star::ui::XUIConfigurationListener*)pIterator.next())->elementInserted( aEvent ); + break; + case NotifyOp_Remove: + ((::com::sun::star::ui::XUIConfigurationListener*)pIterator.next())->elementRemoved( aEvent ); + break; + } + } + catch( css::uno::RuntimeException& ) + { + pIterator.remove(); + } + } + } } } // namespace framework diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 67049d9eb4dc..3309333fb327 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -38,7 +38,6 @@ #include #include #include -#include #ifndef __FRAMEWORK_XML_STATUSBARCONFIGURATION_HXX_ #include @@ -111,9 +110,511 @@ DEFINE_XSERVICEINFO_MULTISERVICE ( UIConfigurationManager DEFINE_INIT_SERVICE ( UIConfigurationManager, {} ) -UIConfigurationManager::UIConfigurationManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager ) -: m_pImpl( new UIConfigurationManagerImpl(xServiceManager,static_cast< OWeakObject* >(this),false) ) + +// important: The order and position of the elements must match the constant +// definition of "::com::sun::star::ui::UIElementType" +static const char* UIELEMENTTYPENAMES[] = +{ + "", // Dummy value for unknown! + UIELEMENTTYPE_MENUBAR_NAME, + UIELEMENTTYPE_POPUPMENU_NAME, + UIELEMENTTYPE_TOOLBAR_NAME, + UIELEMENTTYPE_STATUSBAR_NAME, + UIELEMENTTYPE_FLOATINGWINDOW_NAME, + UIELEMENTTYPE_PROGRESSBAR_NAME +}; + +static const char RESOURCEURL_PREFIX[] = "private:resource/"; +static const sal_Int32 RESOURCEURL_PREFIX_SIZE = 17; + +static sal_Int16 RetrieveTypeFromResourceURL( const rtl::OUString& aResourceURL ) +{ + + if (( aResourceURL.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( RESOURCEURL_PREFIX ))) == 0 ) && + ( aResourceURL.getLength() > RESOURCEURL_PREFIX_SIZE )) + { + rtl::OUString aTmpStr = aResourceURL.copy( RESOURCEURL_PREFIX_SIZE ); + sal_Int32 nIndex = aTmpStr.indexOf( '/' ); + if (( nIndex > 0 ) && ( aTmpStr.getLength() > nIndex )) + { + rtl::OUString aTypeStr( aTmpStr.copy( 0, nIndex )); + for ( int i = 0; i < UIElementType::COUNT; i++ ) + { + if ( aTypeStr.equalsAscii( UIELEMENTTYPENAMES[i] )) + return sal_Int16( i ); + } + } + } + + return UIElementType::UNKNOWN; +} + +static rtl::OUString RetrieveNameFromResourceURL( const rtl::OUString& aResourceURL ) +{ + if (( aResourceURL.indexOf( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( RESOURCEURL_PREFIX ))) == 0 ) && + ( aResourceURL.getLength() > RESOURCEURL_PREFIX_SIZE )) + { + sal_Int32 nIndex = aResourceURL.lastIndexOf( '/' ); + if (( nIndex > 0 ) && (( nIndex+1 ) < aResourceURL.getLength())) + return aResourceURL.copy( nIndex+1 ); + } + + return rtl::OUString(); +} + +void UIConfigurationManager::impl_fillSequenceWithElementTypeInfo( UIElementInfoHashMap& aUIElementInfoCollection, sal_Int16 nElementType ) { + // preload list of element types on demand + impl_preloadUIElementTypeList( nElementType ); + + UIElementDataHashMap& rUserElements = m_aUIElements[nElementType].aElementsHashMap; + UIElementDataHashMap::const_iterator pUserIter = rUserElements.begin(); + + while ( pUserIter != rUserElements.end() ) + { + UIElementData* pDataSettings = impl_findUIElementData( pUserIter->second.aResourceURL, nElementType ); + if ( pDataSettings && !pDataSettings->bDefault ) + { + // Retrieve user interface name from XPropertySet interface + rtl::OUString aUIName; + Reference< XPropertySet > xPropSet( pDataSettings->xSettings, UNO_QUERY ); + if ( xPropSet.is() ) + { + Any a = xPropSet->getPropertyValue( m_aPropUIName ); + a >>= aUIName; + } + + UIElementInfo aInfo( pUserIter->second.aResourceURL, aUIName ); + aUIElementInfoCollection.insert( UIElementInfoHashMap::value_type( pUserIter->second.aResourceURL, aInfo )); + } + ++pUserIter; + } +} + +void UIConfigurationManager::impl_preloadUIElementTypeList( sal_Int16 nElementType ) +{ + UIElementType& rElementTypeData = m_aUIElements[nElementType]; + + if ( !rElementTypeData.bLoaded ) + { + Reference< XStorage > xElementTypeStorage = rElementTypeData.xStorage; + if ( xElementTypeStorage.is() ) + { + rtl::OUStringBuffer aBuf( RESOURCEURL_PREFIX_SIZE ); + aBuf.appendAscii( RESOURCEURL_PREFIX ); + aBuf.appendAscii( UIELEMENTTYPENAMES[ nElementType ] ); + aBuf.appendAscii( "/" ); + rtl::OUString aResURLPrefix( aBuf.makeStringAndClear() ); + + UIElementDataHashMap& rHashMap = rElementTypeData.aElementsHashMap; + Reference< XNameAccess > xNameAccess( xElementTypeStorage, UNO_QUERY ); + Sequence< rtl::OUString > aUIElementNames = xNameAccess->getElementNames(); + for ( sal_Int32 n = 0; n < aUIElementNames.getLength(); n++ ) + { + UIElementData aUIElementData; + + // Resource name must be without ".xml" + sal_Int32 nIndex = aUIElementNames[n].lastIndexOf( '.' ); + if (( nIndex > 0 ) && ( nIndex < aUIElementNames[n].getLength() )) + { + rtl::OUString aExtension( aUIElementNames[n].copy( nIndex+1 )); + rtl::OUString aUIElementName( aUIElementNames[n].copy( 0, nIndex )); + + if (( aUIElementName.getLength() > 0 ) && + ( aExtension.equalsIgnoreAsciiCaseAsciiL( "xml", 3 ))) + { + aUIElementData.aResourceURL = aResURLPrefix + aUIElementName; + aUIElementData.aName = aUIElementNames[n]; + aUIElementData.bModified = false; + aUIElementData.bDefault = false; + + // Create hash_map entries for all user interface elements inside the storage. We don't load the + // settings to speed up the process. + rHashMap.insert( UIElementDataHashMap::value_type( aUIElementData.aResourceURL, aUIElementData )); + } + } + } + } + } + + rElementTypeData.bLoaded = true; +} + +void UIConfigurationManager::impl_requestUIElementData( sal_Int16 nElementType, UIElementData& aUIElementData ) +{ + UIElementType& rElementTypeData = m_aUIElements[nElementType]; + + Reference< XStorage > xElementTypeStorage = rElementTypeData.xStorage; + if ( xElementTypeStorage.is() && aUIElementData.aName.getLength() ) + { + try + { + Reference< XStream > xStream = xElementTypeStorage->openStreamElement( aUIElementData.aName, ElementModes::READ ); + Reference< XInputStream > xInputStream = xStream->getInputStream(); + + if ( xInputStream.is() ) + { + switch ( nElementType ) + { + case ::com::sun::star::ui::UIElementType::UNKNOWN: + break; + + case ::com::sun::star::ui::UIElementType::MENUBAR: + { + try + { + MenuConfiguration aMenuCfg( m_xServiceManager ); + Reference< XIndexAccess > xContainer( aMenuCfg.CreateMenuBarConfigurationFromXML( xInputStream )); + RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xContainer ); + if ( pRootItemContainer ) + aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, sal_True ) ), UNO_QUERY ); + else + aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( xContainer, sal_True ) ), UNO_QUERY ); + return; + } + catch ( ::com::sun::star::lang::WrappedTargetException& ) + { + } + } + break; + + case ::com::sun::star::ui::UIElementType::POPUPMENU: + { + break; + } + + case ::com::sun::star::ui::UIElementType::TOOLBAR: + { + try + { + Reference< XIndexContainer > xIndexContainer( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY ); + ToolBoxConfiguration::LoadToolBox( m_xServiceManager, xInputStream, xIndexContainer ); + RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xIndexContainer ); + aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, sal_True ) ), UNO_QUERY ); + return; + } + catch ( ::com::sun::star::lang::WrappedTargetException& ) + { + } + + break; + } + + case ::com::sun::star::ui::UIElementType::STATUSBAR: + { + try + { + Reference< XIndexContainer > xIndexContainer( static_cast< OWeakObject * >( new RootItemContainer() ), UNO_QUERY ); + StatusBarConfiguration::LoadStatusBar( m_xServiceManager, xInputStream, xIndexContainer ); + RootItemContainer* pRootItemContainer = RootItemContainer::GetImplementation( xIndexContainer ); + aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( pRootItemContainer, sal_True ) ), UNO_QUERY ); + return; + } + catch ( ::com::sun::star::lang::WrappedTargetException& ) + { + } + + break; + } + + case ::com::sun::star::ui::UIElementType::FLOATINGWINDOW: + { + break; + } + } + } + } + catch ( ::com::sun::star::embed::InvalidStorageException& ) + { + } + catch ( ::com::sun::star::lang::IllegalArgumentException& ) + { + } + catch ( ::com::sun::star::io::IOException& ) + { + } + catch ( ::com::sun::star::embed::StorageWrappedTargetException& ) + { + } + } + + // At least we provide an empty settings container! + aUIElementData.xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer()), UNO_QUERY ); +} + +UIConfigurationManager::UIElementData* UIConfigurationManager::impl_findUIElementData( const rtl::OUString& aResourceURL, sal_Int16 nElementType, bool bLoad ) +{ + // preload list of element types on demand + impl_preloadUIElementTypeList( nElementType ); + + // try to look into our document vector/hash_map combination + UIElementDataHashMap& rUserHashMap = m_aUIElements[nElementType].aElementsHashMap; + UIElementDataHashMap::iterator pIter = rUserHashMap.find( aResourceURL ); + if ( pIter != rUserHashMap.end() ) + { + // Default data settings data means removed! + if ( pIter->second.bDefault ) + return &(pIter->second); + else + { + if ( !pIter->second.xSettings.is() && bLoad ) + impl_requestUIElementData( nElementType, pIter->second ); + return &(pIter->second); + } + } + + // Nothing has been found! + return NULL; +} + +void UIConfigurationManager::impl_storeElementTypeData( Reference< XStorage >& xStorage, UIElementType& rElementType, bool bResetModifyState ) +{ + UIElementDataHashMap& rHashMap = rElementType.aElementsHashMap; + UIElementDataHashMap::iterator pIter = rHashMap.begin(); + + while ( pIter != rHashMap.end() ) + { + UIElementData& rElement = pIter->second; + if ( rElement.bModified ) + { + if ( rElement.bDefault ) + { + xStorage->removeElement( rElement.aName ); + rElement.bModified = sal_False; // mark as not modified + } + else + { + Reference< XStream > xStream( xStorage->openStreamElement( rElement.aName, ElementModes::WRITE|ElementModes::TRUNCATE ), UNO_QUERY ); + Reference< XOutputStream > xOutputStream( xStream->getOutputStream() ); + + if ( xOutputStream.is() ) + { + switch( rElementType.nElementType ) + { + case ::com::sun::star::ui::UIElementType::MENUBAR: + { + try + { + MenuConfiguration aMenuCfg( m_xServiceManager ); + aMenuCfg.StoreMenuBarConfigurationToXML( rElement.xSettings, xOutputStream ); + } + catch ( ::com::sun::star::lang::WrappedTargetException& ) + { + } + } + break; + + case ::com::sun::star::ui::UIElementType::TOOLBAR: + { + try + { + ToolBoxConfiguration::StoreToolBox( m_xServiceManager, xOutputStream, rElement.xSettings ); + } + catch ( ::com::sun::star::lang::WrappedTargetException& ) + { + } + } + break; + + case ::com::sun::star::ui::UIElementType::STATUSBAR: + { + try + { + StatusBarConfiguration::StoreStatusBar( m_xServiceManager, xOutputStream, rElement.xSettings ); + } + catch ( ::com::sun::star::lang::WrappedTargetException& ) + { + } + } + break; + + default: + break; + } + } + + // mark as not modified if we store to our own storage + if ( bResetModifyState ) + rElement.bModified = sal_False; + } + } + + ++pIter; + } + + // commit element type storage + Reference< XTransactedObject > xTransactedObject( xStorage, UNO_QUERY ); + if ( xTransactedObject.is() ) + xTransactedObject->commit(); + + // mark UIElementType as not modified if we store to our own storage + if ( bResetModifyState ) + rElementType.bModified = sal_False; +} + +void UIConfigurationManager::impl_resetElementTypeData( + UIElementType& rDocElementType, + ConfigEventNotifyContainer& rRemoveNotifyContainer ) +{ + UIElementDataHashMap& rHashMap = rDocElementType.aElementsHashMap; + UIElementDataHashMap::iterator pIter = rHashMap.begin(); + + Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY ); + Reference< XInterface > xIfac( xThis, UNO_QUERY ); + + // Make copies of the event structures to be thread-safe. We have to unlock our mutex before calling + // our listeners! + while ( pIter != rHashMap.end() ) + { + UIElementData& rElement = pIter->second; + if ( !rElement.bDefault ) + { + // Remove user-defined settings from document + ConfigurationEvent aEvent; + aEvent.ResourceURL = rElement.aResourceURL; + aEvent.Accessor <<= xThis; + aEvent.Source = xIfac; + aEvent.Element <<= rElement.xSettings; + + rRemoveNotifyContainer.push_back( aEvent ); + + // Mark element as default. + rElement.bModified = false; + rElement.bDefault = true; + } + else + rElement.bModified = false; + + ++pIter; + } + + // Remove all settings from our user interface elements + rHashMap.clear(); +} + +void UIConfigurationManager::impl_reloadElementTypeData( + UIElementType& rDocElementType, + ConfigEventNotifyContainer& rRemoveNotifyContainer, + ConfigEventNotifyContainer& rReplaceNotifyContainer ) +{ + UIElementDataHashMap& rHashMap = rDocElementType.aElementsHashMap; + UIElementDataHashMap::iterator pIter = rHashMap.begin(); + Reference< XStorage > xElementStorage( rDocElementType.xStorage ); + Reference< XNameAccess > xElementNameAccess( xElementStorage, UNO_QUERY ); + + Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY ); + Reference< XInterface > xIfac( xThis, UNO_QUERY ); + sal_Int16 nType = rDocElementType.nElementType; + + while ( pIter != rHashMap.end() ) + { + UIElementData& rElement = pIter->second; + if ( rElement.bModified ) + { + if ( xElementNameAccess->hasByName( rElement.aName )) + { + // Replace settings with data from user layer + Reference< XIndexAccess > xOldSettings( rElement.xSettings ); + + impl_requestUIElementData( nType, rElement ); + + ConfigurationEvent aReplaceEvent; + + aReplaceEvent.ResourceURL = rElement.aResourceURL; + aReplaceEvent.Accessor <<= xThis; + aReplaceEvent.Source = xIfac; + aReplaceEvent.ReplacedElement <<= xOldSettings; + aReplaceEvent.Element <<= rElement.xSettings; + rReplaceNotifyContainer.push_back( aReplaceEvent ); + + rElement.bModified = false; + } + else + { + // Element settings are not in any storage => remove + ConfigurationEvent aRemoveEvent; + + aRemoveEvent.ResourceURL = rElement.aResourceURL; + aRemoveEvent.Accessor <<= xThis; + aRemoveEvent.Source = xIfac; + aRemoveEvent.Element <<= rElement.xSettings; + + rRemoveNotifyContainer.push_back( aRemoveEvent ); + + // Mark element as default and not modified. That means "not active" in the document anymore + rElement.bModified = false; + rElement.bDefault = true; + } + } + ++pIter; + } + + rDocElementType.bModified = sal_False; +} + +void UIConfigurationManager::impl_Initialize() +{ + // Initialize the top-level structures with the storage data + if ( m_xDocConfigStorage.is() ) + { + long nModes = m_bReadOnly ? ElementModes::READ : ElementModes::READWRITE; + + // Try to access our module sub folder + for ( sal_Int16 i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; + i++ ) + { + Reference< XStorage > xElementTypeStorage; + try + { + xElementTypeStorage = m_xDocConfigStorage->openStorageElement( rtl::OUString::createFromAscii( UIELEMENTTYPENAMES[i] ), nModes ); + } + catch ( com::sun::star::container::NoSuchElementException& ) + { + } + catch ( ::com::sun::star::embed::InvalidStorageException& ) + { + } + catch ( ::com::sun::star::lang::IllegalArgumentException& ) + { + } + catch ( ::com::sun::star::io::IOException& ) + { + } + catch ( ::com::sun::star::embed::StorageWrappedTargetException& ) + { + } + + m_aUIElements[i].nElementType = i; + m_aUIElements[i].bModified = false; + m_aUIElements[i].xStorage = xElementTypeStorage; + m_aUIElements[i].bDefaultLayer = false; + } + } + else + { + // We have no storage, just initialize ui element types with empty storage! + for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) + m_aUIElements[i].xStorage = m_xDocConfigStorage; + } +} + +UIConfigurationManager::UIConfigurationManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager ) : + ThreadHelpBase( &Application::GetSolarMutex() ) + , m_xDocConfigStorage( 0 ) + , m_bReadOnly( true ) + , m_bInitialized( false ) + , m_bModified( false ) + , m_bConfigRead( false ) + , m_bDisposed( false ) + , m_aXMLPostfix( RTL_CONSTASCII_USTRINGPARAM( ".xml" )) + , m_aPropUIName( RTL_CONSTASCII_USTRINGPARAM( "UIName" )) + , m_aPropResourceURL( RTL_CONSTASCII_USTRINGPARAM( "ResourceURL" )) + , m_xServiceManager( xServiceManager ) + , m_aListenerContainer( m_aLock.getShareableOslMutex() ) +{ + // Make sure we have a default initialized entry for every layer and user interface element type! + // The following code depends on this! + m_aUIElements.resize( ::com::sun::star::ui::UIElementType::COUNT ); } UIConfigurationManager::~UIConfigurationManager() @@ -123,86 +624,507 @@ UIConfigurationManager::~UIConfigurationManager() // XComponent void SAL_CALL UIConfigurationManager::dispose() throw (::com::sun::star::uno::RuntimeException) { - m_pImpl->dispose(); + Reference< XComponent > xThis( static_cast< OWeakObject* >(this), UNO_QUERY ); + + css::lang::EventObject aEvent( xThis ); + m_aListenerContainer.disposeAndClear( aEvent ); + + { + ResetableGuard aGuard( m_aLock ); + try + { + if ( m_xImageManager.is() ) + m_xImageManager->dispose(); + } + catch ( Exception& ) + { + } + + m_xImageManager.clear(); + m_aUIElements.clear(); + m_xDocConfigStorage.clear(); + m_bConfigRead = false; + m_bModified = false; + m_bDisposed = true; + } } void SAL_CALL UIConfigurationManager::addEventListener( const Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) { + { + ResetableGuard aGuard( m_aLock ); - m_pImpl->addEventListener(xListener); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + if ( m_bDisposed ) + throw DisposedException(); + } + + m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); } void SAL_CALL UIConfigurationManager::removeEventListener( const Reference< XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) { - m_pImpl->removeEventListener(xListener); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener ); } // XUIConfigurationManager void SAL_CALL UIConfigurationManager::addConfigurationListener( const Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) { - m_pImpl->addConfigurationListener(xListener); + { + ResetableGuard aGuard( m_aLock ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + if ( m_bDisposed ) + throw DisposedException(); + } + + m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XUIConfigurationListener >* ) NULL ), xListener ); } void SAL_CALL UIConfigurationManager::removeConfigurationListener( const Reference< ::com::sun::star::ui::XUIConfigurationListener >& xListener ) throw (::com::sun::star::uno::RuntimeException) { - m_pImpl->removeConfigurationListener(xListener); + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XUIConfigurationListener >* ) NULL ), xListener ); } void SAL_CALL UIConfigurationManager::reset() throw (::com::sun::star::uno::RuntimeException) { - m_pImpl->reset(); + ResetableGuard aGuard( m_aLock ); + + /* SAFE AREA ----------------------------------------------------------------------------------------------- */ + if ( m_bDisposed ) + throw DisposedException(); + + if ( isReadOnly() ) + return; + + bool bResetStorage( false ); + if ( m_xDocConfigStorage.is() ) + { + try + { + // Remove all elements from our user-defined storage! + bool bCommit( false ); + for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) + { + UIElementType& rElementType = m_aUIElements[i]; + Reference< XStorage > xSubStorage( rElementType.xStorage, UNO_QUERY ); + + if ( xSubStorage.is() ) + { + bool bCommitSubStorage( false ); + Reference< XNameAccess > xSubStorageNameAccess( xSubStorage, UNO_QUERY ); + Sequence< rtl::OUString > aUIElementStreamNames = xSubStorageNameAccess->getElementNames(); + for ( sal_Int32 j = 0; j < aUIElementStreamNames.getLength(); j++ ) + { + xSubStorage->removeElement( aUIElementStreamNames[j] ); + bCommitSubStorage = true; + bCommit = true; + } + + if ( bCommitSubStorage ) + { + Reference< XTransactedObject > xTransactedObject( xSubStorage, UNO_QUERY ); + if ( xTransactedObject.is() ) + xTransactedObject->commit(); + } + } + } + + // Commit changes + if ( bCommit ) + { + Reference< XTransactedObject > xTransactedObject( m_xDocConfigStorage, UNO_QUERY ); + if ( xTransactedObject.is() ) + xTransactedObject->commit(); + } + bResetStorage = true; + + // remove settings from user defined layer and notify listener about removed settings data! + // Try to access our module sub folder + ConfigEventNotifyContainer aRemoveEventNotifyContainer; + for ( sal_Int16 j = 1; j < ::com::sun::star::ui::UIElementType::COUNT; j++ ) + { + UIElementType& rDocElementType = m_aUIElements[j]; + + impl_resetElementTypeData( rDocElementType, aRemoveEventNotifyContainer ); + rDocElementType.bModified = sal_False; + } + + m_bModified = sal_False; + + // Unlock mutex before notify our listeners + aGuard.unlock(); + + // Notify our listeners + for ( sal_uInt32 k = 0; k < aRemoveEventNotifyContainer.size(); k++ ) + implts_notifyContainerListener( aRemoveEventNotifyContainer[k], NotifyOp_Remove ); + } + catch ( ::com::sun::star::lang::IllegalArgumentException& ) + { + } + catch ( ::com::sun::star::container::NoSuchElementException& ) + { + } + catch ( ::com::sun::star::embed::InvalidStorageException& ) + { + } + catch ( ::com::sun::star::embed::StorageWrappedTargetException& ) + { + } + } } Sequence< Sequence< PropertyValue > > SAL_CALL UIConfigurationManager::getUIElementsInfo( sal_Int16 ElementType ) throw ( IllegalArgumentException, RuntimeException ) { - return m_pImpl->getUIElementsInfo(ElementType); + if (( ElementType < 0 ) || ( ElementType >= ::com::sun::star::ui::UIElementType::COUNT )) + throw IllegalArgumentException(); + + ResetableGuard aGuard( m_aLock ); + if ( m_bDisposed ) + throw DisposedException(); + + Sequence< Sequence< PropertyValue > > aElementInfoSeq; + UIElementInfoHashMap aUIElementInfoCollection; + + if ( ElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) + { + for ( sal_Int16 i = 0; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) + impl_fillSequenceWithElementTypeInfo( aUIElementInfoCollection, sal_Int16( i ) ); + } + else + impl_fillSequenceWithElementTypeInfo( aUIElementInfoCollection, ElementType ); + + Sequence< PropertyValue > aUIElementInfo( 2 ); + aUIElementInfo[0].Name = m_aPropResourceURL; + aUIElementInfo[1].Name = m_aPropUIName; + + aElementInfoSeq.realloc( aUIElementInfoCollection.size() ); + UIElementInfoHashMap::const_iterator pIter = aUIElementInfoCollection.begin(); + + sal_Int32 n = 0; + while ( pIter != aUIElementInfoCollection.end() ) + { + aUIElementInfo[0].Value <<= pIter->second.aResourceURL; + aUIElementInfo[1].Value <<= pIter->second.aUIName; + aElementInfoSeq[n++] = aUIElementInfo; + ++pIter; + } + + return aElementInfoSeq; } Reference< XIndexContainer > SAL_CALL UIConfigurationManager::createSettings() throw (::com::sun::star::uno::RuntimeException) { - return m_pImpl->createSettings(); + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + // Creates an empty item container which can be filled from outside + return Reference< XIndexContainer >( static_cast< OWeakObject * >( new RootItemContainer()), UNO_QUERY ); } sal_Bool SAL_CALL UIConfigurationManager::hasSettings( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { - return m_pImpl->hasSettings(ResourceURL); + sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL ); + + if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) || + ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT )) + throw IllegalArgumentException(); + else + { + UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType, false ); + if ( pDataSettings && !pDataSettings->bDefault ) + return sal_True; + } + + return sal_False; } Reference< XIndexAccess > SAL_CALL UIConfigurationManager::getSettings( const ::rtl::OUString& ResourceURL, sal_Bool bWriteable ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) { - return m_pImpl->getSettings(ResourceURL,bWriteable); + sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL ); + + if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) || + ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT )) + throw IllegalArgumentException(); + else + { + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType ); + if ( pDataSettings && !pDataSettings->bDefault ) + { + // Create a copy of our data if someone wants to change the data. + if ( bWriteable ) + return Reference< XIndexAccess >( static_cast< OWeakObject * >( new RootItemContainer( pDataSettings->xSettings ) ), UNO_QUERY ); + else + return pDataSettings->xSettings; + } + } + + throw NoSuchElementException(); } void SAL_CALL UIConfigurationManager::replaceSettings( const ::rtl::OUString& ResourceURL, const Reference< ::com::sun::star::container::XIndexAccess >& aNewData ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException) { - return m_pImpl->replaceSettings(ResourceURL,aNewData); + sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL ); + + if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) || + ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT )) + throw IllegalArgumentException(); + else if ( m_bReadOnly ) + throw IllegalAccessException(); + else + { + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType ); + if ( pDataSettings && !pDataSettings->bDefault ) + { + // we have a settings entry in our user-defined layer - replace + Reference< XIndexAccess > xOldSettings = pDataSettings->xSettings; + + // Create a copy of the data if the container is not const + Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY ); + if ( xReplace.is() ) + pDataSettings->xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY ); + else + pDataSettings->xSettings = aNewData; + + pDataSettings->bDefault = false; + pDataSettings->bModified = true; + m_bModified = true; + + // Modify type container + UIElementType& rElementType = m_aUIElements[nElementType]; + rElementType.bModified = true; + + Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY ); + + // Create event to notify listener about replaced element settings + ConfigurationEvent aEvent; + Reference< XInterface > xIfac( xThis, UNO_QUERY ); + + aEvent.ResourceURL = ResourceURL; + aEvent.Accessor <<= xThis; + aEvent.Source = xIfac; + aEvent.ReplacedElement <<= xOldSettings; + aEvent.Element <<= pDataSettings->xSettings; + + aGuard.unlock(); + + implts_notifyContainerListener( aEvent, NotifyOp_Replace ); + } + else + throw NoSuchElementException(); + } } void SAL_CALL UIConfigurationManager::removeSettings( const ::rtl::OUString& ResourceURL ) throw ( NoSuchElementException, IllegalArgumentException, IllegalAccessException, RuntimeException) { - m_pImpl->removeSettings(ResourceURL); + sal_Int16 nElementType = RetrieveTypeFromResourceURL( ResourceURL ); + + if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) || + ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT )) + throw IllegalArgumentException(); + else if ( m_bReadOnly ) + throw IllegalAccessException(); + else + { + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + UIElementData* pDataSettings = impl_findUIElementData( ResourceURL, nElementType ); + if ( pDataSettings ) + { + // If element settings are default, we don't need to change anything! + if ( pDataSettings->bDefault ) + return; + else + { + Reference< XIndexAccess > xRemovedSettings = pDataSettings->xSettings; + pDataSettings->bDefault = true; + + // check if this is a default layer node + pDataSettings->bModified = true; // we have to remove this node from the user layer! + pDataSettings->xSettings.clear(); + m_bModified = true; // user layer must be written + + // Modify type container + UIElementType& rElementType = m_aUIElements[nElementType]; + rElementType.bModified = true; + + Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY ); + Reference< XInterface > xIfac( xThis, UNO_QUERY ); + + // Create event to notify listener about removed element settings + ConfigurationEvent aEvent; + + aEvent.ResourceURL = ResourceURL; + aEvent.Accessor <<= xThis; + aEvent.Source = xIfac; + aEvent.Element <<= xRemovedSettings; + + aGuard.unlock(); + + implts_notifyContainerListener( aEvent, NotifyOp_Remove ); + } + } + else + throw NoSuchElementException(); + } } void SAL_CALL UIConfigurationManager::insertSettings( const ::rtl::OUString& NewResourceURL, const Reference< XIndexAccess >& aNewData ) throw ( ElementExistException, IllegalArgumentException, IllegalAccessException, RuntimeException ) { - m_pImpl->insertSettings(NewResourceURL,aNewData); + sal_Int16 nElementType = RetrieveTypeFromResourceURL( NewResourceURL ); + + if (( nElementType == ::com::sun::star::ui::UIElementType::UNKNOWN ) || + ( nElementType >= ::com::sun::star::ui::UIElementType::COUNT )) + throw IllegalArgumentException(); + else if ( m_bReadOnly ) + throw IllegalAccessException(); + else + { + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + bool bInsertData( false ); + UIElementData aUIElementData; + UIElementData* pDataSettings = impl_findUIElementData( NewResourceURL, nElementType ); + + if ( pDataSettings && !pDataSettings->bDefault ) + throw ElementExistException(); + + if ( !pDataSettings ) + { + pDataSettings = &aUIElementData; + bInsertData = true; + } + + { + pDataSettings->bDefault = false; + pDataSettings->bModified = true; + + // Create a copy of the data if the container is not const + Reference< XIndexReplace > xReplace( aNewData, UNO_QUERY ); + if ( xReplace.is() ) + pDataSettings->xSettings = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( aNewData ) ), UNO_QUERY ); + else + pDataSettings->xSettings = aNewData; + + m_bModified = true; + + UIElementType& rElementType = m_aUIElements[nElementType]; + rElementType.bModified = true; + + if ( bInsertData ) + { + pDataSettings->aName = RetrieveNameFromResourceURL( NewResourceURL ) + m_aXMLPostfix; + pDataSettings->aResourceURL = NewResourceURL; + + UIElementDataHashMap& rElements = rElementType.aElementsHashMap; + rElements.insert( UIElementDataHashMap::value_type( NewResourceURL, *pDataSettings )); + } + + Reference< XIndexAccess > xInsertSettings( aUIElementData.xSettings ); + Reference< XUIConfigurationManager > xThis( static_cast< OWeakObject* >( this ), UNO_QUERY ); + Reference< XInterface > xIfac( xThis, UNO_QUERY ); + + // Create event to notify listener about removed element settings + ConfigurationEvent aEvent; + + aEvent.ResourceURL = NewResourceURL; + aEvent.Accessor <<= xThis; + aEvent.Source = xIfac; + aEvent.Element <<= xInsertSettings; + + aGuard.unlock(); + + implts_notifyContainerListener( aEvent, NotifyOp_Insert ); + } + } } Reference< XInterface > SAL_CALL UIConfigurationManager::getImageManager() throw (::com::sun::star::uno::RuntimeException) { - return m_pImpl->getImageManager(); + if ( m_bDisposed ) + throw DisposedException(); + + if ( !m_xImageManager.is() ) + { + m_xImageManager = Reference< XComponent >( static_cast< cppu::OWeakObject *>( new ImageManager( m_xServiceManager )), + UNO_QUERY ); + Reference< XInitialization > xInit( m_xImageManager, UNO_QUERY ); + + Sequence< Any > aPropSeq( 2 ); + PropertyValue aPropValue; + aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UserConfigStorage" )); + aPropValue.Value = makeAny( m_xDocConfigStorage ); + aPropSeq[0] = makeAny( aPropValue ); + aPropValue.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ModuleIdentifier" )); + aPropValue.Value = makeAny( m_aModuleIdentifier ); + aPropSeq[1] = makeAny( aPropValue ); + + xInit->initialize( aPropSeq ); + } + + return Reference< XInterface >( m_xImageManager, UNO_QUERY ); } Reference< XInterface > SAL_CALL UIConfigurationManager::getShortCutManager() throw (::com::sun::star::uno::RuntimeException) { - return m_pImpl->getShortCutManager(); + // SAFE -> + ResetableGuard aGuard( m_aLock ); + + if (m_xAccConfig.is()) + return m_xAccConfig; + + Reference< XMultiServiceFactory > xSMGR = m_xServiceManager; + Reference< XStorage > xDocumentRoot = m_xDocConfigStorage; + + aGuard.unlock(); + // <- SAFE + + Reference< XInterface > xAccConfig = xSMGR->createInstance(SERVICENAME_DOCUMENTACCELERATORCONFIGURATION); + Reference< XInitialization > xInit (xAccConfig, UNO_QUERY_THROW); + + PropertyValue aProp; + aProp.Name = ::rtl::OUString::createFromAscii("DocumentRoot"); + aProp.Value <<= xDocumentRoot; + + Sequence< Any > lArgs(1); + lArgs[0] <<= aProp; + + xInit->initialize(lArgs); + + // SAFE -> + aGuard.lock(); + m_xAccConfig = xAccConfig; + aGuard.unlock(); + // <- SAFE + + return xAccConfig; } Reference< XInterface > SAL_CALL UIConfigurationManager::getEventsManager() throw (::com::sun::star::uno::RuntimeException) @@ -213,38 +1135,223 @@ Reference< XInterface > SAL_CALL UIConfigurationManager::getEventsManager() thro // XUIConfigurationStorage void SAL_CALL UIConfigurationManager::setStorage( const Reference< XStorage >& Storage ) throw (::com::sun::star::uno::RuntimeException) { - m_pImpl->setStorage(Storage); + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + if ( m_xDocConfigStorage.is() ) + { + try + { + // Dispose old storage to be sure that it will be closed + Reference< XComponent > xComponent( m_xDocConfigStorage, UNO_QUERY ); + if ( xComponent.is() ) + xComponent->dispose(); + } + catch ( Exception& ) + { + } + } + + // We store the new storage. Be careful it could be an empty reference! + m_xDocConfigStorage = Storage; + m_bReadOnly = sal_True; + + Reference< XUIConfigurationStorage > xAccUpdate(m_xAccConfig, UNO_QUERY); + if ( xAccUpdate.is() ) + xAccUpdate->setStorage( m_xDocConfigStorage ); + + if ( m_xImageManager.is() ) + { + ImageManager* pImageManager = (ImageManager*)m_xImageManager.get(); + if ( pImageManager ) + pImageManager->setStorage( m_xDocConfigStorage ); + } + + if ( m_xDocConfigStorage.is() ) + { + Reference< XPropertySet > xPropSet( m_xDocConfigStorage, UNO_QUERY ); + if ( xPropSet.is() ) + { + try + { + long nOpenMode = 0; + Any a = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenMode" ))); + if ( a >>= nOpenMode ) + m_bReadOnly = !( nOpenMode & ElementModes::WRITE ); + } + catch ( com::sun::star::beans::UnknownPropertyException& ) + { + } + catch ( com::sun::star::lang::WrappedTargetException& ) + { + } + } + } + + impl_Initialize(); } sal_Bool SAL_CALL UIConfigurationManager::hasStorage() throw (::com::sun::star::uno::RuntimeException) { - return m_pImpl->hasStorage(); + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + return ( m_xDocConfigStorage.is() ); } // XUIConfigurationPersistence void SAL_CALL UIConfigurationManager::reload() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) { - m_pImpl->reload(); + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + if ( m_xDocConfigStorage.is() && m_bModified && !m_bReadOnly ) + { + // Try to access our module sub folder + ConfigEventNotifyContainer aRemoveNotifyContainer; + ConfigEventNotifyContainer aReplaceNotifyContainer; + for ( sal_Int16 i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) + { + try + { + UIElementType& rDocElementType = m_aUIElements[i]; + if ( rDocElementType.bModified ) + impl_reloadElementTypeData( rDocElementType, aRemoveNotifyContainer, aReplaceNotifyContainer ); + } + catch ( Exception& ) + { + throw IOException(); + } + } + + m_bModified = sal_False; + + // Unlock mutex before notify our listeners + aGuard.unlock(); + + // Notify our listeners + for ( sal_uInt32 j = 0; j < aRemoveNotifyContainer.size(); j++ ) + implts_notifyContainerListener( aRemoveNotifyContainer[j], NotifyOp_Remove ); + for ( sal_uInt32 k = 0; k < aReplaceNotifyContainer.size(); k++ ) + implts_notifyContainerListener( aReplaceNotifyContainer[k], NotifyOp_Replace ); + } } void SAL_CALL UIConfigurationManager::store() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) { - m_pImpl->store(); + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + if ( m_xDocConfigStorage.is() && m_bModified && !m_bReadOnly ) + { + // Try to access our module sub folder + for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) + { + try + { + UIElementType& rElementType = m_aUIElements[i]; + Reference< XStorage > xStorage( rElementType.xStorage, UNO_QUERY ); + + if ( rElementType.bModified && xStorage.is() ) + impl_storeElementTypeData( xStorage, rElementType ); + } + catch ( Exception& ) + { + throw IOException(); + } + } + + m_bModified = false; + Reference< XTransactedObject > xTransactedObject( m_xDocConfigStorage, UNO_QUERY ); + if ( xTransactedObject.is() ) + xTransactedObject->commit(); + } } void SAL_CALL UIConfigurationManager::storeToStorage( const Reference< XStorage >& Storage ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) { - m_pImpl->storeToStorage(Storage); + ResetableGuard aGuard( m_aLock ); + + if ( m_bDisposed ) + throw DisposedException(); + + if ( m_xDocConfigStorage.is() && m_bModified && !m_bReadOnly ) + { + // Try to access our module sub folder + for ( int i = 1; i < ::com::sun::star::ui::UIElementType::COUNT; i++ ) + { + try + { + Reference< XStorage > xElementTypeStorage( Storage->openStorageElement( + rtl::OUString::createFromAscii( UIELEMENTTYPENAMES[i] ), ElementModes::READWRITE )); + UIElementType& rElementType = m_aUIElements[i]; + + if ( rElementType.bModified && xElementTypeStorage.is() ) + impl_storeElementTypeData( xElementTypeStorage, rElementType, false ); // store data to storage, but don't reset modify flag! + } + catch ( Exception& ) + { + throw IOException(); + } + } + + Reference< XTransactedObject > xTransactedObject( Storage, UNO_QUERY ); + if ( xTransactedObject.is() ) + xTransactedObject->commit(); + } } sal_Bool SAL_CALL UIConfigurationManager::isModified() throw (::com::sun::star::uno::RuntimeException) { - return m_pImpl->isModified(); + ResetableGuard aGuard( m_aLock ); + + return m_bModified; } sal_Bool SAL_CALL UIConfigurationManager::isReadOnly() throw (::com::sun::star::uno::RuntimeException) { - return m_pImpl->isReadOnly(); + ResetableGuard aGuard( m_aLock ); + + return m_bReadOnly; +} + +void UIConfigurationManager::implts_notifyContainerListener( const ConfigurationEvent& aEvent, NotifyOp eOp ) +{ + ::cppu::OInterfaceContainerHelper* pContainer = m_aListenerContainer.getContainer( ::getCppuType( ( const css::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >*) NULL ) ); + if ( pContainer != NULL ) + { + ::cppu::OInterfaceIteratorHelper pIterator( *pContainer ); + while ( pIterator.hasMoreElements() ) + { + try + { + switch ( eOp ) + { + case NotifyOp_Replace: + ((::com::sun::star::ui::XUIConfigurationListener*)pIterator.next())->elementReplaced( aEvent ); + break; + case NotifyOp_Insert: + ((::com::sun::star::ui::XUIConfigurationListener*)pIterator.next())->elementInserted( aEvent ); + break; + case NotifyOp_Remove: + ((::com::sun::star::ui::XUIConfigurationListener*)pIterator.next())->elementRemoved( aEvent ); + break; + } + } + catch( css::uno::RuntimeException& ) + { + pIterator.remove(); + } + } + } } } // namespace framework diff --git a/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx b/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx index 5b67b13d8805..40c2c3f10708 100755 --- a/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanagerimpl.cxx @@ -148,12 +148,12 @@ void UIConfigurationManagerImpl::impl_fillSequenceWithElementTypeInfo( UIElement while ( pUserIter != rUserElements.end() ) { sal_Int32 nIndex = pUserIter->second.aResourceURL.indexOf( aCustomUrlPrefix, RESOURCEURL_PREFIX_SIZE ); - if ( !m_bUseDefault && nIndex > RESOURCEURL_PREFIX_SIZE ) + if ( nIndex > RESOURCEURL_PREFIX_SIZE ) { // Performance: Retrieve user interface name only for custom user interface elements. // It's only used by them! UIElementData* pDataSettings = impl_findUIElementData( pUserIter->second.aResourceURL, nElementType ); - if ( pDataSettings && ( !m_bUseDefault || !pDataSettings->bDefault) ) + if ( pDataSettings && ( m_bUseDefault || !pDataSettings->bDefault )) { // Retrieve user interface name from XPropertySet interface rtl::OUString aUIName; @@ -1268,7 +1268,7 @@ throw ( ElementExistException, IllegalArgumentException, IllegalAccessException, if ( m_bDisposed ) throw DisposedException(); - bool bInsertData( m_bUseDefault ); + bool bInsertData( false ); UIElementData aUIElementData; UIElementData* pDataSettings = impl_findUIElementData( NewResourceURL, nElementType ); if ( !m_bUseDefault ) @@ -1281,7 +1281,7 @@ throw ( ElementExistException, IllegalArgumentException, IllegalAccessException, bInsertData = true; } } - if ( !pDataSettings || bInsertData ) + if ( !pDataSettings || !m_bUseDefault ) { aUIElementData.bDefault = false; if ( !m_bUseDefault ) diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk index 60a44dba706f..0a07f3cf137d 100644 --- a/framework/util/makefile.mk +++ b/framework/util/makefile.mk @@ -334,7 +334,6 @@ SHL4OBJS= \ $(SLO)$/uicategorydescription.obj \ $(SLO)$/uicommanddescription.obj \ $(SLO)$/uiconfigurationmanager.obj \ - $(SLO)$/uiconfigurationmanagerimpl.obj \ $(SLO)$/uielementfactorymanager.obj \ $(SLO)$/urltransformer.obj \ $(SLO)$/vclstatusindicator.obj \ diff --git a/oovbaapi/ooo/vba/constants/makefile.mk b/oovbaapi/ooo/vba/constants/makefile.mk index 0b092e6f7999..fa9cdaddc1c4 100644 --- a/oovbaapi/ooo/vba/constants/makefile.mk +++ b/oovbaapi/ooo/vba/constants/makefile.mk @@ -55,7 +55,6 @@ MYIDLFILES=$(foreach,i,$(MYTMPIDLFILES) $(MY_GEN_IDL_PATH)$/$(i)) MYURDFILES=$(foreach,i,$(MYIDLFILES) $(MY_GEN_UCR_PATH)$/$(i:b).urd) MYDBTARGET=$(OUT)$/ucr/constants.db .ENDIF -.ENDIF .INCLUDE : target.mk @@ -69,3 +68,4 @@ $(MYDBTARGET) : $(MYURDFILES) $(MYIDLFILES) $(REGMERGE) $(OUT)$/ucr/constants.db /UCR @$(mktmp $(MYURDFILES)) .ENDIF +.ENDIF diff --git a/oovbaapi/ooo/vba/makefile.mk b/oovbaapi/ooo/vba/makefile.mk index 6f9815bfeb72..99a11e5ac0fa 100644 --- a/oovbaapi/ooo/vba/makefile.mk +++ b/oovbaapi/ooo/vba/makefile.mk @@ -41,7 +41,7 @@ PACKAGE=ooo$/vba .IF "$(ENABLE_VBA)"!="YES" dummy: @echo "not building vba..." -.ENDIF +.ELSE # ------------------------------------------------------------------------ .IF "$(L10N_framework)"="" @@ -62,3 +62,4 @@ IDLFILES=\ # ------------------------------------------------------------------ .ENDIF .INCLUDE : target.mk +.ENDIF diff --git a/sfx2/source/view/viewimp.hxx b/sfx2/source/view/viewimp.hxx index f75d68fe1413..97f86ee1f395 100644 --- a/sfx2/source/view/viewimp.hxx +++ b/sfx2/source/view/viewimp.hxx @@ -45,6 +45,8 @@ #include #include +#include + #include // forward --------------------------------------------------------------- @@ -71,6 +73,8 @@ public: void AddRequest( SfxRequest& rReq ); }; +class SfxClipboardChangeListener; + struct SfxViewShell_Impl { ::osl::Mutex aMutex; @@ -96,11 +100,9 @@ struct SfxViewShell_Impl ::svt::AcceleratorExecute* pAccExec; SfxAsyncPrintExec_Impl* pPrinterCommandQueue; com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aPrintOpts; + ::rtl::Reference< SfxClipboardChangeListener > xClipboardListener; - SfxViewShell_Impl() - : aInterceptorContainer( aMutex ) - , pAccExec(0) - {} + SfxViewShell_Impl(); }; #endif diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 299c928c748b..f6053a467ed4 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -131,6 +131,8 @@ class SfxClipboardChangeListener : public ::cppu::WeakImplHelper1< public: SfxClipboardChangeListener( SfxViewShell* pView ); virtual ~SfxClipboardChangeListener(); + + void DisconnectViewShell() { pViewShell = NULL; } }; SfxClipboardChangeListener::SfxClipboardChangeListener( SfxViewShell* pView ) @@ -241,7 +243,12 @@ static ::rtl::OUString RetrieveLabelFromCommand( } //========================================================================= +SfxViewShell_Impl::SfxViewShell_Impl() +: aInterceptorContainer( aMutex ) +, pAccExec(0) +{} +//========================================================================= SFX_IMPL_INTERFACE(SfxViewShell,SfxShell,SfxResId(0)) { SFX_CHILDWINDOW_REGISTRATION( SID_MAIL_CHILDWIN ); @@ -1297,21 +1304,27 @@ SfxViewShell::~SfxViewShell() SfxViewShellArr_Impl &rViewArr = SFX_APP()->GetViewShells_Impl(); rViewArr.Remove( rViewArr.GetPos(pThis) ); + if ( pImp->xClipboardListener.is() ) + { + pImp->xClipboardListener->DisconnectViewShell(); + pImp->xClipboardListener = NULL; + } + if ( pImp->pController ) { pImp->pController->ReleaseShell_Impl(); pImp->pController->release(); + pImp->pController = NULL; } if (pImp->pAccExec) { - delete pImp->pAccExec; - pImp->pAccExec = 0; + DELETEZ( pImp->pAccExec ); } - delete pImp->pPrinterCommandQueue; - delete pImp; - delete pIPClientList; + DELETEZ( pImp->pPrinterCommandQueue ); + DELETEZ( pImp ); + DELETEZ( pIPClientList ); } //-------------------------------------------------------------------- @@ -1997,7 +2010,12 @@ void SfxViewShell::SetController( SfxBaseController* pController ) pImp->pController->acquire(); pImp->bControllerSet = TRUE; - AddRemoveClipboardListener( new SfxClipboardChangeListener( this ), TRUE ); + // there should be no old listener, but if there is one, it should be disconnected + if ( pImp->xClipboardListener.is() ) + pImp->xClipboardListener->DisconnectViewShell(); + + pImp->xClipboardListener = new SfxClipboardChangeListener( this ); + AddRemoveClipboardListener( pImp->xClipboardListener.get(), TRUE ); } Reference < XController > SfxViewShell::GetController() @@ -2205,17 +2223,20 @@ void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransf { try { - uno::Reference< datatransfer::clipboard::XClipboard > xClipboard( GetViewFrame()->GetWindow().GetClipboard() ); - if( !xClipboard.is() ) - return; - - uno::Reference< datatransfer::clipboard::XClipboardNotifier > xClpbrdNtfr( xClipboard, uno::UNO_QUERY ); - if( xClpbrdNtfr.is() ) + if ( GetViewFrame() ) { - if( bAdd ) - xClpbrdNtfr->addClipboardListener( rClp ); - else - xClpbrdNtfr->removeClipboardListener( rClp ); + uno::Reference< datatransfer::clipboard::XClipboard > xClipboard( GetViewFrame()->GetWindow().GetClipboard() ); + if( xClipboard.is() ) + { + uno::Reference< datatransfer::clipboard::XClipboardNotifier > xClpbrdNtfr( xClipboard, uno::UNO_QUERY ); + if( xClpbrdNtfr.is() ) + { + if( bAdd ) + xClpbrdNtfr->addClipboardListener( rClp ); + else + xClpbrdNtfr->removeClipboardListener( rClp ); + } + } } } catch( const uno::Exception& ) diff --git a/svx/inc/svx/msdffimp.hxx b/svx/inc/svx/msdffimp.hxx index 248a31dcf71f..603a6831fe30 100644 --- a/svx/inc/svx/msdffimp.hxx +++ b/svx/inc/svx/msdffimp.hxx @@ -481,6 +481,7 @@ public: MSFilterTracer* mpTracer; sal_Bool mbTracing; + Color MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const; Color MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContextProperty = DFF_Prop_lineColor ) const; virtual BOOL SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const; FASTBOOL SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFilePos, DffRecordHeader* pRecHd = NULL, ULONG nSkipCount = 0 ) const; diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx index 27359ebf9738..87a1de55ec0a 100644 --- a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx +++ b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx @@ -65,6 +65,8 @@ namespace sdr { namespace contact { ::rtl::Reference< ViewObjectContactOfUnoControl_Impl > m_pImpl; public: + ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); + /// determines whether an XControl already exists, and is currently visible bool isControlVisible() const; @@ -98,7 +100,6 @@ namespace sdr { namespace contact { virtual void ActionChanged(); protected: - ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); ~ViewObjectContactOfUnoControl(); // support for Primitive2D @@ -110,36 +111,6 @@ namespace sdr { namespace contact { ViewObjectContactOfUnoControl& operator=( const ViewObjectContactOfUnoControl& ); // never implemented }; - //==================================================================== - //= UnoControlDefaultContact - //==================================================================== - class SVX_DLLPRIVATE UnoControlDefaultContact : public ViewObjectContactOfUnoControl - { - public: - UnoControlDefaultContact( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); - ~UnoControlDefaultContact(); - - private: - UnoControlDefaultContact(); // never implemented - UnoControlDefaultContact( const UnoControlDefaultContact& ); // never implemented - UnoControlDefaultContact& operator=( const UnoControlDefaultContact& ); // never implemented - }; - - //==================================================================== - //= UnoControlWindowContact - //==================================================================== - class SVX_DLLPRIVATE UnoControlWindowContact : public ViewObjectContactOfUnoControl - { - public: - UnoControlWindowContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); - ~UnoControlWindowContact(); - - private: - UnoControlWindowContact(); // never implemented - UnoControlWindowContact( const UnoControlWindowContact& ); // never implemented - UnoControlWindowContact& operator=( const UnoControlWindowContact& ); // never implemented - }; - //==================================================================== //= UnoControlPrintOrPreviewContact //==================================================================== @@ -157,21 +128,6 @@ namespace sdr { namespace contact { virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const; }; - //==================================================================== - //= UnoControlPDFExportContact - //==================================================================== - class SVX_DLLPRIVATE UnoControlPDFExportContact : public ViewObjectContactOfUnoControl - { - public: - UnoControlPDFExportContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact ); - ~UnoControlPDFExportContact(); - - private: - UnoControlPDFExportContact(); // never implemented - UnoControlPDFExportContact( const UnoControlPDFExportContact& ); // never implemented - UnoControlPDFExportContact& operator=( const UnoControlPDFExportContact& ); // never implemented - }; - //........................................................................ } } // namespace sdr::contact //........................................................................ diff --git a/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx b/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx index 798e5b53d6de..0f46c2809597 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx @@ -75,7 +75,8 @@ namespace drawinglayer const attribute::SdrTextAttribute& rText, const attribute::SdrLineAttribute* pStroke, bool bCellText, - bool bWordWrap); + bool bWordWrap, + bool bClipOnBounds); Primitive2DSequence createEmbeddedShadowPrimitive( const Primitive2DSequence& rContent, diff --git a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx index 132a3ecc2538..059849531566 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx @@ -219,6 +219,7 @@ namespace drawinglayer unsigned mbUnlimitedPage : 1; // force layout with no text break unsigned mbCellText : 1; // this is a cell text as block text unsigned mbWordWrap : 1; // for CustomShapes text layout + unsigned mbClipOnBounds : 1; // for CustomShapes text layout protected: // local decomposition. @@ -234,7 +235,8 @@ namespace drawinglayer bool bFixedCellHeight, bool bUnlimitedPage, bool bCellText, - bool bWordWrap); + bool bWordWrap, + bool bClipOnBounds); // get data const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; } @@ -244,6 +246,7 @@ namespace drawinglayer bool getUnlimitedPage() const { return mbUnlimitedPage; } bool getCellText() const { return mbCellText; } bool getWordWrap() const { return mbWordWrap; } + bool getClipOnBounds() const { return mbClipOnBounds; } // compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index f53168a273ac..afff309168ac 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -763,12 +763,18 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType ) Fraction aZoom = GetZoom(); // not all of these controls need to know the new zoom, but to be sure ... - Font aFont( IsControlFont() ? GetControlFont() : GetPointFont()); + Font aFont( GetSettings().GetStyleSettings().GetFieldFont() ); + if ( IsControlFont() ) + aFont.Merge( GetControlFont() ); + for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) { pWindows[i]->SetZoom(aZoom); pWindows[i]->SetZoomedPointFont(aFont); } + + SetZoomedPointFont( aFont ); + // rearrange the controls m_nDefaultWidth = ArrangeControls(); } @@ -1075,18 +1081,13 @@ void DbGridControl::ImplInitWindow( const InitWindowFacet _eInitWhat ) { if ( m_bNavigationBar ) { - m_aBar.SetZoom( GetZoom() ); - Font aFont = m_aBar.GetSettings().GetStyleSettings().GetFieldFont(); if ( IsControlFont() ) - { m_aBar.SetControlFont( GetControlFont() ); - aFont.Merge( GetControlFont() ); - } else m_aBar.SetControlFont(); - m_aBar.SetZoomedPointFont( aFont ); + m_aBar.SetZoom( GetZoom() ); } } diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 10c0978288a6..fc7f1aa78558 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -101,6 +101,7 @@ namespace svx //==================================================================== static SfxSlotId pTextControlSlots[] = { + SID_CLIPBOARD_FORMAT_ITEMS, SID_CUT, SID_COPY, SID_PASTE, @@ -140,7 +141,6 @@ namespace svx // SID_TEXTDIRECTION_TOP_TO_BOTTOM, SID_ATTR_CHAR_SCALEWIDTH, /* 911 */ SID_ATTR_CHAR_RELIEF, - SID_CLIPBOARD_FORMAT_ITEMS, /* 922 */ SID_ATTR_PARA_LEFT_TO_RIGHT, /* 950 */ SID_ATTR_PARA_RIGHT_TO_LEFT, 0 diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx index 0e751e3181e7..c9cfde91547a 100644 --- a/svx/source/msfilter/msdffimp.cxx +++ b/svx/source/msfilter/msdffimp.cxx @@ -3234,6 +3234,8 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const { // MapUnit eMap( rManager.GetModel()->GetScaleUnit() ); + sal_Bool bHasShadow = sal_False; + for ( void* pDummy = ((DffPropertyReader*)this)->First(); pDummy; pDummy = ((DffPropertyReader*)this)->Next() ) { UINT32 nRecType = GetCurKey(); @@ -3305,8 +3307,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const break; case DFF_Prop_fshadowObscured : { - sal_Bool bHasShadow = ( nContent & 2 ) != 0; - rSet.Put( SdrShadowItem( bHasShadow ) ); + bHasShadow = ( nContent & 2 ) != 0; if ( bHasShadow ) { if ( !IsProperty( DFF_Prop_shadowOffsetX ) ) @@ -3319,6 +3320,44 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const } } + if ( bHasShadow ) + { + // #160376# sj: activating shadow only if fill and or linestyle is used + // this is required because of the latest drawing layer core changes. + // Issue i104085 is related to this. + UINT32 nLineFlags(GetPropertyValue( DFF_Prop_fNoLineDrawDash )); + if(!IsHardAttribute( DFF_Prop_fLine ) && !IsCustomShapeStrokedByDefault( rObjData.eShapeType )) + nLineFlags &= ~0x08; + UINT32 nFillFlags(GetPropertyValue( DFF_Prop_fNoFillHitTest )); + if(!IsHardAttribute( DFF_Prop_fFilled ) && !IsCustomShapeFilledByDefault( rObjData.eShapeType )) + nFillFlags &= ~0x10; + if ( nFillFlags & 0x10 ) + { + MSO_FillType eMSO_FillType = (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid ); + switch( eMSO_FillType ) + { + case mso_fillSolid : + case mso_fillPattern : + case mso_fillTexture : + case mso_fillPicture : + case mso_fillShade : + case mso_fillShadeCenter : + case mso_fillShadeShape : + case mso_fillShadeScale : + case mso_fillShadeTitle : + break; + // case mso_fillBackground : + default: + nFillFlags &=~0x10; // no fillstyle used + break; + } + } + if ( ( ( nLineFlags & 0x08 ) == 0 ) && ( ( nFillFlags & 0x10 ) == 0 ) ) // if there is no fillstyle and linestyle + bHasShadow = sal_False; // we are turning shadow off. + + if ( bHasShadow ) + rSet.Put( SdrShadowItem( bHasShadow ) ); + } ApplyLineAttributes( rSet, rObjData.eShapeType ); // #i28269# ApplyFillAttributes( rIn, rSet, rObjData ); if ( rObjData.eShapeType != mso_sptNil ) @@ -3770,14 +3809,37 @@ FASTBOOL SvxMSDffManager::GetColorFromPalette( USHORT /* nNum */, Color& rColor return TRUE; } +// sj: the documentation is not complete, especially in ppt the normal rgb for text +// color is written as 0xfeRRGGBB, this can't be explained by the documentation, nearly +// every bit in the upper code is set -> so there seems to be a special handling for +// ppt text colors, i decided not to fix this in MSO_CLR_ToColor because of possible +// side effects, instead MSO_TEXT_CLR_ToColor is called for PPT text colors, to map +// the color code to something that behaves like the other standard color codes used by +// fill and line color +Color SvxMSDffManager::MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const +{ + // Fuer Textfarben: Header ist 0xfeRRGGBB + if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 ) + nColorCode &= 0x00ffffff; + else + { + // for colorscheme colors the color index are the lower three bits of the upper byte + if ( ( nColorCode & 0xf8000000 ) == 0 ) // this must be a colorscheme index + { + nColorCode >>= 24; + nColorCode |= 0x8000000; + } + } + return MSO_CLR_ToColor( nColorCode ); +} Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContentProperty ) const { Color aColor( mnDefaultColor ); // Fuer Textfarben: Header ist 0xfeRRGGBB - if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 ) - nColorCode &= 0x00ffffff; + if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 ) // sj: it needs to be checked if 0xfe is used in + nColorCode &= 0x00ffffff; // other cases than ppt text -> if not this code can be removed sal_uInt8 nUpper = (sal_uInt8)( nColorCode >> 24 ); diff --git a/svx/source/outliner/outliner.cxx b/svx/source/outliner/outliner.cxx index 3da9e8dbecac..fc144cf4304f 100644 --- a/svx/source/outliner/outliner.cxx +++ b/svx/source/outliner/outliner.cxx @@ -1867,6 +1867,20 @@ IMPL_LINK( Outliner, EndMovingParagraphsHdl, MoveParagraphsInfo*, pInfos ) return 0; } +static bool isSameNumbering( const SvxNumberFormat& rN1, const SvxNumberFormat& rN2 ) +{ + if( rN1.GetNumberingType() != rN2.GetNumberingType() ) + return false; + + if( rN1.GetNumStr(1) != rN2.GetNumStr(1) ) + return false; + + if( (rN1.GetPrefix() != rN2.GetPrefix()) || (rN1.GetSuffix() != rN2.GetSuffix()) ) + return false; + + return true; +} + sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt ) { sal_uInt16 nNumber = pParaFmt->GetStart() - 1; @@ -1879,8 +1893,8 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar pPara = pParaList->GetParagraph( nPara ); const sal_Int16 nDepth = pPara->GetDepth(); - // ignore paragraphs that are below our paragraph - if( nDepth > nParaDepth ) + // ignore paragraphs that are below our paragraph or have no numbering + if( (nDepth > nParaDepth) || (nDepth == -1) ) continue; // stop on paragraphs that are above our paragraph @@ -1888,8 +1902,13 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar break; const SvxNumberFormat* pFmt = GetNumberFormat( nPara ); - if( pFmt == 0 || (*pFmt != *pParaFmt) ) - break; // change in number format, stop here + + if( pFmt == 0 ) + continue; // ignore paragraphs without bullets + + // check if numbering is the same + if( !isSameNumbering( *pFmt, *pParaFmt ) ) + break; const SfxBoolItem& rBulletState = (const SfxBoolItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE ); diff --git a/svx/source/outliner/outlvw.cxx b/svx/source/outliner/outlvw.cxx index 098a4055ce0f..a69776df14e8 100644 --- a/svx/source/outliner/outlvw.cxx +++ b/svx/source/outliner/outlvw.cxx @@ -1010,6 +1010,14 @@ void OutlinerView::PasteSpecial() pOwner->bPasting = TRUE; pEditView->PasteSpecial(); + if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT ) + { + const USHORT nParaCount = pOwner->pEditEngine->GetParagraphCount(); + + for( USHORT nPara = 0; nPara < nParaCount; nPara++ ) + pOwner->ImplSetLevelDependendStyleSheet( nPara ); + } + pEditView->SetEditEngineUpdateMode( TRUE ); pOwner->UndoActionEnd( OLUNDO_INSERT ); pEditView->ShowCursor( TRUE, TRUE ); diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index 6a92cb27ff8c..7527b177b3a4 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -310,6 +310,7 @@ namespace sdr false, false, false, + false, false); // decompose immediately with neutral ViewInformation. This will diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx index 9d6548a1b791..7bea25feeeed 100644 --- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx @@ -121,36 +121,18 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- ViewObjectContact& ViewContactOfUnoControl::CreateObjectSpecificViewObjectContact( ObjectContact& _rObjectContact ) { + // print or print preview requires special handling + const OutputDevice* pDevice = _rObjectContact.TryToGetOutputDevice(); + bool bPrintOrPreview = ( pDevice != NULL ) && ( pDevice->GetOutDevType() == OUTDEV_PRINTER ); + ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &_rObjectContact ); - if ( pPageViewContact ) - { - // special classes for special devices: - // - PDF export - ::vcl::PDFExtOutDevData* pPDFExport = PTR_CAST( ::vcl::PDFExtOutDevData, pPageViewContact->GetPageWindow().GetPaintWindow().GetOutputDevice().GetExtOutDevData() ); - if ( pPDFExport != NULL ) - return *new UnoControlPDFExportContact( *pPageViewContact, *this ); - - // - print preview - if ( pPageViewContact->GetPageWindow().GetPageView().GetView().IsPrintPreview() ) - return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this ); - - OutDevType eDeviceType = pPageViewContact->GetPageWindow().GetPaintWindow().GetOutputDevice().GetOutDevType(); - // - printing - if ( eDeviceType == OUTDEV_PRINTER ) - return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this ); - - // - any other virtual device - if ( eDeviceType == OUTDEV_VIRDEV ) - return *new UnoControlDefaultContact( *pPageViewContact, *this ); - - // - normal windows have special, design-mode dependent handling - if ( eDeviceType == OUTDEV_WINDOW ) - return *new UnoControlWindowContact( *pPageViewContact, *this ); - } + bPrintOrPreview |= ( pPageViewContact != NULL ) && pPageViewContact->GetPageWindow().GetPageView().GetView().IsPrintPreview(); + + if ( bPrintOrPreview ) + return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this ); - // if we're not working for a ObjectContactOfPageView, then we can't use a ViewObjectContactOfUnoControl, or any - // of its derivees. Fall back to a "normal" SdrObj's contact object. - return *new ViewObjectContactOfSdrObj( _rObjectContact, *this ); + // all others are nowadays served by the same implementation + return *new ViewObjectContactOfUnoControl( _rObjectContact, *this ); } //-------------------------------------------------------------------- @@ -173,7 +155,7 @@ namespace sdr { namespace contact { aTransform.set(0, 2, aRange.getMinX()); aTransform.set(1, 2, aRange.getMinY()); - // create control primitive WITHOUT evtl. existing XControl; this would be done in + // create control primitive WITHOUT possibly existing XControl; this would be done in // the VOC in createPrimitive2DSequence() const drawinglayer::primitive2d::Primitive2DReference xRetval(new drawinglayer::primitive2d::ControlPrimitive2D( aTransform, xControlModel)); diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx index 667129e27653..bbfe3eaf65ab 100644 --- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx @@ -402,7 +402,7 @@ namespace sdr { namespace contact { //= InvisibleControlViewAccess //==================================================================== /** is a ->IPageViewAccess implementation which can be used to create an invisble control for - an arbitrary device + an arbitrary window */ class InvisibleControlViewAccess : public IPageViewAccess { @@ -445,6 +445,47 @@ namespace sdr { namespace contact { return false; } + //==================================================================== + //= DummyPageViewAccess + //==================================================================== + /** is a ->IPageViewAccess implementation which can be used to create a control for an arbitrary + non-Window device + + The implementation will report the "PageView" as being in design mode, all layers to be visible, + and will not return any ControlContainer, so all control container related features (notifications etc) + are not available. + */ + class DummyPageViewAccess : public IPageViewAccess + { + public: + DummyPageViewAccess() + { + } + + virtual bool isDesignMode() const; + virtual Reference< XControlContainer > + getControlContainer( const OutputDevice& _rDevice ) const; + virtual bool isLayerVisible( SdrLayerID _nLayerID ) const; + }; + + //-------------------------------------------------------------------- + bool DummyPageViewAccess::isDesignMode() const + { + return true; + } + + //-------------------------------------------------------------------- + Reference< XControlContainer > DummyPageViewAccess::getControlContainer( const OutputDevice& /*_rDevice*/ ) const + { + return NULL; + } + + //-------------------------------------------------------------------- + bool DummyPageViewAccess::isLayerVisible( SdrLayerID /*_nLayerID*/ ) const + { + return true; + } + //==================================================================== //= ViewObjectContactOfUnoControl_Impl //==================================================================== @@ -763,8 +804,9 @@ namespace sdr { namespace contact { This method cares for this, by retrieving the very original OutputDevice. */ - static const OutputDevice& imp_getPageViewDevice_nothrow( const ObjectContactOfPageView& _rObjectContact ); - const OutputDevice& imp_getPageViewDevice_nothrow() const; + static const OutputDevice& impl_getPageViewOutputDevice_nothrow( const ObjectContactOfPageView& _rObjectContact ); + + const OutputDevice& impl_getOutputDevice_throw() const; private: ViewObjectContactOfUnoControl_Impl(); // never implemented @@ -828,6 +870,13 @@ namespace sdr { namespace contact { static void getTransformation( const ViewContactOfUnoControl& _rVOC, ::basegfx::B2DHomMatrix& _out_Transformation ); + private: + void impl_positionAndZoomControl( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const + { + if ( !_rViewInformation.getViewport().isEmpty() ) + m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() ); + } + private: ::rtl::Reference< ViewObjectContactOfUnoControl_Impl > m_pVOCImpl; /** The geometry is part of the identity of an primitive, so we cannot calculate it on demand @@ -854,9 +903,15 @@ namespace sdr { namespace contact { DBG_CTOR( ViewObjectContactOfUnoControl_Impl, NULL ); DBG_ASSERT( m_pAntiImpl, "ViewObjectContactOfUnoControl_Impl::ViewObjectContactOfUnoControl_Impl: invalid AntiImpl!" ); - const OutputDevice& rPageViewDevice( imp_getPageViewDevice_nothrow() ); + const OutputDevice& rPageViewDevice( impl_getOutputDevice_throw() ); m_aZoomLevelNormalization = rPageViewDevice.GetInverseViewTransformation(); + #if OSL_DEBUG_LEVEL > 1 + ::basegfx::B2DVector aScale, aTranslate; + double fRotate, fShearX; + m_aZoomLevelNormalization.decompose( aScale, aTranslate, fRotate, fShearX ); + #endif + ::basegfx::B2DHomMatrix aScaleNormalization; MapMode aCurrentDeviceMapMode( rPageViewDevice.GetMapMode() ); aScaleNormalization.set( 0, 0, (double)aCurrentDeviceMapMode.GetScaleX() ); @@ -953,27 +1008,40 @@ namespace sdr { namespace contact { return false; ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &m_pAntiImpl->GetObjectContact() ); - DBG_ASSERT( pPageViewContact, "ViewObjectContactOfUnoControl_Impl::ensureControl: cannot create a control if I don't have a PageView!" ); - if ( !pPageViewContact ) - return false; + if ( pPageViewContact ) + { + SdrPageViewAccess aPVAccess( pPageViewContact->GetPageWindow().GetPageView() ); + return impl_ensureControl_nothrow( + aPVAccess, + impl_getPageViewOutputDevice_nothrow( *pPageViewContact ) + ); + } - SdrPageViewAccess aPVAccess( pPageViewContact->GetPageWindow().GetPageView() ); + DummyPageViewAccess aNoPageView; return impl_ensureControl_nothrow( - aPVAccess, - imp_getPageViewDevice_nothrow( *pPageViewContact ) + aNoPageView, + impl_getOutputDevice_throw() ); } //-------------------------------------------------------------------- - const OutputDevice& ViewObjectContactOfUnoControl_Impl::imp_getPageViewDevice_nothrow() const + const OutputDevice& ViewObjectContactOfUnoControl_Impl::impl_getOutputDevice_throw() const { ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &m_pAntiImpl->GetObjectContact() ); - ENSURE_OR_THROW( pPageViewContact, "need a ObjectContactOfPageView." ); - return imp_getPageViewDevice_nothrow( *pPageViewContact ); + if ( pPageViewContact ) + { + // do not use ObjectContact::TryToGetOutputDevice here, it would not care for the PageWindow's + // OriginalPaintWindow + return impl_getPageViewOutputDevice_nothrow( *pPageViewContact ); + } + + const OutputDevice* pDevice = m_pAntiImpl->GetObjectContact().TryToGetOutputDevice(); + ENSURE_OR_THROW( pDevice, "no output device -> no control" ); + return *pDevice; } //-------------------------------------------------------------------- - const OutputDevice& ViewObjectContactOfUnoControl_Impl::imp_getPageViewDevice_nothrow( const ObjectContactOfPageView& _rObjectContact ) + const OutputDevice& ViewObjectContactOfUnoControl_Impl::impl_getPageViewOutputDevice_nothrow( const ObjectContactOfPageView& _rObjectContact ) { // if the PageWindow has a patched PaintWindow, use the original PaintWindow // this ensures that our control is _not_ re-created just because somebody @@ -1522,18 +1590,28 @@ namespace sdr { namespace contact { //-------------------------------------------------------------------- ::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::get2DDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const { + #if OSL_DEBUG_LEVEL > 1 + ::basegfx::B2DVector aScale, aTranslate; + double fRotate, fShearX; + _rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX ); + #endif if ( m_pVOCImpl->hasControl() ) - m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() ); + impl_positionAndZoomControl( _rViewInformation ); return BasePrimitive2D::get2DDecomposition( _rViewInformation ); } //-------------------------------------------------------------------- ::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::createLocalDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const { + #if OSL_DEBUG_LEVEL > 1 + ::basegfx::B2DVector aScale, aTranslate; + double fRotate, fShearX; + _rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX ); + #endif // force control here to make it a VCL ChildWindow. Will be fetched // and used below by getExistentControl() m_pVOCImpl->ensureControl(); - m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() ); + impl_positionAndZoomControl( _rViewInformation ); // get needed data const ViewContactOfUnoControl& rViewContactOfUnoControl( m_pVOCImpl->getViewContact() ); @@ -1703,40 +1781,6 @@ namespace sdr { namespace contact { } } - //==================================================================== - //= UnoControlDefaultContact - //==================================================================== - DBG_NAME( UnoControlDefaultContact ) - //-------------------------------------------------------------------- - UnoControlDefaultContact::UnoControlDefaultContact( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact ) - :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact ) - { - DBG_CTOR( UnoControlDefaultContact, NULL ); - } - - //-------------------------------------------------------------------- - UnoControlDefaultContact::~UnoControlDefaultContact() - { - DBG_DTOR( UnoControlDefaultContact, NULL ); - } - - //==================================================================== - //= UnoControlWindowContact - //==================================================================== - DBG_NAME( UnoControlWindowContact ) - //-------------------------------------------------------------------- - UnoControlWindowContact::UnoControlWindowContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact ) - :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact ) - { - DBG_CTOR( UnoControlWindowContact, NULL ); - } - - //-------------------------------------------------------------------- - UnoControlWindowContact::~UnoControlWindowContact() - { - DBG_DTOR( UnoControlWindowContact, NULL ); - } - //==================================================================== //= UnoControlPrintOrPreviewContact //==================================================================== @@ -1762,23 +1806,6 @@ namespace sdr { namespace contact { return ViewObjectContactOfUnoControl::createPrimitive2DSequence( rDisplayInfo ); } - //==================================================================== - //= UnoControlPDFExportContact - //==================================================================== - DBG_NAME( UnoControlPDFExportContact ) - //-------------------------------------------------------------------- - UnoControlPDFExportContact::UnoControlPDFExportContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact ) - :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact ) - { - DBG_CTOR( UnoControlPDFExportContact, NULL ); - } - - //-------------------------------------------------------------------- - UnoControlPDFExportContact::~UnoControlPDFExportContact() - { - DBG_DTOR( UnoControlPDFExportContact, NULL ); - } - //........................................................................ } } // namespace sdr::contact //........................................................................ diff --git a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx index 3c8feb7ff2b2..73d5689350c2 100644 --- a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx @@ -123,6 +123,7 @@ namespace drawinglayer *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, + false, false)); } diff --git a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx index 0edbe1a35046..a04021ae21ad 100644 --- a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx @@ -72,7 +72,7 @@ namespace drawinglayer // add text if(getSdrLSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(getUnitPolygon()), aEmptyMatrix, *getSdrLSTAttribute().getText(), getSdrLSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(getUnitPolygon()), aEmptyMatrix, *getSdrLSTAttribute().getText(), getSdrLSTAttribute().getLine(), false, false, false)); } // add shadow diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx index 497266433d67..e2dce7b551ed 100644 --- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx @@ -60,8 +60,9 @@ namespace drawinglayer getTextBox(), *getSdrSTAttribute().getText(), 0, - isForceTextClipToTextRange(), // #SJ# use CellText mode; text upper-left - getWordWrap())); + false, + getWordWrap(), + isForceTextClipToTextRange())); } // add shadow diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 09769a2a013e..cd426edfdd05 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -173,7 +173,8 @@ namespace drawinglayer const attribute::SdrTextAttribute& rText, const attribute::SdrLineAttribute* pStroke, bool bCellText, - bool bWordWrap) + bool bWordWrap, + bool bClipOnBounds) { basegfx::B2DHomMatrix aAnchorTransform(rObjectTransform); SdrTextPrimitive2D* pNew = 0; @@ -297,7 +298,8 @@ namespace drawinglayer rText.isFixedCellHeight(), rText.isScroll(), bCellText, - bWordWrap); + bWordWrap, + bClipOnBounds); } } diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx index ed3062184f1a..4f7e2c768669 100644 --- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx @@ -94,7 +94,7 @@ namespace drawinglayer // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow @@ -191,7 +191,7 @@ namespace drawinglayer // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx index f5f2f4e876dc..63d050a775af 100644 --- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx @@ -104,7 +104,7 @@ namespace drawinglayer // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index 94e59f79c3de..f5445cefa5f6 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -134,6 +134,7 @@ namespace drawinglayer pTextAttribute->isScroll(), false, false, + false, false); aTextRange = pBlockText->getB2DRange(aViewInformation); } diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx index ab5d23962719..7c44311d3c5a 100644 --- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx @@ -110,7 +110,7 @@ namespace drawinglayer // always supported by the old paints, too if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx index 91ed0bd2adce..96da706fb66a 100644 --- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx @@ -89,7 +89,7 @@ namespace drawinglayer // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(getUnitPolyPolygon(), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(getUnitPolyPolygon(), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx index 64ac716b40e9..edb2837ef670 100644 --- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx @@ -110,7 +110,7 @@ namespace drawinglayer // add text if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false)); } // add shadow diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx index 748270c36977..47e85894f37e 100644 --- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx @@ -382,7 +382,8 @@ namespace drawinglayer bool bFixedCellHeight, bool bUnlimitedPage, bool bCellText, - bool bWordWrap) + bool bWordWrap, + bool bClipOnBounds) : SdrTextPrimitive2D(pSdrText, rOutlinerParaObject), maTextRangeTransform(rTextRangeTransform), maSdrTextHorzAdjust(aSdrTextHorzAdjust), @@ -390,7 +391,8 @@ namespace drawinglayer mbFixedCellHeight(bFixedCellHeight), mbUnlimitedPage(bUnlimitedPage), mbCellText(bCellText), - mbWordWrap(bWordWrap) + mbWordWrap(bWordWrap), + mbClipOnBounds(bClipOnBounds) { } @@ -406,7 +408,8 @@ namespace drawinglayer && isFixedCellHeight() == rCompare.isFixedCellHeight() && getUnlimitedPage() == rCompare.getUnlimitedPage() && getCellText() == rCompare.getCellText() - && getWordWrap() == rCompare.getWordWrap()); + && getWordWrap() == rCompare.getWordWrap() + && getClipOnBounds() == rCompare.getClipOnBounds()); } return false; @@ -423,7 +426,8 @@ namespace drawinglayer isFixedCellHeight(), getUnlimitedPage(), getCellText(), - getWordWrap()); + getWordWrap(), + getClipOnBounds()); } // provide unique ID diff --git a/svx/source/svdraw/svdfppt.cxx b/svx/source/svdraw/svdfppt.cxx index d0b01f6a820f..af38c34e0749 100644 --- a/svx/source/svdraw/svdfppt.cxx +++ b/svx/source/svdraw/svdfppt.cxx @@ -3972,7 +3972,7 @@ void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager, aFont.SetFamily( pAtom->eFamily ); aFont.SetPitch( pAtom->ePitch ); } - Color aCol( rManager.MSO_CLR_ToColor( nBulletColor ) ); + Color aCol( rManager.MSO_TEXT_CLR_ToColor( nBulletColor ) ); aFont.SetColor( aCol ); sal_uInt16 nBuChar = (sal_uInt16)nBulletChar; @@ -5886,14 +5886,14 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, U { if ( GetAttrib( PPT_CharAttr_FontColor, nVal, nDestinationInstance ) ) // Textfarbe (4Byte-Arg) { - Color aCol( rManager.MSO_CLR_ToColor( nVal ) ); + Color aCol( rManager.MSO_TEXT_CLR_ToColor( nVal ) ); rSet.Put( SvxColorItem( aCol, EE_CHAR_COLOR ) ); if ( nDestinationInstance == 0xffffffff ) mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ].mnFontColorInStyleSheet = aCol; } else if ( nVal & 0x0f000000 ) // this is not a hard attribute, but maybe the page has a different colerscheme, { // so that in this case we must use a hard color attribute - Color aCol( rManager.MSO_CLR_ToColor( nVal ) ); + Color aCol( rManager.MSO_TEXT_CLR_ToColor( nVal ) ); Color& aColorInSheet = mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ].mnFontColorInStyleSheet; if ( aColorInSheet != aCol ) rSet.Put( SvxColorItem( aCol, EE_CHAR_COLOR ) ); @@ -6315,7 +6315,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >& nColor = rParaLevel.mnBulletColor; else nColor = rCharLevel.mnFontColor; - aNumberFormat2.SetBulletColor( rManager.MSO_CLR_ToColor( nColor ) ); + aNumberFormat2.SetBulletColor( rManager.MSO_TEXT_CLR_ToColor( nColor ) ); pRule->SetLevel( i, aNumberFormat2 ); } } @@ -7611,8 +7611,8 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl { Color aLineColor( ((XLineColorItem&)pLine->GetMergedItem( XATTR_LINECOLOR )).GetColorValue() ); aBorderLine.Color = aLineColor.GetColor(); - aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() ); - aBorderLine.InnerLineWidth = 0; + aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4 ); + aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4 ); aBorderLine.LineDistance = 0; } break; diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 93d3651e3f01..e72b606f3b53 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -800,24 +800,32 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( const bool bVerticalWritintg(rSdrBlockTextPrimitive.getOutlinerParaObject().IsVertical()); const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight)); + // check if block text is used (only one of them can be true) + const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg); + const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg); + + // set minimal paper size hor/ver if needed + if(bHorizontalIsBlock) + { + rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0)); + } + else if(bVerticalIsBlock) + { + rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight)); + } + if(bIsCell) { // cell text is formated neither like a text object nor like a object // text, so use a special setup here - rOutliner.SetMinAutoPaperSize(aNullSize); rOutliner.SetMaxAutoPaperSize(aAnchorTextSize); rOutliner.SetPaperSize(aAnchorTextSize); - rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0)); - rOutliner.SetUpdateMode(TRUE); + rOutliner.SetUpdateMode(true); rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject()); - rOutliner.SetUpdateMode(TRUE); rOutliner.SetControlWord(nOriginalControlWord); } else { - // check if block text is used (only one of them can be true) - const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg); - const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg); if((rSdrBlockTextPrimitive.getWordWrap() || IsTextFrame()) && !rSdrBlockTextPrimitive.getUnlimitedPage()) { @@ -843,16 +851,6 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( rOutliner.SetMaxAutoPaperSize(aMaxAutoPaperSize); } - // set minimal paper size hor/ver if needed - if(bHorizontalIsBlock) - { - rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0)); - } - else if(bVerticalIsBlock) - { - rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight)); - } - rOutliner.SetPaperSize(aNullSize); rOutliner.SetUpdateMode(true); rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject()); @@ -931,7 +929,8 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( // as the master shape we are working on. For vertical, use the top-right // corner const double fStartInX(bVerticalWritintg ? aAdjustTranslate.getX() + aOutlinerScale.getX() : aAdjustTranslate.getX()); - aNewTransformA.translate(fStartInX, aAdjustTranslate.getY()); + const basegfx::B2DTuple aAdjOffset(fStartInX, aAdjustTranslate.getY()); + aNewTransformA.translate(aAdjOffset.getX(), aAdjOffset.getY()); // mirroring. We are now in aAnchorTextRange sizes. When mirroring in X and Y, // move the null point which was top left to bottom right. @@ -948,10 +947,10 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( // #SJ# create ClipRange (if needed) basegfx::B2DRange aClipRange; - if(bIsCell) + if(rSdrBlockTextPrimitive.getClipOnBounds()) { - aClipRange.expand(basegfx::B2DTuple(0.0, 0.0)); - aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height())); + aClipRange.expand(-aAdjOffset); + aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height()) - aAdjOffset); } // now break up text primitives. diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index 45a24211f7b2..e53f41251ff2 100644 --- a/svx/source/table/viewcontactoftableobj.cxx +++ b/svx/source/table/viewcontactoftableobj.cxx @@ -123,7 +123,7 @@ namespace drawinglayer getTransform(), *getSdrFTAttribute().getText(), 0, - true, false)); + true, false, false)); } } diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index d4dc48ede241..0dece7c6965c 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -1629,6 +1629,7 @@ sal_Bool SvXMLImport::IsODFVersionConsistent( const ::rtl::OUString& aODFVersion if ( aODFVersion.getLength() && aODFVersion.compareTo( ODFVER_012_TEXT ) >= 0 ) { // check the consistency only for the ODF1.2 and later ( according to content.xml ) + // manifest.xml might have no version, it should be checked here and the correct version should be set try { uno::Reference< document::XStorageBasedDocument > xDoc( mxModel, uno::UNO_QUERY_THROW ); @@ -1654,7 +1655,24 @@ sal_Bool SvXMLImport::IsODFVersionConsistent( const ::rtl::OUString& aODFVersion ::rtl::OUString aStorVersion; xStorProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ) ) >>= aStorVersion; - bResult = aODFVersion.equals( aStorVersion ); + + // if the storage version is set in manifest.xml, it must be the same as in content.xml + // if not, set it explicitly to be used further ( it will work even for readonly storage ) + // This workaround is not nice, but I see no other way to handle it, since there are + // ODF1.2 documents without version in manifest.xml + if ( aStorVersion.getLength() ) + bResult = aODFVersion.equals( aStorVersion ); + else + xStorProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ), + uno::makeAny( aODFVersion ) ); + + if ( bResult ) + { + sal_Bool bInconsistent = sal_False; + xStorProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsInconsistent" ) ) ) + >>= bInconsistent; + bResult = !bInconsistent; + } } } } -- cgit From 4a8256a93d4bb2bda592c525613a2fc9cacdb28c Mon Sep 17 00:00:00 2001 From: Sven Jacobi Date: Tue, 20 Oct 2009 11:37:58 +0000 Subject: #i102257# fixed gpf when loading some types of pict graphics --- svx/source/msfilter/msdffimp.cxx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx index 0e751e3181e7..087e13e88f3c 100644 --- a/svx/source/msfilter/msdffimp.cxx +++ b/svx/source/msfilter/msdffimp.cxx @@ -4954,16 +4954,16 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r ApplyAttributes( rSt, aSet, aObjData ); pRet->SetMergedItemSet(aSet); } - else if ( aObjData.eShapeType == mso_sptLine ) - { - basegfx::B2DPolygon aPoly; - aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top())); - aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom())); - pRet = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly)); - pRet->SetModel( pSdrModel ); - ApplyAttributes( rSt, aSet, aObjData ); - pRet->SetMergedItemSet(aSet); - } + else if ( aObjData.eShapeType == mso_sptLine ) + { + basegfx::B2DPolygon aPoly; + aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top())); + aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom())); + pRet = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly)); + pRet->SetModel( pSdrModel ); + ApplyAttributes( rSt, aSet, aObjData ); + pRet->SetMergedItemSet(aSet); + } else { if ( GetCustomShapeContent( aObjData.eShapeType ) || IsProperty( DFF_Prop_pVertices ) ) @@ -7037,6 +7037,8 @@ BOOL SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect aZCodec.Decompress( rBLIPStream, *pOut ); aZCodec.EndCompression(); pOut->Seek( STREAM_SEEK_TO_BEGIN ); + pOut->SetResizeOffset( 0 ); // sj: #i102257# setting ResizeOffset of 0 prevents from seeking + // behind the stream end (allocating too much memory) pGrStream = pOut; } -- cgit From 939bb9c884e994788ee563944e22f79a50a56067 Mon Sep 17 00:00:00 2001 From: Armin Weiss Date: Tue, 20 Oct 2009 11:48:09 +0000 Subject: #i105856# changed conditions for using the filled TextShape for HitTest to do the same as before primitives --- svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx | 9 ++++----- svx/source/sdr/contact/viewcontactofsdrrectobj.cxx | 8 +++++++- svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx | 10 +++++----- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx index 650cc1a882c5..23bbc2676f22 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx @@ -55,9 +55,8 @@ namespace drawinglayer double mfCornerRadiusY; // [0.0..1.0] relative to 1/2 height // bitfield - // flag which decides if this is a text frame. If Yes, the HitArea - // should be the filled geometry - bool mbTextFrame : 1; + // flag which decides if the HitArea should be the filled geometry + bool mbForceFillForHitTest : 1; protected: // local decomposition. @@ -69,7 +68,7 @@ namespace drawinglayer const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, double fCornerRadiusX, double fCornerRadiusY, - bool bTextFrame); + bool bForceFillForHitTest); // data access const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } @@ -77,7 +76,7 @@ namespace drawinglayer double getCornerRadiusX() const { return mfCornerRadiusX; } double getCornerRadiusY() const { return mfCornerRadiusY; } bool isCornerRadiusUsed() const { return (0.0 != mfCornerRadiusX || 0.0 != mfCornerRadiusY); } - bool getTextFrame() const { return mbTextFrame; } + bool getForceFillForHitTest() const { return mbForceFillForHitTest; } // compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx index 8ba8ae8ab4c9..cefb3e065165 100644 --- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx @@ -39,6 +39,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -104,6 +105,10 @@ namespace sdr double fCornerRadiusY; drawinglayer::primitive2d::calculateRelativeCornerRadius(nCornerRadius, aObjectRange, fCornerRadiusX, fCornerRadiusY); + // #i105856# use knowledge about pickthrough from the model + const bool bPickThroughTransparentTextFrames( + GetRectObj().GetModel() && GetRectObj().GetModel()->IsPickThroughTransparentTextFrames()); + // create primitive const drawinglayer::primitive2d::Primitive2DReference xReference( new drawinglayer::primitive2d::SdrRectanglePrimitive2D( @@ -111,7 +116,8 @@ namespace sdr *pAttribute, fCornerRadiusX, fCornerRadiusY, - GetRectObj().IsTextFrame())); + // #i105856# use fill for HitTest when TextFrame and not PickThrough + GetRectObj().IsTextFrame() && !bPickThroughTransparentTextFrames)); xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx index 64ac716b40e9..7139c9f215e3 100644 --- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx @@ -68,7 +68,7 @@ namespace drawinglayer *getSdrLFSTAttribute().getFill(), getSdrLFSTAttribute().getFillFloatTransGradient())); } - else if(getTextFrame()) + else if(getForceFillForHitTest()) { // if no fill and it's a text frame, create a fill for HitTest and // BoundRect fallback @@ -89,7 +89,7 @@ namespace drawinglayer getTransform(), *getSdrLFSTAttribute().getLine())); } - else if(!getTextFrame()) + else if(!getForceFillForHitTest()) { // if initially no line is defined and it's not a text frame, create // a line for HitTest and BoundRect @@ -127,13 +127,13 @@ namespace drawinglayer const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, double fCornerRadiusX, double fCornerRadiusY, - bool bTextFrame) + bool bForceFillForHitTest) : BasePrimitive2D(), maTransform(rTransform), maSdrLFSTAttribute(rSdrLFSTAttribute), mfCornerRadiusX(fCornerRadiusX), mfCornerRadiusY(fCornerRadiusY), - mbTextFrame(bTextFrame) + mbForceFillForHitTest(bForceFillForHitTest) { } @@ -147,7 +147,7 @@ namespace drawinglayer && getCornerRadiusY() == rCompare.getCornerRadiusY() && getTransform() == rCompare.getTransform() && getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute() - && getTextFrame() == rCompare.getTextFrame()); + && getForceFillForHitTest() == rCompare.getForceFillForHitTest()); } return false; -- cgit From 924a015ffc8d735430d487b6d48f3cad1f7a3473 Mon Sep 17 00:00:00 2001 From: Armin Weiss Date: Tue, 20 Oct 2009 15:35:41 +0000 Subject: #i105065# speedup 3D/FontWork --- .../sdr/primitive2d/sdrcustomshapeprimitive2d.hxx | 13 +- .../svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx | 25 +-- svx/inc/svx/svddrgmt.hxx | 20 +++ svx/source/customshapes/EnhancedCustomShape2d.cxx | 71 ++++---- svx/source/customshapes/EnhancedCustomShape3d.cxx | 12 +- svx/source/engine3d/helperhittest3d.cxx | 183 +-------------------- .../sdr/contact/viewcontactofsdrobjcustomshape.cxx | 11 +- svx/source/sdr/overlay/overlaymanager.cxx | 16 ++ .../sdr/primitive2d/sdrcustomshapeprimitive2d.cxx | 24 ++- .../sdr/primitive2d/sdrmeasureprimitive2d.cxx | 28 ++-- svx/source/svdraw/svddrgmt.cxx | 50 +++++- 11 files changed, 210 insertions(+), 243 deletions(-) diff --git a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx index 4eddc4386a0d..8f7f0eb23cb3 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx @@ -56,8 +56,13 @@ namespace drawinglayer // defines if SdrTextWordWrapItem was set at SdrObjCustomShape which means // that the text needs to be block formatted unsigned mbWordWrap : 1; - // #SJ# Allow text clipping against TextBox in special cases (used for SC) - unsigned mbForceTextClipToTextRange : 1; + + // #SJ# Allow text clipping against TextBox in special cases (used for SC) + unsigned mbForceTextClipToTextRange : 1; + + // defines that the object contains/is a 3D AutoShape. Needed for + // making exceptions with shadow generation + unsigned mb3DShape : 1; protected: // local decomposition. @@ -69,7 +74,8 @@ namespace drawinglayer const Primitive2DSequence& rSubPrimitives, const basegfx::B2DHomMatrix& rTextBox, bool bWordWrap, - bool bForceTextClipToTextRange); + bool bForceTextClipToTextRange, + bool b3DShape); // data access const attribute::SdrShadowTextAttribute& getSdrSTAttribute() const { return maSdrSTAttribute; } @@ -77,6 +83,7 @@ namespace drawinglayer const basegfx::B2DHomMatrix& getTextBox() const { return maTextBox; } bool getWordWrap() const { return mbWordWrap; } bool isForceTextClipToTextRange() const { return mbForceTextClipToTextRange; } + bool get3DShape() const { return mb3DShape; } // compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; diff --git a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx index 1e68a61432a0..a7084993b5f2 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx @@ -39,19 +39,19 @@ ////////////////////////////////////////////////////////////////////////////// // predefines -namespace drawinglayer -{ - namespace primitive2d +namespace drawinglayer { namespace primitive2d { + enum MeasureTextPosition { - enum MeasureTextPosition - { - MEASURETEXTPOSITION_AUTOMATIC, - MEASURETEXTPOSITION_NEGATIVE, - MEASURETEXTPOSITION_CENTERED, - MEASURETEXTPOSITION_POSITIVE - }; - } // end of namespace primitive2d -} // end of namespace drawinglayer + MEASURETEXTPOSITION_AUTOMATIC, + MEASURETEXTPOSITION_NEGATIVE, + MEASURETEXTPOSITION_CENTERED, + MEASURETEXTPOSITION_POSITIVE + }; +}} + +namespace drawinglayer { namespace attribute { + class SdrLineAttribute; +}} ////////////////////////////////////////////////////////////////////////////// @@ -80,6 +80,7 @@ namespace drawinglayer // internal decomposition helper Primitive2DReference impCreatePart( + const attribute::SdrLineAttribute& rLineAttribute, const basegfx::B2DHomMatrix& rObjectMatrix, const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd, diff --git a/svx/inc/svx/svddrgmt.hxx b/svx/inc/svx/svddrgmt.hxx index fa4e09c9a324..91112a7dd287 100644 --- a/svx/inc/svx/svddrgmt.hxx +++ b/svx/inc/svx/svddrgmt.hxx @@ -107,6 +107,22 @@ public: ////////////////////////////////////////////////////////////////////////////// +class SdrDragEntryPrimitive2DSequence : public SdrDragEntry +{ +private: + drawinglayer::primitive2d::Primitive2DSequence maPrimitive2DSequence; + +public: + SdrDragEntryPrimitive2DSequence( + const drawinglayer::primitive2d::Primitive2DSequence& rSequence, + bool bAddToTransparent); + virtual ~SdrDragEntryPrimitive2DSequence(); + + virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod); +}; + +////////////////////////////////////////////////////////////////////////////// + class SdrDragEntryPointGlueDrag : public SdrDragEntry { private: @@ -138,6 +154,7 @@ protected: void clearSdrDragEntries() { for(sal_uInt32 a(0); a < maSdrDragEntries.size(); a++) { delete maSdrDragEntries[a]; } maSdrDragEntries.clear(); } void addSdrDragEntry(SdrDragEntry* pNew) { if(pNew) { maSdrDragEntries.push_back(pNew); }} virtual void createSdrDragEntries(); + virtual void createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool bModify); // access for derivated classes to maOverlayObjectList void clearOverlayObjectList() { maOverlayObjectList.clear(); } @@ -236,6 +253,9 @@ private: void ImpCheckSnap(const Point& rPt); +protected: + virtual void createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool bModify); + public: TYPEINFO(); SdrDragMove(SdrDragView& rNewView); diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 804db0c58a16..0ef28d7972dc 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -696,7 +696,16 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : ClearItem( SDRATTR_TEXTDIRECTION ); //SJ: vertical writing is not required, by removing this item no outliner is created - // For primitive rendering, shadow handling is done completely based on the geometry, so i removed it here + // #i105323# For 2D AtoShapes, the shadow attirbute does not need to be applied to any + // of the constucted helper SdrObjects. This would lead to problems since the shadow + // of one helper object would fall on one helper object behind it (e.g. with the + // eyes of the smiley shape). This is not wanted; instead a single shadow 'behind' + // the AutoShape visualisation is wanted. This is done with primitive functionailty + // now in SdrCustomShapePrimitive2D::create2DDecomposition, but only for 2D objects + // (see there and in EnhancedCustomShape3d::Create3DObject to read more). + // This exception may be removed later when AutoShapes will create primitives directly. + // So, currently remove the ShadowAttribute from the ItemSet to not apply it to any + // 2D helper shape. ClearItem(SDRATTR_SHADOW); Point aP( pCustomShapeObj->GetSnapRect().Center() ); @@ -731,23 +740,23 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : /*const sal_Int32* pDefData =*/ ApplyShapeAttributes( rGeometryItem ); switch( eSpType ) { - case mso_sptCan : nColorData = 0x20400000; break; - case mso_sptCube : nColorData = 0x302e0000; break; - case mso_sptActionButtonBlank : nColorData = 0x502ce400; break; - case mso_sptActionButtonHome : nColorData = 0x702ce4ce; break; - case mso_sptActionButtonHelp : nColorData = 0x602ce4c0; break; - case mso_sptActionButtonInformation : nColorData = 0x702ce4c5; break; - case mso_sptActionButtonBackPrevious : nColorData = 0x602ce4c0; break; - case mso_sptActionButtonForwardNext : nColorData = 0x602ce4c0; break; - case mso_sptActionButtonBeginning : nColorData = 0x602ce4c0; break; - case mso_sptActionButtonEnd : nColorData = 0x602ce4c0; break; - case mso_sptActionButtonReturn : nColorData = 0x602ce4c0; break; - case mso_sptActionButtonDocument : nColorData = 0x702ce4ec; break; - case mso_sptActionButtonSound : nColorData = 0x602ce4c0; break; - case mso_sptActionButtonMovie : nColorData = 0x602ce4c0; break; - case mso_sptBevel : nColorData = 0x502ce400; break; - case mso_sptFoldedCorner : nColorData = 0x20e00000; break; - case mso_sptSmileyFace : nColorData = 0x20e00000; break; + case mso_sptCan : nColorData = 0x20400000; break; + case mso_sptCube : nColorData = 0x302e0000; break; + case mso_sptActionButtonBlank : nColorData = 0x502ce400; break; + case mso_sptActionButtonHome : nColorData = 0x702ce4ce; break; + case mso_sptActionButtonHelp : nColorData = 0x602ce4c0; break; + case mso_sptActionButtonInformation : nColorData = 0x702ce4c5; break; + case mso_sptActionButtonBackPrevious : nColorData = 0x602ce4c0; break; + case mso_sptActionButtonForwardNext : nColorData = 0x602ce4c0; break; + case mso_sptActionButtonBeginning : nColorData = 0x602ce4c0; break; + case mso_sptActionButtonEnd : nColorData = 0x602ce4c0; break; + case mso_sptActionButtonReturn : nColorData = 0x602ce4c0; break; + case mso_sptActionButtonDocument : nColorData = 0x702ce4ec; break; + case mso_sptActionButtonSound : nColorData = 0x602ce4c0; break; + case mso_sptActionButtonMovie : nColorData = 0x602ce4c0; break; + case mso_sptBevel : nColorData = 0x502ce400; break; + case mso_sptFoldedCorner : nColorData = 0x20e00000; break; + case mso_sptSmileyFace : nColorData = 0x20e00000; break; case mso_sptNil : { if( sShapeType.getLength() > 4 && @@ -1701,19 +1710,19 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm if(aNewB2DPolyPolygon.count()) { - if( !bLineGeometryNeededOnly ) - { - // hack aNewB2DPolyPolygon to fill logic rect - this is - // needed to produce gradient fills that look like mso - aNewB2DPolygon.clear(); - aNewB2DPolygon.append(basegfx::B2DPoint(0,0)); - aNewB2DPolyPolygon.append(aNewB2DPolygon); - - aNewB2DPolygon.clear(); - aNewB2DPolygon.append(basegfx::B2DPoint(aLogicRect.GetWidth(), - aLogicRect.GetHeight())); - aNewB2DPolyPolygon.append(aNewB2DPolygon); - } + if( !bLineGeometryNeededOnly ) + { + // hack aNewB2DPolyPolygon to fill logic rect - this is + // needed to produce gradient fills that look like mso + aNewB2DPolygon.clear(); + aNewB2DPolygon.append(basegfx::B2DPoint(0,0)); + aNewB2DPolyPolygon.append(aNewB2DPolygon); + + aNewB2DPolygon.clear(); + aNewB2DPolygon.append(basegfx::B2DPoint(aLogicRect.GetWidth(), + aLogicRect.GetHeight())); + aNewB2DPolyPolygon.append(aNewB2DPolygon); + } // #i37011# bool bForceCreateTwoObjects(false); diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index 2beab9adbe7a..07f7c2ab6bea 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -323,7 +323,17 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con Point aCenter( aSnapRect.Center() ); SfxItemSet aSet( pCustomShape->GetMergedItemSet() ); - aSet.ClearItem( SDRATTR_TEXTDIRECTION ); //SJ: vertical writing is not required, by removing this item no outliner is created + + //SJ: vertical writing is not required, by removing this item no outliner is created + aSet.ClearItem( SDRATTR_TEXTDIRECTION ); + + // #i105323# For 3D AutoShapes, the shadow attribute has to be applied to each + // created visualisation helper model shape individually. The shadow itself + // will then be rendered from the 3D renderer correctly for the whole 3D scene + // (and thus behind all objects of which the visualisation may be built). So, + // dio NOT remove it from the ItemSet here. + // aSet.ClearItem(SDRATTR_SHADOW); + std::vector< E3dCompoundObject* > aPlaceholderObjectList; double fExtrusionBackward, fExtrusionForward; diff --git a/svx/source/engine3d/helperhittest3d.cxx b/svx/source/engine3d/helperhittest3d.cxx index 821c0ba07c32..ad70d3399c8f 100644 --- a/svx/source/engine3d/helperhittest3d.cxx +++ b/svx/source/engine3d/helperhittest3d.cxx @@ -36,18 +36,10 @@ #include #include #include -#include -#include -#include -#include -#include +#include #include #include -#include -#include -#include #include -#include ////////////////////////////////////////////////////////////////////////////// @@ -80,176 +72,13 @@ public: ////////////////////////////////////////////////////////////////////////////// -namespace drawinglayer -{ - namespace processor3d - { - class CutFindProcessor : public BaseProcessor3D - { - private: - // the start and stop point for the cut vector - basegfx::B3DPoint maFront; - basegfx::B3DPoint maBack; - - // the found cut points - ::std::vector< basegfx::B3DPoint > maResult; - - // #i102956# the transformation change from TransformPrimitive3D processings - // needs to be remembered to be able to transform found cuts to the - // basic coordinate system the processor starts with - basegfx::B3DHomMatrix maCombinedTransform; - - // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BasePrimitive3D-based. - virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); - - public: - CutFindProcessor(const geometry::ViewInformation3D& rViewInformation, - const basegfx::B3DPoint& rFront, - const basegfx::B3DPoint& rBack) - : BaseProcessor3D(rViewInformation), - maFront(rFront), - maBack(rBack), - maResult(), - maCombinedTransform() - {} - - // data access - const ::std::vector< basegfx::B3DPoint >& getCutPoints() const { return maResult; } - }; - - void CutFindProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) - { - // it is a BasePrimitive3D implementation, use getPrimitiveID() call for switch - switch(rCandidate.getPrimitiveID()) - { - case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D : - { - // transform group. - const primitive3d::TransformPrimitive3D& rPrimitive = static_cast< const primitive3d::TransformPrimitive3D& >(rCandidate); - - // remember old and transform front, back to object coordinates - const basegfx::B3DPoint aLastFront(maFront); - const basegfx::B3DPoint aLastBack(maBack); - basegfx::B3DHomMatrix aInverseTrans(rPrimitive.getTransformation()); - aInverseTrans.invert(); - maFront *= aInverseTrans; - maBack *= aInverseTrans; - - // remember current and create new transformation; add new object transform from right side - const geometry::ViewInformation3D aLastViewInformation3D(getViewInformation3D()); - const geometry::ViewInformation3D aNewViewInformation3D( - aLastViewInformation3D.getObjectTransformation() * rPrimitive.getTransformation(), - aLastViewInformation3D.getOrientation(), - aLastViewInformation3D.getProjection(), - aLastViewInformation3D.getDeviceToView(), - aLastViewInformation3D.getViewTime(), - aLastViewInformation3D.getExtendedInformationSequence()); - updateViewInformation(aNewViewInformation3D); - - // #i102956# remember needed back-transform for found cuts (combine from right side) - const basegfx::B3DHomMatrix aLastCombinedTransform(maCombinedTransform); - maCombinedTransform = maCombinedTransform * rPrimitive.getTransformation(); - - // let break down - process(rPrimitive.getChildren()); - - // restore transformations and front, back - maCombinedTransform = aLastCombinedTransform; - updateViewInformation(aLastViewInformation3D); - maFront = aLastFront; - maBack = aLastBack; - break; - } - case PRIMITIVE3D_ID_POLYGONHAIRLINEPRIMITIVE3D : - { - // PolygonHairlinePrimitive3D, not used for hit test with planes, ignore. This - // means that also thick line expansion will not be hit-tested as - // PolyPolygonMaterialPrimitive3D - break; - } - case PRIMITIVE3D_ID_HATCHTEXTUREPRIMITIVE3D : - { - // #i97321# - // For HatchTexturePrimitive3D, do not use the decomposition since it will produce - // clipped hatch lines in 3D. It can be used when the hatch also has a filling, but for - // simplicity, just use the children which are the PolyPolygonMaterialPrimitive3D - // which define the hatched areas anyways; for HitTest this is more than adequate - const primitive3d::HatchTexturePrimitive3D& rPrimitive = static_cast< const primitive3d::HatchTexturePrimitive3D& >(rCandidate); - process(rPrimitive.getChildren()); - break; - } - case PRIMITIVE3D_ID_HITTESTPRIMITIVE3D : - { - // HitTestPrimitive3D, force usage due to we are doing a hit test and this - // primitive only gets generated on 3d objects without fill, exactly for this - // purpose - const primitive3d::HitTestPrimitive3D& rPrimitive = static_cast< const primitive3d::HitTestPrimitive3D& >(rCandidate); - process(rPrimitive.getChildren()); - break; - } - case PRIMITIVE3D_ID_POLYPOLYGONMATERIALPRIMITIVE3D : - { - // PolyPolygonMaterialPrimitive3D - const primitive3d::PolyPolygonMaterialPrimitive3D& rPrimitive = static_cast< const primitive3d::PolyPolygonMaterialPrimitive3D& >(rCandidate); - - if(!maFront.equal(maBack)) - { - const basegfx::B3DPolyPolygon& rPolyPolygon = rPrimitive.getB3DPolyPolygon(); - const sal_uInt32 nPolyCount(rPolyPolygon.count()); - - if(nPolyCount) - { - const basegfx::B3DPolygon aPolygon(rPolyPolygon.getB3DPolygon(0)); - const sal_uInt32 nPointCount(aPolygon.count()); - - if(nPointCount > 2) - { - const basegfx::B3DVector aPlaneNormal(aPolygon.getNormal()); - - if(!aPlaneNormal.equalZero()) - { - const basegfx::B3DPoint aPointOnPlane(aPolygon.getB3DPoint(0)); - double fCut(0.0); - - if(basegfx::tools::getCutBetweenLineAndPlane(aPlaneNormal, aPointOnPlane, maFront, maBack, fCut)) - { - const basegfx::B3DPoint aCutPoint(basegfx::interpolate(maFront, maBack, fCut)); - - if(basegfx::tools::isInside(rPolyPolygon, aCutPoint, false)) - { - // #i102956# add result. Do not forget to do this in the coordinate - // system the processor get started with, so use the collected - // combined transformation from processed TransformPrimitive3D's - maResult.push_back(maCombinedTransform * aCutPoint); - } - } - } - } - } - } - - break; - } - default : - { - // process recursively - process(rCandidate.get3DDecomposition(getViewInformation3D())); - break; - } - } - } - } // end of namespace processor3d -} // end of namespace drawinglayer - -////////////////////////////////////////////////////////////////////////////// - void getAllHit3DObjectWithRelativePoint( const basegfx::B3DPoint& rFront, const basegfx::B3DPoint& rBack, const E3dCompoundObject& rObject, const drawinglayer::geometry::ViewInformation3D& rObjectViewInformation3D, - ::std::vector< basegfx::B3DPoint >& o_rResult) + ::std::vector< basegfx::B3DPoint >& o_rResult, + bool bAnyHit) { o_rResult.clear(); @@ -271,7 +100,7 @@ void getAllHit3DObjectWithRelativePoint( if(aObjectRange.overlaps(aFrontBackRange)) { // bound volumes hit, geometric cut tests needed - drawinglayer::processor3d::CutFindProcessor aCutFindProcessor(rObjectViewInformation3D, rFront, rBack); + drawinglayer::processor3d::CutFindProcessor aCutFindProcessor(rObjectViewInformation3D, rFront, rBack, bAnyHit); aCutFindProcessor.process(aPrimitives); o_rResult = aCutFindProcessor.getCutPoints(); } @@ -388,7 +217,7 @@ SVX_DLLPUBLIC void getAllHit3DObjectsSortedFrontToBack( { // get all hit points with object ::std::vector< basegfx::B3DPoint > aHitsWithObject; - getAllHit3DObjectWithRelativePoint(aFront, aBack, *pCandidate, aViewInfo3D, aHitsWithObject); + getAllHit3DObjectWithRelativePoint(aFront, aBack, *pCandidate, aViewInfo3D, aHitsWithObject, false); for(sal_uInt32 a(0); a < aHitsWithObject.size(); a++) { @@ -452,7 +281,7 @@ bool checkHitSingle3DObject( { // get all hit points with object ::std::vector< basegfx::B3DPoint > aHitsWithObject; - getAllHit3DObjectWithRelativePoint(aFront, aBack, rCandidate, aViewInfo3D, aHitsWithObject); + getAllHit3DObjectWithRelativePoint(aFront, aBack, rCandidate, aViewInfo3D, aHitsWithObject, true); if(aHitsWithObject.size()) { diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx index 5f632f60ab85..9d19e752396c 100644 --- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx @@ -39,6 +39,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -134,6 +135,7 @@ namespace sdr // create Primitive2DSequence from sub-geometry const SdrObject* pSdrObjRepresentation = GetCustomShapeObj().GetSdrObjectFromCustomShape(); + bool b3DShape(false); if(pSdrObjRepresentation) { @@ -142,6 +144,12 @@ namespace sdr while(aIterator.IsMore()) { SdrObject& rCandidate = *aIterator.Next(); + + if(!b3DShape && dynamic_cast< E3dObject* >(&rCandidate)) + { + b3DShape = true; + } + const drawinglayer::primitive2d::Primitive2DSequence xNew(rCandidate.GetViewContact().getViewIndependentPrimitive2DSequence()); drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xGroup, xNew); } @@ -220,7 +228,8 @@ namespace sdr xGroup, aTextBoxMatrix, bWordWrap, - false)); // #SJ# New parameter to force to clipped BlockText for SC + false, // #SJ# New parameter to force to clipped BlockText for SC + b3DShape)); xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx index 79d493b6d9d0..24a5fb56a8cf 100644 --- a/svx/source/sdr/overlay/overlaymanager.cxx +++ b/svx/source/sdr/overlay/overlaymanager.cxx @@ -44,6 +44,10 @@ ////////////////////////////////////////////////////////////////////////////// +using namespace com::sun::star; + +////////////////////////////////////////////////////////////////////////////// + namespace sdr { namespace overlay @@ -140,6 +144,18 @@ namespace sdr maViewInformation2D(0), mfDiscreteOne(0.0) { + // set Property 'ReducedDisplayQuality' to true to allow simpler interaction + // visualisations + static bool bUseReducedDisplayQualityForDrag(true); + + if(bUseReducedDisplayQualityForDrag) + { + uno::Sequence< beans::PropertyValue > xProperties(1); + xProperties[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedDisplayQuality")); + xProperties[0].Value <<= true; + maViewInformation2D = drawinglayer::geometry::ViewInformation2D(xProperties); + } + if(pOldOverlayManager) { // take over OverlayObjects from given OverlayManager. Copy diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx index 497266433d67..7658b2a992c7 100644 --- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx @@ -67,7 +67,20 @@ namespace drawinglayer // add shadow if(aRetval.hasElements() && getSdrSTAttribute().getShadow()) { - aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow()); + // #i105323# add generic shadow only for 2D shapes. For + // 3D shapes shadow will be set at the individual created + // visualisation objects and be visualized by the 3d renderer + // as a single shadow. + // + // The shadow for AutoShapes could be handled uniformely by not setting any + // shadow items at the helper model objects and only adding shadow here for + // 2D and 3D (and it works, too), but this would lead to two 3D scenes for + // the 3D object; one for the shadow aond one for the content. The one for the + // shadow will be correct (using ColorModifierStack), but expensive. + if(!get3DShape()) + { + aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow()); + } } return aRetval; @@ -78,13 +91,15 @@ namespace drawinglayer const Primitive2DSequence& rSubPrimitives, const basegfx::B2DHomMatrix& rTextBox, bool bWordWrap, - bool bForceTextClipToTextRange) + bool bForceTextClipToTextRange, + bool b3DShape) : BasePrimitive2D(), maSdrSTAttribute(rSdrSTAttribute), maSubPrimitives(rSubPrimitives), maTextBox(rTextBox), mbWordWrap(bWordWrap), - mbForceTextClipToTextRange(bForceTextClipToTextRange) + mbForceTextClipToTextRange(bForceTextClipToTextRange), + mb3DShape(b3DShape) { } @@ -98,7 +113,8 @@ namespace drawinglayer && getSubPrimitives() == rCompare.getSubPrimitives() && getTextBox() == rCompare.getTextBox() && getWordWrap() == rCompare.getWordWrap() - && isForceTextClipToTextRange() == rCompare.isForceTextClipToTextRange()); + && isForceTextClipToTextRange() == rCompare.isForceTextClipToTextRange() + && get3DShape() == rCompare.get3DShape()); } return false; diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index 94e59f79c3de..4b5dc8a3b48e 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -52,27 +52,29 @@ namespace drawinglayer namespace primitive2d { Primitive2DReference SdrMeasurePrimitive2D::impCreatePart( + const attribute::SdrLineAttribute& rLineAttribute, const basegfx::B2DHomMatrix& rObjectMatrix, const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd, bool bLeftActive, bool bRightActive) const { + const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd(); basegfx::B2DPolygon aPolygon; + aPolygon.append(rStart); aPolygon.append(rEnd); - if(!getSdrLSTAttribute().getLineStartEnd() || (!bLeftActive && !bRightActive)) + if(!pLineStartEnd || (!bLeftActive && !bRightActive)) { - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), 0L); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, 0); } if(bLeftActive && bRightActive) { - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), getSdrLSTAttribute().getLineStartEnd()); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, pLineStartEnd); } - const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd(); const basegfx::B2DPolyPolygon aEmpty; const attribute::SdrLineStartEndAttribute aLineStartEnd( bLeftActive ? pLineStartEnd->getStartPolyPolygon() : aEmpty, bRightActive ? pLineStartEnd->getEndPolyPolygon() : aEmpty, @@ -80,7 +82,7 @@ namespace drawinglayer bLeftActive ? pLineStartEnd->isStartActive() : false, bRightActive ? pLineStartEnd->isEndActive() : false, bLeftActive ? pLineStartEnd->isStartCentered() : false, bRightActive? pLineStartEnd->isEndCentered() : false); - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), &aLineStartEnd); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, &aLineStartEnd); } Primitive2DSequence SdrMeasurePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const @@ -277,12 +279,12 @@ namespace drawinglayer const basegfx::B2DPoint aMainLeftLeft(aMainLeft.getX() - fLenLeft, aMainLeft.getY()); const basegfx::B2DPoint aMainRightRight(aMainRight.getX() + fLenRight, aMainRight.getY()); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeftLeft, aMainLeft, false, true)); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainRight, aMainRightRight, true, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeftLeft, aMainLeft, false, true)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainRight, aMainRightRight, true, false)); if(!bMainLineSplitted || MEASURETEXTPOSITION_CENTERED != eHorizontal) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainRight, false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(* pLineAttribute, aObjectMatrix, aMainLeft, aMainRight, false, false)); } } else @@ -293,12 +295,12 @@ namespace drawinglayer const basegfx::B2DPoint aMainInnerLeft(aMainLeft.getX() + fHalfLength, aMainLeft.getY()); const basegfx::B2DPoint aMainInnerRight(aMainRight.getX() - fHalfLength, aMainRight.getY()); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainInnerLeft, true, false)); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainInnerRight, aMainRight, false, true)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeft, aMainInnerLeft, true, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainInnerRight, aMainRight, false, true)); } else { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainRight, true, true)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeft, aMainRight, true, true)); } } @@ -311,13 +313,13 @@ namespace drawinglayer const basegfx::B2DPoint aLeftUp(0.0, fTopEdge); const basegfx::B2DPoint aLeftDown(0.0, fBottomLeft); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aLeftDown, aLeftUp, false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aLeftDown, aLeftUp, false, false)); // right help line const basegfx::B2DPoint aRightUp(fDistance, fTopEdge); const basegfx::B2DPoint aRightDown(fDistance, fBottomRight); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aRightDown, aRightUp, false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aRightDown, aRightUp, false, false)); // text horizontal position if(MEASURETEXTPOSITION_NEGATIVE == eHorizontal) diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index eb6412b20259..a8d588e73fe5 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -206,6 +206,32 @@ drawinglayer::primitive2d::Primitive2DSequence SdrDragEntrySdrObject::createPrim //////////////////////////////////////////////////////////////////////////////////////////////////// +SdrDragEntryPrimitive2DSequence::SdrDragEntryPrimitive2DSequence( + const drawinglayer::primitive2d::Primitive2DSequence& rSequence, + bool bAddToTransparent) +: SdrDragEntry(), + maPrimitive2DSequence(rSequence) +{ + // add parts to transparent overlay stuff eventually + setAddToTransparent(bAddToTransparent); +} + +SdrDragEntryPrimitive2DSequence::~SdrDragEntryPrimitive2DSequence() +{ +} + +drawinglayer::primitive2d::Primitive2DSequence SdrDragEntryPrimitive2DSequence::createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod) +{ + drawinglayer::primitive2d::Primitive2DReference aTransformPrimitive2D( + new drawinglayer::primitive2d::TransformPrimitive2D( + rDragMethod.getCurrentTransformation(), + maPrimitive2DSequence)); + + return drawinglayer::primitive2d::Primitive2DSequence(&aTransformPrimitive2D, 1); +} + +//////////////////////////////////////////////////////////////////////////////////////////////////// + SdrDragEntryPointGlueDrag::SdrDragEntryPointGlueDrag(const std::vector< basegfx::B2DPoint >& rPositions, bool bIsPointDrag) : maPositions(rPositions), mbIsPointDrag(bIsPointDrag) @@ -318,6 +344,13 @@ void SdrDragMethod::createSdrDragEntries() } } +void SdrDragMethod::createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool bModify) +{ + // add full obejct drag; Clone() at the object has to work + // for this + addSdrDragEntry(new SdrDragEntrySdrObject(rOriginal, rObjectContact, bModify)); +} + void SdrDragMethod::createSdrDragEntries_SolidDrag() { const sal_uInt32 nMarkAnz(getSdrDragView().GetMarkedObjectCount()); @@ -359,7 +392,7 @@ void SdrDragMethod::createSdrDragEntries_SolidDrag() { // add full obejct drag; Clone() at the object has to work // for this - addSdrDragEntry(new SdrDragEntrySdrObject(*pCandidate, rOC, true)); + createSdrDragEntryForSdrObject(*pCandidate, rOC, true); } if(bAddWireframe) @@ -1358,6 +1391,21 @@ Pointer SdrDragObjOwn::GetSdrDragPointer() const TYPEINIT1(SdrDragMove,SdrDragMethod); +void SdrDragMove::createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool /*bModify*/) +{ + // for SdrDragMove, use current Primitive2DSequence of SdrObject visualisation + // in given ObjectContact directly + sdr::contact::ViewContact& rVC = rOriginal.GetViewContact(); + sdr::contact::ViewObjectContact& rVOC = rVC.GetViewObjectContact(rObjectContact); + sdr::contact::DisplayInfo aDisplayInfo; + + // Do not use the last ViewPort set at the OC from the last ProcessDisplay(), + // here we want the complete primitive sequence without visibility clippings + rObjectContact.resetViewPort(); + + addSdrDragEntry(new SdrDragEntryPrimitive2DSequence(rVOC.getPrimitive2DSequenceHierarchy(aDisplayInfo), true)); +} + void SdrDragMove::applyCurrentTransformationToSdrObject(SdrObject& rTarget) { rTarget.Move(Size(DragStat().GetDX(), DragStat().GetDY())); -- cgit From 2a0a3168f4354285e59dd79d4477a4199c2f773b Mon Sep 17 00:00:00 2001 From: Armin Weiss Date: Tue, 20 Oct 2009 15:36:32 +0000 Subject: #i105065# speedup 3D/FontWork --- .../drawinglayer/geometry/viewinformation2d.hxx | 7 + .../drawinglayer/primitive2d/sceneprimitive2d.hxx | 20 ++- .../processor2d/hittestprocessor2d.hxx | 2 + .../drawinglayer/processor2d/vclprocessor2d.hxx | 2 + drawinglayer/prj/d.lst | 2 + drawinglayer/source/geometry/viewinformation2d.cxx | 40 +++++- .../source/primitive2d/sceneprimitive2d.cxx | 148 +++++++++++++++------ .../source/processor2d/contourextractor2d.cxx | 9 +- .../source/processor2d/hittestprocessor2d.cxx | 142 +++++++++++++++++--- .../source/processor2d/vclpixelprocessor2d.cxx | 6 + drawinglayer/source/processor2d/vclprocessor2d.cxx | 92 +++++++++++++ drawinglayer/source/processor3d/makefile.mk | 1 + 12 files changed, 403 insertions(+), 68 deletions(-) diff --git a/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx b/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx index 94a5623a2a77..0a87b268c8b1 100644 --- a/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx +++ b/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx @@ -149,6 +149,13 @@ namespace drawinglayer /// On-demand prepared Viewport in discrete units for convenience const basegfx::B2DRange& getDiscreteViewport() const; + /** support reduced DisplayQuality, PropertyName is 'ReducedDisplayQuality'. This + is used e.g. to allow to lower display quality for OverlayPrimitives and + may lead to simpler decompositions in the local create2DDecomposition + implementations of the primitives + */ + bool getReducedDisplayQuality() const; + /** Get the uno::Sequence< beans::PropertyValue > which contains all ViewInformation Use this call if You need to extract all contained ViewInformation. The ones diff --git a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx index d7fbfd4deaee..8ffc9a332e5c 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx @@ -41,6 +41,7 @@ #include #include #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -70,9 +71,13 @@ namespace drawinglayer double mfOldDiscreteSizeY; basegfx::B2DRange maOldUnitVisiblePart; + // the last created BitmapEx, e.g. for fast HitTest. This does not really need + // memory since BitmapEx is internally RefCounted + BitmapEx maOldRenderedBitmap; + // private helpers bool impGetShadow3D(const geometry::ViewInformation2D& rViewInformation) const; - void calculateDsicreteSizes( + void calculateDiscreteSizes( const geometry::ViewInformation2D& rViewInformation, basegfx::B2DRange& rDiscreteRange, basegfx::B2DRange& rVisibleDiscreteRange, @@ -87,7 +92,18 @@ namespace drawinglayer // Geometry extractor. Shadow will be added as in createLocalDecomposition, but // the 3D content is not converted to a bitmap visualisation but to projected 2D gemetry. This // helper is useful e.g. for Contour extraction or HitTests. - Primitive2DSequence getGeometry2D(const geometry::ViewInformation2D& rViewInformation) const; + Primitive2DSequence getGeometry2D() const; + Primitive2DSequence getShadow2D(const geometry::ViewInformation2D& rViewInformation) const; + + // Fast HitTest which uses the last buffered BitmapEx from the last + // rendered area if available. The return value describes if the check + // could be done with the current information, so do NOT use o_rResult + // when it returns false. o_rResult will be changed on return true and + // then contains a definitive answer if content of this scene is hit or + // not. On return false, it is normally necessary to use the geometric + // HitTest (see CutFindProcessor usages). The given HitPoint + // has to be in logic coordinates in scene's ObjectCoordinateSystem. + bool tryToCheckLastVisualisationDirectHit(const basegfx::B2DPoint& rLogicHitPoint, bool& o_rResult) const; // constructor/destructor ScenePrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx index 1eeaefd2dade..c0ab33052883 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx @@ -43,6 +43,7 @@ namespace basegfx { class B2DPolygon; } namespace basegfx { class B2DPolyPolygon; } +namespace drawinglayer { namespace primitive2d { class ScenePrimitive2D; }} ////////////////////////////////////////////////////////////////////////////// @@ -80,6 +81,7 @@ namespace drawinglayer bool checkFillHitWithTolerance( const basegfx::B2DPolyPolygon& rPolyPolygon, double fDiscreteHitTolerance); + void check3DHit(const primitive2d::ScenePrimitive2D& rCandidate); public: HitTestProcessor2D( diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx index e29b413190ab..66ca140c2e56 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx @@ -51,6 +51,7 @@ namespace drawinglayer { namespace primitive2d { class BitmapPrimitive2D; class FillBitmapPrimitive2D; class PolyPolygonGradientPrimitive2D; + class PolyPolygonBitmapPrimitive2D; class PolyPolygonColorPrimitive2D; class MetafilePrimitive2D; class MaskPrimitive2D; @@ -100,6 +101,7 @@ namespace drawinglayer void RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate); void RenderFillBitmapPrimitive2D(const primitive2d::FillBitmapPrimitive2D& rFillBitmapCandidate); void RenderPolyPolygonGradientPrimitive2D(const primitive2d::PolyPolygonGradientPrimitive2D& rPolygonCandidate); + void RenderPolyPolygonBitmapPrimitive2D(const primitive2d::PolyPolygonBitmapPrimitive2D& rPolygonCandidate); void RenderPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate); void RenderMetafilePrimitive2D(const primitive2d::MetafilePrimitive2D& rPolygonCandidate); void RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate); diff --git a/drawinglayer/prj/d.lst b/drawinglayer/prj/d.lst index 0068b32c24ae..1ba3c2e7b614 100644 --- a/drawinglayer/prj/d.lst +++ b/drawinglayer/prj/d.lst @@ -90,6 +90,8 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\processor2d mkdir: %_DEST%\inc%_EXT%\drawinglayer\processor3d ..\inc\drawinglayer\processor3d\baseprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\baseprocessor3d.hxx +..\inc\drawinglayer\processor3d\cutfindprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\cutfindprocessor3d.hxx +..\inc\drawinglayer\processor3d\defaultprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\defaultprocessor3d.hxx ..\inc\drawinglayer\processor3d\zbufferprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\zbufferprocessor3d.hxx ..\inc\drawinglayer\processor3d\tbufferprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\tbufferprocessor3d.hxx diff --git a/drawinglayer/source/geometry/viewinformation2d.cxx b/drawinglayer/source/geometry/viewinformation2d.cxx index 372de9936935..e03c946edf9e 100644 --- a/drawinglayer/source/geometry/viewinformation2d.cxx +++ b/drawinglayer/source/geometry/viewinformation2d.cxx @@ -81,12 +81,18 @@ namespace drawinglayer basegfx::B2DRange maDiscreteViewport; // the DrawPage which is target of visualisation. This is needed e.g. for - // the view-dependent decomposition of PageNumber TextFields + // the view-dependent decomposition of PageNumber TextFields. + // This parameter is buffered here, but mainly resides in mxExtendedInformation, + // so it will be interpreted, but held there. It will also not be added + // to mxExtendedInformation in impFillViewInformationFromContent (it's there already) uno::Reference< drawing::XDrawPage > mxVisualizedPage; // the point in time double mfViewTime; + // bitfield + bool mbReducedDisplayQuality : 1; + // the complete PropertyValue representation (if already created) uno::Sequence< beans::PropertyValue > mxViewInformation; @@ -125,6 +131,12 @@ namespace drawinglayer return s_sNameProperty; } + const ::rtl::OUString& getNamePropertyReducedDisplayQuality() + { + static ::rtl::OUString s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("ReducedDisplayQuality")); + return s_sNameProperty; + } + void impInterpretPropertyValues(const uno::Sequence< beans::PropertyValue >& rViewParameters) { if(rViewParameters.hasElements()) @@ -139,7 +151,17 @@ namespace drawinglayer { const beans::PropertyValue& rProp = rViewParameters[a]; - if(rProp.Name == getNamePropertyObjectTransformation()) + if(rProp.Name == getNamePropertyReducedDisplayQuality()) + { + // extra information; add to filtered information + mxExtendedInformation[nExtendedInsert++] = rProp; + + // for performance reasons, also cache content locally + sal_Bool bSalBool; + rProp.Value >>= bSalBool; + mbReducedDisplayQuality = bSalBool; + } + else if(rProp.Name == getNamePropertyObjectTransformation()) { com::sun::star::geometry::AffineMatrix2D aAffineMatrix2D; rProp.Value >>= aAffineMatrix2D; @@ -185,6 +207,7 @@ namespace drawinglayer const bool bViewportUsed(!maViewport.isEmpty()); const bool bTimeUsed(0.0 < mfViewTime); const bool bVisualizedPageUsed(mxVisualizedPage.is()); + const bool bReducedDisplayQualityUsed(true == mbReducedDisplayQuality); const bool bExtraInformation(mxExtendedInformation.hasElements()); sal_uInt32 nIndex(0); const sal_uInt32 nCount( @@ -193,6 +216,7 @@ namespace drawinglayer (bViewportUsed ? 1 : 0) + (bTimeUsed ? 1 : 0) + (bVisualizedPageUsed ? 1 : 0) + + (bReducedDisplayQualityUsed ? 1 : 0) + (bExtraInformation ? mxExtendedInformation.getLength() : 0)); mxViewInformation.realloc(nCount); @@ -265,6 +289,7 @@ namespace drawinglayer maDiscreteViewport(), mxVisualizedPage(rxDrawPage), mfViewTime(fViewTime), + mbReducedDisplayQuality(false), mxViewInformation(), mxExtendedInformation() { @@ -281,6 +306,7 @@ namespace drawinglayer maDiscreteViewport(), mxVisualizedPage(), mfViewTime(), + mbReducedDisplayQuality(false), mxViewInformation(rViewParameters), mxExtendedInformation() { @@ -355,6 +381,11 @@ namespace drawinglayer return mxVisualizedPage; } + bool getReducedDisplayQuality() const + { + return mbReducedDisplayQuality; + } + const uno::Sequence< beans::PropertyValue >& getViewInformationSequence() const { if(!mxViewInformation.hasElements()) @@ -501,6 +532,11 @@ namespace drawinglayer return mpViewInformation2D->getDiscreteViewport(); } + bool ViewInformation2D::getReducedDisplayQuality() const + { + return mpViewInformation2D->getReducedDisplayQuality(); + } + const uno::Sequence< beans::PropertyValue >& ViewInformation2D::getViewInformationSequence() const { return mpViewInformation2D->getViewInformationSequence(); diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx index f52af2da6a6d..ad36a40ea996 100644 --- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx @@ -100,7 +100,7 @@ namespace drawinglayer return maShadowPrimitives.hasElements(); } - void ScenePrimitive2D::calculateDsicreteSizes( + void ScenePrimitive2D::calculateDiscreteSizes( const geometry::ViewInformation2D& rViewInformation, basegfx::B2DRange& rDiscreteRange, basegfx::B2DRange& rVisibleDiscreteRange, @@ -110,23 +110,12 @@ namespace drawinglayer rDiscreteRange = basegfx::B2DRange(0.0, 0.0, 1.0, 1.0); rDiscreteRange.transform(rViewInformation.getObjectToViewTransformation() * getObjectTransformation()); - // force to discrete expanded bounds (it grows, so expanding works perfectly well) - rDiscreteRange.expand(basegfx::B2DTuple(floor(rDiscreteRange.getMinX()), floor(rDiscreteRange.getMinY()))); - rDiscreteRange.expand(basegfx::B2DTuple(ceil(rDiscreteRange.getMaxX()), ceil(rDiscreteRange.getMaxY()))); - // clip it against discrete Viewport (if set) rVisibleDiscreteRange = rDiscreteRange; if(!rViewInformation.getViewport().isEmpty()) { rVisibleDiscreteRange.intersect(rViewInformation.getDiscreteViewport()); - - if(!rVisibleDiscreteRange.isEmpty()) - { - // force to discrete expanded bounds, too - rVisibleDiscreteRange.expand(basegfx::B2DTuple(floor(rVisibleDiscreteRange.getMinX()), floor(rVisibleDiscreteRange.getMinY()))); - rVisibleDiscreteRange.expand(basegfx::B2DTuple(ceil(rVisibleDiscreteRange.getMaxX()), ceil(rVisibleDiscreteRange.getMaxY()))); - } } if(rVisibleDiscreteRange.isEmpty()) @@ -177,11 +166,11 @@ namespace drawinglayer } } - // get the involved ranges (see helper method calculateDsicreteSizes for details) + // get the involved ranges (see helper method calculateDiscreteSizes for details) basegfx::B2DRange aDiscreteRange; basegfx::B2DRange aVisibleDiscreteRange; basegfx::B2DRange aUnitVisibleRange; - calculateDsicreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); + calculateDiscreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); if(!aVisibleDiscreteRange.isEmpty()) { @@ -200,6 +189,31 @@ namespace drawinglayer fViewSizeY *= fReduceFactor; } + if(rViewInformation.getReducedDisplayQuality()) + { + // when reducing the visualisation is allowed (e.g. an OverlayObject + // only needed for dragging), reduce resolution extra + // to speed up dragging interactions + const double fArea(fViewSizeX * fViewSizeY); + double fReducedVisualisationFactor(1.0 / (sqrt(fArea) * (1.0 / 170.0))); + + if(fReducedVisualisationFactor > 1.0) + { + fReducedVisualisationFactor = 1.0; + } + else if(fReducedVisualisationFactor < 0.20) + { + fReducedVisualisationFactor = 0.20; + } + + if(fReducedVisualisationFactor != 1.0) + { + fReduceFactor *= fReducedVisualisationFactor; + fViewSizeX *= fReducedVisualisationFactor; + fViewSizeY *= fReducedVisualisationFactor; + } + } + // calculate logic render size in world coordinates for usage in renderer basegfx::B2DVector aLogicRenderSize( aDiscreteRange.getWidth() * fReduceFactor, @@ -207,9 +221,8 @@ namespace drawinglayer aLogicRenderSize *= rViewInformation.getInverseObjectToViewTransformation(); // determine the oversample value - static bool bDoOversample(false); static sal_uInt16 nDefaultOversampleValue(3); - const sal_uInt16 nOversampleValue((bDoOversample || aDrawinglayerOpt.IsAntiAliasing()) ? nDefaultOversampleValue : 0); + const sal_uInt16 nOversampleValue(aDrawinglayerOpt.IsAntiAliasing() ? nDefaultOversampleValue : 0); // use default 3D primitive processor to create BitmapEx for aUnitVisiblePart and process processor3d::ZBufferProcessor3D aZBufferProcessor3D( @@ -224,18 +237,16 @@ namespace drawinglayer aZBufferProcessor3D.processNonTransparent(getChildren3D()); aZBufferProcessor3D.processTransparent(getChildren3D()); - const BitmapEx aNewBitmap(aZBufferProcessor3D.getBitmapEx()); - const Size aBitmapSizePixel(aNewBitmap.GetSizePixel()); + const_cast< ScenePrimitive2D* >(this)->maOldRenderedBitmap = aZBufferProcessor3D.getBitmapEx(); + const Size aBitmapSizePixel(maOldRenderedBitmap.GetSizePixel()); if(aBitmapSizePixel.getWidth() && aBitmapSizePixel.getHeight()) { // create transform for the created bitmap in discrete coordinates first. - // #i97772# Do not forget to apply evtl. render size reduction to scaling basegfx::B2DHomMatrix aNew2DTransform; - const double fSizeReductionFactor(1.0 / fReduceFactor); - aNew2DTransform.set(0, 0, (double)(aBitmapSizePixel.getWidth() - 1) * fSizeReductionFactor); - aNew2DTransform.set(1, 1, (double)(aBitmapSizePixel.getHeight() - 1) * fSizeReductionFactor); + aNew2DTransform.set(0, 0, aVisibleDiscreteRange.getWidth()); + aNew2DTransform.set(1, 1, aVisibleDiscreteRange.getHeight()); aNew2DTransform.set(0, 2, aVisibleDiscreteRange.getMinX()); aNew2DTransform.set(1, 2, aVisibleDiscreteRange.getMinY()); @@ -243,7 +254,7 @@ namespace drawinglayer aNew2DTransform *= rViewInformation.getInverseObjectToViewTransformation(); // create bitmap primitive and add - const Primitive2DReference xRef(new BitmapPrimitive2D(aNewBitmap, aNew2DTransform)); + const Primitive2DReference xRef(new BitmapPrimitive2D(maOldRenderedBitmap, aNew2DTransform)); appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, xRef); // test: Allow to add an outline in the debugger when tests are needed @@ -262,17 +273,10 @@ namespace drawinglayer return aRetval; } - Primitive2DSequence ScenePrimitive2D::getGeometry2D(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence ScenePrimitive2D::getGeometry2D() const { Primitive2DSequence aRetval; - // create 2D shadows from contained 3D primitives - if(impGetShadow3D(rViewInformation)) - { - // add extracted 2d shadows (before 3d scene creations itself) - aRetval = maShadowPrimitives; - } - // create 2D projected geometry from 3D geometry if(getChildren3D().hasElements()) { @@ -284,14 +288,68 @@ namespace drawinglayer // process local primitives aGeometryProcessor.process(getChildren3D()); - // fetch result and append - Primitive2DSequence a2DExtractedPrimitives(aGeometryProcessor.getPrimitive2DSequence()); - appendPrimitive2DSequenceToPrimitive2DSequence(aRetval, a2DExtractedPrimitives); + // fetch result + aRetval = aGeometryProcessor.getPrimitive2DSequence(); } return aRetval; } + Primitive2DSequence ScenePrimitive2D::getShadow2D(const geometry::ViewInformation2D& rViewInformation) const + { + Primitive2DSequence aRetval; + + // create 2D shadows from contained 3D primitives + if(impGetShadow3D(rViewInformation)) + { + // add extracted 2d shadows (before 3d scene creations itself) + aRetval = maShadowPrimitives; + } + + return aRetval; + } + + bool ScenePrimitive2D::tryToCheckLastVisualisationDirectHit(const basegfx::B2DPoint& rLogicHitPoint, bool& o_rResult) const + { + if(!maOldRenderedBitmap.IsEmpty() && !maOldUnitVisiblePart.isEmpty()) + { + basegfx::B2DHomMatrix aInverseSceneTransform(getObjectTransformation()); + aInverseSceneTransform.invert(); + const basegfx::B2DPoint aRelativePoint(aInverseSceneTransform * rLogicHitPoint); + + if(maOldUnitVisiblePart.isInside(aRelativePoint)) + { + // calculate coordinates relative to visualized part + double fDivisorX(maOldUnitVisiblePart.getWidth()); + double fDivisorY(maOldUnitVisiblePart.getHeight()); + + if(basegfx::fTools::equalZero(fDivisorX)) + { + fDivisorX = 1.0; + } + + if(basegfx::fTools::equalZero(fDivisorY)) + { + fDivisorY = 1.0; + } + + const double fRelativeX((aRelativePoint.getX() - maOldUnitVisiblePart.getMinX()) / fDivisorX); + const double fRelativeY((aRelativePoint.getY() - maOldUnitVisiblePart.getMinY()) / fDivisorY); + + // combine with real BitmapSizePixel to get bitmap coordinates + const Size aBitmapSizePixel(maOldRenderedBitmap.GetSizePixel()); + const sal_Int32 nX(basegfx::fround(fRelativeX * aBitmapSizePixel.Width())); + const sal_Int32 nY(basegfx::fround(fRelativeY * aBitmapSizePixel.Height())); + + // try to get a statement about transparency in that pixel + o_rResult = (0xff != maOldRenderedBitmap.GetTransparency(nX, nY)); + return true; + } + } + + return false; + } + ScenePrimitive2D::ScenePrimitive2D( const primitive3d::Primitive3DSequence& rxChildren3D, const attribute::SdrSceneAttribute& rSdrSceneAttribute, @@ -308,7 +366,8 @@ namespace drawinglayer mbShadow3DChecked(false), mfOldDiscreteSizeX(0.0), mfOldDiscreteSizeY(0.0), - maOldUnitVisiblePart() + maOldUnitVisiblePart(), + maOldRenderedBitmap() { } @@ -359,7 +418,7 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - // get the involved ranges (see helper method calculateDsicreteSizes for details) + // get the involved ranges (see helper method calculateDiscreteSizes for details) basegfx::B2DRange aDiscreteRange; basegfx::B2DRange aUnitVisibleRange; bool bNeedNewDecomposition(false); @@ -368,21 +427,22 @@ namespace drawinglayer if(getLocalDecomposition().hasElements()) { basegfx::B2DRange aVisibleDiscreteRange; - calculateDsicreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); + calculateDiscreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); bDiscreteSizesAreCalculated = true; - // display has changed and cannot be reused when resolution did change - if(!basegfx::fTools::equal(aDiscreteRange.getWidth(), mfOldDiscreteSizeX) || - !basegfx::fTools::equal(aDiscreteRange.getHeight(), mfOldDiscreteSizeY)) + // needs to be painted when the new part is not part of the last + // decomposition + if(!maOldUnitVisiblePart.isInside(aUnitVisibleRange)) { bNeedNewDecomposition = true; } + // display has changed and cannot be reused when resolution got bigger. It + // can be reused when resolution got smaller, though. if(!bNeedNewDecomposition) { - // needs to be painted when the new part is not part of the last - // decomposition - if(!maOldUnitVisiblePart.isInside(aUnitVisibleRange)) + if(basegfx::fTools::more(aDiscreteRange.getWidth(), mfOldDiscreteSizeX) || + basegfx::fTools::more(aDiscreteRange.getHeight(), mfOldDiscreteSizeY)) { bNeedNewDecomposition = true; } @@ -400,7 +460,7 @@ namespace drawinglayer if(!bDiscreteSizesAreCalculated) { basegfx::B2DRange aVisibleDiscreteRange; - calculateDsicreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); + calculateDiscreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); } // remember last used NewDiscreteSize and NewUnitVisiblePart diff --git a/drawinglayer/source/processor2d/contourextractor2d.cxx b/drawinglayer/source/processor2d/contourextractor2d.cxx index b7931aed5c27..1f629cb25c9c 100644 --- a/drawinglayer/source/processor2d/contourextractor2d.cxx +++ b/drawinglayer/source/processor2d/contourextractor2d.cxx @@ -162,7 +162,8 @@ namespace drawinglayer { // 2D Scene primitive containing 3D stuff; extract 2D contour in world coordinates const primitive2d::ScenePrimitive2D& rScenePrimitive2DCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate)); - const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D(getViewInformation2D())); + const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D()); + const primitive2d::Primitive2DSequence xExtracted2DSceneShadow(rScenePrimitive2DCandidate.getShadow2D(getViewInformation2D())); // proccess content if(xExtracted2DSceneGeometry.hasElements()) @@ -170,6 +171,12 @@ namespace drawinglayer process(xExtracted2DSceneGeometry); } + // proccess content + if(xExtracted2DSceneShadow.hasElements()) + { + process(xExtracted2DSceneShadow); + } + break; } case PRIMITIVE2D_ID_WRONGSPELLPRIMITIVE2D : diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx index 8a2d732cbb2f..cf10c9defd8a 100644 --- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx +++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx @@ -48,6 +48,8 @@ #include #include #include +#include +#include ////////////////////////////////////////////////////////////////////////////// @@ -164,6 +166,119 @@ namespace drawinglayer return bRetval; } + void HitTestProcessor2D::check3DHit(const primitive2d::ScenePrimitive2D& rCandidate) + { + // calculate relative point in unified 2D scene + const basegfx::B2DPoint aLogicHitPosition(getViewInformation2D().getInverseObjectToViewTransformation() * getDiscreteHitPosition()); + + // use bitmap check in ScenePrimitive2D + bool bTryFastResult(false); + + if(rCandidate.tryToCheckLastVisualisationDirectHit(aLogicHitPosition, bTryFastResult)) + { + mbHit = bTryFastResult; + } + else + { + basegfx::B2DHomMatrix aInverseSceneTransform(rCandidate.getObjectTransformation()); + aInverseSceneTransform.invert(); + const basegfx::B2DPoint aRelativePoint(aInverseSceneTransform * aLogicHitPosition); + + // check if test point is inside scene's unified area at all + if(aRelativePoint.getX() >= 0.0 && aRelativePoint.getX() <= 1.0 + && aRelativePoint.getY() >= 0.0 && aRelativePoint.getY() <= 1.0) + { + // get 3D view information + const geometry::ViewInformation3D& rObjectViewInformation3D = rCandidate.getViewInformation3D(); + + // create HitPoint Front and Back, transform to object coordinates + basegfx::B3DHomMatrix aViewToObject(rObjectViewInformation3D.getObjectToView()); + aViewToObject.invert(); + const basegfx::B3DPoint aFront(aViewToObject * basegfx::B3DPoint(aRelativePoint.getX(), aRelativePoint.getY(), 0.0)); + const basegfx::B3DPoint aBack(aViewToObject * basegfx::B3DPoint(aRelativePoint.getX(), aRelativePoint.getY(), 1.0)); + + if(!aFront.equal(aBack)) + { + const primitive3d::Primitive3DSequence& rPrimitives = rCandidate.getChildren3D(); + + if(rPrimitives.hasElements()) + { + // make BoundVolume empty and overlapping test for speedup + const basegfx::B3DRange aObjectRange( + drawinglayer::primitive3d::getB3DRangeFromPrimitive3DSequence( + rPrimitives, rObjectViewInformation3D)); + + if(!aObjectRange.isEmpty()) + { + const basegfx::B3DRange aFrontBackRange(aFront, aBack); + + if(aObjectRange.overlaps(aFrontBackRange)) + { + // bound volumes hit, geometric cut tests needed + drawinglayer::processor3d::CutFindProcessor aCutFindProcessor( + rObjectViewInformation3D, + aFront, + aBack, + true); + aCutFindProcessor.process(rPrimitives); + + mbHit = (0 != aCutFindProcessor.getCutPoints().size()); + } + } + } + } + } + + // This is needed to check hit with 3D shadows, too. HitTest is without shadow + // to keep compatible with previous versions. Keeping here as reference + // + // if(!getHit()) + // { + // // if scene has shadow, check hit with shadow, too + // const primitive2d::Primitive2DSequence xExtracted2DSceneShadow(rCandidate.getShadow2D(getViewInformation2D())); + // + // if(xExtracted2DSceneShadow.hasElements()) + // { + // // proccess extracted 2D content + // process(xExtracted2DSceneShadow); + // } + // } + + if(!getHit()) + { + // empty 3D scene; Check for border hit + basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0))); + aOutline.transform(rCandidate.getObjectTransformation()); + + mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); + } + + // This is what the previous version did. Keeping it here for reference + // + // // 2D Scene primitive containing 3D stuff; extract 2D contour in world coordinates + // // This may be refined later to an own 3D HitTest renderer which processes the 3D + // // geometry directly + // const primitive2d::ScenePrimitive2D& rScenePrimitive2DCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate)); + // const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D()); + // const primitive2d::Primitive2DSequence xExtracted2DSceneShadow(rScenePrimitive2DCandidate.getShadow2D(getViewInformation2D())); + // + // if(xExtracted2DSceneGeometry.hasElements() || xExtracted2DSceneShadow.hasElements()) + // { + // // proccess extracted 2D content + // process(xExtracted2DSceneGeometry); + // process(xExtracted2DSceneShadow); + // } + // else + // { + // // empty 3D scene; Check for border hit + // const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D())); + // basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + // + // mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); + // } + } + } + void HitTestProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) { if(getHit()) @@ -334,25 +449,8 @@ namespace drawinglayer { if(!getHitTextOnly()) { - // 2D Scene primitive containing 3D stuff; extract 2D contour in world coordinates - // This may be refined later to an own 3D HitTest renderer which processes the 3D - // geometry directly - const primitive2d::ScenePrimitive2D& rScenePrimitive2DCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate)); - const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D(getViewInformation2D())); - - if(xExtracted2DSceneGeometry.hasElements()) - { - // proccess extracted 2D content - process(xExtracted2DSceneGeometry); - } - else - { - // empty 3D scene; Check for border hit - const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D())); - basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); - - mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); - } + const primitive2d::ScenePrimitive2D& rCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate)); + check3DHit(rCandidate); } break; @@ -365,6 +463,12 @@ namespace drawinglayer // ignorable primitives break; } + case PRIMITIVE2D_ID_SHADOWPRIMITIVE2D : + { + // Ignore shadows; we do not want to have shadows hittable. + // Remove this one to make shadows hittable on demand. + break; + } case PRIMITIVE2D_ID_TEXTSIMPLEPORTIONPRIMITIVE2D : case PRIMITIVE2D_ID_TEXTDECORATEDPORTIONPRIMITIVE2D : { diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 8e2f89bb82a6..ef351002a1ea 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -218,6 +218,12 @@ namespace drawinglayer } break; } + case PRIMITIVE2D_ID_POLYPOLYGONBITMAPPRIMITIVE2D : + { + // direct draw of bitmap + RenderPolyPolygonBitmapPrimitive2D(static_cast< const primitive2d::PolyPolygonBitmapPrimitive2D& >(rCandidate)); + break; + } case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D : { // direct draw of PolyPolygon with color diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index e5a88812dd10..ede5aee730cf 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -565,6 +565,98 @@ namespace drawinglayer } } + // direct draw of bitmap + void VclProcessor2D::RenderPolyPolygonBitmapPrimitive2D(const primitive2d::PolyPolygonBitmapPrimitive2D& rPolygonCandidate) + { + bool bDone(false); + const basegfx::B2DPolyPolygon& rPolyPolygon = rPolygonCandidate.getB2DPolyPolygon(); + + if(rPolyPolygon.count()) + { + const attribute::FillBitmapAttribute& rFillBitmapAttribute = rPolygonCandidate.getFillBitmap(); + const Bitmap& rBitmap = rFillBitmapAttribute.getBitmap(); + + if(rBitmap.IsEmpty()) + { + // empty bitmap, done + bDone = true; + } + else + { + // try to catch cases where the bitmap will be color-modified to a single + // color (e.g. shadow). This would NOT be optimizable with an alpha channel + // at the Bitmap which we do not have here. When this should change, this + // optimization has to be reworked accordingly. + const sal_uInt32 nBColorModifierStackCount(maBColorModifierStack.count()); + + if(nBColorModifierStackCount) + { + const basegfx::BColorModifier& rTopmostModifier = maBColorModifierStack.getBColorModifier(nBColorModifierStackCount - 1); + + if(basegfx::BCOLORMODIFYMODE_REPLACE == rTopmostModifier.getMode()) + { + // the bitmap fill is in unified color, so we can replace it with + // a single polygon fill. The form of the fill depends on tiling + if(rFillBitmapAttribute.getTiling()) + { + // with tiling, fill the whole PolyPolygon with the modifier color + basegfx::B2DPolyPolygon aLocalPolyPolygon(rPolyPolygon); + + aLocalPolyPolygon.transform(maCurrentTransformation); + mpOutputDevice->SetLineColor(); + mpOutputDevice->SetFillColor(Color(rTopmostModifier.getBColor())); + mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon); + } + else + { + // without tiling, only the area common to the bitmap tile and the + // PolyPolygon is filled. Create the bitmap tile area in object + // coordinates. For this, the object transformation needs to be created + // from the already scaled PolyPolygon. The tile area in object + // coordinates wil always be non-rotated, so it's not necessary to + // work with a polygon here + basegfx::B2DRange aTileRange(rFillBitmapAttribute.getTopLeft(), + rFillBitmapAttribute.getTopLeft() + rFillBitmapAttribute.getSize()); + const basegfx::B2DRange aPolyPolygonRange(rPolyPolygon.getB2DRange()); + basegfx::B2DHomMatrix aNewObjectTransform; + + aNewObjectTransform.set(0, 0, aPolyPolygonRange.getWidth()); + aNewObjectTransform.set(1, 1, aPolyPolygonRange.getHeight()); + aNewObjectTransform.set(0, 2, aPolyPolygonRange.getMinX()); + aNewObjectTransform.set(1, 2, aPolyPolygonRange.getMinY()); + aTileRange.transform(aNewObjectTransform); + + // now clip the object polyPolygon against the tile range + // to get the common area (OR) + basegfx::B2DPolyPolygon aTarget = basegfx::tools::clipPolyPolygonOnRange(rPolyPolygon, aTileRange, true, false); + + if(aTarget.count()) + { + aTarget.transform(maCurrentTransformation); + mpOutputDevice->SetLineColor(); + mpOutputDevice->SetFillColor(Color(rTopmostModifier.getBColor())); + mpOutputDevice->DrawPolyPolygon(aTarget); + } + } + + bDone = true; + } + } + } + } + else + { + // empty polyPolygon, done + bDone = true; + } + + if(!bDone) + { + // use default decomposition + process(rPolygonCandidate.get2DDecomposition(getViewInformation2D())); + } + } + // direct draw of PolyPolygon with color void VclProcessor2D::RenderPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate) { diff --git a/drawinglayer/source/processor3d/makefile.mk b/drawinglayer/source/processor3d/makefile.mk index 8ca0097c435a..2ae2ae52f2f2 100644 --- a/drawinglayer/source/processor3d/makefile.mk +++ b/drawinglayer/source/processor3d/makefile.mk @@ -46,6 +46,7 @@ ENABLE_EXCEPTIONS=TRUE SLOFILES= \ $(SLO)$/baseprocessor3d.obj \ + $(SLO)$/cutfindprocessor3d.obj \ $(SLO)$/defaultprocessor3d.obj \ $(SLO)$/shadow3dextractor.obj \ $(SLO)$/geometry2dextractor.obj \ -- cgit From ca42fba5120c7de4ba7ab5321ba61cc1e092ef55 Mon Sep 17 00:00:00 2001 From: Armin Weiss Date: Tue, 20 Oct 2009 15:37:20 +0000 Subject: #i105065# speedup 3D/FontWork --- .../processor3d/cutfindprocessor3d.hxx | 86 +++++++++ .../source/processor3d/cutfindprocessor3d.cxx | 199 +++++++++++++++++++++ 2 files changed, 285 insertions(+) create mode 100644 drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx create mode 100644 drawinglayer/source/processor3d/cutfindprocessor3d.cxx diff --git a/drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx new file mode 100644 index 000000000000..8a800d6d24b1 --- /dev/null +++ b/drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx @@ -0,0 +1,86 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: zbufferprocessor3d.hxx,v $ + * + * $Revision: 1.4 $ + * + * last change: $Author: aw $ $Date: 2008-06-24 15:30:18 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX +#define INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX + +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace processor3d + { + class CutFindProcessor : public BaseProcessor3D + { + private: + // the start and stop point for the cut vector + basegfx::B3DPoint maFront; + basegfx::B3DPoint maBack; + + // the found cut points + ::std::vector< basegfx::B3DPoint > maResult; + + // #i102956# the transformation change from TransformPrimitive3D processings + // needs to be remembered to be able to transform found cuts to the + // basic coordinate system the processor starts with + basegfx::B3DHomMatrix maCombinedTransform; + + // bitfield + bool mbAnyHit : 1; + + // as tooling, the process() implementation takes over API handling and calls this + // virtual render method when the primitive implementation is BasePrimitive3D-based. + virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); + + public: + CutFindProcessor(const geometry::ViewInformation3D& rViewInformation, + const basegfx::B3DPoint& rFront, + const basegfx::B3DPoint& rBack, + bool bAnyHit); + + // data access + const ::std::vector< basegfx::B3DPoint >& getCutPoints() const { return maResult; } + bool getAnyHit() const { return mbAnyHit; } + }; + } // end of namespace processor3d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX + +// eof diff --git a/drawinglayer/source/processor3d/cutfindprocessor3d.cxx b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx new file mode 100644 index 000000000000..99f5801c60e3 --- /dev/null +++ b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx @@ -0,0 +1,199 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: zbufferprocessor3d.cxx,v $ + * + * $Revision: 1.5 $ + * + * last change: $Author: aw $ $Date: 2008-06-24 15:31:09 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_drawinglayer.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace processor3d + { + CutFindProcessor::CutFindProcessor(const geometry::ViewInformation3D& rViewInformation, + const basegfx::B3DPoint& rFront, + const basegfx::B3DPoint& rBack, + bool bAnyHit) + : BaseProcessor3D(rViewInformation), + maFront(rFront), + maBack(rBack), + maResult(), + maCombinedTransform(), + mbAnyHit(bAnyHit) + { + } + + void CutFindProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) + { + if(getAnyHit() && maResult.size()) + { + // stop processing as soon as a hit was recognized + return; + } + + // it is a BasePrimitive3D implementation, use getPrimitiveID() call for switch + switch(rCandidate.getPrimitiveID()) + { + case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D : + { + // transform group. + const primitive3d::TransformPrimitive3D& rPrimitive = static_cast< const primitive3d::TransformPrimitive3D& >(rCandidate); + + // remember old and transform front, back to object coordinates + const basegfx::B3DPoint aLastFront(maFront); + const basegfx::B3DPoint aLastBack(maBack); + basegfx::B3DHomMatrix aInverseTrans(rPrimitive.getTransformation()); + aInverseTrans.invert(); + maFront *= aInverseTrans; + maBack *= aInverseTrans; + + // remember current and create new transformation; add new object transform from right side + const geometry::ViewInformation3D aLastViewInformation3D(getViewInformation3D()); + const geometry::ViewInformation3D aNewViewInformation3D( + aLastViewInformation3D.getObjectTransformation() * rPrimitive.getTransformation(), + aLastViewInformation3D.getOrientation(), + aLastViewInformation3D.getProjection(), + aLastViewInformation3D.getDeviceToView(), + aLastViewInformation3D.getViewTime(), + aLastViewInformation3D.getExtendedInformationSequence()); + updateViewInformation(aNewViewInformation3D); + + // #i102956# remember needed back-transform for found cuts (combine from right side) + const basegfx::B3DHomMatrix aLastCombinedTransform(maCombinedTransform); + maCombinedTransform = maCombinedTransform * rPrimitive.getTransformation(); + + // let break down + process(rPrimitive.getChildren()); + + // restore transformations and front, back + maCombinedTransform = aLastCombinedTransform; + updateViewInformation(aLastViewInformation3D); + maFront = aLastFront; + maBack = aLastBack; + break; + } + case PRIMITIVE3D_ID_POLYGONHAIRLINEPRIMITIVE3D : + { + // PolygonHairlinePrimitive3D, not used for hit test with planes, ignore. This + // means that also thick line expansion will not be hit-tested as + // PolyPolygonMaterialPrimitive3D + break; + } + case PRIMITIVE3D_ID_HATCHTEXTUREPRIMITIVE3D : + { + // #i97321# + // For HatchTexturePrimitive3D, do not use the decomposition since it will produce + // clipped hatch lines in 3D. It can be used when the hatch also has a filling, but for + // simplicity, just use the children which are the PolyPolygonMaterialPrimitive3D + // which define the hatched areas anyways; for HitTest this is more than adequate + const primitive3d::HatchTexturePrimitive3D& rPrimitive = static_cast< const primitive3d::HatchTexturePrimitive3D& >(rCandidate); + process(rPrimitive.getChildren()); + break; + } + case PRIMITIVE3D_ID_HITTESTPRIMITIVE3D : + { + // HitTestPrimitive3D, force usage due to we are doing a hit test and this + // primitive only gets generated on 3d objects without fill, exactly for this + // purpose + const primitive3d::HitTestPrimitive3D& rPrimitive = static_cast< const primitive3d::HitTestPrimitive3D& >(rCandidate); + process(rPrimitive.getChildren()); + break; + } + case PRIMITIVE3D_ID_POLYPOLYGONMATERIALPRIMITIVE3D : + { + // PolyPolygonMaterialPrimitive3D + const primitive3d::PolyPolygonMaterialPrimitive3D& rPrimitive = static_cast< const primitive3d::PolyPolygonMaterialPrimitive3D& >(rCandidate); + + if(!maFront.equal(maBack)) + { + const basegfx::B3DPolyPolygon& rPolyPolygon = rPrimitive.getB3DPolyPolygon(); + const sal_uInt32 nPolyCount(rPolyPolygon.count()); + + if(nPolyCount) + { + const basegfx::B3DPolygon aPolygon(rPolyPolygon.getB3DPolygon(0)); + const sal_uInt32 nPointCount(aPolygon.count()); + + if(nPointCount > 2) + { + const basegfx::B3DVector aPlaneNormal(aPolygon.getNormal()); + + if(!aPlaneNormal.equalZero()) + { + const basegfx::B3DPoint aPointOnPlane(aPolygon.getB3DPoint(0)); + double fCut(0.0); + + if(basegfx::tools::getCutBetweenLineAndPlane(aPlaneNormal, aPointOnPlane, maFront, maBack, fCut)) + { + const basegfx::B3DPoint aCutPoint(basegfx::interpolate(maFront, maBack, fCut)); + + if(basegfx::tools::isInside(rPolyPolygon, aCutPoint, false)) + { + // #i102956# add result. Do not forget to do this in the coordinate + // system the processor get started with, so use the collected + // combined transformation from processed TransformPrimitive3D's + maResult.push_back(maCombinedTransform * aCutPoint); + } + } + } + } + } + } + + break; + } + default : + { + // process recursively + process(rCandidate.get3DDecomposition(getViewInformation3D())); + break; + } + } + } + } // end of namespace processor3d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// eof -- cgit From c86788a9514535d2868356b52fc0df4f444136d3 Mon Sep 17 00:00:00 2001 From: Philipp Lohmann Date: Tue, 20 Oct 2009 23:12:55 +0200 Subject: #i106113# update from shtylman and kendy (thanks !) --- fpicker/source/unx/kde4/KDE4FPEntry.cxx | 6 +- fpicker/source/unx/kde4/KDE4FilePicker.cxx | 114 +++++++++++++++++++++-------- shell/source/backends/kdebe/makefile.mk | 4 +- 3 files changed, 87 insertions(+), 37 deletions(-) diff --git a/fpicker/source/unx/kde4/KDE4FPEntry.cxx b/fpicker/source/unx/kde4/KDE4FPEntry.cxx index 268c01b600b3..46e09bfe5359 100644 --- a/fpicker/source/unx/kde4/KDE4FPEntry.cxx +++ b/fpicker/source/unx/kde4/KDE4FPEntry.cxx @@ -84,12 +84,12 @@ static Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiS // the three uno functions that will be exported extern "C" { - void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ) + void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } - sal_Bool SAL_CALL component_writeInfo( void* pServiceManager, void* pRegistryKey ) + sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey ) { sal_Bool bRetVal = sal_True; @@ -110,7 +110,7 @@ extern "C" return bRetVal; } - void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* pRegistryKey ) + void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* ) { void* pRet = 0; diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx index 09e33a225977..96a14dbcef11 100644 --- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx +++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx @@ -111,6 +111,8 @@ using namespace ::com::sun::star::uno; // helper functions ////////////////////////////////////////////////////////////////////////// +#include + namespace { // controling event notifications @@ -157,14 +159,15 @@ KDE4FilePicker::KDE4FilePicker( const uno::Reference _resMgr( CREATEVERSIONRESMGR( fps_office ) ) { _extraControls = new QWidget(); - _layout = new QGridLayout(_extraControls); - _dialog = new KFileDialog(KUrl(""), QString(""), 0, _extraControls); + _dialog = new KFileDialog(KUrl("~"), QString(""), 0, _extraControls); _dialog->setMode(KFile::File | KFile::LocalOnly); //default mode _dialog->setOperationMode(KFileDialog::Opening); + + _dialog->setStyleSheet("color: black;"); } KDE4FilePicker::~KDE4FilePicker() @@ -207,21 +210,12 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute() } } + _dialog->clearFilter(); _dialog->setFilter(_filter); - _dialog->exec(); - - //nasty hack to get a local qt event loop going to process the dialog - //otherwise the dialog returns immediately - while (_dialog->isVisible()) - { - kapp->processEvents(QEventLoop::WaitForMoreEvents); - } //block and wait for user input - if (_dialog->result() == KFileDialog::Accepted) - { + if (_dialog->exec() == KFileDialog::Accepted) return ExecutableDialogResults::OK; - } return ExecutableDialogResults::CANCEL; } @@ -230,13 +224,9 @@ void SAL_CALL KDE4FilePicker::setMultiSelectionMode( sal_Bool multiSelect ) throw( uno::RuntimeException ) { if (multiSelect) - { _dialog->setMode(KFile::Files | KFile::LocalOnly); - } else - { _dialog->setMode(KFile::File | KFile::LocalOnly); - } } void SAL_CALL KDE4FilePicker::setDefaultName( const ::rtl::OUString &name ) @@ -250,7 +240,7 @@ void SAL_CALL KDE4FilePicker::setDisplayDirectory( const rtl::OUString &dir ) throw( uno::RuntimeException ) { const QString url = toQString(dir); - _dialog->setStartDir(KUrl(url)); + _dialog->setUrl(KUrl(url)); } rtl::OUString SAL_CALL KDE4FilePicker::getDisplayDirectory() @@ -263,16 +253,63 @@ rtl::OUString SAL_CALL KDE4FilePicker::getDisplayDirectory() uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles() throw( uno::RuntimeException ) { - QStringList files = _dialog->selectedFiles(); + QStringList rawFiles = _dialog->selectedFiles(); + QStringList files; - uno::Sequence< ::rtl::OUString > seq(files.size()); + // check if we need to add an extension + QString extension = ""; + if ( _dialog->operationMode() == KFileDialog::Saving ) + { + QCheckBox *cb = dynamic_cast ( + _customWidgets[ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION ]); + + if (cb->isChecked()) + { + extension = _dialog->currentFilter(); // assuming filter value is like this *.ext + extension.replace("*",""); + } + } + + // 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 = "file://" + KUrl(rawFiles[0]).directory(); - for (int i=0 ; i 1) { - const QString fileName = "file:" + files[i]; - seq[i] = toOUString(fileName); + singleFile = false; + //for multi file sequences, oo expects the first param to be the directory + //can't treat all cases like multi file because in some instances (inserting image) + //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) + // we add the file to list of avail files + if ((dir + "/") != ("file://" + rawFiles[i])) + { + QString filename = KUrl(rawFiles[i]).fileName(); + + if (singleFile) + filename.prepend(dir + "/"); + + //prevent extension append if we already have one + if (filename.endsWith(extension)) + files.append(filename); + else + files.append(filename + extension); + } + } + + // 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) + seq[i] = toOUString(files[i]); + return seq; } @@ -283,9 +320,7 @@ void SAL_CALL KDE4FilePicker::appendFilter( const ::rtl::OUString &title, const QString f = toQString(filter); if (!_filter.isNull()) - { _filter.append("\n"); - } //add to hash map for reverse lookup in getCurrentFilter _filters.insert(f, t); @@ -294,15 +329,18 @@ void SAL_CALL KDE4FilePicker::appendFilter( const ::rtl::OUString &title, const //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)); } void SAL_CALL KDE4FilePicker::setCurrentFilter( const rtl::OUString &title ) throw( lang::IllegalArgumentException, uno::RuntimeException ) { - QString filter = toQString(title); - filter.replace("/", "\\/"); - _dialog->filterWidget()->setCurrentFilter(filter); + QString t = toQString(title); + t.replace("/", "\\/"); + _dialog->filterWidget()->setCurrentFilter(t); } rtl::OUString SAL_CALL KDE4FilePicker::getCurrentFilter() @@ -312,17 +350,29 @@ rtl::OUString SAL_CALL KDE4FilePicker::getCurrentFilter() //default if not found if (filter.isNull()) - { filter = "ODF Text Document (.odt)"; - } return toOUString(filter); } -void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString&, const uno::Sequence& ) +void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString& , const uno::Sequence& filters) throw( lang::IllegalArgumentException, uno::RuntimeException ) { - //TODO + 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'); + } } void SAL_CALL KDE4FilePicker::setValue( sal_Int16 controlId, sal_Int16, const uno::Any &value ) diff --git a/shell/source/backends/kdebe/makefile.mk b/shell/source/backends/kdebe/makefile.mk index 8bc0b475be8e..6159be6be151 100644 --- a/shell/source/backends/kdebe/makefile.mk +++ b/shell/source/backends/kdebe/makefile.mk @@ -77,11 +77,11 @@ SHL1OBJS=$(SLOFILES) SHL1DEF=$(MISC)$/$(SHL1TARGET).def SHL1IMPLIB=i$(SHL1TARGET) +SHL1LINKFLAGS+=$(KDE_LIBS) -lkio SHL1STDLIBS= \ $(CPPUHELPERLIB) \ $(CPPULIB) \ - $(SALLIB) \ - $(KDE_LIBS) -lkio + $(SALLIB) SHL1VERSIONMAP=exports.map SHL1DEF=$(MISC)$/$(SHL1TARGET).def -- cgit From 79486067e5a4294eb101ee5c8f08877e4f634b2a Mon Sep 17 00:00:00 2001 From: Philipp Lohmann Date: Wed, 21 Oct 2009 09:51:34 +0000 Subject: fix a compile problem --- drawinglayer/source/geometry/viewinformation2d.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drawinglayer/source/geometry/viewinformation2d.cxx b/drawinglayer/source/geometry/viewinformation2d.cxx index e03c946edf9e..706684c5f7d8 100644 --- a/drawinglayer/source/geometry/viewinformation2d.cxx +++ b/drawinglayer/source/geometry/viewinformation2d.cxx @@ -157,7 +157,7 @@ namespace drawinglayer mxExtendedInformation[nExtendedInsert++] = rProp; // for performance reasons, also cache content locally - sal_Bool bSalBool; + sal_Bool bSalBool = sal_True; rProp.Value >>= bSalBool; mbReducedDisplayQuality = bSalBool; } -- cgit From 3b28ed8f3566afd5ad70156ee1148b76f64861fb Mon Sep 17 00:00:00 2001 From: Philipp Lohmann Date: Wed, 21 Oct 2009 09:55:42 +0000 Subject: fix a compile problem --- drawinglayer/source/processor2d/hittestprocessor2d.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx index cf10c9defd8a..d038c61541ac 100644 --- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx +++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx @@ -449,8 +449,8 @@ namespace drawinglayer { if(!getHitTextOnly()) { - const primitive2d::ScenePrimitive2D& rCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate)); - check3DHit(rCandidate); + const primitive2d::ScenePrimitive2D& rSceneCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate)); + check3DHit(rSceneCandidate); } break; -- cgit From ae7a95208039e7c78ba23fe819c9e0db43e467b5 Mon Sep 17 00:00:00 2001 From: Philipp Lohmann Date: Wed, 21 Oct 2009 15:49:31 +0200 Subject: #i103932# allow duplicate field names in PDF export on request --- officecfg/registry/schema/org/openoffice/Office/Common.xcs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index 72c0b768ed84..716e1ff4dbbb 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -5343,6 +5343,13 @@ Dymamic border coloring means that when the mouse is hovered over a control, and 0 + + + pl + Specifies whether multiple form fields exported are allowed to have the same field name. + + false + FME -- cgit From 65aca165c2049957833a3f306dc0d0bd86e5c68d Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Thu, 22 Oct 2009 09:42:03 +0000 Subject: #i106146# do not crash if there is no numbering rule in itemset --- svx/source/cui/numpages.cxx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/svx/source/cui/numpages.cxx b/svx/source/cui/numpages.cxx index 0e2840894e9a..59e95b9b1a94 100644 --- a/svx/source/cui/numpages.cxx +++ b/svx/source/cui/numpages.cxx @@ -570,17 +570,12 @@ int SvxBulletPickTabPage::DeactivatePage(SfxItemSet *_pSet) void SvxBulletPickTabPage::Reset( const SfxItemSet& rSet ) { - const SfxPoolItem* pItem; - //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); - if(eState != SFX_ITEM_SET) - { - nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); - } - DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!"); + nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE; + + const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + delete pSaveNum; - pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); + pSaveNum = new SvxNumRule(*rItem.GetNumRule()); // nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel(); -- cgit From 2963255c67b41faf76c6c92d9d218ecfe71569ed Mon Sep 17 00:00:00 2001 From: Sven Jacobi Date: Thu, 22 Oct 2009 11:02:37 +0000 Subject: #i106130# fixed crash accessing already deleted shape --- svx/inc/svx/svdfppt.hxx | 2 +- svx/source/msfilter/msdffimp.cxx | 1 + svx/source/svdraw/svdfppt.cxx | 11 ++++++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/svx/inc/svx/svdfppt.hxx b/svx/inc/svx/svdfppt.hxx index 63f196876e93..fb7f75598c4e 100644 --- a/svx/inc/svx/svdfppt.hxx +++ b/svx/inc/svx/svdfppt.hxx @@ -610,7 +610,7 @@ public: UINT32& nMappedFontId, Font& rFont, char nDefault ) const; const PptDocumentAtom& GetDocumentAtom() const { return aDocAtom; } virtual const PptSlideLayoutAtom* GetSlideLayoutAtom() const; - SdrObject* CreateTable( SdrObject* pGroupObject, sal_uInt32* pTableArry, SvxMSDffSolverContainer* ) const; + SdrObject* CreateTable( SdrObject* pGroupObject, sal_uInt32* pTableArry, SvxMSDffSolverContainer* ); }; //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx index 087e13e88f3c..36349e5e592d 100644 --- a/svx/source/msfilter/msdffimp.cxx +++ b/svx/source/msfilter/msdffimp.cxx @@ -8124,6 +8124,7 @@ void SvxMSDffManager::removeShapeId( SdrObject* pShape ) maShapeIdContainer.erase( aIter ); break; } + aIter++; } } diff --git a/svx/source/svdraw/svdfppt.cxx b/svx/source/svdraw/svdfppt.cxx index d0b01f6a820f..8a7aa668a660 100644 --- a/svx/source/svdraw/svdfppt.cxx +++ b/svx/source/svdraw/svdfppt.cxx @@ -7662,7 +7662,7 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl } } -SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTableArry, SvxMSDffSolverContainer* pSolverContainer ) const +SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTableArry, SvxMSDffSolverContainer* pSolverContainer ) { SdrObject* pRet = pGroup; sal_uInt32 nRows = pTableArry[ 1 ]; @@ -7786,6 +7786,15 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab pTable->uno_unlock(); pTable->SetSnapRect( pGroup->GetSnapRect() ); pRet = pTable; + + //Remove Objects from shape map + SdrObjListIter aIter( *pGroup, IM_DEEPWITHGROUPS ); + while( aIter.IsMore() ) + { + SdrObject* pPartObj = aIter.Next(); + removeShapeId( pPartObj ); + } + SdrObject::Free( pGroup ); } catch( Exception& ) -- cgit From 5074096e42b7b91f50d8e9f1be02e87233d8e60f Mon Sep 17 00:00:00 2001 From: Philipp Lohmann Date: Thu, 22 Oct 2009 16:23:16 +0200 Subject: #i105747# grab focus to first button if backing window gets focused --- framework/source/services/backingwindow.cxx | 7 +++++++ framework/source/services/backingwindow.hxx | 1 + 2 files changed, 8 insertions(+) diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index 40e4a9f7a6b9..c5d845a9d333 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -231,6 +231,13 @@ BackingWindow::~BackingWindow() delete mpAccExec; } +void BackingWindow::GetFocus() +{ + if( IsVisible() ) + maWriterButton.GrabFocus(); + Window::GetFocus(); +} + class ImageContainerRes : public Resource { public: diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx index 63cfa0742e35..0b9afa6d38de 100644 --- a/framework/source/services/backingwindow.hxx +++ b/framework/source/services/backingwindow.hxx @@ -173,6 +173,7 @@ namespace framework virtual void DataChanged( const DataChangedEvent& rDCEvt ); virtual Window* GetParentLabelFor( const Window* pLabel ) const; virtual Window* GetParentLabeledBy( const Window* pLabeled ) const; + virtual void GetFocus(); void setOwningFrame( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& xFrame ); }; -- cgit From 053cb63bb1f321e63ac4db9a82eae685c6197218 Mon Sep 17 00:00:00 2001 From: Philipp Lohmann Date: Fri, 23 Oct 2009 13:26:54 +0200 Subject: #i90373# allow only ascii characters in PDF passwords --- sfx2/inc/sfx2/passwd.hxx | 4 ++-- sfx2/source/dialog/passwd.cxx | 28 +++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/sfx2/inc/sfx2/passwd.hxx b/sfx2/inc/sfx2/passwd.hxx index bb4e1b8c1561..bfe8debecca1 100644 --- a/sfx2/inc/sfx2/passwd.hxx +++ b/sfx2/inc/sfx2/passwd.hxx @@ -68,10 +68,9 @@ private: USHORT mnMinLen; USHORT mnExtras; -//#if 0 // _SOLAR__PRIVATE + bool mbAsciiOnly; DECL_DLLPRIVATE_LINK( EditModifyHdl, Edit* ); DECL_DLLPRIVATE_LINK( OKHdl, OKButton* ); -//#endif public: SfxPasswordDialog( Window* pParent, const String* pGroupText = NULL ); @@ -84,6 +83,7 @@ public: void SetMaxLen( USHORT Len ); void SetEditHelpId( ULONG nId ) { maPasswordED.SetHelpId( nId ); } void ShowExtras( USHORT nExtras ) { mnExtras = nExtras; } + void AllowAsciiOnly( bool i_bAsciiOnly = true ) { mbAsciiOnly = i_bAsciiOnly; } virtual short Execute(); }; diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index cbe47d39b704..981657d476fa 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -43,10 +43,35 @@ #include "dialog.hrc" #include "passwd.hrc" +#include "vcl/sound.hxx" + // ----------------------------------------------------------------------- IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG ) { + if( mbAsciiOnly ) + { + rtl::OUString aTest( maPasswordED.GetText() ); + const sal_Unicode* pTest = aTest.getStr(); + sal_Int32 nLen = aTest.getLength(); + rtl::OUStringBuffer aFilter( nLen ); + bool bReset = false; + for( sal_Int32 i = 0; i < nLen; i++ ) + { + if( *pTest > 0x007f ) + bReset = true; + else + aFilter.append( *pTest ); + pTest++; + } + if( bReset ) + { + Sound::Beep( SOUND_ERROR ); + maPasswordED.SetSelection( Selection( 0, nLen ) ); + maPasswordED.ReplaceSelected( aFilter.makeStringAndClear() ); + } + + } maOKBtn.Enable( maPasswordED.GetText().Len() >= mnMinLen ); return 0; } @@ -88,7 +113,8 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText maConfirmStr ( SfxResId( STR_PASSWD_CONFIRM ) ), mnMinLen ( 5 ), - mnExtras ( 0 ) + mnExtras ( 0 ), + mbAsciiOnly ( false ) { FreeResource(); -- cgit From ab6ea039d3c5a5ba7055b7b7f19d8b7c0d2eb084 Mon Sep 17 00:00:00 2001 From: Armin Weiss Date: Mon, 26 Oct 2009 17:53:55 +0000 Subject: #i105856# Corrected error with not taking into account that getB2DRange may be empty for primitives --- .../source/processor2d/hittestprocessor2d.cxx | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx index d038c61541ac..4ffef7515389 100644 --- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx +++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx @@ -272,9 +272,11 @@ namespace drawinglayer // { // // empty 3D scene; Check for border hit // const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D())); - // basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); - // - // mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); + // if(!aRange.isEmpty()) + // { + // const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + // mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); + // } // } } } @@ -474,9 +476,12 @@ namespace drawinglayer { // for text use the BoundRect of the primitive itself const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D())); - basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); - mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance()); + if(!aRange.isEmpty()) + { + const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance()); + } break; } @@ -496,9 +501,12 @@ namespace drawinglayer // - For Bitamps, the mask and/or alpha information may be used // - For MetaFiles, the MetaFile content may be used const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D())); - basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); - mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance()); + if(!aRange.isEmpty()) + { + const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance()); + } } break; -- cgit From 898b0e6106093ab2eca17adb1421967d7bdc2184 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 27 Oct 2009 15:01:25 +0000 Subject: CWS-TOOLING: integrate CWS impress178 2009-10-16 19:54:41 +0200 sj r276995 : removed warning 2009-10-16 17:46:12 +0200 sj r276993 : #i103757# applied patch (fixed crash if model changes) 2009-10-16 16:06:07 +0200 sj r276985 : CWS-TOOLING: rebase CWS impress178 to branches/OOO320@276942 (milestone: OOO320:m2) 2009-10-08 13:51:23 +0200 sj r276790 : #i105654# fixed closing of line geometry 2009-10-07 17:26:56 +0200 sj r276762 : #i105606# fixed object shadow 2009-10-07 17:25:39 +0200 sj r276761 : minor improvements 2009-10-07 11:48:26 +0200 af r276745 : #i103047# Prevent context menu of LayoutMenu from being shown when user clicks on background. 2009-10-07 11:33:59 +0200 af r276743 : #i99866# Set position of the design control manually. 2009-10-06 17:18:23 +0200 sj r276721 : minor improvements 2009-10-05 18:34:23 +0200 sj r276692 : #105606# fixed fontsize problem 2009-10-05 17:26:21 +0200 af r276691 : #i105354# Never process more than one request in a row. 2009-10-02 13:24:25 +0200 af r276639 : #i94242# Taking insertion position of slide sorter correctly into account. 2009-10-01 13:46:47 +0200 aw r276602 : #i102224# some Polygon/PolyPolygon usages in SVMConverter ignored the possible curve status of tools::Polygon; added at least an AdaptiveSubdivide 2009-10-01 12:33:56 +0200 aw r276588 : #i102224# ImplWritePolyPolygon killed the curve information at the PolyPolygon by NOT copying the flags 2009-09-30 17:48:56 +0200 aw r276567 : #i102224# removed GetSimple() from Polygon and PolyPolygon, replaced completely with AdaptiveSubdivide 2009-09-30 15:45:46 +0200 aw r276559 : #i102048# secured primitive creation for dimension lines with linestyle none 2009-09-30 14:56:41 +0200 af r276556 : #i105471# Reordered statements in ~SdModule. 2009-09-30 14:47:12 +0200 aw r276555 : #i105373# corrected curve ignoring places in MetaFile export --- .../svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx | 25 +++++++++---------- svx/inc/svx/svdoashp.hxx | 2 ++ svx/source/customshapes/EnhancedCustomShape2d.cxx | 13 ---------- .../sdr/primitive2d/sdrmeasureprimitive2d.cxx | 28 ++++++++++++---------- svx/source/svdraw/svdoashp.cxx | 6 +++++ 5 files changed, 36 insertions(+), 38 deletions(-) diff --git a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx index 1e68a61432a0..a7084993b5f2 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx @@ -39,19 +39,19 @@ ////////////////////////////////////////////////////////////////////////////// // predefines -namespace drawinglayer -{ - namespace primitive2d +namespace drawinglayer { namespace primitive2d { + enum MeasureTextPosition { - enum MeasureTextPosition - { - MEASURETEXTPOSITION_AUTOMATIC, - MEASURETEXTPOSITION_NEGATIVE, - MEASURETEXTPOSITION_CENTERED, - MEASURETEXTPOSITION_POSITIVE - }; - } // end of namespace primitive2d -} // end of namespace drawinglayer + MEASURETEXTPOSITION_AUTOMATIC, + MEASURETEXTPOSITION_NEGATIVE, + MEASURETEXTPOSITION_CENTERED, + MEASURETEXTPOSITION_POSITIVE + }; +}} + +namespace drawinglayer { namespace attribute { + class SdrLineAttribute; +}} ////////////////////////////////////////////////////////////////////////////// @@ -80,6 +80,7 @@ namespace drawinglayer // internal decomposition helper Primitive2DReference impCreatePart( + const attribute::SdrLineAttribute& rLineAttribute, const basegfx::B2DHomMatrix& rObjectMatrix, const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd, diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx index faf1aa7055aa..f65afc0b4efe 100644 --- a/svx/inc/svx/svdoashp.hxx +++ b/svx/inc/svx/svdoashp.hxx @@ -179,6 +179,8 @@ public: virtual UINT16 GetObjIdentifier() const; virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual void SetModel(SdrModel* pNewModel); + virtual void RecalcSnapRect(); virtual const Rectangle& GetSnapRect() const; diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 804db0c58a16..36bb586b01d6 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1701,19 +1701,6 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm if(aNewB2DPolyPolygon.count()) { - if( !bLineGeometryNeededOnly ) - { - // hack aNewB2DPolyPolygon to fill logic rect - this is - // needed to produce gradient fills that look like mso - aNewB2DPolygon.clear(); - aNewB2DPolygon.append(basegfx::B2DPoint(0,0)); - aNewB2DPolyPolygon.append(aNewB2DPolygon); - - aNewB2DPolygon.clear(); - aNewB2DPolygon.append(basegfx::B2DPoint(aLogicRect.GetWidth(), - aLogicRect.GetHeight())); - aNewB2DPolyPolygon.append(aNewB2DPolygon); - } // #i37011# bool bForceCreateTwoObjects(false); diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index 94e59f79c3de..4b5dc8a3b48e 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -52,27 +52,29 @@ namespace drawinglayer namespace primitive2d { Primitive2DReference SdrMeasurePrimitive2D::impCreatePart( + const attribute::SdrLineAttribute& rLineAttribute, const basegfx::B2DHomMatrix& rObjectMatrix, const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd, bool bLeftActive, bool bRightActive) const { + const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd(); basegfx::B2DPolygon aPolygon; + aPolygon.append(rStart); aPolygon.append(rEnd); - if(!getSdrLSTAttribute().getLineStartEnd() || (!bLeftActive && !bRightActive)) + if(!pLineStartEnd || (!bLeftActive && !bRightActive)) { - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), 0L); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, 0); } if(bLeftActive && bRightActive) { - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), getSdrLSTAttribute().getLineStartEnd()); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, pLineStartEnd); } - const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd(); const basegfx::B2DPolyPolygon aEmpty; const attribute::SdrLineStartEndAttribute aLineStartEnd( bLeftActive ? pLineStartEnd->getStartPolyPolygon() : aEmpty, bRightActive ? pLineStartEnd->getEndPolyPolygon() : aEmpty, @@ -80,7 +82,7 @@ namespace drawinglayer bLeftActive ? pLineStartEnd->isStartActive() : false, bRightActive ? pLineStartEnd->isEndActive() : false, bLeftActive ? pLineStartEnd->isStartCentered() : false, bRightActive? pLineStartEnd->isEndCentered() : false); - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), &aLineStartEnd); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, &aLineStartEnd); } Primitive2DSequence SdrMeasurePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const @@ -277,12 +279,12 @@ namespace drawinglayer const basegfx::B2DPoint aMainLeftLeft(aMainLeft.getX() - fLenLeft, aMainLeft.getY()); const basegfx::B2DPoint aMainRightRight(aMainRight.getX() + fLenRight, aMainRight.getY()); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeftLeft, aMainLeft, false, true)); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainRight, aMainRightRight, true, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeftLeft, aMainLeft, false, true)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainRight, aMainRightRight, true, false)); if(!bMainLineSplitted || MEASURETEXTPOSITION_CENTERED != eHorizontal) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainRight, false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(* pLineAttribute, aObjectMatrix, aMainLeft, aMainRight, false, false)); } } else @@ -293,12 +295,12 @@ namespace drawinglayer const basegfx::B2DPoint aMainInnerLeft(aMainLeft.getX() + fHalfLength, aMainLeft.getY()); const basegfx::B2DPoint aMainInnerRight(aMainRight.getX() - fHalfLength, aMainRight.getY()); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainInnerLeft, true, false)); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainInnerRight, aMainRight, false, true)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeft, aMainInnerLeft, true, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainInnerRight, aMainRight, false, true)); } else { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainRight, true, true)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeft, aMainRight, true, true)); } } @@ -311,13 +313,13 @@ namespace drawinglayer const basegfx::B2DPoint aLeftUp(0.0, fTopEdge); const basegfx::B2DPoint aLeftDown(0.0, fBottomLeft); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aLeftDown, aLeftUp, false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aLeftDown, aLeftUp, false, false)); // right help line const basegfx::B2DPoint aRightUp(fDistance, fTopEdge); const basegfx::B2DPoint aRightDown(fDistance, fBottomRight); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aRightDown, aRightUp, false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aRightDown, aRightUp, false, false)); // text horizontal position if(MEASURETEXTPOSITION_NEGATIVE == eHorizontal) diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index dab855fa6f41..217916633998 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1673,6 +1673,12 @@ void SdrObjCustomShape::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const } } +void SdrObjCustomShape::SetModel(SdrModel* pNewModel) +{ + SdrTextObj::SetModel(pNewModel); + mXRenderedCustomShape.clear(); +} + UINT16 SdrObjCustomShape::GetObjIdentifier() const { return UINT16(OBJ_CUSTOMSHAPE); -- cgit From 81c1316709e2f29670e9d5aaebe9b29bc92f2a5d Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 27 Oct 2009 16:20:25 +0000 Subject: CWS-TOOLING: integrate CWS ooo32gsl01 2009-10-13 15:59:25 +0200 hdu r276868 : #i100000# fix remaining merge conflict 2009-10-12 16:08:38 +0200 hdu r276837 : CWS-TOOLING: rebase CWS ooo32gsl01 to branches/OOO320@276773 (milestone: OOO320:m1) 2009-09-15 10:09:52 +0200 hdu r276150 : #i104861# adjust metrics to pseudo-emUnits==1000 expectation for better precision allow non-integer charwidth/stemwidth 2009-09-15 09:58:00 +0200 hdu r276149 : #i104861# prepare to fix by updating cff.cxx to latest version from CWS vcl105 2009-09-14 16:06:46 +0200 hdu r276130 : #i104221# treat judeo-spanish varika as diacritic also in problematic fonts (thanks yoramg) 2009-09-14 15:27:14 +0200 hdu r276126 : #i104221# fix regression with he/ar diacritics 2009-09-10 15:39:58 +0200 aw r276038 : #i104867# added a GraphicVersion number to EmbeddedObjectRef to allow Grahic chamge checks without fetching the graphic 2009-09-10 15:38:41 +0200 aw r276037 : #i104867# added GraphicVersionNumber to SdrOleContentPrimitive to detect OLE content change without getting the Graphic 2009-09-09 17:16:43 +0200 hdu r276006 : #i104886# Aqua: fix for 101491 only applies to non-hairlines 2009-09-09 16:39:05 +0200 hdu r276002 : #i99849# don't give up on ScriptItemize too early --- svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx | 7 +++++++ svx/source/sdr/contact/viewcontactofsdrole2obj.cxx | 5 +++++ svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx | 7 +++++++ 3 files changed, 19 insertions(+) diff --git a/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx index 70e28d599a44..9ee4f3f69417 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx @@ -53,6 +53,11 @@ namespace drawinglayer SdrObjectWeakRef mpSdrOle2Obj; basegfx::B2DHomMatrix maObjectTransform; + // #i104867# The GraphicVersion number to identify in operator== if + // the graphic has changed, but without fetching it (which may + // be expensive, e.g. triggering chart creation) + sal_uInt32 mnGraphicVersion; + // bitfield unsigned mbHighContrast : 1; @@ -64,6 +69,7 @@ namespace drawinglayer SdrOleContentPrimitive2D( const SdrOle2Obj& rSdrOle2Obj, const basegfx::B2DHomMatrix& rObjectTransform, + sal_uInt32 nGraphicVersion, bool bHighContrast); // compare operator @@ -74,6 +80,7 @@ namespace drawinglayer // data access const basegfx::B2DHomMatrix& getObjectTransform() const { return maObjectTransform; } + sal_uInt32 getGraphicVersion() const { return mnGraphicVersion; } bool getHighContrast() const { return mbHighContrast; } // provide unique ID diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx index 3c239b12113c..a054e881b7c3 100644 --- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx @@ -113,6 +113,11 @@ namespace sdr new drawinglayer::primitive2d::SdrOleContentPrimitive2D( GetOle2Obj(), aObjectMatrix, + + // #i104867# add GraphicVersion number to be able to check for + // content change in the primitive later + GetOle2Obj().getEmbeddedObjectRef().getGraphicVersion(), + bHighContrast)); // create primitive. Use Ole2 primitive here. Prepare attribute settings, will be used soon anyways. diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx index 67fee9215b73..e682c0e04b55 100644 --- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx @@ -157,10 +157,12 @@ namespace drawinglayer SdrOleContentPrimitive2D::SdrOleContentPrimitive2D( const SdrOle2Obj& rSdrOle2Obj, const basegfx::B2DHomMatrix& rObjectTransform, + sal_uInt32 nGraphicVersion, bool bHighContrast) : BasePrimitive2D(), mpSdrOle2Obj(const_cast< SdrOle2Obj* >(&rSdrOle2Obj)), maObjectTransform(rObjectTransform), + mnGraphicVersion(nGraphicVersion), mbHighContrast(bHighContrast) { } @@ -176,6 +178,11 @@ namespace drawinglayer return ((bBothNot || bBothAndEqual) && getObjectTransform() == rCompare.getObjectTransform() + + // #i104867# to find out if the Graphic content of the + // OLE has changed, use GraphicVersion number + && getGraphicVersion() == rCompare.getGraphicVersion() + && getHighContrast() == rCompare.getHighContrast()); } -- cgit From a71e992f009725cab57f0b43627d91bfa1456942 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Wed, 28 Oct 2009 12:52:06 +0000 Subject: #i106146# fixed also the other 5 occourences of the same buggy code --- svx/source/cui/numpages.cxx | 77 +++++++++++++++------------------------------ 1 file changed, 26 insertions(+), 51 deletions(-) diff --git a/svx/source/cui/numpages.cxx b/svx/source/cui/numpages.cxx index 59e95b9b1a94..6454b3dd7c2a 100644 --- a/svx/source/cui/numpages.cxx +++ b/svx/source/cui/numpages.cxx @@ -378,18 +378,12 @@ int SvxSingleNumPickTabPage::DeactivatePage(SfxItemSet *_pSet) void SvxSingleNumPickTabPage::Reset( const SfxItemSet& rSet ) { - const SfxPoolItem* pItem; -// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel(); - //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); - if(eState != SFX_ITEM_SET) - { - nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); - } - DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!"); + nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE; + + const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + delete pSaveNum; - pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); + pSaveNum = new SvxNumRule(*rItem.GetNumRule()); if(!pActNum) pActNum = new SvxNumRule(*pSaveNum); @@ -795,17 +789,12 @@ int SvxNumPickTabPage::DeactivatePage(SfxItemSet *_pSet) void SvxNumPickTabPage::Reset( const SfxItemSet& rSet ) { - const SfxPoolItem* pItem; - //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); - if(eState != SFX_ITEM_SET) - { - nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); - } - DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!"); + nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE; + + const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + delete pSaveNum; - pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); + pSaveNum = new SvxNumRule(*rItem.GetNumRule()); // nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel(); if(!pActNum) @@ -1100,17 +1089,12 @@ BOOL SvxBitmapPickTabPage::FillItemSet( SfxItemSet& rSet ) void SvxBitmapPickTabPage::Reset( const SfxItemSet& rSet ) { - const SfxPoolItem* pItem; - //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); - if(eState != SFX_ITEM_SET) - { - nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); - } - DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!"); + nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE; + + const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + delete pSaveNum; - pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); + pSaveNum = new SvxNumRule(*rItem.GetNumRule()); if(!pActNum) pActNum = new SvxNumRule(*pSaveNum); @@ -1532,17 +1516,12 @@ BOOL SvxNumOptionsTabPage::FillItemSet( SfxItemSet& rSet ) --------------------------------------------------*/ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) { - const SfxPoolItem* pItem; - //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); - if(eState != SFX_ITEM_SET) - { - nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); - } - DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!"); + nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE; + + const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + delete pSaveNum; - pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); + pSaveNum = new SvxNumRule(*rItem.GetNumRule()); // Ebenen einfuegen if(!aLevelLB.GetEntryCount()) @@ -1586,6 +1565,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) pPreviewWIN->SetNumRule(pActNum); aSameLevelCB.Check(pActNum->IsContinuousNumbering()); + const SfxPoolItem* pItem = 0; //ColorListBox bei Bedarf fuellen if ( pActNum->IsFeatureSupported( NUM_BULLET_COLOR ) ) { @@ -3429,17 +3409,12 @@ BOOL SvxNumPositionTabPage::FillItemSet( SfxItemSet& rSet ) --------------------------------------------------*/ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet ) { - const SfxPoolItem* pItem; - //im Draw gibt es das Item als WhichId, im Writer nur als SlotId - SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem); - if(eState != SFX_ITEM_SET) - { - nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE); - eState = rSet.GetItemState(nNumItemId, FALSE, &pItem); - } - DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!"); + nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE; + + const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) ); + delete pSaveNum; - pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule()); + pSaveNum = new SvxNumRule(*rItem.GetNumRule()); // Ebenen einfuegen if(!aLevelLB.GetEntryCount()) -- cgit From d7c1cd7976cc346a7c9384dff41f06376126b38a Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Thu, 29 Oct 2009 13:22:30 +0000 Subject: CWS-TOOLING: integrate CWS c07v026_OOO320 2009-10-19 10:26:11 +0200 mav r277008 : #b6886425# use standard solution to encode the URL for the Gnome 2009-10-19 08:38:28 +0200 mav r276998 : #b6886425# encode the URL correctly for the Gnome 2009-10-07 12:49:32 +0200 os r276749 : #b6887668# resize items depending on the item text length 2009-09-28 18:42:32 +0200 dr r276499 : #b6883075# shrink print ranges to Excel sheet limits 2009-09-28 16:50:25 +0200 od r276497 : #b6882166# method - assure notification on position changes, otherwise the layout will not be correct. 2009-09-15 18:31:37 +0200 dr r276185 : #b6872823# check cursor before using, patch by aw 2009-09-09 10:52:52 +0200 od r275975 : #b6879723# correct handling of new list level attributes regarding paragraph indent values, especially in case of OOo 2.0 and former hidden compatibility option "Ignore first line indent on numbering" 2009-09-08 11:10:31 +0200 od r275918 : #b6876367# method - do not reset list attributes at paragraph, if its applied list style will not change due to the newly applied paragraph style. 2009-09-07 12:48:58 +0200 obo r275890 : Merge from c07v025 into this CWS --- fpicker/source/unx/gnome/SalGtkPicker.cxx | 13 +++++++++++-- sfx2/inc/sfx2/filedlghelper.hxx | 3 +++ svx/source/sdr/overlay/overlaymanagerbuffered.cxx | 3 +++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/fpicker/source/unx/gnome/SalGtkPicker.cxx b/fpicker/source/unx/gnome/SalGtkPicker.cxx index b6b9d2bb36ab..cde61d801495 100644 --- a/fpicker/source/unx/gnome/SalGtkPicker.cxx +++ b/fpicker/source/unx/gnome/SalGtkPicker.cxx @@ -73,6 +73,8 @@ rtl::OUString SalGtkPicker::uritounicode(const gchar* pIn) INetURLObject aURL(sURL); if (INET_PROT_FILE == aURL.GetProtocol()) { + // all the URLs are handled by office in UTF-8 + // so the Gnome FP related URLs should be converted accordingly gchar *pEncodedFileName = g_filename_from_uri(pIn, NULL, NULL); if ( pEncodedFileName ) { @@ -94,12 +96,19 @@ rtl::OUString SalGtkPicker::uritounicode(const gchar* pIn) rtl::OString SalGtkPicker::unicodetouri(const rtl::OUString &rURL) { + // all the URLs are handled by office in UTF-8 ( and encoded with "%xx" codes based on UTF-8 ) + // so the Gnome FP related URLs should be converted accordingly OString sURL = OUStringToOString(rURL, RTL_TEXTENCODING_UTF8); INetURLObject aURL(rURL); if (INET_PROT_FILE == aURL.GetProtocol()) { - rtl::OUString sOUURL = aURL.getExternalURL(INetURLObject::DECODE_WITH_CHARSET, osl_getThreadTextEncoding()); - sURL = OUStringToOString( sOUURL, osl_getThreadTextEncoding()); + OUString aNewURL = Reference(Reference(comphelper::getProcessServiceFactory(), UNO_QUERY_THROW)->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.ExternalUriReferenceTranslator"))), UNO_QUERY_THROW)->translateToExternal( rURL ); + + if( aNewURL.getLength() ) + { + // At this point the URL should contain ascii characters only actually + sURL = OUStringToOString( aNewURL, osl_getThreadTextEncoding() ); + } } return sURL; } diff --git a/sfx2/inc/sfx2/filedlghelper.hxx b/sfx2/inc/sfx2/filedlghelper.hxx index e6dc185ef919..91be281e9617 100644 --- a/sfx2/inc/sfx2/filedlghelper.hxx +++ b/sfx2/inc/sfx2/filedlghelper.hxx @@ -240,6 +240,9 @@ public: /** Provides the selected files with full path information */ ::com::sun::star::uno::Sequence< ::rtl::OUString > GetSelectedFiles() const; + /** Provides the selected files with full path information */ + ::com::sun::star::uno::Sequence< ::rtl::OUString > GetSelectedFiles() const; + void AddFilter( const String& rFilterName, const String& rExtension ); void SetCurrentFilter( const String& rFilter ); diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx index 3fedc40f37cf..13a83f0fc235 100644 --- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx +++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx @@ -370,6 +370,9 @@ namespace sdr OverlayManager::ImpDrawMembers(aBufferRememberedRangeLogic, getOutputDevice()); } + // #i80730# removed: VCL hack for transparent child windows + // No longer needed, checked in DEV300 m54 + // #i80730# restore visibility of VCL cursor if(bCursorWasEnabled) { -- cgit From 9af74059bc2da889f2f17e5c69c61e213158c4ec Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 2 Nov 2009 11:06:59 +0100 Subject: sb117: #160937# removed unused special configuration data settings --- officecfg/registry/data/org/openoffice/Inet.xcu | 5 ---- .../registry/data/org/openoffice/Office/Writer.xcu | 27 ---------------------- .../data/org/openoffice/Office/makefile.mk | 2 -- officecfg/registry/data/org/openoffice/makefile.mk | 1 - 4 files changed, 35 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/Inet.xcu b/officecfg/registry/data/org/openoffice/Inet.xcu index bb3fa8e1a618..58c0df52dd4c 100644 --- a/officecfg/registry/data/org/openoffice/Inet.xcu +++ b/officecfg/registry/data/org/openoffice/Inet.xcu @@ -35,11 +35,6 @@ 1 - - - Google - - diff --git a/officecfg/registry/data/org/openoffice/Office/Writer.xcu b/officecfg/registry/data/org/openoffice/Office/Writer.xcu index d0eb8273fde3..0e01200a0215 100644 --- a/officecfg/registry/data/org/openoffice/Office/Writer.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Writer.xcu @@ -702,33 +702,6 @@ - - - - true - - - 3 - - - - - - Arial - - - Arial - - - Arial - - - Arial - - - Arial - - diff --git a/officecfg/registry/data/org/openoffice/Office/makefile.mk b/officecfg/registry/data/org/openoffice/Office/makefile.mk index 50b67954aeef..e8753721d678 100644 --- a/officecfg/registry/data/org/openoffice/Office/makefile.mk +++ b/officecfg/registry/data/org/openoffice/Office/makefile.mk @@ -89,8 +89,6 @@ MODULEFILES= \ Paths-macosx.xcu \ Paths-unxwnt.xcu \ Writer-cjk.xcu \ - Writer-defaultfontarial.xcu \ - Writer-directcursor.xcu \ Writer-javamail.xcu \ Impress-ogltrans.xcu \ Embedding-calc.xcu \ diff --git a/officecfg/registry/data/org/openoffice/makefile.mk b/officecfg/registry/data/org/openoffice/makefile.mk index 6d5a1b264d8c..b953c9b1cd63 100644 --- a/officecfg/registry/data/org/openoffice/makefile.mk +++ b/officecfg/registry/data/org/openoffice/makefile.mk @@ -47,7 +47,6 @@ XCUFILES= \ UserProfile.xcu MODULEFILES= \ - Inet-defaultsearchengine.xcu \ Setup-brand.xcu \ Setup-writer.xcu \ Setup-calc.xcu \ -- cgit From b9f41c75e4e70579e49c4dfefb37b1f953a77cd0 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Mon, 2 Nov 2009 16:16:04 +0100 Subject: ause109: #i106513# - fix dependency for classfiles that can't be build here --- xmlhelp/source/com/sun/star/help/makefile.mk | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/xmlhelp/source/com/sun/star/help/makefile.mk b/xmlhelp/source/com/sun/star/help/makefile.mk index 1e1a2c518fa0..db6e619b31e3 100644 --- a/xmlhelp/source/com/sun/star/help/makefile.mk +++ b/xmlhelp/source/com/sun/star/help/makefile.mk @@ -58,8 +58,6 @@ CFLAGS+=-DSYSTEM_EXPAT JAVACLASSFILES = \ - $(SOLARBINDIR)$/help$/$(PACKAGE)$/HelpIndexerTool.class \ - $(SOLARBINDIR)$/help$/$(PACKAGE)$/HelpFileDocument.class \ $(CLASSDIR)$/$(PACKAGE)$/HelpSearch.class \ $(CLASSDIR)$/$(PACKAGE)$/HelpComponent.class \ $(CLASSDIR)$/$(PACKAGE)$/HelpIndexer.class @@ -75,9 +73,7 @@ TRANSEX3FILES = \ ADDFILES = $(subst,$(SOLARBINDIR)$/help,$(CLASSDIR) $(TRANSEX3FILES)) -#JAVAFILES = $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES))) - -JARFILES = ridl.jar jurt.jar unoil.jar juh.jar HelpIndexerTool.jar +JARFILES = ridl.jar jurt.jar unoil.jar juh.jar .IF "$(SYSTEM_LUCENE)" == "YES" XCLASSPATH!:=$(XCLASSPATH)$(PATH_SEPERATOR)$(LUCENE_CORE_JAR)$(PATH_SEPERATOR)$(LUCENE_ANALYZERS_JAR) COMP=fix_system_lucene @@ -96,6 +92,7 @@ CUSTOMMANIFESTFILE = MANIFEST.MF ALLTAR : $(ADDFILES) .IF "$(JARTARGETN)"!="" +$(JAVATARGET) : $(ADDFILES) $(JARTARGETN) : $(ADDFILES) $(JARTARGETN) : $(COMP) .ENDIF -- cgit From aa6853dcd64446f8e246484c1227192825d33ecb Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 3 Nov 2009 18:12:19 +0100 Subject: #i104678# use high contrast mode setting instead of IsDark (paradigm shift begun with issue i35482) --- desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 2 +- desktop/source/deployment/gui/license_dialog.cxx | 2 +- fpicker/source/office/iodlg.cxx | 4 ++-- fpicker/source/office/iodlgimp.cxx | 4 ++-- sfx2/source/appl/newhelp.cxx | 6 +++--- sfx2/source/dialog/templdlg.cxx | 4 ++-- sfx2/source/doc/docvor.cxx | 6 +++--- sfx2/source/menu/mnuitem.cxx | 4 ++-- sfx2/source/menu/virtmenu.cxx | 6 +----- sfx2/source/toolbox/imgmgr.cxx | 4 ++-- sfx2/source/toolbox/tbxitem.cxx | 6 +++--- svx/source/cui/SpellDialog.cxx | 6 +++--- svx/source/cui/align.cxx | 2 +- svx/source/cui/border.cxx | 8 ++++---- svx/source/cui/cfg.cxx | 11 ++++------- svx/source/cui/labdlg.cxx | 2 +- svx/source/cui/macropg.cxx | 4 +--- svx/source/cui/optcolor.cxx | 2 +- svx/source/cui/optsave.cxx | 2 +- svx/source/cui/readonlyimage.cxx | 2 +- svx/source/cui/tphatch.cxx | 4 ++-- svx/source/cui/tpline.cxx | 2 +- svx/source/cui/treeopt.cxx | 4 ++-- svx/source/dialog/_bmpmask.cxx | 2 +- svx/source/dialog/_contdlg.cxx | 2 +- svx/source/dialog/connctrl.cxx | 2 +- svx/source/dialog/dlgctrl.cxx | 6 +++--- svx/source/dialog/docrecovery.cxx | 4 +--- svx/source/dialog/fontwork.cxx | 4 +--- svx/source/dialog/frmsel.cxx | 2 +- svx/source/dialog/hyprlink.cxx | 5 +---- svx/source/dialog/imapdlg.cxx | 2 +- svx/source/dialog/langbox.cxx | 2 +- svx/source/dialog/measctrl.cxx | 4 ++-- svx/source/dialog/swframeexample.cxx | 2 +- svx/source/form/datanavi.cxx | 6 +++--- svx/source/form/fmshimp.cxx | 4 ++-- svx/source/form/tbxform.cxx | 2 +- svx/source/gallery2/galbrws2.cxx | 2 +- svx/source/stbctrls/xmlsecctrl.cxx | 8 ++++---- svx/source/stbctrls/zoomsliderctrl.cxx | 8 ++++---- svx/source/tbxctrls/extrusioncontrols.cxx | 18 +++++++++--------- svx/source/tbxctrls/fontworkgallery.cxx | 8 ++++---- svx/source/tbxctrls/itemwin.cxx | 4 ++-- svx/source/tbxctrls/tbcontrl.cxx | 2 +- svx/source/tbxctrls/tbxcolorupdate.cxx | 6 +++--- 46 files changed, 93 insertions(+), 109 deletions(-) diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index f4473c2c6fd8..36f08dbf5b32 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -1141,7 +1141,7 @@ void ExtensionBox_Impl::checkEntries() //------------------------------------------------------------------------------ bool ExtensionBox_Impl::isHCMode() { - return (bool)GetDisplayBackground().GetColor().IsDark(); + return (bool)GetSettings().GetStyleSettings().GetHighContrastMode(); } //------------------------------------------------------------------------------ diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx index bbc6a983c1fd..555b7578b327 100644 --- a/desktop/source/deployment/gui/license_dialog.cxx +++ b/desktop/source/deployment/gui/license_dialog.cxx @@ -215,7 +215,7 @@ LicenseDialogImpl::LicenseDialogImpl( { - if (GetBackground().GetColor().IsDark()) + if (GetSettings().GetStyleSettings().GetHighContrastMode()) { // high contrast mode needs other images m_fiArrow1.SetImage(Image(DpGuiResId(IMG_LICENCE_ARROW_HC))); diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 1b9494bdae22..5470df6fe409 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -560,7 +560,7 @@ void SvtFileDialog::Init_Impl WinBits nStyle ) { - sal_Bool bIsHighContrast = GetDisplayBackground().GetColor().IsDark(); + sal_Bool bIsHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); m_aImages = ImageList( SvtResId( bIsHighContrast ? RID_FILEPICKER_IMAGES_HC : RID_FILEPICKER_IMAGES ) ); _pImp->_nStyle = nStyle; @@ -2683,7 +2683,7 @@ void SvtFileDialog::implUpdateImages( ) { // determine high contrast mode { - sal_Bool bIsHighContrast = GetDisplayBackground().GetColor().IsDark(); + sal_Bool bIsHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); m_aImages = ImageList( SvtResId( bIsHighContrast ? RID_FILEPICKER_IMAGES_HC : RID_FILEPICKER_IMAGES ) ); } diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx index 3a34c1da7be6..4d217f518547 100644 --- a/fpicker/source/office/iodlgimp.cxx +++ b/fpicker/source/office/iodlgimp.cxx @@ -231,7 +231,7 @@ void SvtUpButton_Impl::FillURLMenu( PopupMenu* _pMenu ) ::svtools::VolumeInfo aVolInfo( sal_True /* volume */, sal_False /* remote */, sal_False /* removable */, sal_False /* floppy */, sal_False /* compact disk */ ); - sal_Bool bIsHighContrast = pBox->GetDisplayBackground().GetColor().IsDark(); + sal_Bool bIsHighContrast = pBox->GetSettings().GetStyleSettings().GetHighContrastMode(); Image aVolumeImage( SvFileInformationManager::GetFolderImage( aVolInfo, bIsHighContrast ) ); while ( nCount >= 1 ) @@ -319,7 +319,7 @@ void SvtTravelButton_Impl::FillURLMenu( PopupMenu* _pMenu ) _pMenu->Clear(); - sal_Bool bIsHighContrast = GetDialogParent()->GetView()->GetDisplayBackground().GetColor().IsDark(); + sal_Bool bIsHighContrast = GetDialogParent()->GetView()->GetSettings().GetStyleSettings().GetHighContrastMode(); USHORT nItemId = 1; String sDisplayName; diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 5051f71ab78e..df47180c9f77 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -296,7 +296,7 @@ ContentListBox_Impl::ContentListBox_Impl( Window* pParent, const ResId& rResId ) aDocumentImage ( SfxResId( IMG_HELP_CONTENT_DOC ) ) { - if ( GetSettings().GetStyleSettings().GetWindowColor().IsDark() ) + if ( GetSettings().GetStyleSettings().GetHighContrastMode() ) { aOpenBookImage = Image( SfxResId( IMG_HELP_CONTENT_BOOK_OPEN_HC ) ); aClosedBookImage = Image( SfxResId( IMG_HELP_CONTENT_BOOK_CLOSED_HC ) ); @@ -2178,7 +2178,7 @@ sal_Bool SfxHelpTextWindow_Impl::HasSelection() const void SfxHelpTextWindow_Impl::InitToolBoxImages() { sal_Bool bLarge = SvtMiscOptions().AreCurrentSymbolsLarge(); - sal_Bool bHiContrast = GetBackground().GetColor().IsDark(); + sal_Bool bHiContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); aIndexOnImage = Image( SfxResId( bLarge ? bHiContrast ? IMG_HELP_TOOLBOX_HCL_INDEX_ON : IMG_HELP_TOOLBOX_L_INDEX_ON @@ -2584,7 +2584,7 @@ long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt ) if ( pCmdEvt->GetCommand() == COMMAND_CONTEXTMENU && pCmdWin != this && pCmdWin != &aToolBox ) { - sal_Bool bHiContrast = GetSettings().GetStyleSettings().GetMenuColor().IsDark(); + sal_Bool bHiContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); Point aPos; if ( pCmdEvt->IsMouseEvent() ) aPos = pCmdEvt->GetMousePosPixel(); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 706739cd0571..fb21ff8463a1 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -2407,7 +2407,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages() return; // let the families collection update the images - sal_Bool bIsHighContrast = m_pFloat->GetDisplayBackground().GetColor().IsDark(); + sal_Bool bIsHighContrast = m_pFloat->GetSettings().GetStyleSettings().GetHighContrastMode(); pStyleFamilies->updateImages( *m_pStyleFamiliesId, bIsHighContrast ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL ); // and set the new images on our toolbox @@ -2424,7 +2424,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages() void SfxTemplateDialog_Impl::updateNonFamilyImages() { m_aActionTbR.SetImageList( ImageList( SfxResId( - m_pFloat->GetDisplayBackground().GetColor().IsDark() ? IMG_LST_STYLE_DESIGNER_HC + m_pFloat->GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_LST_STYLE_DESIGNER_HC : DLG_STYLE_DESIGNER ) ) ); } diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx index e70824869070..d0c10556abd3 100644 --- a/sfx2/source/doc/docvor.cxx +++ b/sfx2/source/doc/docvor.cxx @@ -1188,7 +1188,7 @@ void SfxOrganizeListBox_Impl::RequestingChilds( SvLBoxEntry* pEntry ) // einfuegen BmpColorMode eColorMode = BMP_COLOR_NORMAL; - if ( GetDisplayBackground().GetColor().IsDark() ) + if ( GetSettings().GetStyleSettings().GetHighContrastMode() ) eColorMode = BMP_COLOR_HIGHCONTRAST; @@ -1480,7 +1480,7 @@ const Image &SfxOrganizeListBox_Impl::GetClosedBmp(USHORT nLevel) const */ { - BOOL bHC = GetBackground().GetColor().IsDark(); + BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); const Image* pRet = NULL; switch( nLevel ) @@ -1514,7 +1514,7 @@ const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(USHORT nLevel) const */ { - BOOL bHC = GetBackground().GetColor().IsDark(); + BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); const Image* pRet = NULL; switch( nLevel ) diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index 988bbf3b4118..6619c17d3077 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -451,7 +451,7 @@ SfxAppMenuControl_Impl::SfxAppMenuControl_Impl( // Determine the current background color setting for menus const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); m_nSymbolsStyle = rSettings.GetSymbolsStyle(); - m_bWasHiContrastMode = rSettings.GetMenuColor().IsDark(); + m_bWasHiContrastMode = rSettings.GetHighContrastMode(); m_bShowMenuImages = rSettings.GetUseImagesInMenus(); Reference aXMultiServiceFactory(::comphelper::getProcessServiceFactory()); @@ -477,7 +477,7 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu ) { const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); ULONG nSymbolsStyle = rSettings.GetSymbolsStyle(); - BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark(); + BOOL bIsHiContrastMode = rSettings.GetHighContrastMode(); BOOL bShowMenuImages = rSettings.GetUseImagesInMenus(); if (( nSymbolsStyle != m_nSymbolsStyle ) || diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index 88c9ba8aa757..e0b6f6f32bf2 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -336,11 +336,7 @@ SfxVirtualMenu::~SfxVirtualMenu() BOOL SfxVirtualMenu::IsHiContrastMode() const { const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - Color aMenuColor = rSettings.GetMenuColor(); - if ( aMenuColor.IsDark() ) - return TRUE; - else - return FALSE; + return rSettings.GetHighContrastMode(); } //-------------------------------------------------------------------- diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx index 6f00ae5b7681..0d659826d453 100644 --- a/sfx2/source/toolbox/imgmgr.cxx +++ b/sfx2/source/toolbox/imgmgr.cxx @@ -229,7 +229,7 @@ void SfxImageManager_Impl::SetSymbolsSize_Impl( sal_Int16 nNewSymbolsSize ) if ( pInf->nFlags & SFX_TOOLBOX_CHANGESYMBOLSET ) { ToolBox *pBox = pInf->pToolBox; - BOOL bHiContrast = pBox->GetBackground().GetColor().IsDark(); + BOOL bHiContrast = pBox->GetSettings().GetStyleSettings().GetHighContrastMode(); USHORT nCount = pBox->GetItemCount(); for ( USHORT nPos=0; nPosm_nSymbolsSize == SFX_SYMBOLS_SIZE_LARGE ); - BOOL bHiContrast = rToolBox.GetBackground().GetColor().IsDark(); + BOOL bHiContrast = rToolBox.GetSettings().GetStyleSettings().GetHighContrastMode(); SetImagesForceSize( rToolBox, bHiContrast, bLarge ); } diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 6a776f6a211e..b6e69156214d 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -1529,7 +1529,7 @@ SfxAppToolBoxControl_Impl::SfxAppToolBoxControl_Impl( USHORT nSlotId, USHORT nId // Determine the current background color of the menus const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); m_nSymbolsStyle = rSettings.GetSymbolsStyle(); - m_bWasHiContrastMode = rSettings.GetMenuColor().IsDark(); + m_bWasHiContrastMode = rSettings.GetHighContrastMode(); m_bShowMenuImages = rSettings.GetUseImagesInMenus(); SetImage( String() ); @@ -1654,7 +1654,7 @@ void SfxAppToolBoxControl_Impl::SetImage( const String &rURL ) aURL = sFallback; BOOL bBig = SvtMiscOptions().AreCurrentSymbolsLarge(); - BOOL bHC = GetToolBox().GetBackground().GetColor().IsDark(); + BOOL bHC = GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode(); Image aImage = SvFileInformationManager::GetImageNoDefault( INetURLObject( aURL ), bBig, bHC ); if ( !aImage ) aImage = !!aMenuImage ? aMenuImage : @@ -1805,7 +1805,7 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu ) { const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); ULONG nSymbolsStyle = rSettings.GetSymbolsStyle(); - BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark(); + BOOL bIsHiContrastMode = rSettings.GetHighContrastMode(); BOOL bShowMenuImages = rSettings.GetUseImagesInMenus(); if (( nSymbolsStyle != m_nSymbolsStyle ) || diff --git a/svx/source/cui/SpellDialog.cxx b/svx/source/cui/SpellDialog.cxx index 3febb657ded2..86dbf966619a 100644 --- a/svx/source/cui/SpellDialog.cxx +++ b/svx/source/cui/SpellDialog.cxx @@ -914,7 +914,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang) const SpellErrorDescription* pSpellErrorDescription = aSentenceED.GetAlternatives(); if( pSpellErrorDescription && pSpellErrorDescription->sServiceName.getLength() ) { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); ::rtl::OUString sSuggestionImageUrl = SvtLinguConfig().GetSpellAndGrammarDialogImage( pSpellErrorDescription->sServiceName, bHighContrast ); aVendorImageFI.SetImage( lcl_GetImageFromPngUrl( sSuggestionImageUrl ) ); @@ -924,7 +924,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang) } else { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); aVendorImageFI.SetImage( bHighContrast ? aVendorImageHC : aVendorImage ); } @@ -935,7 +935,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang) } else { - //bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + //bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); sTitle = m_sTitleSpellingGrammar; } } diff --git a/svx/source/cui/align.cxx b/svx/source/cui/align.cxx index e6e65efc31f2..641ee0717b96 100644 --- a/svx/source/cui/align.cxx +++ b/svx/source/cui/align.cxx @@ -248,7 +248,7 @@ void AlignmentTabPage::InitVsRefEgde() // remember selection - is deleted in call to ValueSet::Clear() USHORT nSel = maVsRefEdge.GetSelectItemId(); - ResId aResId( GetBackground().GetColor().IsDark() ? IL_LOCK_BMPS_HC : IL_LOCK_BMPS, DIALOG_MGR() ); + ResId aResId( GetSettings().GetStyleSettings().GetHighContrastMode() ? IL_LOCK_BMPS_HC : IL_LOCK_BMPS, DIALOG_MGR() ); ImageList aImageList( aResId ); Size aItemSize( aImageList.GetImage( IID_BOTTOMLOCK ).GetSizePixel() ); diff --git a/svx/source/cui/border.cxx b/svx/source/cui/border.cxx index b2ed7bc9ef02..101afc828371 100644 --- a/svx/source/cui/border.cxx +++ b/svx/source/cui/border.cxx @@ -1033,8 +1033,8 @@ USHORT SvxBorderTabPage::GetPresetStringId( USHORT nValueSetIdx ) const void SvxBorderTabPage::FillPresetVS() { // find correct image list - bool bDark = aWndPresets.GetDisplayBackground().GetColor().IsDark(); - ImageList& rImgList = bDark ? aBorderImgLstH : aBorderImgLst; + bool bHC = aWndPresets.GetSettings().GetStyleSettings().GetHighContrastMode(); + ImageList& rImgList = bHC ? aBorderImgLstH : aBorderImgLst; Size aImgSize( rImgList.GetImage( IID_PRE_CELL_NONE ).GetSizePixel() ); // basic initialization of the ValueSet @@ -1060,8 +1060,8 @@ void SvxBorderTabPage::FillPresetVS() void SvxBorderTabPage::FillShadowVS() { // find correct image list - bool bDark = aWndShadows.GetDisplayBackground().GetColor().IsDark(); - ImageList& rImgList = bDark ? aShadowImgLstH : aShadowImgLst; + bool bHC = aWndPresets.GetSettings().GetStyleSettings().GetHighContrastMode(); + ImageList& rImgList = bHC ? aShadowImgLstH : aShadowImgLst; Size aImgSize( rImgList.GetImage( IID_SHADOWNONE ).GetSizePixel() ); // basic initialization of the ValueSet diff --git a/svx/source/cui/cfg.cxx b/svx/source/cui/cfg.cxx index 346fb0bb5d1e..5df1e03edb53 100644 --- a/svx/source/cui/cfg.cxx +++ b/svx/source/cui/cfg.cxx @@ -403,7 +403,7 @@ void InitImageType() Window* topwin = Application::GetActiveTopWindow(); if ( topwin != NULL && - topwin->GetDisplayBackground().GetColor().IsDark() ) + topwin->GetSettings().GetStyleSettings().GetHighContrastMode() ) { theImageType |= css::ui::ImageType::COLOR_HIGHCONTRAST; } @@ -5114,7 +5114,7 @@ SvxToolbarEntriesListBox::SvxToolbarEntriesListBox( BuildCheckBoxButtonImages( m_pButtonData ); EnableCheckButton( m_pButtonData ); - m_bHiContrastMode = GetDisplayBackground().GetColor().IsDark(); + m_bHiContrastMode = GetSettings().GetStyleSettings().GetHighContrastMode(); } // -------------------------------------------------------- @@ -5189,11 +5189,8 @@ void SvxToolbarEntriesListBox::DataChanged( const DataChangedEvent& rDCEvt ) if (( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE )) { - if ( m_bHiContrastMode != GetDisplayBackground().GetColor().IsDark() ) - { - // We have to reset all images because we change to/from high contrast mode - m_bHiContrastMode = GetDisplayBackground().GetColor().IsDark(); - } + // We have to reset all images because we change to/from high contrast mode + m_bHiContrastMode = GetSettings().GetStyleSettings().GetHighContrastMode(); BuildCheckBoxButtonImages( m_pButtonData ); Invalidate(); diff --git a/svx/source/cui/labdlg.cxx b/svx/source/cui/labdlg.cxx index 02a3bd158c79..327300d3a603 100644 --- a/svx/source/cui/labdlg.cxx +++ b/svx/source/cui/labdlg.cxx @@ -574,7 +574,7 @@ void SvxCaptionTabPage::DataChanged( const DataChangedEvent& rDCEvt ) void SvxCaptionTabPage::FillValueSet() { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); Image** ppBitmaps = bHighContrast ? mpBmpCapTypesH : mpBmpCapTypes; aCT_CAPTTYPE.SetItemImage(BMP_CAPTTYPE_1, *(ppBitmaps[0]) ); diff --git a/svx/source/cui/macropg.cxx b/svx/source/cui/macropg.cxx index 0ee76246abe3..bda5aca7372b 100644 --- a/svx/source/cui/macropg.cxx +++ b/svx/source/cui/macropg.cxx @@ -494,9 +494,7 @@ void IconLBoxString::Paint( const Point& aPos, SvLBox& aDevice, sal_Int32 nIndex = aURL.indexOf( aVndSunStarUNO ); bool bUNO = nIndex == 0; - Wallpaper aBackground = aDevice.GetBackground(); - Color aColor = aBackground.GetColor(); - BOOL bHC = aColor.IsDark(); + BOOL bHC = aDevice.GetSettings().GetStyleSettings().GetHighContrastMode(); const Image* pImg; if( bHC ) pImg = bUNO ? m_pComponentImg_h : m_pMacroImg_h; diff --git a/svx/source/cui/optcolor.cxx b/svx/source/cui/optcolor.cxx index 11112dd936cd..e20c2284314c 100644 --- a/svx/source/cui/optcolor.cxx +++ b/svx/source/cui/optcolor.cxx @@ -762,9 +762,9 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe Wallpaper aTransparentWall(TempColor); sal_Int32 nWinWidth = GetSizePixel().Width(); sal_Int32 nFTHeight = aChapters[0]->GetSizePixel().Height(); - sal_Bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); Color aBackColor; const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); + sal_Bool bHighContrast = rStyleSettings.GetHighContrastMode(); if ( bHighContrast ) aBackColor = rStyleSettings.GetShadowColor(); else diff --git a/svx/source/cui/optsave.cxx b/svx/source/cui/optsave.cxx index 29708444fe93..893300d10e01 100644 --- a/svx/source/cui/optsave.cxx +++ b/svx/source/cui/optsave.cxx @@ -233,7 +233,7 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) : pImpl ( new SvxSaveTabPage_Impl ) { - sal_Bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + sal_Bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); aODFWarningFI.SetImage( Image( SVX_RES( bHighContrast ? IMG_ODF_WARNING_HC : IMG_ODF_WARNING ) ) ); diff --git a/svx/source/cui/readonlyimage.cxx b/svx/source/cui/readonlyimage.cxx index a43a87d820c8..b22ee80f3a4c 100644 --- a/svx/source/cui/readonlyimage.cxx +++ b/svx/source/cui/readonlyimage.cxx @@ -46,7 +46,7 @@ ReadOnlyImage::ReadOnlyImage(Window* pParent, const ResId rResId) : FixedImage(pParent, rResId) { - sal_Bool bHighContrast = pParent->GetDisplayBackground().GetColor().IsDark(); + sal_Bool bHighContrast = pParent->GetSettings().GetStyleSettings().GetHighContrastMode(); SetImage( Image(SVX_RES(bHighContrast ? RID_SVXBMP_LOCK_HC : RID_SVXBMP_LOCK ))); } diff --git a/svx/source/cui/tphatch.cxx b/svx/source/cui/tphatch.cxx index d060031abea2..58c55321195a 100644 --- a/svx/source/cui/tphatch.cxx +++ b/svx/source/cui/tphatch.cxx @@ -164,7 +164,7 @@ SvxHatchTabPage::SvxHatchTabPage aBtnLoad.SetClickHdl( LINK( this, SvxHatchTabPage, ClickLoadHdl_Impl ) ); aBtnSave.SetClickHdl( LINK( this, SvxHatchTabPage, ClickSaveHdl_Impl ) ); - aCtlPreview.SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + aCtlPreview.SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); } // ----------------------------------------------------------------------- @@ -905,7 +905,7 @@ void SvxHatchTabPage::PointChanged( Window* pWindow, RECT_POINT eRcPt ) void SvxHatchTabPage::DataChanged( const DataChangedEvent& rDCEvt ) { if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) - aCtlPreview.SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + aCtlPreview.SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); SvxTabPage::DataChanged( rDCEvt ); } diff --git a/svx/source/cui/tpline.cxx b/svx/source/cui/tpline.cxx index edbf7247fd47..c6cc30cbb0ba 100644 --- a/svx/source/cui/tpline.cxx +++ b/svx/source/cui/tpline.cxx @@ -299,7 +299,7 @@ void SvxLineTabPage::Construct() void SvxLineTabPage::FillListboxes() { -// aCtlPreview.SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); +// aCtlPreview.SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); ResMgr& rMgr = DIALOG_MGR(); diff --git a/svx/source/cui/treeopt.cxx b/svx/source/cui/treeopt.cxx index 744f9d5c1dbe..f33efffc2416 100644 --- a/svx/source/cui/treeopt.cxx +++ b/svx/source/cui/treeopt.cxx @@ -1078,7 +1078,7 @@ void OfaTreeOptionsDialog::DataChanged( const DataChangedEvent& rDCEvt ) !aTreeLB.GetParent(pEntry)) { OptionsGroupInfo* pInfo = static_cast(pEntry->GetUserData()); - bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); ImageList* pImgLst = bHighContrast ? &aPageImagesHC : &aPageImages; for ( sal_uInt16 i = 0; i < aHelpTextsArr.Count(); ++i ) { @@ -1336,7 +1336,7 @@ IMPL_LINK( OfaTreeOptionsDialog, SelectHdl_Impl, Timer*, EMPTYARG ) OptionsGroupInfo* pTGInfo = (OptionsGroupInfo *)pEntry->GetUserData(); if ( pTGInfo->m_sPageURL.getLength() == 0 ) { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); ImageList* pImgLst = bHighContrast ? &aPageImagesHC : &aPageImages; //hier den Hilfetext anzeigen for ( sal_uInt16 i = 0; i < aHelpTextsArr.Count(); ++i ) diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 6eac7520fe42..91f6021b92b9 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -1212,7 +1212,7 @@ void SvxBmpMask::DataChanged( const DataChangedEvent& rDCEvt ) void SvxBmpMask::ApplyStyle() { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); aTbxPipette.SetItemImage( TBI_PIPETTE, bHighContrast ? maImgPipetteH : maImgPipette ); } diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 1e01b9cfde24..fa07ac74d517 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -1133,7 +1133,7 @@ IMPL_LINK( SvxSuperContourDlg, WorkplaceClickHdl, ContourWindow*, pWnd ) void SvxSuperContourDlg::ApplyImageList() { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); ImageList& rImgLst = bHighContrast ? maImageListH : maImageList; diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index acc101cf4fb3..74fde268f9fa 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -374,7 +374,7 @@ void SvxXConnectionPreview::MouseButtonDown( const MouseEvent& rMEvt ) void SvxXConnectionPreview::SetStyles() { const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings(); - SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); SetBackground( Wallpaper( Color( rStyles.GetFieldColor() ) ) ); } diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 59d0c721b560..d2b01ac62ab4 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1202,7 +1202,7 @@ void HatchingLB::UserDraw( const UserDrawEvent& rUDEvt ) OutputDevice* pDevice = rUDEvt.GetDevice(); ULONG nOldDrawMode = pDevice->GetDrawMode(); - pDevice->SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + pDevice->SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); XHatch& rXHatch = mpList->GetHatch( rUDEvt.GetItemId() )->GetHatch(); MapMode aMode( MAP_100TH_MM ); @@ -1943,7 +1943,7 @@ SvxPreviewBase::SvxPreviewBase( Window* pParent, const ResId& rResId ) { // Draw the control's border as a flat thin black line. SetBorderStyle(WINDOW_BORDER_MONO); - SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); SetMapMode(MAP_100TH_MM); // init model @@ -2006,7 +2006,7 @@ void SvxPreviewBase::StateChanged(StateChangedType nType) void SvxPreviewBase::DataChanged(const DataChangedEvent& rDCEvt) { - SetDrawMode(GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR); + SetDrawMode(GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR); if((DATACHANGED_SETTINGS == rDCEvt.GetType()) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) { diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 90cbdc27cb1a..a380e480f295 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -917,9 +917,7 @@ void RecovDocListEntry::Paint(const Point& aPos , const String* pTxt = 0; RecovDocList* pList = static_cast< RecovDocList* >(&aDevice); - Wallpaper aBackground = aDevice.GetBackground(); - Color aColor = aBackground.GetColor(); - BOOL bHC = aColor.IsDark(); + BOOL bHC = aDevice.GetSettings().GetStyleSettings().GetHighContrastMode(); TURLInfo* pInfo = (TURLInfo*)pEntry->GetUserData(); switch(pInfo->RecoveryState) diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index 54f831f3505a..ffcf8f21b49d 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -1228,9 +1228,7 @@ void SvxFontWorkDialog::DataChanged( const DataChangedEvent& rDCEvt ) ---------------------------------------------------------------------------*/ void SvxFontWorkDialog::ApplyImageList() { - bool bHighContrast = - (GetSettings().GetStyleSettings().GetHighContrastMode() != 0) && - (GetDisplayBackground().GetColor().IsDark() != 0); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); ResMgr* _pMgr = &DIALOG_MGR(); diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 10e53698af7e..fa413d81ed17 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -328,7 +328,7 @@ void FrameSelectorImpl::InitColors() { const StyleSettings& rSett = mrFrameSel.GetSettings().GetStyleSettings(); maBackCol = rSett.GetFieldColor(); - mbHCMode = maBackCol.IsDark(); + mbHCMode = rSett.GetHighContrastMode(); maArrowCol = rSett.GetFieldTextColor(); maMarkCol.operator=( maBackCol ).Merge( maArrowCol, mbHCMode ? 0x80 : 0xC0 ); maHCLineCol = rSett.GetLabelTextColor(); diff --git a/svx/source/dialog/hyprlink.cxx b/svx/source/dialog/hyprlink.cxx index 86d01aa9fdb8..0cb6cc4d52df 100644 --- a/svx/source/dialog/hyprlink.cxx +++ b/svx/source/dialog/hyprlink.cxx @@ -828,10 +828,7 @@ void SvxHyperlinkDlg::DataChanged( const DataChangedEvent& rDCEvt ) void SvxHyperlinkDlg::SetImages() { - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode() != 0; - - if( bHighContrast ) - bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); SetItemImage( BTN_LINK, mpManager->GetImage( BTN_LINK, bHighContrast ) ); SetItemImage( BTN_INSERT_BOOKMARK, mpManager->GetImage( BTN_INSERT_BOOKMARK, bHighContrast ) ); diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 5777dc8e7446..a9c43347b7bf 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -1042,7 +1042,7 @@ IMPL_LINK( SvxIMapDlg, MiscHdl, void*, EMPTYARG ) void SvxIMapDlg::ApplyImageList() { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); ImageList& rImgLst = bHighContrast ? maImageListH : maImageList; diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index c196178a4d16..87f1b89bd3f4 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -181,7 +181,7 @@ USHORT SvxLanguageBox::ImplInsertImgEntry( const String& rEntry, USHORT nPos, bo USHORT nRet = 0; if( !bChecked ) nRet = InsertEntry( rEntry, m_aNotCheckedImage, nPos ); - else if( GetSettings().GetStyleSettings().GetFaceColor().IsDark() ) + else if( GetSettings().GetStyleSettings().GetHighContrastMode() ) nRet = InsertEntry( rEntry, m_aCheckedImageHC, nPos ); else nRet = InsertEntry( rEntry, m_aCheckedImage, nPos ); diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx index 2c1747dbc0b4..73e376f9eac1 100644 --- a/svx/source/dialog/measctrl.cxx +++ b/svx/source/dialog/measctrl.cxx @@ -79,7 +79,7 @@ SvxXMeasurePreview::SvxXMeasurePreview //pMeasureObj->SetItemSetAndBroadcast(rInAttrs); pMeasureObj->SetMergedItemSetAndBroadcast(rInAttrs); - SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); Invalidate(); } @@ -196,7 +196,7 @@ void SvxXMeasurePreview::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); } } diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index 67f5ee2ea318..79035bc4b8cb 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -76,7 +76,7 @@ void SvxSwFrameExample::InitColors_Impl( void ) const StyleSettings& rSettings = GetSettings().GetStyleSettings(); m_aBgCol = Color( rSettings.GetWindowColor() ); // old: COL_WHITE - BOOL bHC = m_aBgCol.IsDark(); + BOOL bHC = rSettings.GetHighContrastMode(); m_aFrameColor = Color( COL_LIGHTGREEN ); m_aAlignColor = Color( COL_LIGHTRED ); diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 791bebc772c8..ffe012734ae5 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -778,7 +778,7 @@ namespace svxform SvLBoxEntry* XFormsPage::AddEntry( ItemNode* _pNewNode, bool _bIsElement ) { SvLBoxEntry* pParent = m_aItemList.FirstSelected(); - const ImageList& rImageList = GetBackground().GetColor().IsDark() + const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode() ? m_pNaviWin->GetItemHCImageList() : m_pNaviWin->GetItemImageList(); USHORT nImageID = ( _bIsElement ) ? IID_ELEMENT : IID_ATTRIBUTE; @@ -988,7 +988,7 @@ namespace svxform SvLBoxEntry* XFormsPage::AddEntry( const Reference< XPropertySet >& _rEntry ) { SvLBoxEntry* pEntry = NULL; - const ImageList& rImageList = GetBackground().GetColor().IsDark() + const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode() ? m_pNaviWin->GetItemHCImageList() : m_pNaviWin->GetItemImageList(); Image aImage = rImageList.GetImage( IID_ELEMENT ); @@ -1244,7 +1244,7 @@ namespace svxform m_xUIHelper = Reference< css::xforms::XFormsUIHelper1 >( _xModel, UNO_QUERY ); String sRet; m_bHasModel = true; - const ImageList& rImageList = GetBackground().GetColor().IsDark() + const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode() ? m_pNaviWin->GetItemHCImageList() : m_pNaviWin->GetItemImageList(); diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 8c5ca61f6691..e4d656a06f28 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -987,7 +987,7 @@ PopupMenu* FmXFormShell::GetConversionMenu() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::GetConversionMenu" ); const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark(); + BOOL bIsHiContrastMode = rSettings.GetHighContrastMode(); PopupMenu* pNewMenu = new PopupMenu(SVX_RES( RID_FMSHELL_CONVERSIONMENU )); @@ -2001,7 +2001,7 @@ bool FmXFormShell::setCurrentSelection( const InterfaceBag& _rSelection ) m_aCurrentSelection = _rSelection; - // determine the form which all the selected objécts belong to, if any + // determine the form which all the selected obj�cts belong to, if any Reference< XForm > xNewCurrentForm; for ( InterfaceBag::const_iterator loop = m_aCurrentSelection.begin(); loop != m_aCurrentSelection.end(); diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx index 08c83b571a8f..ee9fd0c165b8 100644 --- a/svx/source/form/tbxform.cxx +++ b/svx/source/form/tbxform.cxx @@ -219,7 +219,7 @@ void SvxFmTbxCtlConfig::StateChanged(USHORT nSID, SfxItemState eState, const Sfx Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages(), - GetToolBox().GetDisplayBackground().GetColor().IsDark() ); + GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode() ); GetToolBox().SetItemImage( GetId(), aImage ); nLastSlot = nSlot; diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index edc7f253a024..8240f607f5fa 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -1228,7 +1228,7 @@ IMPL_LINK( GalleryBrowser2, SelectTbxHdl, ToolBox*, pBox ) IMPL_LINK( GalleryBrowser2, MiscHdl, void*, EMPTYARG ) { - const sal_Bool bHC = GALLERY_DLG_COLOR.IsDark(); + const sal_Bool bHC = maViewBox.GetSettings().GetStyleSettings().GetHighContrastMode(); maViewBox.SetOutStyle( maMiscOptions.GetToolboxStyle() ); diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx index 890cde02e428..787985d0e7e9 100644 --- a/svx/source/stbctrls/xmlsecctrl.cxx +++ b/svx/source/stbctrls/xmlsecctrl.cxx @@ -97,12 +97,12 @@ XmlSecStatusBarControl::XmlSecStatusBarControl( USHORT _nSlotId, USHORT _nId, S { mpImpl->mnState = (UINT16)SIGNATURESTATE_UNKNOWN; - sal_Bool bIsDark = GetStatusBar().GetBackground().GetColor().IsDark(); - mpImpl->maImage = Image( SVX_RES( bIsDark ? RID_SVXBMP_SIGNET_H : RID_SVXBMP_SIGNET ) ); + sal_Bool bHC = GetStatusBar().GetSettings().GetStyleSettings().GetHighContrastMode(); + mpImpl->maImage = Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_H : RID_SVXBMP_SIGNET ) ); mpImpl->maImageBroken = - Image( SVX_RES( bIsDark ? RID_SVXBMP_SIGNET_BROKEN_H : RID_SVXBMP_SIGNET_BROKEN ) ); + Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_BROKEN_H : RID_SVXBMP_SIGNET_BROKEN ) ); mpImpl->maImageNotValidated = - Image( SVX_RES( bIsDark ? RID_SVXBMP_SIGNET_NOTVALIDATED_H : RID_SVXBMP_SIGNET_NOTVALIDATED ) ); + Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_NOTVALIDATED_H : RID_SVXBMP_SIGNET_NOTVALIDATED ) ); } XmlSecStatusBarControl::~XmlSecStatusBarControl() diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index 2f3431accf64..70b12ac628a6 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -188,10 +188,10 @@ SvxZoomSliderControl::SvxZoomSliderControl( USHORT _nSlotId, USHORT _nId, Statu SfxStatusBarControl( _nSlotId, _nId, _rStb ), mpImpl( new SvxZoomSliderControl_Impl ) { - const sal_Bool bIsDark = GetStatusBar().GetBackground().GetColor().IsDark(); - mpImpl->maSliderButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) ); - mpImpl->maIncreaseButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) ); - mpImpl->maDecreaseButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) ); + const sal_Bool bHC = GetStatusBar().GetSettings().GetStyleSettings().GetHighContrastMode(); + mpImpl->maSliderButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) ); + mpImpl->maIncreaseButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) ); + mpImpl->maDecreaseButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) ); } // ----------------------------------------------------------------------- diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index 06fe8c26f0be..f4964d1b1ff1 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -137,7 +137,7 @@ void ExtrusionDirectionWindow::implInit() mpDirectionSet->SetColCount( 3 ); mpDirectionSet->EnableFullItemMode( FALSE ); - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) { @@ -174,7 +174,7 @@ void ExtrusionDirectionWindow::DataChanged( const DataChangedEvent& rDCEvt ) if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); USHORT i; for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) @@ -514,7 +514,7 @@ void ExtrusionDepthWindow::implInit() mpMenu->SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) ); - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); String aEmpty; mpMenu->appendEntry( 0, aEmpty, bHighContrast ? maImgDepth0h : maImgDepth0 ); @@ -635,7 +635,7 @@ void ExtrusionDepthWindow::DataChanged( const DataChangedEvent& rDCEvt ) if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); mpMenu->setEntryImage( 0, bHighContrast ? maImgDepth0h : maImgDepth0 ); mpMenu->setEntryImage( 1, bHighContrast ? maImgDepth1h : maImgDepth1 ); @@ -882,7 +882,7 @@ void ExtrusionLightingWindow::implInit() mpLightingSet->SetColCount( 3 ); mpLightingSet->EnableFullItemMode( FALSE ); - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); for( i = FROM_TOP_LEFT; i <= FROM_BOTTOM_RIGHT; i++ ) { @@ -949,7 +949,7 @@ void ExtrusionLightingWindow::implSetDirection( int nDirection, bool bEnabled ) mnDirection = nDirection; mbDirectionEnabled = bEnabled; - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); if( !bEnabled ) nDirection = FROM_FRONT; @@ -1022,7 +1022,7 @@ void ExtrusionLightingWindow::DataChanged( const DataChangedEvent& rDCEvt ) if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); implSetDirection( mnDirection, mbDirectionEnabled ); mpMenu->setEntryImage( 0, bHighContrast ? maImgBrighth : maImgBright ); @@ -1231,7 +1231,7 @@ void ExtrusionSurfaceWindow::implInit() { SetHelpId( HID_POPUP_EXTRUSION_SURFACE ); - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); // mpSurfaceForewarder = new SfxStatusForwarder( SID_EXTRUSION_SURFACE, *this ); @@ -1316,7 +1316,7 @@ void ExtrusionSurfaceWindow::DataChanged( const DataChangedEvent& rDCEvt ) if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); mpMenu->appendEntry( 0, String( SVX_RES( STR_WIREFRAME ) ), bHighContrast ? maImgSurface1h : maImgSurface1 ); mpMenu->appendEntry( 1, String( SVX_RES( STR_MATTE ) ), bHighContrast ? maImgSurface2h : maImgSurface2 ); diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index dfa22cc64e23..111f2394836a 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -397,7 +397,7 @@ void FontWorkAlignmentWindow::implInit() { SetHelpId( HID_POPUP_FONTWORK_ALIGN ); - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN ); mpMenu->SetHelpId( HID_POPUP_FONTWORK_ALIGN ); @@ -477,7 +477,7 @@ void FontWorkAlignmentWindow::DataChanged( const DataChangedEvent& rDCEvt ) if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); mpMenu->appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 ); mpMenu->appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 ); @@ -637,7 +637,7 @@ void FontWorkCharacterSpacingWindow::implInit() { SetHelpId( HID_POPUP_FONTWORK_CHARSPACE ); -// bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); +// bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN ); mpMenu->SetHelpId( HID_POPUP_FONTWORK_CHARSPACE ); @@ -754,7 +754,7 @@ void FontWorkCharacterSpacingWindow::DataChanged( const DataChangedEvent& rDCEvt if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { -// bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); +// bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); mpMenu->appendEntry( 0, String( SVX_RES( STR_CHARS_SPACING_VERY_TIGHT ) ), MIB_CHECKABLE ); mpMenu->appendEntry( 1, String( SVX_RES( STR_CHARS_SPACING_TIGHT ) ), MIB_CHECKABLE ); diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index 030d7e0cf0df..846cb1f81825 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -74,7 +74,7 @@ using namespace ::com::sun::star::beans; SvxLineBox::SvxLineBox( Window* pParent, const Reference< XFrame >& rFrame, WinBits nBits ) : LineLB( pParent, nBits ), - meBmpMode ( GetDisplayBackground().GetColor().IsDark() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL ), + meBmpMode ( GetSettings().GetStyleSettings().GetHighContrastMode() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL ), nCurPos ( 0 ), aLogicalSize(40,140), bRelease ( TRUE ), @@ -268,7 +268,7 @@ void SvxLineBox::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - BmpColorMode eMode = GetDisplayBackground().GetColor().IsDark() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL; + BmpColorMode eMode = GetSettings().GetStyleSettings().GetHighContrastMode() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL; if( eMode != meBmpMode ) { meBmpMode = eMode; diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index efa49025bbc4..d631a2dac467 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -282,7 +282,7 @@ public: inline BOOL SvxFrameWindow_Impl::IsHighContrast( void ) const { - return GetDisplayBackground().GetColor().IsDark(); + return GetSettings().GetStyleSettings().GetHighContrastMode(); } //======================================================================== diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index 4d0ebe5dd6c2..3df0d8487ac2 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -63,7 +63,7 @@ namespace svx if (mnSlotId == SID_BACKGROUND_COLOR) mnDrawMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW; DBG_ASSERT( ptrTbx, "ToolBox not found :-(" ); - mbWasHiContrastMode = ptrTbx ? ( ptrTbx->GetBackground().GetColor().IsDark() ) : FALSE; + mbWasHiContrastMode = ptrTbx ? ( ptrTbx->GetSettings().GetStyleSettings().GetHighContrastMode() ) : FALSE; Update(mnSlotId == SID_ATTR_CHAR_COLOR2 ? COL_BLACK : COL_GRAY); } @@ -79,7 +79,7 @@ namespace svx { Image aImage( mpTbx->GetItemImage( mnBtnId ) ); const bool bSizeChanged = ( maBmpSize != aImage.GetSizePixel() ); - const bool bDisplayModeChanged = ( mbWasHiContrastMode != mpTbx->GetBackground().GetColor().IsDark() ); + const bool bDisplayModeChanged = ( mbWasHiContrastMode != mpTbx->GetSettings().GetStyleSettings().GetHighContrastMode() ); Color aColor( rColor ); // !!! #109290# Workaround for SetFillColor with COL_AUTO @@ -107,7 +107,7 @@ namespace svx else pMskAcc = NULL; - mbWasHiContrastMode = mpTbx->GetBackground().GetColor().IsDark(); + mbWasHiContrastMode = mpTbx->GetSettings().GetStyleSettings().GetHighContrastMode(); if( mnDrawMode == TBX_UPDATER_MODE_CHAR_COLOR_NEW && ( COL_TRANSPARENT != aColor.GetColor() ) ) pBmpAcc->SetLineColor( aColor ); -- cgit From 1f2e63a3934fb42f6fbbf97f8c4bd3674ca74937 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 4 Nov 2009 11:46:31 +0100 Subject: #i104768# make autoHC immediately active --- svx/source/cui/optaccessibility.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/source/cui/optaccessibility.cxx b/svx/source/cui/optaccessibility.cxx index eb7cac6d8c5d..4f47bbf168ae 100644 --- a/svx/source/cui/optaccessibility.cxx +++ b/svx/source/cui/optaccessibility.cxx @@ -151,8 +151,8 @@ BOOL SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet& ) aMiscSettings.SetEnableATToolSupport( m_aAccessibilityTool.IsChecked() ); #endif aAllSettings.SetMiscSettings(aMiscSettings); - Application::SetSettings(aAllSettings); Application::MergeSystemSettings( aAllSettings ); + Application::SetSettings(aAllSettings); return FALSE; } -- cgit From 2083665c037ec598c2e20d3c949164d65bc56cad Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 4 Nov 2009 13:58:04 +0100 Subject: #i105368#: XMLEventExport.cxx: add missing events --- xmloff/source/script/XMLEventExport.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx index cf8156ae21e8..c39dda6d4e18 100644 --- a/xmloff/source/script/XMLEventExport.cxx +++ b/xmloff/source/script/XMLEventExport.cxx @@ -341,6 +341,11 @@ const XMLEventNameTranslation aStandardEventTable[] = { "OnSaveToFailed", XML_NAMESPACE_OFFICE, "save-to-failed" }, { "OnSubComponentOpened", XML_NAMESPACE_OFFICE, "subcomponent-opened" }, { "OnSubComponentClosed", XML_NAMESPACE_OFFICE, "subcomponent-closed" }, + { "OnStorageChanged", XML_NAMESPACE_OFFICE, "storage-changed" }, + { "OnMailMergeFinished", XML_NAMESPACE_OFFICE, "mail-merge-finished" }, + { "OnFieldMerge", XML_NAMESPACE_OFFICE, "field-merge" }, + { "OnFieldMergeFinished", XML_NAMESPACE_OFFICE, "field-merge-finished" }, + { "OnLayoutFinished", XML_NAMESPACE_OFFICE, "layout-finished" }, { NULL, 0, 0 } }; -- cgit From b12639936ccf2e659d3b31a95adc83226fa950ee Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Thu, 5 Nov 2009 18:37:39 +0100 Subject: ause109: #i106645# make sure multiple xsltproc don't collide in dir creation --- readlicense_oo/util/makefile.pmk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readlicense_oo/util/makefile.pmk b/readlicense_oo/util/makefile.pmk index b5c9099a1aa6..1b2e1de5130f 100755 --- a/readlicense_oo/util/makefile.pmk +++ b/readlicense_oo/util/makefile.pmk @@ -62,6 +62,7 @@ $(MISC)$/readme_text.xsl : virtual .ENDIF # "$(USE_SHELL)"!="4nt" $(MISC)$/$(GUI)$/$(eq,$(GUI),WNT readme README)_%.html : 'virtual' + @@-$(MKDIRHIER) $(@:d) $(XSLTPROC) --nonet -o $@ \ --stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \ --stringparam cp1 $(CPUNAME) --stringparam type html --stringparam lang1 $* \ @@ -71,6 +72,7 @@ $(MISC)$/$(GUI)$/$(eq,$(GUI),WNT readme README)_%.html : 'virtual' .ENDIF # "$(GUI)"=="UNX" $(MISC)$/$(GUI)$/$(eq,$(GUI),OS2 readme README)_%.html : 'virtual' + @@-$(MKDIRHIER) $(@:d) $(XSLTPROC) --nonet -o $@ \ --stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \ --stringparam cp1 $(CPUNAME) --stringparam type html --stringparam lang1 $* \ @@ -78,6 +80,7 @@ $(MISC)$/$(GUI)$/$(eq,$(GUI),OS2 readme README)_%.html : 'virtual' # no percent-rule to avoid ambiguous inference chains for README_.html $(SYSTEXTDOCS) : $(MISC)$/readme_text.xsl + @@-$(MKDIRHIER) $(@:d) $(XSLTPROC) --nonet -o $@ \ --stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \ --stringparam cp1 $(CPUNAME) --stringparam type text --stringparam lang1 $(@:b:s/readme_//:s/README_//) \ -- cgit From 273b150f8b10b5f438688b4f6f9348b4d088ecb5 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 6 Nov 2009 11:03:40 +0000 Subject: cmcfixes66: #i106674# fix remaining new[]/delete mismatches --- svx/source/msfilter/msdffimp.cxx | 22 +++++++++++----------- svx/source/msfilter/msocximex.cxx | 2 +- svx/source/svdraw/svdhdl.cxx | 2 +- ucb/source/ucp/odma/odma_content.cxx | 2 +- ucb/source/ucp/odma/odma_datasupplier.cxx | 8 ++++---- ucb/source/ucp/odma/odma_provider.cxx | 22 +++++++++++----------- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx index c9cfde91547a..fc71feb18740 100644 --- a/svx/source/msfilter/msdffimp.cxx +++ b/svx/source/msfilter/msdffimp.cxx @@ -317,7 +317,7 @@ BOOL Impl_OlePres::Read( SvStream & rStm ) { BYTE * p = new BYTE[ nSize ]; rStm.Read( p, nSize ); - delete p; + delete [] p; return FALSE; } return TRUE; @@ -5016,16 +5016,16 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r ApplyAttributes( rSt, aSet, aObjData ); pRet->SetMergedItemSet(aSet); } - else if ( aObjData.eShapeType == mso_sptLine ) - { - basegfx::B2DPolygon aPoly; - aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top())); - aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom())); - pRet = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly)); - pRet->SetModel( pSdrModel ); - ApplyAttributes( rSt, aSet, aObjData ); - pRet->SetMergedItemSet(aSet); - } + else if ( aObjData.eShapeType == mso_sptLine ) + { + basegfx::B2DPolygon aPoly; + aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top())); + aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom())); + pRet = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly)); + pRet->SetModel( pSdrModel ); + ApplyAttributes( rSt, aSet, aObjData ); + pRet->SetMergedItemSet(aSet); + } else { if ( GetCustomShapeContent( aObjData.eShapeType ) || IsProperty( DFF_Prop_pVertices ) ) diff --git a/svx/source/msfilter/msocximex.cxx b/svx/source/msfilter/msocximex.cxx index 7db08e229536..e16c3c118913 100644 --- a/svx/source/msfilter/msocximex.cxx +++ b/svx/source/msfilter/msocximex.cxx @@ -5299,7 +5299,7 @@ sal_Bool OCX_Image::Read(SotStorageStream *pS) bool result = storePictureInFileSystem( sImageUrl, pImage, nImageLen ); OUString pictName = sImageUrl.copy( sImageUrl.lastIndexOf('/') + 1 ); result = storePictureInDoc( pDocSh, pictName, pImage, nImageLen ); - delete pImage; + delete [] pImage; } return sal_True; } diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 936c073f6e84..d3202e389f83 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -2004,7 +2004,7 @@ void SdrHdlList::TravelFocusHdl(sal_Bool bForward) } // #105678# free mem again - delete pHdlAndIndex; + delete [] pHdlAndIndex; } } diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx index b2d514e6a424..ef6128a0b75b 100644 --- a/ucb/source/ucp/odma/odma_content.cxx +++ b/ucb/source/ucp/odma/odma_content.cxx @@ -565,7 +565,7 @@ uno::Any SAL_CALL Content::execute( ODM_DELETE, lpszNewDocId); - delete lpszNewDocId; + delete [] lpszNewDocId; } if(bError) ucbhelper::cancelCommandExecution( diff --git a/ucb/source/ucp/odma/odma_datasupplier.cxx b/ucb/source/ucp/odma/odma_datasupplier.cxx index 91c7f61021c8..68ee5f91cbae 100644 --- a/ucb/source/ucp/odma/odma_datasupplier.cxx +++ b/ucb/source/ucp/odma/odma_datasupplier.cxx @@ -329,10 +329,10 @@ sal_Bool DataSupplier::getResult( sal_uInt32 nIndex ) // now close the query odm = NODMQueryClose(ContentProvider::getHandle(), pQueryId); - delete lpszDMSList; - delete pQueryId; - delete lpszDocId; - delete lpszDocName; + delete [] lpszDMSList; + delete [] pQueryId; + delete [] lpszDocId; + delete [] lpszDocName; if ( !bFound ) m_pImpl->m_bCountFinal = sal_True; diff --git a/ucb/source/ucp/odma/odma_provider.cxx b/ucb/source/ucp/odma/odma_provider.cxx index b4b97421d05b..8f4b4603911d 100644 --- a/ucb/source/ucp/odma/odma_provider.cxx +++ b/ucb/source/ucp/odma/odma_provider.cxx @@ -230,7 +230,7 @@ uno::Reference< ucb::XContent > SAL_CALL ContentProvider::queryContent( aProp->m_sContentType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODMA_CONTENT_TYPE)); append(aProp); } - delete lpszDocName; + delete [] lpszDocName; } else // we got an already fetched name here so look for it { @@ -298,11 +298,11 @@ void ContentProvider::saveDocument(const ::rtl::OString& _sDocumentId) OSL_ENSURE(odm == ODM_SUCCESS,"Could not save document!"); if(odm != ODM_SUCCESS) { - delete lpszDocId; + delete [] lpszDocId; throw uno::Exception(); } aIter->second->m_sDocumentId = rtl::OString(lpszDocId); - delete lpszDocId; + delete [] lpszDocId; } } // ----------------------------------------------------------------------------- @@ -414,7 +414,7 @@ void ContentProvider::fillDocumentProperties(const ::rtl::Reference& _rProp) @@ -482,16 +482,16 @@ void ContentProvider::append(const ::rtl::Reference& _rProp) } while(nCount > nMaxCount); - delete lpszDocInfo; - delete lpszDocId; - delete lpszDocName; + delete [] lpszDocInfo; + delete [] lpszDocId; + delete [] lpszDocName; } // now close the query odm = NODMQueryClose(ContentProvider::getHandle(), pQueryId); - delete pQueryId; + delete [] pQueryId; } - delete lpszDMSList; + delete [] lpszDMSList; return aReturn; @@ -547,11 +547,11 @@ void ContentProvider::append(const ::rtl::Reference& _rProp) _rProp->m_bIsOpen = sal_True; break; default: - delete pFileName; + delete [] pFileName; throw uno::Exception(); // TODO give a more precise error message here } - delete pFileName; + delete [] pFileName; } return _rProp->m_sFileURL; } -- cgit From b4083630cb439a9f54340db6840e8bc6cfcc42c8 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Mon, 16 Nov 2009 21:50:44 +0100 Subject: masterfix: #i10000# missing dependency added --- desktop/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst index ce2ed07f57e4..3f51d13cec1b 100644 --- a/desktop/prj/build.lst +++ b/desktop/prj/build.lst @@ -21,7 +21,7 @@ dt desktop\os2\source\applauncher nmake - p dt_applauncher dt_inc NULL dt desktop\unx\source\officeloader nmake - u dt_officeloader_unx dt_inc NULL dt desktop\source\pagein nmake - u dt_pagein dt_inc NULL dt desktop\source\pkgchk\unopkg nmake - all dt_unopkg dt_dp_misc dt_app dt_inc dt_guiloader.w NULL -dt desktop\source\deployment nmake - all dt_deployment dt_dp_manager dt_dp_registry dt_dp_registry_package dt_dp_registry_executable dt_dp_registry_help dt_dp_registry_script dt_dp_registry_sfwk dt_dp_registry_component dt_dp_registry_configuration dt_dp_migration dt_dp_unopkg dt_inc NULL +dt desktop\source\deployment nmake - all dt_deployment dt_dp_manager dt_dp_registry dt_dp_registry_package dt_dp_registry_executable dt_dp_registry_help dt_dp_registry_script dt_dp_registry_sfwk dt_dp_registry_component dt_dp_registry_configuration dt_dp_migration dt_dp_unopkg dt_inc dt_dp_misc NULL dt desktop\source\deployment\misc nmake - all dt_dp_misc dt_inc NULL dt desktop\source\deployment\unopkg nmake - all dt_dp_unopkg dt_inc NULL dt desktop\source\deployment\migration nmake - all dt_dp_migration dt_inc NULL -- cgit From ef1ec7001a06a6ba0fdbed702bcd7a6fec58eaf9 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Mon, 30 Nov 2009 14:20:54 +0100 Subject: #i10000# remove duplicated declaration --- sfx2/inc/sfx2/filedlghelper.hxx | 3 --- 1 file changed, 3 deletions(-) diff --git a/sfx2/inc/sfx2/filedlghelper.hxx b/sfx2/inc/sfx2/filedlghelper.hxx index 91be281e9617..e6dc185ef919 100644 --- a/sfx2/inc/sfx2/filedlghelper.hxx +++ b/sfx2/inc/sfx2/filedlghelper.hxx @@ -240,9 +240,6 @@ public: /** Provides the selected files with full path information */ ::com::sun::star::uno::Sequence< ::rtl::OUString > GetSelectedFiles() const; - /** Provides the selected files with full path information */ - ::com::sun::star::uno::Sequence< ::rtl::OUString > GetSelectedFiles() const; - void AddFilter( const String& rFilterName, const String& rExtension ); void SetCurrentFilter( const String& rFilter ); -- cgit