diff options
author | sb <sb@openoffice.org> | 2009-09-04 12:24:40 +0200 |
---|---|---|
committer | sb <sb@openoffice.org> | 2009-09-04 12:24:40 +0200 |
commit | ab1ce9610fa399348a164fe1f8ed52919a0fe597 (patch) | |
tree | f0d30e09784db9bd714ce570239f11ed2a142fac /svx | |
parent | a255d9a0db453a89a8405a2b48a95975a4d68158 (diff) |
merged in DEV300_m57
Diffstat (limited to 'svx')
232 files changed, 4407 insertions, 3351 deletions
diff --git a/svx/inc/AccessibleSelectionBase.hxx b/svx/inc/AccessibleSelectionBase.hxx index 335ddf7c96e4..09767025d84a 100644 --- a/svx/inc/AccessibleSelectionBase.hxx +++ b/svx/inc/AccessibleSelectionBase.hxx @@ -74,79 +74,3 @@ namespace accessibility } #endif // _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: AccessibleSelectionBase.hxx,v $ - * $Revision: 1.6 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX -#define _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX - -#include <comphelper/accessibleselectionhelper.hxx> -#include "svx/svxdllapi.h" - -namespace accessibility -{ -/** @descr - This base class provides a base implementation of the - <type>XAccessibleSelection</type> interface. - The following methods have to be implemented if this - class is used: - - <method>implGetMutex</method>, - <method>implGetAccessibleContext</method>, - <method>implIsSelected</method>, - <method>implSelect</method>, -*/ - class SVX_DLLPUBLIC AccessibleSelectionBase : public ::comphelper::OCommonAccessibleSelection, - public ::com::sun::star::accessibility::XAccessibleSelection - { - protected: - - virtual ::osl::Mutex& implGetMutex() = 0; - - public: - - // XAccessibleSelection - default implementations - virtual void SAL_CALL selectAccessibleChild( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isAccessibleChildSelected( sal_Int32 nChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL clearAccessibleSelection( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL selectAllAccessibleChildren( ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL getSelectedAccessibleChildCount( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getSelectedAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); - - public: - - AccessibleSelectionBase(); - virtual ~AccessibleSelectionBase(); - }; - -} - -#endif // _SVX_ACCESSIBILITY_ACCESSIBLE_SELECTION_BASE_HXX diff --git a/svx/inc/AccessibleStaticTextBase.hxx b/svx/inc/AccessibleStaticTextBase.hxx index 5ee498be5695..60a31117185f 100644 --- a/svx/inc/AccessibleStaticTextBase.hxx +++ b/svx/inc/AccessibleStaticTextBase.hxx @@ -44,6 +44,7 @@ class SvxEditSource; +class SvxEditViewForwarder; namespace accessibility { @@ -266,6 +267,9 @@ namespace accessibility protected: Rectangle GetParagraphBoundingBox() const; + sal_Int32 GetParagraphCount() const; + sal_Int32 GetParagraphIndex() const; + sal_Int32 GetLineCount( sal_Int32 nParagraph ) const; private: diff --git a/svx/inc/ActionDescriptionProvider.hxx b/svx/inc/ActionDescriptionProvider.hxx index 01b128db09cd..b34ca9a1d312 100644 --- a/svx/inc/ActionDescriptionProvider.hxx +++ b/svx/inc/ActionDescriptionProvider.hxx @@ -66,71 +66,3 @@ public: }; #endif -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: ActionDescriptionProvider.hxx,v $ - * $Revision: 1.3 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SVX_ACTIONDESCRIPTIONPROVIDER_HXX -#define _SVX_ACTIONDESCRIPTIONPROVIDER_HXX - -#include "svx/svxdllapi.h" - -// header for class OUString -#include <rtl/ustring.hxx> - -//----------------------------------------------------------------------------- -/** This class provides localized descriptions for some basic actions done with objects. -The strings are intended to be provided to the user e.g. as description for undo actions in the menu. -The name of the object acted on and the type of action needs to be given as input parameter. -*/ - -class SVX_DLLPUBLIC ActionDescriptionProvider -{ -public: - enum ActionType - { - INSERT - , DELETE - , CUT - , MOVE - , RESIZE - , ROTATE - , TRANSFORM - , FORMAT - , MOVE_TOTOP - , MOVE_TOBOTTOM - , POS_SIZE - }; - -public: - static ::rtl::OUString createDescription( ActionType eActionType - , const ::rtl::OUString& rObjectName ); -}; - -#endif diff --git a/svx/inc/EnhancedCustomShapeFunctionParser.hxx b/svx/inc/EnhancedCustomShapeFunctionParser.hxx index 9c9a8574aa8f..411a16d60e31 100755 --- a/svx/inc/EnhancedCustomShapeFunctionParser.hxx +++ b/svx/inc/EnhancedCustomShapeFunctionParser.hxx @@ -32,14 +32,14 @@ #define _ENHANCEDCUSTOMSHAPEFUNCTIONPARSER_HXX #include <sal/config.h> -#ifndef BOOST_SHARED_PTR_HPP_INCLUDED #include <boost/shared_ptr.hpp> -#endif #include "EnhancedCustomShapeFunctionParser.hxx" #include <com/sun/star/drawing/EnhancedCustomShapeParameter.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp> #include <vector> +#include <svx/svxdllapi.h> + struct EnhancedCustomShapeEquation { sal_Int32 nOperation; @@ -97,7 +97,7 @@ enum ExpressionFunct #define EXPRESSION_FLAG_SUMANGLE_MODE 1 -void FillEquationParameter( const com::sun::star::drawing::EnhancedCustomShapeParameter&, const sal_Int32, EnhancedCustomShapeEquation& ); +SVX_DLLPUBLIC void FillEquationParameter( const com::sun::star::drawing::EnhancedCustomShapeParameter&, const sal_Int32, EnhancedCustomShapeEquation& ); class ExpressionNode { @@ -200,7 +200,7 @@ public: @return the generated function object. */ - static ExpressionNodeSharedPtr parseFunction( const ::rtl::OUString& rFunction, const EnhancedCustomShape2d& rCustoShape ); + SVX_DLLPUBLIC static ExpressionNodeSharedPtr parseFunction( const ::rtl::OUString& rFunction, const EnhancedCustomShape2d& rCustoShape ); private: // disabled constructor/destructor, since this is diff --git a/svx/inc/accessibility.hrc b/svx/inc/accessibility.hrc index c202c4611ffe..5688f7a8033e 100644 --- a/svx/inc/accessibility.hrc +++ b/svx/inc/accessibility.hrc @@ -80,8 +80,6 @@ // text paragraphs and bullets #define RID_SVXSTR_A11Y_TEXTHELPER_START (RID_SVXSTR_ACCESSIBILITY_START + 70) -#define RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION (RID_SVXSTR_A11Y_TEXTHELPER_START + 0) -#define RID_SVXSTR_A11Y_PARAGRAPH_NAME (RID_SVXSTR_A11Y_TEXTHELPER_START + 1) #define RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION (RID_SVXSTR_A11Y_TEXTHELPER_START + 2) #define RID_SVXSTR_A11Y_IMAGEBULLET_NAME (RID_SVXSTR_A11Y_TEXTHELPER_START + 3) diff --git a/svx/inc/acorrcfg.hxx b/svx/inc/acorrcfg.hxx index fe28610df8d6..046cf1a6198a 100644 --- a/svx/inc/acorrcfg.hxx +++ b/svx/inc/acorrcfg.hxx @@ -134,141 +134,3 @@ public: #endif - -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: acorrcfg.hxx,v $ - * $Revision: 1.7 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SVXACCFG_HXX -#define _SVXACCFG_HXX - -// include --------------------------------------------------------------- - -#include "svx/svxdllapi.h" -#include <unotools/configitem.hxx> -/* -----------------------------12.10.00 11:40-------------------------------- - - ---------------------------------------------------------------------------*/ -class SvxAutoCorrect; -class SvxAutoCorrCfg; -class SVX_DLLPUBLIC SvxBaseAutoCorrCfg : public utl::ConfigItem -{ - SvxAutoCorrCfg& rParent; - com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); - -public: - SvxBaseAutoCorrCfg(SvxAutoCorrCfg& rParent); - ~SvxBaseAutoCorrCfg(); - - void Load(sal_Bool bInit); - virtual void Commit(); - virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); - void SetModified() {ConfigItem::SetModified();} -}; -/* -----------------------------12.10.00 11:40-------------------------------- - - ---------------------------------------------------------------------------*/ -class SVX_DLLPUBLIC SvxSwAutoCorrCfg : public utl::ConfigItem -{ - SvxAutoCorrCfg& rParent; - com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames(); - -public: - SvxSwAutoCorrCfg(SvxAutoCorrCfg& rParent); - ~SvxSwAutoCorrCfg(); - - void Load(sal_Bool bInit); - virtual void Commit(); - virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); - void SetModified() {ConfigItem::SetModified();} -}; -/*-------------------------------------------------------------------- - Beschreibung: Konfiguration fuer Auto Correction - --------------------------------------------------------------------*/ -class SVX_DLLPUBLIC SvxAutoCorrCfg -{ - friend class SvxBaseAutoCorrCfg; - friend class SvxSwAutoCorrCfg; - - SvxAutoCorrect* pAutoCorrect; - - SvxBaseAutoCorrCfg aBaseConfig; - SvxSwAutoCorrCfg aSwConfig; - - // Flags f"ur Autotext: - sal_Bool bFileRel; - sal_Bool bNetRel; - // Tiphilfe f"ur Autotext w"ahrend der Eingabe - sal_Bool bAutoTextTip; - sal_Bool bAutoTextPreview; - sal_Bool bAutoFmtByInput; - sal_Bool bSearchInAllCategories; - -public: - void SetModified() - { - aBaseConfig.SetModified(); - aSwConfig.SetModified(); - } - void Commit() - { - aBaseConfig.Commit(); - aSwConfig.Commit(); - } - - SvxAutoCorrect* GetAutoCorrect() { return pAutoCorrect; } - const SvxAutoCorrect* GetAutoCorrect() const { return pAutoCorrect; } - // der Pointer geht in den Besitz des ConfigItems! - void SetAutoCorrect( SvxAutoCorrect* ); - - sal_Bool IsAutoFmtByInput() const { return bAutoFmtByInput; } - void SetAutoFmtByInput( sal_Bool bSet ) { bAutoFmtByInput = bSet;aSwConfig.SetModified();} - - sal_Bool IsSaveRelFile() const { return bFileRel; } - void SetSaveRelFile( sal_Bool bSet ) { bFileRel = bSet; aSwConfig.SetModified(); } - - sal_Bool IsSaveRelNet() const { return bNetRel; } - void SetSaveRelNet( sal_Bool bSet ) { bNetRel = bSet; aSwConfig.SetModified();} - - sal_Bool IsAutoTextPreview() const {return bAutoTextPreview;} - void SetAutoTextPreview(sal_Bool bSet) {bAutoTextPreview = bSet; aSwConfig.SetModified();} - - sal_Bool IsAutoTextTip() const { return bAutoTextTip; } - void SetAutoTextTip(sal_Bool bSet ) { bAutoTextTip = bSet;aSwConfig.SetModified();} - - sal_Bool IsSearchInAllCategories() const { return bSearchInAllCategories;} - void SetSearchInAllCategories(sal_Bool bSet ) { bSearchInAllCategories = bSet; aSwConfig.SetModified(); } - - SvxAutoCorrCfg(); - virtual ~SvxAutoCorrCfg(); - static SvxAutoCorrCfg* Get(); -}; - - -#endif - diff --git a/svx/inc/anchorid.hxx b/svx/inc/anchorid.hxx index 072bcaae4177..db897fb3e11e 100644 --- a/svx/inc/anchorid.hxx +++ b/svx/inc/anchorid.hxx @@ -43,50 +43,3 @@ enum SvxAnchorIds #endif - -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: anchorid.hxx,v $ - * $Revision: 1.3 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SVX_ANCHORID_HXX -#define _SVX_ANCHORID_HXX - - -enum SvxAnchorIds -{ - SVX_OBJ_AT_CNTNT = 0x01, //Absatzgebundener Rahmen - SVX_OBJ_IN_CNTNT = 0x02, //Zeichengebundener Rahmen - SVX_OBJ_PAGE = 0x04, //Seitengebundener Rahmen - SVX_OBJ_AT_FLY = 0x08 //Rahmengebundener Rahmen -// SVX_OBJ_AUTO_CNTNT = 0x10 //Automatisch positionierter, absatzgebundener Rahmen -}; - - - -#endif - diff --git a/svx/inc/asiancfg.hxx b/svx/inc/asiancfg.hxx index 5a445f36b1ee..303da7e76630 100644 --- a/svx/inc/asiancfg.hxx +++ b/svx/inc/asiancfg.hxx @@ -70,77 +70,3 @@ public: }; #endif - -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: asiancfg.hxx,v $ - * $Revision: 1.4 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SVX_ASIANCFG_HXX -#define _SVX_ASIANCFG_HXX - -#include <unotools/configitem.hxx> -#include <com/sun/star/uno/Sequence.h> -#include "svx/svxdllapi.h" - -namespace com{namespace sun{namespace star{ -namespace lang{ - struct Locale; -}}}} -//----------------------------------------------------------------------------- -struct SvxAsianConfig_Impl; -class SVX_DLLPUBLIC SvxAsianConfig : public utl::ConfigItem -{ - SvxAsianConfig_Impl* pImpl; - -public: - SvxAsianConfig(sal_Bool bEnableNotify = sal_True); - virtual ~SvxAsianConfig(); - - void Load(); - virtual void Commit(); - virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); - - sal_Bool IsKerningWesternTextOnly() const; - void SetKerningWesternTextOnly(sal_Bool bSet); - - sal_Int16 GetCharDistanceCompression() const; - void SetCharDistanceCompression(sal_Int16 nSet); - - com::sun::star::uno::Sequence<com::sun::star::lang::Locale> - GetStartEndCharLocales(); - - sal_Bool GetStartEndChars( const com::sun::star::lang::Locale& rLocale, - rtl::OUString& rStartChars, - rtl::OUString& rEndChars ); - void SetStartEndChars( const com::sun::star::lang::Locale& rLocale, - const rtl::OUString* pStartChars, - const rtl::OUString* pEndChars ); -}; - -#endif - diff --git a/svx/inc/bolnitem.hxx b/svx/inc/bolnitem.hxx index f8ec8d319325..bfb55d676866 100644 --- a/svx/inc/bolnitem.hxx +++ b/svx/inc/bolnitem.hxx @@ -84,91 +84,3 @@ private: #endif - -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: bolnitem.hxx,v $ - * $Revision: 1.7 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SVX_BOLNITEM_HXX -#define _SVX_BOLNITEM_HXX - -// include --------------------------------------------------------------- - - - -#include <svtools/poolitem.hxx> -#include "svx/svxdllapi.h" - - - -// class SvxLineItem ----------------------------------------------------- - - -/* -[Beschreibung] -Dieses Item transportiert eine SvxBorderLine. -*/ - -class SvxBorderLine; - -class SVX_DLLPUBLIC SvxLineItem : public SfxPoolItem -{ -public: - TYPEINFO(); - - SvxLineItem( const USHORT nId ); - SvxLineItem( const SvxLineItem& rCpy ); - ~SvxLineItem(); - SvxLineItem &operator=( const SvxLineItem& rLine ); - - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, const IntlWrapper * = 0 ) const; - - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create(SvStream &, USHORT) const; - virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const; - virtual int ScaleMetrics( long nMult, long nDiv ); - virtual int HasMetrics() const; - - const SvxBorderLine* GetLine () const { return pLine; } - void SetLine ( const SvxBorderLine *pNew ); - -private: - SvxBorderLine* pLine; -}; - - - - -#endif - diff --git a/svx/inc/bulitem.hxx b/svx/inc/bulitem.hxx index 84eda79feecc..b0adc0d4dd9f 100644 --- a/svx/inc/bulitem.hxx +++ b/svx/inc/bulitem.hxx @@ -161,168 +161,3 @@ public: #endif - -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: bulitem.hxx,v $ - * $Revision: 1.6 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SVX_BULITEM_HXX -#define _SVX_BULITEM_HXX - -// include --------------------------------------------------------------- - -#include "svx/svxdllapi.h" - - -// define ---------------------------------------------------------------- - -// Styles -#define BS_ABC_BIG 0 -#define BS_ABC_SMALL 1 -#define BS_ROMAN_BIG 2 -#define BS_ROMAN_SMALL 3 -#define BS_123 4 -#define BS_NONE 5 -#define BS_BULLET 6 -#define BS_BMP 128 - -// Justification -#define BJ_HLEFT 0x01 -#define BJ_HRIGHT 0x02 -#define BJ_HCENTER 0x04 -#define BJ_VTOP 0x08 -#define BJ_VBOTTOM 0x10 -#define BJ_VCENTER 0x20 - -// Valid-Bits -// Erstmal nur die Werte, die vom Dialog geaendert werden... -#define VALID_FONTCOLOR 0x0001 -#define VALID_FONTNAME 0x0002 -#define VALID_SYMBOL 0x0004 -#define VALID_BITMAP 0x0008 -#define VALID_SCALE 0x0010 -#define VALID_START 0x0020 -#define VALID_STYLE 0x0040 -#define VALID_PREVTEXT 0x0080 -#define VALID_FOLLOWTEXT 0x0100 -#include <svtools/poolitem.hxx> -#include <vcl/font.hxx> -#include <goodies/grfmgr.hxx> - -// class SvxBulletItem --------------------------------------------------- - -class SVX_DLLPUBLIC SvxBulletItem : public SfxPoolItem -{ - Font aFont; - GraphicObject* pGraphicObject; - String aPrevText; - String aFollowText; - USHORT nStart; - USHORT nStyle; - long nWidth; - USHORT nScale; - sal_Unicode cSymbol; - BYTE nJustify; - USHORT nValidMask; // Nur temporaer fuer GetAttribs/SetAttribs, wegen des grossen Bullets - -#ifdef _SVX_BULITEM_CXX - void SetDefaultFont_Impl(); - void SetDefaults_Impl(); -#endif - -public: - TYPEINFO(); - - SvxBulletItem( USHORT nWhich = 0 ); - SvxBulletItem( BYTE nStyle, const Font& rFont, USHORT nStart = 0, USHORT nWhich = 0 ); - SvxBulletItem( const Font& rFont, sal_Unicode cSymbol, USHORT nWhich=0 ); - SvxBulletItem( const Bitmap&, USHORT nWhich = 0 ); - SvxBulletItem( const GraphicObject&, USHORT nWhich = 0 ); - SvxBulletItem( SvStream& rStrm, USHORT nWhich = 0 ); - SvxBulletItem( const SvxBulletItem& ); - ~SvxBulletItem(); - - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream&, USHORT nVersion ) const; - virtual SvStream& Store( SvStream & , USHORT nItemVersion ) const; - - String GetFullText() const; - sal_Unicode GetSymbol() const { return cSymbol; } - String GetPrevText() const { return aPrevText; } - String GetFollowText() const { return aFollowText; } - - USHORT GetStart() const { return nStart; } - long GetWidth() const { return nWidth; } - USHORT GetStyle() const { return nStyle; } - BYTE GetJustification() const { return nJustify; } - Font GetFont() const { return aFont; } - USHORT GetScale() const { return nScale; } - - Bitmap GetBitmap() const; - void SetBitmap( const Bitmap& rBmp ); - - const GraphicObject& GetGraphicObject() const; - void SetGraphicObject( const GraphicObject& rGraphicObject ); - - void SetSymbol( sal_Unicode c) { cSymbol = c; } - void SetPrevText( const String& rStr) { aPrevText = rStr;} - void SetFollowText(const String& rStr) { aFollowText=rStr;} - - void SetStart( USHORT nNew ) { nStart = nNew; } - void SetWidth( long nNew ) { nWidth = nNew; } - void SetStyle( USHORT nNew ) { nStyle = nNew; } - void SetJustification( BYTE nNew ) { nJustify = nNew; } - void SetFont( const Font& rNew) { aFont = rNew; } - void SetScale( USHORT nNew ) { nScale = nNew; } - - virtual USHORT GetVersion(USHORT nFileVersion) const; - virtual int operator==( const SfxPoolItem& ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, const IntlWrapper * = 0 ) const; - - static void StoreFont( SvStream&, const Font& ); - static Font CreateFont( SvStream&, USHORT nVer ); - - USHORT& GetValidMask() { return nValidMask; } - USHORT GetValidMask() const { return nValidMask; } - USHORT IsValid( USHORT nFlag ) const { return nValidMask & nFlag; } - void SetValid( USHORT nFlag, BOOL bValid ) - { - if ( bValid ) - nValidMask |= nFlag; - else - nValidMask &= ~nFlag; - } - void CopyValidProperties( const SvxBulletItem& rCopyFrom ); -}; - - -#endif - diff --git a/svx/inc/charhiddenitem.hxx b/svx/inc/charhiddenitem.hxx index 8a09f1c978e4..ea36786a503b 100644 --- a/svx/inc/charhiddenitem.hxx +++ b/svx/inc/charhiddenitem.hxx @@ -62,71 +62,3 @@ public: }; #endif - - -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: charhiddenitem.hxx,v $ - * $Revision: 1.6 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SVX_CHARHIDDENITEM_HXX -#define _SVX_CHARHIDDENITEM_HXX - -// include --------------------------------------------------------------- - -#include <svtools/poolitem.hxx> -#include <svtools/eitem.hxx> -#include "svx/svxdllapi.h" - -// class SvxCharHiddenItem ------------------------------------------------- -/* - [Description] - This item marks text as hidden -*/ - -class SVX_DLLPUBLIC SvxCharHiddenItem : public SfxBoolItem -{ -public: - TYPEINFO(); - - SvxCharHiddenItem( const BOOL bHidden /*= FALSE*/, const USHORT nId ); - - virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, - SfxMapUnit eCoreMetric, - SfxMapUnit ePresMetric, - String &rText, const IntlWrapper * = 0 ) const; - - inline SvxCharHiddenItem& operator=(const SvxCharHiddenItem& rHidden) { - SetValue(rHidden.GetValue()); - return *this; - } -}; - -#endif - - diff --git a/svx/inc/fontitem.hxx b/svx/inc/fontitem.hxx index 8f092b4640f2..da0ee972954b 100644 --- a/svx/inc/fontitem.hxx +++ b/svx/inc/fontitem.hxx @@ -111,7 +111,7 @@ public: return *this; } - static void EnableStoreUnicodeNames( BOOL bEnable ) { bEnableStoreUnicodeNames = bEnable; } + static void EnableStoreUnicodeNames( BOOL bEnable ); }; diff --git a/svx/inc/gallery1.hxx b/svx/inc/gallery1.hxx index f38bf0dda5d9..e3665a47c707 100644 --- a/svx/inc/gallery1.hxx +++ b/svx/inc/gallery1.hxx @@ -144,7 +144,7 @@ private: void ImplLoadImports(); void ImplWriteImportList(); - GalleryThemeEntry* ImplGetThemeEntry( const String& rThemeName ); + SVX_DLLPUBLIC GalleryThemeEntry* ImplGetThemeEntry( const String& rThemeName ); GalleryThemeEntry* ImplGetThemeEntry( ULONG nThemeId ); GalleryImportThemeEntry* ImplGetImportThemeEntry( const String& rImportName ); @@ -168,7 +168,7 @@ public: SVX_DLLPUBLIC BOOL CreateTheme( const String& rThemeName, UINT32 nNumFrom = 0 ); BOOL CreateImportTheme( const INetURLObject& rURL, const String& rFileName ); BOOL RenameTheme( const String& rOldName, const String& rNewName ); - BOOL RemoveTheme( const String& rThemeName ); + SVX_DLLPUBLIC BOOL RemoveTheme( const String& rThemeName ); SVX_DLLPUBLIC GalleryTheme* AcquireTheme( const String& rThemeName, SfxListener& rListener ); SVX_DLLPUBLIC void ReleaseTheme( GalleryTheme* pTheme, SfxListener& rListener ); diff --git a/svx/inc/galobj.hxx b/svx/inc/galobj.hxx index fd1988383d8e..ce2b481bdcdf 100644 --- a/svx/inc/galobj.hxx +++ b/svx/inc/galobj.hxx @@ -122,8 +122,8 @@ public: BOOL IsValid() const { return bIsValid; } BOOL IsThumbBitmap() const { return bIsThumbBmp; } - const String GetTitle() const; - void SetTitle( const String& rTitle ); + SVX_DLLPUBLIC const String GetTitle() const; + SVX_DLLPUBLIC void SetTitle( const String& rTitle ); friend SvStream& operator<<( SvStream& rOut, const SgaObject& rObj ); friend SvStream& operator>>( SvStream& rIn, SgaObject& rObj ); diff --git a/svx/inc/galtheme.hxx b/svx/inc/galtheme.hxx index 459ef98b9a84..15a1c6fbb1e2 100644 --- a/svx/inc/galtheme.hxx +++ b/svx/inc/galtheme.hxx @@ -107,12 +107,12 @@ private: BOOL bAbortActualize; void ImplCreateSvDrawStorage(); - SgaObject* ImplReadSgaObject( GalleryObject* pEntry ); + SVX_DLLPUBLIC SgaObject* ImplReadSgaObject( GalleryObject* pEntry ); BOOL ImplWriteSgaObject( const SgaObject& rObj, ULONG nPos, GalleryObject* pExistentEntry ); void ImplRead(); void ImplWrite(); const GalleryObject* ImplGetGalleryObject( ULONG nPos ) const { return aObjectList.GetObject( nPos ); } - const GalleryObject* ImplGetGalleryObject( const INetURLObject& rURL ); + SVX_DLLPUBLIC const GalleryObject* ImplGetGalleryObject( const INetURLObject& rURL ); ULONG ImplGetGalleryObjectPos( const GalleryObject* pObj ) const { return aObjectList.GetPos( pObj ); } INetURLObject ImplGetURL( const GalleryObject* pObject ) const; INetURLObject ImplCreateUniqueURL( SgaObjKind eObjKind, ULONG nFormat = CVT_UNKNOWN ); @@ -129,11 +129,11 @@ public: ULONG GetObjectCount() const { return aObjectList.Count(); } - SgaObject* AcquireObject( ULONG nPos ); - void ReleaseObject( SgaObject* pObj ); + SVX_DLLPUBLIC SgaObject* AcquireObject( ULONG nPos ); + SVX_DLLPUBLIC void ReleaseObject( SgaObject* pObj ); - BOOL InsertObject( const SgaObject& rObj, ULONG nPos = LIST_APPEND ); - BOOL RemoveObject( ULONG nPos ); + SVX_DLLPUBLIC BOOL InsertObject( const SgaObject& rObj, ULONG nPos = LIST_APPEND ); + SVX_DLLPUBLIC BOOL RemoveObject( ULONG nPos ); BOOL ChangeObjectPos( ULONG nOldPos, ULONG nNewPos ); const String& GetName() const { return IsImported() ? aImportName : pThm->GetThemeName(); } @@ -194,11 +194,11 @@ public: BOOL GetThumb( ULONG nPos, Bitmap& rBmp, BOOL bProgress = FALSE ); - BOOL GetGraphic( ULONG nPos, Graphic& rGraphic, BOOL bProgress = FALSE ); - BOOL InsertGraphic( const Graphic& rGraphic, ULONG nInsertPos = LIST_APPEND ); + SVX_DLLPUBLIC BOOL GetGraphic( ULONG nPos, Graphic& rGraphic, BOOL bProgress = FALSE ); + SVX_DLLPUBLIC BOOL InsertGraphic( const Graphic& rGraphic, ULONG nInsertPos = LIST_APPEND ); - BOOL GetModel( ULONG nPos, SdrModel& rModel, BOOL bProgress = FALSE ); - BOOL InsertModel( const FmFormModel& rModel, ULONG nInsertPos = LIST_APPEND ); + SVX_DLLPUBLIC BOOL GetModel( ULONG nPos, SdrModel& rModel, BOOL bProgress = FALSE ); + SVX_DLLPUBLIC BOOL InsertModel( const FmFormModel& rModel, ULONG nInsertPos = LIST_APPEND ); BOOL GetModelStream( ULONG nPos, SotStorageStreamRef& rModelStreamRef, BOOL bProgress = FALSE ); BOOL InsertModelStream( const SotStorageStreamRef& rModelStream, ULONG nInsertPos = LIST_APPEND ); diff --git a/svx/inc/optgenrl.hrc b/svx/inc/optgenrl.hrc index 1972689529fc..b6f191aaea07 100644 --- a/svx/inc/optgenrl.hrc +++ b/svx/inc/optgenrl.hrc @@ -74,7 +74,7 @@ #define LINEH 12 #define FLINEH 8 #define LEFT 12 -#define MID 96 +#define MID 100 #define RIGHT 248 #define TOP 10 #define LINE(y) (14+y*15) diff --git a/svx/inc/svdglob.hxx b/svx/inc/svdglob.hxx index c4856be30083..4526579d0658 100644 --- a/svx/inc/svdglob.hxx +++ b/svx/inc/svdglob.hxx @@ -33,11 +33,11 @@ #include <tools/contnr.hxx> -#ifndef _RESID_HXX //autogen #include <tools/resid.hxx> -#endif #include <tools/string.hxx> +#include <svx/svxdllapi.h> + //************************************************************ // Vorausdeklarationen //************************************************************ @@ -64,7 +64,7 @@ public: // IDs von SDR_StringCacheBegin (256) bis // SDR_StringCacheEnd (weiss ich grad' nicht). // Hierzu siehe auch SvdStr.Hrc -String ImpGetResStr(sal_uInt16 nResID); +SVX_DLLPUBLIC String ImpGetResStr(sal_uInt16 nResID); //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/svx/inc/svdstr.hrc b/svx/inc/svdstr.hrc index cb1b85079f37..280a9dba6122 100644 --- a/svx/inc/svdstr.hrc +++ b/svx/inc/svdstr.hrc @@ -324,7 +324,13 @@ #define STR_UndoNewLayer (STR_UndoBegin +13) #define STR_UndoDelLayer (STR_UndoBegin +14) #define STR_UndoMovLayer (STR_UndoBegin +15) -#define STR_UndoEnd (STR_UndoMovLayer) + +// --> OD 2009-07-09 #i73249# +#define STR_UndoObjName (STR_UndoBegin +16) +#define STR_UndoObjTitle (STR_UndoBegin +17) +#define STR_UndoObjDescription (STR_UndoBegin +18) +// <-- +#define STR_UndoEnd (STR_UndoObjDescription) #define STR_LayerBegin (STR_UndoEnd+1) diff --git a/svx/inc/svx/AccessibleContextBase.hxx b/svx/inc/svx/AccessibleContextBase.hxx index 9e36f99eaf0d..009c9b4fa619 100644 --- a/svx/inc/svx/AccessibleContextBase.hxx +++ b/svx/inc/svx/AccessibleContextBase.hxx @@ -1,37 +1,5 @@ /************************************************************************* * -<<<<<<< AccessibleContextBase.hxx - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: AccessibleContextBase.hxx,v $ - * - * $Revision: 1.4 $ - * - * last change: $Author: rt $ $Date: 2008-07-07 14:27:26 $ - * - * 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 -======= * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2008 by Sun Microsystems, Inc. @@ -57,7 +25,6 @@ * version 3 along with OpenOffice.org. If not, see * <http://www.openoffice.org/license.html> * for a copy of the LGPLv3 License. ->>>>>>> 1.3 * ************************************************************************/ diff --git a/svx/inc/svx/AccessibleControlShape.hxx b/svx/inc/svx/AccessibleControlShape.hxx index bf8cdec82815..82a56aafb2bf 100644 --- a/svx/inc/svx/AccessibleControlShape.hxx +++ b/svx/inc/svx/AccessibleControlShape.hxx @@ -31,13 +31,9 @@ #ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_CONTROL_SHAPE_HXX #define _SVX_ACCESSIBILITY_ACCESSIBLE_CONTROL_SHAPE_HXX -#ifndef _SVX_ACCESSIBILITY_ACCESSIBLE_SHAPE_MANAGER_HXX #include <svx/AccessibleShape.hxx> -#endif -#ifndef _COM_SUN_STAR_ACCESSIBILITY_XACCESSIBLE_ACTION_HPP_ #include <com/sun/star/accessibility/XAccessibleAction.hpp> -#endif #include <com/sun/star/accessibility/XAccessibleEventListener.hpp> #include <com/sun/star/util/XModeChangeBroadcaster.hpp> #include <com/sun/star/container/XContainerListener.hpp> diff --git a/svx/inc/svx/AccessibleShape.hxx b/svx/inc/svx/AccessibleShape.hxx index f545771728ed..018737934c74 100755 --- a/svx/inc/svx/AccessibleShape.hxx +++ b/svx/inc/svx/AccessibleShape.hxx @@ -1,37 +1,5 @@ /************************************************************************* * -<<<<<<< AccessibleShape.hxx - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: AccessibleShape.hxx,v $ - * - * $Revision: 1.4 $ - * - * last change: $Author: rt $ $Date: 2008-07-07 14:28:01 $ - * - * 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 -======= * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2008 by Sun Microsystems, Inc. @@ -57,7 +25,6 @@ * version 3 along with OpenOffice.org. If not, see * <http://www.openoffice.org/license.html> * for a copy of the LGPLv3 License. ->>>>>>> 1.3 * ************************************************************************/ diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc index 13e835a3d378..1d78c5e6396e 100644 --- a/svx/inc/svx/dialogs.hrc +++ b/svx/inc/svx/dialogs.hrc @@ -251,8 +251,10 @@ // ResId fuer FontSubstitution #define RID_SVX_FONT_SUBSTITUTION (RID_SVX_START + 18) +// insert row&col dialog +#define DLG_INS_ROW_COL (RID_SVX_START + 156) + //InetDlg -//#define RID_SVXDLG_INTERNET (RID_SVX_START + 156) #define RID_SVXPAGE_INET_MAIL (RID_SVX_START + 155) #define RID_SVXPAGE_INET_PROXY (RID_SVX_START + 157) #define RID_SVXPAGE_INET_CACHE (RID_SVX_START + 158) diff --git a/svx/inc/svx/editeng.hxx b/svx/inc/svx/editeng.hxx index d5176034a301..65168297274e 100644 --- a/svx/inc/svx/editeng.hxx +++ b/svx/inc/svx/editeng.hxx @@ -219,6 +219,8 @@ public: USHORT GetLineCount( USHORT nParagraph ) const; xub_StrLen GetLineLen( USHORT nParagraph, USHORT nLine ) const; + void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; + USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; sal_uInt32 GetLineHeight( USHORT nParagraph, USHORT nLine = 0 ); USHORT GetFirstLineOffset( USHORT nParagraph ); ParagraphInfos GetParagraphInfos( USHORT nPara ); diff --git a/svx/inc/svx/escherex.hxx b/svx/inc/svx/escherex.hxx index 2f6552510c7e..a93814b2a825 100644 --- a/svx/inc/svx/escherex.hxx +++ b/svx/inc/svx/escherex.hxx @@ -304,6 +304,8 @@ #define ESCHER_ShpInst_ActionButtonMovie 200 #define ESCHER_ShpInst_HostControl 201 #define ESCHER_ShpInst_TextBox 202 + +#define ESCHER_ShpInst_COUNT 203 #define ESCHER_ShpInst_Max 0x0FFF #define ESCHER_ShpInst_Nil ESCHER_ShpInst_Max @@ -960,10 +962,35 @@ namespace com { namespace sun { namespace star { struct Gradient; } namespace drawing { + struct EnhancedCustomShapeAdjustmentValue; class XShape; } }}} +struct SVX_DLLPUBLIC EscherConnectorListEntry +{ + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnector; + ::com::sun::star::awt::Point maPointA; + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnectToA; + ::com::sun::star::awt::Point maPointB; + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnectToB; + + sal_uInt32 GetConnectorRule( sal_Bool bFirst ); + + EscherConnectorListEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rC, + const ::com::sun::star::awt::Point& rPA, + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rSA , + const ::com::sun::star::awt::Point& rPB, + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rSB ) : + mXConnector ( rC ), + maPointA ( rPA ), + mXConnectToA( rSA ), + maPointB ( rPB ), + mXConnectToB( rSB ) {} + + sal_uInt32 GetClosestPoint( const Polygon& rPoly, const ::com::sun::star::awt::Point& rP ); +}; + struct SVX_DLLPUBLIC EscherExContainer { sal_uInt32 nContPos; @@ -1108,8 +1135,19 @@ public: #define ESCHER_CREATEPOLYGON_POLYLINE 2 #define ESCHER_CREATEPOLYGON_POLYPOLYGON 4 -struct EscherPropSortStruct; class GraphicAttr; +class SdrObjCustomShape; + +struct EscherPropSortStruct +{ + sal_uInt8* pBuf; + sal_uInt32 nPropSize; + sal_uInt32 nPropValue; + sal_uInt16 nPropId; +}; + +typedef std::vector< EscherPropSortStruct > EscherProperties; + class SVX_DLLPUBLIC EscherPropertyContainer { EscherGraphicProvider* pGraphicProvider; @@ -1155,6 +1193,10 @@ class SVX_DLLPUBLIC EscherPropertyContainer sal_Bool GetOpt( sal_uInt16 nPropertyID, sal_uInt32& rPropValue ) const; + sal_Bool GetOpt( sal_uInt16 nPropertyID, EscherPropSortStruct& rPropValue ) const; + + EscherProperties GetOpts() const; + void Commit( SvStream& rSt, sal_uInt16 nVersion = 3, sal_uInt16 nRecType = ESCHER_OPT ); sal_Bool CreateOLEGraphicProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXOleObject ); @@ -1202,6 +1244,14 @@ class SVX_DLLPUBLIC EscherPropertyContainer static PolyPolygon GetPolyPolygon( const ::com::sun::star::uno::Any& rSource ); static MSO_SPT GetCustomShapeType( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape, sal_uInt32& nMirrorFlags ); static MSO_SPT GetCustomShapeType( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape, sal_uInt32& nMirrorFlags, rtl::OUString& rShapeType ); + + // helper functions which are also used in ooxml export + static sal_Bool GetLineArrow( const sal_Bool bLineStart, + const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet, + ESCHER_LineEnd& reLineEnd, sal_Int32& rnArrowLength, sal_Int32& rnArrowWidth ); + static sal_Bool IsDefaultObject( SdrObjCustomShape* pCustoShape ); + static void LookForPolarHandles( const MSO_SPT eShapeType, sal_Int32& nAdjustmentsWhichNeedsToBeConverted ); + static sal_Bool GetAdjustmentValue( const com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue & rkProp, sal_Int32 nIndex, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, sal_Int32& nValue ); }; // --------------------------------------------------------------------------------------------- @@ -1338,7 +1388,7 @@ class SVX_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGraphicPr BOOL mbOleEmf; // OLE is EMF instead of WMF - BOOL DoSeek( UINT32 nKey ); + virtual BOOL DoSeek( UINT32 nKey ); public: @@ -1349,7 +1399,7 @@ class SVX_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGraphicPr /// Wenn pPicStreamMergeBSE angegeben ist, werden die BLIPs /// aus diesem Stream in die MsofbtBSE Records des EscherStream /// gemerged, wie es fuer Excel (und Word?) benoetigt wird. - void Flush( SvStream* pPicStreamMergeBSE = NULL ); + virtual void Flush( SvStream* pPicStreamMergeBSE = NULL ); virtual ~EscherEx(); @@ -1360,13 +1410,13 @@ class SVX_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGraphicPr void InsertPersistOffset( UINT32 nKey, UINT32 nOffset ); // Es wird nicht geprueft, ob sich jener schluessel schon in der PersistantTable befindet BOOL SeekToPersistOffset( UINT32 nKey ); - BOOL InsertAtPersistOffset( UINT32 nKey, UINT32 nValue );// nValue wird im Stream an entrsprechender Stelle eingefuegt(overwrite modus), ohne dass sich die + virtual BOOL InsertAtPersistOffset( UINT32 nKey, UINT32 nValue );// nValue wird im Stream an entrsprechender Stelle eingefuegt(overwrite modus), ohne dass sich die // aktuelle StreamPosition aendert SvStream& GetStream() const { return *mpOutStrm; } ULONG GetStreamPos() const { return mpOutStrm->Tell(); } - BOOL SeekBehindRecHeader( UINT16 nRecType ); // der stream muss vor einem gueltigen Record Header oder Atom stehen + virtual BOOL SeekBehindRecHeader( UINT16 nRecType ); // der stream muss vor einem gueltigen Record Header oder Atom stehen // features beim erzeugen folgender Container: // @@ -1378,23 +1428,26 @@ class SVX_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGraphicPr virtual void OpenContainer( UINT16 nEscherContainer, int nRecInstance = 0 ); virtual void CloseContainer(); - void BeginAtom(); - void EndAtom( UINT16 nRecType, int nRecVersion = 0, int nRecInstance = 0 ); - void AddAtom( UINT32 nAtomSitze, UINT16 nRecType, int nRecVersion = 0, int nRecInstance = 0 ); - void AddClientAnchor( const Rectangle& rRectangle ); + virtual void BeginAtom(); + virtual void EndAtom( UINT16 nRecType, int nRecVersion = 0, int nRecInstance = 0 ); + virtual void AddAtom( UINT32 nAtomSitze, UINT16 nRecType, int nRecVersion = 0, int nRecInstance = 0 ); + virtual void AddChildAnchor( const Rectangle& rRectangle ); + virtual void AddClientAnchor( const Rectangle& rRectangle ); - UINT32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 ); + virtual UINT32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 ); UINT32 EnterGroup( const Rectangle* pBoundRect = NULL ); UINT32 GetGroupLevel() const { return mnGroupLevel; }; - BOOL SetGroupSnapRect( UINT32 nGroupLevel, const Rectangle& rRect ); - BOOL SetGroupLogicRect( UINT32 nGroupLevel, const Rectangle& rRect ); - void LeaveGroup(); + virtual BOOL SetGroupSnapRect( UINT32 nGroupLevel, const Rectangle& rRect ); + virtual BOOL SetGroupLogicRect( UINT32 nGroupLevel, const Rectangle& rRect ); + virtual void LeaveGroup(); // ein ESCHER_Sp wird geschrieben ( Ein ESCHER_DgContainer muss dazu geoeffnet sein !!) - void AddShape( UINT32 nShpInstance, UINT32 nFlagIds, UINT32 nShapeID = 0 ); + virtual void AddShape( UINT32 nShpInstance, UINT32 nFlagIds, UINT32 nShapeID = 0 ); // reserviert eine ShapeId UINT32 GetShapeID(); + virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect ); + UINT32 GetColor( const UINT32 nColor, BOOL bSwap = TRUE ); UINT32 GetColor( const Color& rColor, BOOL bSwap = TRUE ); diff --git a/svx/inc/svx/fntctrl.hxx b/svx/inc/svx/fntctrl.hxx index d87d75ab3690..a0de3b2d3048 100644 --- a/svx/inc/svx/fntctrl.hxx +++ b/svx/inc/svx/fntctrl.hxx @@ -71,6 +71,7 @@ public: SvxFont& GetCJKFont(); SvxFont& GetCTLFont(); void SetColor( const Color& rColor ); + void ResetColor(); void SetBackColor( const Color& rColor ); void UseResourceText( BOOL bUse = TRUE ); void Paint( const Rectangle& ); diff --git a/svx/inc/svx/framelink.hxx b/svx/inc/svx/framelink.hxx index 257816fd9c5c..012e0f103ac3 100644 --- a/svx/inc/svx/framelink.hxx +++ b/svx/inc/svx/framelink.hxx @@ -325,7 +325,7 @@ inline double GetVerDiagAngle( const Rectangle& rRect ) @param fAngle Inner (right) angle between diagonal and horizontal frame border. */ -long GetTLDiagOffset( long nVerOffs, long nDiagOffs, double fAngle ); +SVX_DLLPUBLIC long GetTLDiagOffset( long nVerOffs, long nDiagOffs, double fAngle ); /** Returns an X coordinate for a diagonal frame border in the specified height. @@ -434,7 +434,7 @@ long GetTRDiagOffset( long nVerOffs, long nDiagOffs, double fAngle ); True, if rLBorder and rRBorder can be drawn in one step without interruption at their connection point. */ -bool CheckFrameBorderConnectable( +SVX_DLLPUBLIC bool CheckFrameBorderConnectable( const Style& rLBorder, /// Style of the left frame border to connect. const Style& rRBorder, /// Style of the right frame border to connect. @@ -486,7 +486,7 @@ bool CheckFrameBorderConnectable( | \ / | rLFromB \ / rRFromB */ -void DrawHorFrameBorder( +SVX_DLLPUBLIC void DrawHorFrameBorder( OutputDevice& rDev, /// The output device used to draw the frame border. const Point& rLPos, /// Reference point for left end of the processed frame border. @@ -603,7 +603,7 @@ void SVX_DLLPUBLIC DrawHorFrameBorder( rBFromB | */ -void DrawVerFrameBorder( +SVX_DLLPUBLIC void DrawVerFrameBorder( OutputDevice& rDev, /// The output device used to draw the frame border. const Point& rTPos, /// Reference point for top end of the processed frame border. @@ -698,7 +698,7 @@ void SVX_DLLPUBLIC DrawVerFrameBorderSlanted( The function preserves all settings of the passed output device. */ -void DrawDiagFrameBorders( +SVX_DLLPUBLIC void DrawDiagFrameBorders( OutputDevice& rDev, /// The output device used to draw the frame border. const Rectangle& rRect, /// Rectangle for both diagonal frame borders. diff --git a/svx/inc/svx/msdffimp.hxx b/svx/inc/svx/msdffimp.hxx index a172add3ddb4..248a31dcf71f 100644 --- a/svx/inc/svx/msdffimp.hxx +++ b/svx/inc/svx/msdffimp.hxx @@ -36,9 +36,7 @@ #include <tools/solar.h> // UINTXX #include <svtools/svarray.hxx> -#ifndef _SV_COLOR_HXX //autogen #include <tools/color.hxx> -#endif #include <tools/gen.hxx> #include <tools/table.hxx> #include <svx/msdffdef.hxx> @@ -48,7 +46,7 @@ #include <map> #include <com/sun/star/beans/XPropertySet.hpp> -#include "svx/svxdllapi.h" +#include <svx/svxdllapi.h> #include <sot/storage.hxx> diff --git a/svx/inc/svx/obj3d.hxx b/svx/inc/svx/obj3d.hxx index 6d77b0612e90..46c79b45e4d1 100644 --- a/svx/inc/svx/obj3d.hxx +++ b/svx/inc/svx/obj3d.hxx @@ -92,8 +92,8 @@ class E3dObjList : public SdrObjList public: TYPEINFO(); E3dObjList(SdrModel* pNewModel = 0, SdrPage* pNewPage = 0, E3dObjList* pNewUpList = 0); - E3dObjList(const E3dObjList& rSrcList); - virtual ~E3dObjList(); + SVX_DLLPUBLIC E3dObjList(const E3dObjList& rSrcList); + SVX_DLLPUBLIC virtual ~E3dObjList(); virtual void NbcInsertObject(SdrObject* pObj, ULONG nPos=CONTAINER_APPEND, const SdrInsertReason* pReason=NULL); virtual void InsertObject(SdrObject* pObj, ULONG nPos=CONTAINER_APPEND, const SdrInsertReason* pReason=NULL); diff --git a/svx/inc/svx/sdasaitm.hxx b/svx/inc/svx/sdasaitm.hxx index b945a8341808..2301e0021b42 100644 --- a/svx/inc/svx/sdasaitm.hxx +++ b/svx/inc/svx/sdasaitm.hxx @@ -54,9 +54,9 @@ class SdrCustomShapeAdjustmentItem : public SfxPoolItem public : TYPEINFO(); - SdrCustomShapeAdjustmentItem(); + SVX_DLLPUBLIC SdrCustomShapeAdjustmentItem(); SdrCustomShapeAdjustmentItem( SvStream& rIn, sal_uInt16 nVersion ); - ~SdrCustomShapeAdjustmentItem(); + SVX_DLLPUBLIC ~SdrCustomShapeAdjustmentItem(); virtual int operator==( const SfxPoolItem& ) const; virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePresentation, @@ -76,8 +76,8 @@ class SdrCustomShapeAdjustmentItem : public SfxPoolItem #endif sal_uInt32 GetCount() const { return aAdjustmentValueList.Count(); }; - const SdrCustomShapeAdjustmentValue& GetValue( sal_uInt32 nIndex ) const; - void SetValue( sal_uInt32 nIndex, + SVX_DLLPUBLIC const SdrCustomShapeAdjustmentValue& GetValue( sal_uInt32 nIndex ) const; + SVX_DLLPUBLIC void SetValue( sal_uInt32 nIndex, const SdrCustomShapeAdjustmentValue& rVal ); }; diff --git a/svx/inc/svx/sdgcpitm.hxx b/svx/inc/svx/sdgcpitm.hxx index 41efd3e7abee..4df0e005111d 100644 --- a/svx/inc/svx/sdgcpitm.hxx +++ b/svx/inc/svx/sdgcpitm.hxx @@ -38,7 +38,7 @@ // SdrGrafCropItem - //------------------ -class SdrGrafCropItem : public SvxGrfCrop +class SVX_DLLPUBLIC SdrGrafCropItem : public SvxGrfCrop { public: diff --git a/svx/inc/svx/sdr/animation/objectanimator.hxx b/svx/inc/svx/sdr/animation/objectanimator.hxx index 6f1b0900c030..3fcb52463bc8 100644 --- a/svx/inc/svx/sdr/animation/objectanimator.hxx +++ b/svx/inc/svx/sdr/animation/objectanimator.hxx @@ -48,7 +48,7 @@ namespace sdr public: // basic constructor and destructor primitiveAnimator(); - virtual ~primitiveAnimator(); + SVX_DLLPUBLIC virtual ~primitiveAnimator(); }; } // end of namespace animation } // end of namespace sdr diff --git a/svx/inc/svx/sdr/animation/scheduler.hxx b/svx/inc/svx/sdr/animation/scheduler.hxx index 589cbde9bd75..03fc8eccd9b4 100644 --- a/svx/inc/svx/sdr/animation/scheduler.hxx +++ b/svx/inc/svx/sdr/animation/scheduler.hxx @@ -33,6 +33,7 @@ #include <sal/types.h> #include <vcl/timer.hxx> +#include <svx/svxdllapi.h> ////////////////////////////////////////////////////////////////////////////// // event class @@ -52,7 +53,7 @@ namespace sdr public: // constructor/destructor Event(sal_uInt32 nTime); - virtual ~Event(); + SVX_DLLPUBLIC virtual ~Event(); // access to mpNext Event* GetNext() const; @@ -83,7 +84,7 @@ namespace sdr public: // constructor/destructor EventList(); - virtual ~EventList(); + SVX_DLLPUBLIC virtual ~EventList(); // insert/remove time dependent void Insert(Event* pNew); @@ -123,10 +124,10 @@ namespace sdr public: // constructor/destructor Scheduler(); - virtual ~Scheduler(); + SVX_DLLPUBLIC virtual ~Scheduler(); // From baseclass Timer, the timeout call - virtual void Timeout(); + SVX_DLLPUBLIC virtual void Timeout(); // get time sal_uInt32 GetTime(); diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx index d75c2bfa3919..27235de9e097 100644 --- a/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx +++ b/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx @@ -64,15 +64,15 @@ namespace sdr ViewContactOfSdrOle2Obj(SdrOle2Obj& rOle2Obj); virtual ~ViewContactOfSdrOle2Obj(); - // helper for creating a OLE sequence for this object for a specified Graphic. This is locally - // used from createViewIndependentPrimitive2DSequence and also allows the VOC which knows about - // HighContrast mode to easily do the same with the HighContrast OLE metafile. It also allows - // to give a hint for scaling down the content what is needed for EmptyPresObjs - drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceWithGivenGraphic(const Graphic& rOLEGraphic, bool bScaleContent) const; + // helper for creating a OLE sequence for this object. It takes care od attributes, needed + // scaling (e.g. for EmptyPresObj's), the correct graphic and other stuff. It is used from + // createViewIndependentPrimitive2DSequence with false, and with evtl. HighContrast true + // from the VOC which knows that + drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceWithParameters(bool bHighContrast) const; protected: // This method is responsible for creating the graphical visualisation data - // ONLY based on model data + // ONLY based on model data, just wraps to call createPrimitive2DSequenceWithParameters(false) virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const; }; } // end of namespace contact diff --git a/svx/inc/svx/sdr/overlay/overlayobject.hxx b/svx/inc/svx/sdr/overlay/overlayobject.hxx index e5aca5651976..ae31df8f6dee 100644 --- a/svx/inc/svx/sdr/overlay/overlayobject.hxx +++ b/svx/inc/svx/sdr/overlay/overlayobject.hxx @@ -133,8 +133,9 @@ namespace sdr OverlayManager* getOverlayManager() const { return mpOverlayManager; } // the access method for Primitive2DSequence. Will use createPrimitive2DSequence and - // setPrimitive2DSequence if needed - const drawinglayer::primitive2d::Primitive2DSequence& getOverlayObjectPrimitive2DSequence() const; + // setPrimitive2DSequence if needed. Overloading may be used to allow disposal of last + // created primitives to react on changed circumstances and to re-create primitives + virtual drawinglayer::primitive2d::Primitive2DSequence getOverlayObjectPrimitive2DSequence() const; // access to visibility state bool isVisible() const { return mbIsVisible; } diff --git a/svx/inc/svx/sdr/overlay/overlayselection.hxx b/svx/inc/svx/sdr/overlay/overlayselection.hxx new file mode 100644 index 000000000000..fe725a577eec --- /dev/null +++ b/svx/inc/svx/sdr/overlay/overlayselection.hxx @@ -0,0 +1,98 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlayline.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _SDR_OVERLAY_OVERLAYSELECTION_HXX +#define _SDR_OVERLAY_OVERLAYSELECTION_HXX + +#include <svx/sdr/overlay/overlayobject.hxx> +#include <vcl/region.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + // overlay type definition + enum OverlayType + { + OVERLAY_INVERT, + OVERLAY_SOLID, + OVERLAY_TRANSPARENT + }; + + class SVX_DLLPUBLIC OverlaySelection : public OverlayObject + { + protected: + // type of overlay + OverlayType meOverlayType; + + // geometry of overlay + std::vector< basegfx::B2DRange > maRanges; + + // Values of last primitive creation. These are checked in getOverlayObjectPrimitive2DSequence + // to evtl. get rid of last Primitive2DSequence. This ensures that these values are up-to-date + // and are usable when creating primitives + OverlayType maLastOverlayType; + sal_uInt16 mnLastTransparence; + + // bitfield + unsigned mbBorder : 1; + + // geometry creation for OverlayObject, can use local *Last* values + virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence(); + + public: + OverlaySelection( + OverlayType eType, + const Color& rColor, + const std::vector< basegfx::B2DRange >& rRanges, + bool bBorder); + virtual ~OverlaySelection(); + + // data read access + const OverlayType getOverlayType() const { return meOverlayType; } + const std::vector< basegfx::B2DRange >& getRanges() const { return maRanges; } + bool getBorder() const { return mbBorder; } + + // overloaded to check conditions for last createOverlayObjectPrimitive2DSequence + virtual drawinglayer::primitive2d::Primitive2DSequence getOverlayObjectPrimitive2DSequence() const; + + // data write access + void setRanges(const std::vector< basegfx::B2DRange >& rNew); + }; + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// + +#endif //_SDR_OVERLAY_OVERLAYSELECTION_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/primitiveFactory2d.hxx b/svx/inc/svx/sdr/primitive2d/primitiveFactory2d.hxx index 85368fc8db86..aa3785995b25 100644 --- a/svx/inc/svx/sdr/primitive2d/primitiveFactory2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/primitiveFactory2d.hxx @@ -36,6 +36,8 @@ #include <cppuhelper/compbase1.hxx> #include <comphelper/broadcasthelper.hxx> +#include <svx/svxdllapi.h> + ////////////////////////////////////////////////////////////////////////////// // UNO API helper methods @@ -43,7 +45,7 @@ namespace drawinglayer { namespace primitive2d { - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL XPrimitiveFactory2DProvider_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); + SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL XPrimitiveFactory2DProvider_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); } // end of namespace primitive2d } // end of namespace drawinglayer @@ -73,8 +75,8 @@ namespace drawinglayer virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XPrimitive2D > > SAL_CALL createPrimitivesFromXDrawPage( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& xDrawPage, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aParms ) throw (::com::sun::star::uno::RuntimeException); // UNO API helpers - static rtl::OUString getImplementationName_Static(); - static com::sun::star::uno::Sequence< rtl::OUString > getSupportedServiceNames_Static(); + SVX_DLLPUBLIC static rtl::OUString getImplementationName_Static(); + SVX_DLLPUBLIC static com::sun::star::uno::Sequence< rtl::OUString > getSupportedServiceNames_Static(); }; } // end of namespace primitive2d } // end of namespace drawinglayer diff --git a/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx index b5b8867b1ae5..01bb7794e9f3 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrcaptionprimitive2d.hxx @@ -76,7 +76,7 @@ namespace drawinglayer const ::basegfx::B2DPolygon& getTail() const { return maTail; } double getCornerRadiusX() const { return mfCornerRadiusX; } double getCornerRadiusY() const { return mfCornerRadiusY; } - bool hasCornerRadius() const { return (0.0 != mfCornerRadiusX || 0.0 != mfCornerRadiusY); } + bool isCornerRadiusUsed() const { return (0.0 != mfCornerRadiusX || 0.0 != mfCornerRadiusY); } // provide unique ID DeclPrimitrive2DIDBlock() diff --git a/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx b/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx index 2f4702e62b07..798e5b53d6de 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx @@ -77,8 +77,8 @@ namespace drawinglayer bool bCellText, bool bWordWrap); - Primitive2DReference createShadowPrimitive( - const Primitive2DSequence& rSource, + Primitive2DSequence createEmbeddedShadowPrimitive( + const Primitive2DSequence& rContent, const attribute::SdrShadowAttribute& rShadow); } // end of namespace primitive2d diff --git a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx index 7ee46630bf5b..1e68a61432a0 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx @@ -63,8 +63,8 @@ namespace drawinglayer { private: attribute::SdrLineShadowTextAttribute maSdrLSTAttribute; - ::basegfx::B2DPoint maStart; - ::basegfx::B2DPoint maEnd; + basegfx::B2DPoint maStart; + basegfx::B2DPoint maEnd; MeasureTextPosition meHorizontal; MeasureTextPosition meVertical; double mfDistance; @@ -80,9 +80,9 @@ namespace drawinglayer // internal decomposition helper Primitive2DReference impCreatePart( - const ::basegfx::B2DHomMatrix& rObjectMatrix, - const ::basegfx::B2DPoint& rStart, - const ::basegfx::B2DPoint& rEnd, + const basegfx::B2DHomMatrix& rObjectMatrix, + const basegfx::B2DPoint& rStart, + const basegfx::B2DPoint& rEnd, bool bLeftActive, bool bRightActive) const; @@ -93,7 +93,8 @@ namespace drawinglayer public: SdrMeasurePrimitive2D( const attribute::SdrLineShadowTextAttribute& rSdrLSTAttribute, - const ::basegfx::B2DPoint& rStart, const ::basegfx::B2DPoint& rEnd, + const basegfx::B2DPoint& rStart, + const basegfx::B2DPoint& rEnd, MeasureTextPosition eHorizontal, MeasureTextPosition eVertical, double fDistance, @@ -107,8 +108,8 @@ namespace drawinglayer // data access const attribute::SdrLineShadowTextAttribute& getSdrLSTAttribute() const { return maSdrLSTAttribute; } - const ::basegfx::B2DPoint& getStart() const { return maStart; } - const ::basegfx::B2DPoint& getEnd() const { return maEnd; } + const basegfx::B2DPoint& getStart() const { return maStart; } + const basegfx::B2DPoint& getEnd() const { return maEnd; } MeasureTextPosition getHorizontal() const { return meHorizontal; } MeasureTextPosition getVertical() const { return meVertical; } double getDistance() const { return mfDistance; } diff --git a/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx new file mode 100644 index 000000000000..70e28d599a44 --- /dev/null +++ b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx @@ -0,0 +1,89 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrcaptionprimitive2d.hxx,v $ + * + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX +#define INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX + +#include <drawinglayer/primitive2d/baseprimitive2d.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <svx/svdobj.hxx> + +////////////////////////////////////////////////////////////////////////////// +// predefinitions + +class SdrOle2Obj; + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + class SdrOleContentPrimitive2D : public BasePrimitive2D + { + private: + SdrObjectWeakRef mpSdrOle2Obj; + basegfx::B2DHomMatrix maObjectTransform; + + // bitfield + unsigned mbHighContrast : 1; + + protected: + // local decomposition. + virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; + + public: + SdrOleContentPrimitive2D( + const SdrOle2Obj& rSdrOle2Obj, + const basegfx::B2DHomMatrix& rObjectTransform, + bool bHighContrast); + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // The default implementation will use getDecomposition results to create the range + virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; + + // data access + const basegfx::B2DHomMatrix& getObjectTransform() const { return maObjectTransform; } + bool getHighContrast() const { return mbHighContrast; } + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_SDR_PRIMITIVE2D_SDROLECONTENTPRIMITIVE2D_HXX + +// eof diff --git a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx index 6a3983835ef9..650cc1a882c5 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx @@ -49,28 +49,35 @@ namespace drawinglayer class SdrRectanglePrimitive2D : public BasePrimitive2D { private: - ::basegfx::B2DHomMatrix maTransform; + basegfx::B2DHomMatrix maTransform; attribute::SdrLineFillShadowTextAttribute maSdrLFSTAttribute; double mfCornerRadiusX; // [0.0..1.0] relative to 1/2 width 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; + protected: // local decomposition. virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const; public: SdrRectanglePrimitive2D( - const ::basegfx::B2DHomMatrix& rTransform, + const basegfx::B2DHomMatrix& rTransform, const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, - double fCornerRadiusX = 0.0, - double fCornerRadiusY = 0.0); + double fCornerRadiusX, + double fCornerRadiusY, + bool bTextFrame); // data access - const ::basegfx::B2DHomMatrix& getTransform() const { return maTransform; } + const basegfx::B2DHomMatrix& getTransform() const { return maTransform; } const attribute::SdrLineFillShadowTextAttribute& getSdrLFSTAttribute() const { return maSdrLFSTAttribute; } double getCornerRadiusX() const { return mfCornerRadiusX; } double getCornerRadiusY() const { return mfCornerRadiusY; } - bool hasCornerRadius() const { return (0.0 != mfCornerRadiusX || 0.0 != mfCornerRadiusY); } + bool isCornerRadiusUsed() const { return (0.0 != mfCornerRadiusX || 0.0 != mfCornerRadiusY); } + bool getTextFrame() const { return mbTextFrame; } // compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; diff --git a/svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx b/svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx index 623158f21d68..d1b857f510c3 100644 --- a/svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx @@ -58,6 +58,7 @@ #define PRIMITIVE2D_ID_OVERLAYHELPLINESTRIPEDPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 19) #define PRIMITIVE2D_ID_OVERLAYROLLINGRECTANGLEPRIMITIVE (PRIMITIVE2D_ID_RANGE_SVX| 20) #define PRIMITIVE2D_ID_SDRCONTROLPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 21) +#define PRIMITIVE2D_ID_SDROLECONTENTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_SVX| 22) ////////////////////////////////////////////////////////////////////////////// diff --git a/svx/inc/svx/sdtfchim.hxx b/svx/inc/svx/sdtfchim.hxx index e52296dfe579..d8fa20507980 100644 --- a/svx/inc/svx/sdtfchim.hxx +++ b/svx/inc/svx/sdtfchim.hxx @@ -32,28 +32,28 @@ #include <svx/svddef.hxx> -class SdrTextFixedCellHeightItem : public SfxBoolItem +class SVX_DLLPUBLIC SdrTextFixedCellHeightItem : public SfxBoolItem { public: TYPEINFO(); SdrTextFixedCellHeightItem( BOOL bUseFixedCellHeight = FALSE ); - SdrTextFixedCellHeightItem( SvStream & rStream, sal_uInt16 nVersion ); + SVX_DLLPRIVATE SdrTextFixedCellHeightItem( SvStream & rStream, sal_uInt16 nVersion ); - virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePresentation, + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePresentation, SfxMapUnit eCoreMetric, SfxMapUnit ePresentationMetric, String &rText, const IntlWrapper * = 0) const; - virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nItem ) const; - virtual SvStream& Store( SvStream&, sal_uInt16 nVersion ) const; - virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; - virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream&, sal_uInt16 nItem ) const; + SVX_DLLPRIVATE virtual SvStream& Store( SvStream&, sal_uInt16 nVersion ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + SVX_DLLPRIVATE virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const; - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); #ifdef SDR_ISPOOLABLE - virtual int IsPoolable() const; + SVX_DLLPRIVATE virtual int IsPoolable() const; #endif }; diff --git a/svx/inc/svx/svdetc.hxx b/svx/inc/svx/svdetc.hxx index 493c8476c459..fb922a7d896c 100644 --- a/svx/inc/svx/svdetc.hxx +++ b/svx/inc/svx/svdetc.hxx @@ -81,7 +81,7 @@ friend class SdrAttrObj; Fraction aMapFraction; private: - SVX_DLLPRIVATE static SdrEngineDefaults& GetDefaults(); + static SdrEngineDefaults& GetDefaults(); public: SdrEngineDefaults(); @@ -272,7 +272,7 @@ protected: public: SdrLinkList(): aList(1024,4,4) {} ~SdrLinkList() { Clear(); } - void Clear(); + SVX_DLLPUBLIC void Clear(); unsigned GetLinkCount() const { return (unsigned)aList.Count(); } Link& GetLink(unsigned nNum) { return *((Link*)(aList.GetObject(nNum))); } const Link& GetLink(unsigned nNum) const { return *((Link*)(aList.GetObject(nNum))); } @@ -299,7 +299,7 @@ class OLEObjCache : public Container public: OLEObjCache(); - ~OLEObjCache(); + SVX_DLLPUBLIC ~OLEObjCache(); void SetSize(ULONG nNewSize); void InsertObj(SdrOle2Obj* pObj); diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx index 34c16511aacb..2873b77ac2ea 100644 --- a/svx/inc/svx/svdmodel.hxx +++ b/svx/inc/svx/svdmodel.hxx @@ -689,7 +689,7 @@ public: void SetModelStorage( SotStorage* pStor ) { pModelStorage = pStor; } ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getUnoModel(); - void setUnoModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xModel ) { mxUnoModel = xModel; } + void setUnoModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xModel ); // these functions are used by the api to disable repaints during a // set of api calls. diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx index 1344bff74413..faf1aa7055aa 100644 --- a/svx/inc/svx/svdoashp.hxx +++ b/svx/inc/svx/svdoashp.hxx @@ -105,7 +105,7 @@ private: // #i37011# render geometry shadow SdrObject* mpLastShadowGeometry; - static SVX_DLLPRIVATE com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeEngine > GetCustomShapeEngine( const SdrObjCustomShape* pCustomShape ); + static com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeEngine > GetCustomShapeEngine( const SdrObjCustomShape* pCustomShape ); // SVX_DLLPRIVATE com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeHandle > > // SdrObjCustomShape::GetInteraction( const SdrObjCustomShape* pCustomShape ) const; @@ -134,7 +134,7 @@ public: const SdrObject* GetSdrObjectShadowFromCustomShape() const; sal_Bool GetTextBounds( Rectangle& rTextBound ) const; sal_Bool IsTextPath() const; - static SVX_DLLPRIVATE basegfx::B2DPolyPolygon GetLineGeometry( const SdrObjCustomShape* pCustomShape, const sal_Bool bBezierAllowed ); + static basegfx::B2DPolyPolygon GetLineGeometry( const SdrObjCustomShape* pCustomShape, const sal_Bool bBezierAllowed ); protected: diff --git a/svx/inc/svx/svdoedge.hxx b/svx/inc/svx/svdoedge.hxx index 4fa4fd7c0d31..227afd9ab027 100644 --- a/svx/inc/svx/svdoedge.hxx +++ b/svx/inc/svx/svdoedge.hxx @@ -73,7 +73,7 @@ protected: public: SdrObjConnection() { ResetVars(); } - ~SdrObjConnection(); + SVX_DLLPUBLIC ~SdrObjConnection(); void ResetVars(); FASTBOOL TakeGluePoint(SdrGluePoint& rGP, FASTBOOL bSetAbsolutePos) const; diff --git a/svx/inc/svx/svdoole2.hxx b/svx/inc/svx/svdoole2.hxx index 605e9463bdab..2b5a19f7b60b 100644 --- a/svx/inc/svx/svdoole2.hxx +++ b/svx/inc/svx/svdoole2.hxx @@ -184,10 +184,8 @@ public: sal_Bool CalculateNewScaling( Fraction& aScaleWidth, Fraction& aScaleHeight, Size& aObjAreaSize ); sal_Bool AddOwnLightClient(); - bool executeOldDoPaintPreparations(SdrPageView* pPageVew) const; //remove me with the next incompatible build - // handy to get the empty replacement bitmap without accessing all the old stuff - Bitmap GetEmtyOLEReplacementBitmap() const; + static Bitmap GetEmtyOLEReplacementBitmap(); void SetWindow(const com::sun::star::uno::Reference < com::sun::star::awt::XWindow >& _xWindow); }; diff --git a/svx/inc/svx/svdotext.hxx b/svx/inc/svx/svdotext.hxx index 36afd7a670ab..5298fc2dd79b 100644 --- a/svx/inc/svx/svdotext.hxx +++ b/svx/inc/svx/svdotext.hxx @@ -259,7 +259,7 @@ protected: // Flag for allowing text animation. Default is sal_true. BOOL mbTextAnimationAllowed : 1; - SVX_DLLPRIVATE SdrOutliner& ImpGetDrawOutliner() const; + SdrOutliner& ImpGetDrawOutliner() const; private: SVX_DLLPRIVATE void ImpCheckMasterCachable(); diff --git a/svx/inc/svx/svdpntv.hxx b/svx/inc/svx/svdpntv.hxx index 8654e3a79db0..48523dc97c3b 100644 --- a/svx/inc/svx/svdpntv.hxx +++ b/svx/inc/svx/svdpntv.hxx @@ -109,7 +109,7 @@ namespace sdr //////////////////////////////////////////////////////////////////////////////////////////////////// -class SvxViewHint : public SfxHint +class SVX_DLLPUBLIC SvxViewHint : public SfxHint { public: enum HintType { SVX_HINT_VIEWCHANGED }; diff --git a/svx/inc/svx/svdundo.hxx b/svx/inc/svx/svdundo.hxx index 1b8c0f76b8b2..717b1a070c6f 100644 --- a/svx/inc/svx/svdundo.hxx +++ b/svx/inc/svx/svdundo.hxx @@ -484,6 +484,35 @@ public: virtual bool CanSdrRepeat(SdrView& rView) const; }; +// --> OD 2009-07-09 #i73249# +class SdrUndoObjStrAttr : public SdrUndoObj +{ +public: + enum ObjStrAttrType + { + OBJ_NAME, + OBJ_TITLE, + OBJ_DESCRIPTION + }; + +protected: + const ObjStrAttrType meObjStrAttr; + const String msOldStr; + const String msNewStr; + +public: + SdrUndoObjStrAttr( SdrObject& rNewObj, + const ObjStrAttrType eObjStrAttr, + const String& sOldStr, + const String& sNewStr); + + virtual void Undo(); + virtual void Redo(); + + virtual String GetComment() const; +}; +// <-- + //////////////////////////////////////////////////////////////////////////////////////////////////// // // @@ @@@@ @@ @@ @@@@@ @@@@@ @@ -754,7 +783,7 @@ protected: SdrUndoPageMasterPage(SdrPage& rChangedPage); public: - virtual ~SdrUndoPageMasterPage(); + SVX_DLLPUBLIC virtual ~SdrUndoPageMasterPage(); }; //************************************************************ @@ -827,6 +856,13 @@ public: virtual SdrUndoAction* CreateUndoObjectLayerChange( SdrObject& rObject, SdrLayerID aOldLayer, SdrLayerID aNewLayer ); virtual SdrUndoAction* CreateUndoObjectSetText( SdrObject& rNewObj, sal_Int32 nText ); + // --> OD 2009-07-09 #i73249# + virtual SdrUndoAction* CreateUndoObjectStrAttr( SdrObject& rObject, + SdrUndoObjStrAttr::ObjStrAttrType eObjStrAttrType, + String sOldStr, + String sNewStr ); + // <-- + // layer virtual SdrUndoAction* CreateUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel); virtual SdrUndoAction* CreateUndoDeleteLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel); diff --git a/svx/inc/svx/svx3ditems.hxx b/svx/inc/svx/svx3ditems.hxx index a77a9c3f8459..e956edb69803 100644 --- a/svx/inc/svx/svx3ditems.hxx +++ b/svx/inc/svx/svx3ditems.hxx @@ -48,12 +48,12 @@ public: class Svx3DBackscaleItem : public SfxUInt16Item { public: - Svx3DBackscaleItem(sal_uInt16 nVal = 100); + SVX_DLLPUBLIC Svx3DBackscaleItem(sal_uInt16 nVal = 100); }; class Svx3DDepthItem : public SfxUInt32Item { public: - Svx3DDepthItem(sal_uInt32 nVal = 1000); + SVX_DLLPUBLIC Svx3DDepthItem(sal_uInt32 nVal = 1000); }; class SVX_DLLPUBLIC Svx3DHorizontalSegmentsItem : public SfxUInt32Item { @@ -63,12 +63,12 @@ public: class Svx3DVerticalSegmentsItem : public SfxUInt32Item { public: - Svx3DVerticalSegmentsItem(sal_uInt32 nVal = 24); + SVX_DLLPUBLIC Svx3DVerticalSegmentsItem(sal_uInt32 nVal = 24); }; class Svx3DEndAngleItem : public SfxUInt32Item { public: - Svx3DEndAngleItem(sal_uInt32 nVal = 3600); + SVX_DLLPUBLIC Svx3DEndAngleItem(sal_uInt32 nVal = 3600); }; class SVX_DLLPUBLIC Svx3DDoubleSidedItem : public SfxBoolItem { @@ -85,29 +85,29 @@ public: virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const; }; -class Svx3DNormalsKindItem : public SfxUInt16Item { +class SVX_DLLPUBLIC Svx3DNormalsKindItem : public SfxUInt16Item { public: Svx3DNormalsKindItem(sal_uInt16 nVal = 0); // use drawing::NormalsKind - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; + SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; }; class Svx3DNormalsInvertItem : public SfxBoolItem { public: - Svx3DNormalsInvertItem(BOOL bVal = 0); + SVX_DLLPUBLIC Svx3DNormalsInvertItem(BOOL bVal = 0); }; -class Svx3DTextureProjectionXItem : public SfxUInt16Item { +class SVX_DLLPUBLIC Svx3DTextureProjectionXItem : public SfxUInt16Item { public: Svx3DTextureProjectionXItem(sal_uInt16 nVal = 0); // use drawing::TextureProjectionMode - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; + SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; }; class SVX_DLLPUBLIC Svx3DTextureProjectionYItem : public SfxUInt16Item { @@ -122,7 +122,7 @@ public: class Svx3DShadow3DItem : public SfxBoolItem { public: - Svx3DShadow3DItem(BOOL bVal = 0); + SVX_DLLPUBLIC Svx3DShadow3DItem(BOOL bVal = 0); }; class Svx3DMaterialColorItem : public SvxColorItem { @@ -132,68 +132,68 @@ public: class Svx3DMaterialEmissionItem : public SvxColorItem { public: - Svx3DMaterialEmissionItem(const Color& rCol = Color(0x00000000)); + SVX_DLLPUBLIC Svx3DMaterialEmissionItem(const Color& rCol = Color(0x00000000)); }; class Svx3DMaterialSpecularItem : public SvxColorItem { public: - Svx3DMaterialSpecularItem(const Color& rCol = Color(0x00ffffff)); + SVX_DLLPUBLIC Svx3DMaterialSpecularItem(const Color& rCol = Color(0x00ffffff)); }; class Svx3DMaterialSpecularIntensityItem : public SfxUInt16Item { public: - Svx3DMaterialSpecularIntensityItem(sal_uInt16 nVal = 15); + SVX_DLLPUBLIC Svx3DMaterialSpecularIntensityItem(sal_uInt16 nVal = 15); }; -class Svx3DTextureKindItem : public SfxUInt16Item { +class SVX_DLLPUBLIC Svx3DTextureKindItem : public SfxUInt16Item { public: Svx3DTextureKindItem(sal_uInt16 nVal = 3); // use drawing::TextureKind - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; + SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; }; -class Svx3DTextureModeItem : public SfxUInt16Item { +class SVX_DLLPUBLIC Svx3DTextureModeItem : public SfxUInt16Item { public: Svx3DTextureModeItem(sal_uInt16 nVal = 2); // use drawing:TextureMode - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; + SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; }; class Svx3DTextureFilterItem : public SfxBoolItem { public: - Svx3DTextureFilterItem(BOOL bVal = 0); + SVX_DLLPUBLIC Svx3DTextureFilterItem(BOOL bVal = 0); }; // Svx3D _3DSCENE_ Items -class Svx3DPerspectiveItem : public SfxUInt16Item { +class SVX_DLLPUBLIC Svx3DPerspectiveItem : public SfxUInt16Item { public: Svx3DPerspectiveItem(sal_uInt16 nVal = (sal_uInt16)PR_PERSPECTIVE); // use drawing::ProjectionMode - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; + SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; }; class Svx3DDistanceItem : public SfxUInt32Item { public: - Svx3DDistanceItem(sal_uInt32 nVal = 100); + SVX_DLLPUBLIC Svx3DDistanceItem(sal_uInt32 nVal = 100); }; class Svx3DFocalLengthItem : public SfxUInt32Item { public: - Svx3DFocalLengthItem(sal_uInt32 nVal = 100); + SVX_DLLPUBLIC Svx3DFocalLengthItem(sal_uInt32 nVal = 100); }; class Svx3DTwoSidedLightingItem : public SfxBoolItem { public: - Svx3DTwoSidedLightingItem(BOOL bVal = 0); + SVX_DLLPUBLIC Svx3DTwoSidedLightingItem(BOOL bVal = 0); }; class SVX_DLLPUBLIC Svx3DLightcolor1Item : public SvxColorItem { @@ -323,17 +323,17 @@ public: class Svx3DShadowSlantItem : public SfxUInt16Item { public: - Svx3DShadowSlantItem(sal_uInt16 nVal = 0); + SVX_DLLPUBLIC Svx3DShadowSlantItem(sal_uInt16 nVal = 0); }; -class Svx3DShadeModeItem : public SfxUInt16Item { +class SVX_DLLPUBLIC Svx3DShadeModeItem : public SfxUInt16Item { public: Svx3DShadeModeItem(sal_uInt16 nVal = 2); // use drawing::ShadeMode - virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; - virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); - virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; + SVX_DLLPRIVATE virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const; + SVX_DLLPRIVATE virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ); + SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = NULL) const; }; ////////////////////////////////////////////////////////////////////////////// @@ -362,19 +362,19 @@ public: }; // #107245# Item to replace bExtrudeCloseFront and bLatheCloseFront -class Svx3DCloseFrontItem : public SfxBoolItem { +class SVX_DLLPUBLIC Svx3DCloseFrontItem : public SfxBoolItem { public: Svx3DCloseFrontItem(BOOL bVal = 1); - virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const; - virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const; + SVX_DLLPRIVATE virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const; }; // #107245# Item to replace bExtrudeCloseBack and bLatheCloseBack -class Svx3DCloseBackItem : public SfxBoolItem { +class SVX_DLLPUBLIC Svx3DCloseBackItem : public SfxBoolItem { public: Svx3DCloseBackItem(BOOL bVal = 1); - virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const; - virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const; + SVX_DLLPRIVATE virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const; }; #endif // _SVX3DITEMS_HXX diff --git a/svx/inc/svx/svxdlg.hxx b/svx/inc/svx/svxdlg.hxx index 233c7956f18a..e4b3b6152022 100644 --- a/svx/inc/svx/svxdlg.hxx +++ b/svx/inc/svx/svxdlg.hxx @@ -347,6 +347,13 @@ public: virtual sal_Int32 getColumns() const = 0; }; +class SvxAbstractInsRowColDlg : public VclAbstractDialog +{ +public: + virtual bool isInsertBefore() const = 0; + virtual sal_uInt16 getInsertCount() const = 0; +}; + //------------------------------------------------------------- class SVX_DLLPUBLIC SvxAbstractDialogFactory : public SfxAbstractDialogFactory @@ -543,6 +550,8 @@ public: virtual SvxAbstractSplittTableDialog* CreateSvxSplittTableDialog( Window* pParent, bool bIsTableVertical, long nMaxVertical, long nMaxHorizontal )=0; virtual SvxAbstractNewTableDialog* CreateSvxNewTableDialog( Window* pParent ) = 0; + + virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId ) = 0; }; #endif diff --git a/svx/inc/svx/svxfont.hxx b/svx/inc/svx/svxfont.hxx index b0165d73f978..cab43c06628c 100644 --- a/svx/inc/svx/svxfont.hxx +++ b/svx/inc/svx/svxfont.hxx @@ -70,7 +70,8 @@ public: inline void SetCaseMap( const SvxCaseMap eNew ) { eCaseMap = eNew; } inline LanguageType GetLanguage() const { return eLang; } - inline void SetLanguage( const LanguageType eNewLan ) { eLang = eNewLan; } + inline void SetLanguage( const LanguageType eNewLan ) + { eLang = eNewLan; Font::SetLanguage(eNewLan); } // Is-Methoden: inline BOOL IsCaseMap() const { return SVX_CASEMAP_NOT_MAPPED != eCaseMap; } diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc index d7c018bedaac..6019c3590d55 100644 --- a/svx/inc/svx/svxids.hrc +++ b/svx/inc/svx/svxids.hrc @@ -831,7 +831,11 @@ #define SID_OFASLOTS_START ( SID_SVX_START + 425 ) //#define SID_SD_AUTOPILOT ( SID_SVX_START + 425 ) -> sfxsids.hrc #define SID_AUTOPILOT SID_SD_AUTOPILOT -// 4 defines of Writer's old wizards have been removed here + +#define SID_TABLE_INSERT_COL_DLG ( SID_SVX_START + 426 ) +#define SID_TABLE_INSERT_ROW_DLG ( SID_SVX_START + 427 ) +#define SID_TABLE_PARAM_INSERT_AFTER ( SID_SVX_START + 428 ) + #define SID_TABLEDESIGN ( SID_SVX_START + 429 ) #define SID_MN_AUTOPILOT ( SID_SVX_START + 430 ) #define SID_GENERAL_OPTIONS ( SID_SVX_START + 432 ) diff --git a/svx/inc/svx/sxfiitm.hxx b/svx/inc/svx/sxfiitm.hxx index 27690098aad6..3228dee660e7 100644 --- a/svx/inc/svx/sxfiitm.hxx +++ b/svx/inc/svx/sxfiitm.hxx @@ -40,7 +40,7 @@ class SdrFractionItem: public SfxPoolItem { Fraction nValue; public: - TYPEINFO(); + TYPEINFO_VISIBILITY( SVX_DLLPUBLIC ); SdrFractionItem(USHORT nId=0): SfxPoolItem(nId) {} SdrFractionItem(USHORT nId, const Fraction& rVal): SfxPoolItem(nId), nValue(rVal) {} SdrFractionItem(USHORT nId, SvStream& rIn); diff --git a/svx/inc/svx/unoedsrc.hxx b/svx/inc/svx/unoedsrc.hxx index 3eafa5795893..a4777b6469b4 100644 --- a/svx/inc/svx/unoedsrc.hxx +++ b/svx/inc/svx/unoedsrc.hxx @@ -31,6 +31,8 @@ #ifndef _SVX_UNOEDSRC_HXX #define _SVX_UNOEDSRC_HXX +#include <com/sun/star/accessibility/TextSegment.hpp> + #include <tools/solar.h> #include <i18npool/lang.h> #include <tools/link.hxx> @@ -358,6 +360,36 @@ public: */ virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const = 0; + /** Query bounds of line in paragraph + + @param rStart [output param; 0 .. text_len] + The index in the paragraph text that belongs to the chara at the start of the line + + @param rEnd [output param; 0 .. text_len] + The index in the paragraph text that follows the last chara in the line + + @param nParagraph[0 .. n-1] + Index of paragraph to query line length in + + @param nLine[0 .. m-1] + Index of line in paragraph to query line length of + + */ + virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const = 0; + + /** Query the line number for a index in the paragraphs text + + @param nPara[0 .. n-1] + Index of paragraph to query line length in + + @param nIndex[0 .. m-1] + Index of of the chara in the paragraph text + + @returns [0 .. k-1] + The line number of the chara in the paragraph + */ + virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const = 0; + /** Delete given text range and reformat text @param rSelection diff --git a/svx/inc/svx/unofored.hxx b/svx/inc/svx/unofored.hxx index e912e5e4e593..a9c72f766a35 100644 --- a/svx/inc/svx/unofored.hxx +++ b/svx/inc/svx/unofored.hxx @@ -81,6 +81,8 @@ public: virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; virtual USHORT GetLineCount( USHORT nPara ) const; virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; + virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; + virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); diff --git a/svx/inc/svx/unoforou.hxx b/svx/inc/svx/unoforou.hxx index 91ef33cae3b7..75adcc620a47 100644 --- a/svx/inc/svx/unoforou.hxx +++ b/svx/inc/svx/unoforou.hxx @@ -102,6 +102,8 @@ public: virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; virtual USHORT GetLineCount( USHORT nPara ) const; virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; + virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const; + virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); diff --git a/svx/inc/svx/unoprov.hxx b/svx/inc/svx/unoprov.hxx index 319a587b59ff..ebe1e375f58c 100644 --- a/svx/inc/svx/unoprov.hxx +++ b/svx/inc/svx/unoprov.hxx @@ -166,7 +166,7 @@ namespace comphelper { class PropertySetInfo; } class SvxPropertySetInfoPool { public: - static comphelper::PropertySetInfo* getOrCreate( sal_Int32 nServiceId ) throw(); + SVX_DLLPUBLIC static comphelper::PropertySetInfo* getOrCreate( sal_Int32 nServiceId ) throw(); private: static comphelper::PropertySetInfo* mpInfos[SVXUNO_SERVICEID_LASTID+1]; diff --git a/svx/inc/svx/unoshtxt.hxx b/svx/inc/svx/unoshtxt.hxx index e8d8e2b76f6c..6027191d222e 100644 --- a/svx/inc/svx/unoshtxt.hxx +++ b/svx/inc/svx/unoshtxt.hxx @@ -35,9 +35,14 @@ #include <svx/unoedsrc.hxx> #include "svx/svxdllapi.h" -namespace com { namespace sun { namespace star { namespace uno { - class XInterface; -} } } } +namespace com { namespace sun { namespace star { + namespace uno { + class XInterface; + } + namespace accessibility { + struct TextSegment; + } +} } } class SvxTextForwarder; class SdrObject; @@ -80,7 +85,7 @@ public: // static sal_Bool hasLevels( const SdrObject* pObject ); - // the viewforwarder interface + // the SvxViewForwarder interface virtual BOOL IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point&, const MapMode& ) const; diff --git a/svx/inc/svx/unotext.hxx b/svx/inc/svx/unotext.hxx index 1a5b446be144..63ce0a28b739 100644 --- a/svx/inc/svx/unotext.hxx +++ b/svx/inc/svx/unotext.hxx @@ -231,6 +231,8 @@ public: virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; virtual USHORT GetLineCount( USHORT nPara ) const; virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; + virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; + virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); @@ -673,9 +675,9 @@ public: }; -const SvxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSvxPropertySet(); -const SfxItemPropertyMapEntry* ImplGetSvxUnoOutlinerTextCursorPropertyMap(); -const SvxItemPropertySet* ImplGetSvxTextPortionSvxPropertySet(); -const SfxItemPropertyMapEntry* ImplGetSvxTextPortionPropertyMap(); +SVX_DLLPUBLIC const SvxItemPropertySet* ImplGetSvxUnoOutlinerTextCursorSvxPropertySet(); +SVX_DLLPUBLIC const SfxItemPropertyMapEntry* ImplGetSvxUnoOutlinerTextCursorPropertyMap(); +SVX_DLLPUBLIC const SvxItemPropertySet* ImplGetSvxTextPortionSvxPropertySet(); +SVX_DLLPUBLIC const SfxItemPropertyMapEntry* ImplGetSvxTextPortionPropertyMap(); #endif diff --git a/svx/inc/svx/xflbckit.hxx b/svx/inc/svx/xflbckit.hxx index 8f4de04218df..2744982b8639 100644 --- a/svx/inc/svx/xflbckit.hxx +++ b/svx/inc/svx/xflbckit.hxx @@ -46,13 +46,13 @@ public: TYPEINFO(); XFillBackgroundItem( BOOL bFill = FALSE ); - XFillBackgroundItem( SvStream& rIn ); + SVX_DLLPRIVATE XFillBackgroundItem( SvStream& rIn ); - virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; - virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = NULL ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; diff --git a/svx/inc/svx/xflbmpit.hxx b/svx/inc/svx/xflbmpit.hxx index ff15f038dcd3..42117613cba4 100644 --- a/svx/inc/svx/xflbmpit.hxx +++ b/svx/inc/svx/xflbmpit.hxx @@ -45,18 +45,18 @@ class SVX_DLLPUBLIC XFillBmpPosItem : public SfxEnumItem public: TYPEINFO(); XFillBmpPosItem( RECT_POINT eRP = RP_MM ); - XFillBmpPosItem( SvStream& rIn ); + SVX_DLLPRIVATE XFillBmpPosItem( SvStream& rIn ); - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual USHORT GetValueCount() const; - RECT_POINT GetValue() const { return (RECT_POINT) SfxEnumItem::GetValue(); } + SVX_DLLPRIVATE virtual USHORT GetValueCount() const; + SVX_DLLPRIVATE RECT_POINT GetValue() const { return (RECT_POINT) SfxEnumItem::GetValue(); } }; diff --git a/svx/inc/svx/xflbmsli.hxx b/svx/inc/svx/xflbmsli.hxx index f57f4dc811d1..332bbf9792b7 100644 --- a/svx/inc/svx/xflbmsli.hxx +++ b/svx/inc/svx/xflbmsli.hxx @@ -45,12 +45,12 @@ class SVX_DLLPUBLIC XFillBmpSizeLogItem : public SfxBoolItem public: TYPEINFO(); XFillBmpSizeLogItem( BOOL bLog = TRUE ); - XFillBmpSizeLogItem( SvStream& rIn ); + SVX_DLLPRIVATE XFillBmpSizeLogItem( SvStream& rIn ); - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; diff --git a/svx/inc/svx/xflbmsxy.hxx b/svx/inc/svx/xflbmsxy.hxx index c9da8290daa0..78263dd2c5e3 100644 --- a/svx/inc/svx/xflbmsxy.hxx +++ b/svx/inc/svx/xflbmsxy.hxx @@ -45,12 +45,12 @@ class SVX_DLLPUBLIC XFillBmpSizeXItem : public SfxMetricItem public: TYPEINFO(); XFillBmpSizeXItem( long nSizeX = 0 ); - XFillBmpSizeXItem( SvStream& rIn ); + SVX_DLLPRIVATE XFillBmpSizeXItem( SvStream& rIn ); - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; @@ -58,7 +58,7 @@ public: // Dieses Item nimmt sowohl metrische als auch // Prozentwerte ( sind negativ ) auf; das muessen // wir hier beruecksichtigen - virtual FASTBOOL HasMetrics() const; + SVX_DLLPRIVATE virtual FASTBOOL HasMetrics() const; }; /************************************************************************* @@ -72,12 +72,12 @@ class SVX_DLLPUBLIC XFillBmpSizeYItem : public SfxMetricItem public: TYPEINFO(); XFillBmpSizeYItem( long nSizeY = 0 ); - XFillBmpSizeYItem( SvStream& rIn ); + SVX_DLLPRIVATE XFillBmpSizeYItem( SvStream& rIn ); - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; @@ -85,7 +85,7 @@ public: // Dieses Item nimmt sowohl metrische als auch // Prozentwerte ( sind negativ ) auf; das muessen // wir hier beruecksichtigen - virtual FASTBOOL HasMetrics() const; + SVX_DLLPRIVATE virtual FASTBOOL HasMetrics() const; }; #endif diff --git a/svx/inc/svx/xflboxy.hxx b/svx/inc/svx/xflboxy.hxx index 6e9024399ef0..9f0c37f9b6b3 100644 --- a/svx/inc/svx/xflboxy.hxx +++ b/svx/inc/svx/xflboxy.hxx @@ -45,12 +45,12 @@ class SVX_DLLPUBLIC XFillBmpPosOffsetXItem : public SfxUInt16Item public: TYPEINFO(); XFillBmpPosOffsetXItem( USHORT nOffPosX = 0 ); - XFillBmpPosOffsetXItem( SvStream& rIn ); + SVX_DLLPRIVATE XFillBmpPosOffsetXItem( SvStream& rIn ); - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; @@ -68,12 +68,12 @@ class SVX_DLLPUBLIC XFillBmpPosOffsetYItem : public SfxUInt16Item public: TYPEINFO(); XFillBmpPosOffsetYItem( USHORT nOffPosY = 0 ); - XFillBmpPosOffsetYItem( SvStream& rIn ); + SVX_DLLPRIVATE XFillBmpPosOffsetYItem( SvStream& rIn ); - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; diff --git a/svx/inc/svx/xflbtoxy.hxx b/svx/inc/svx/xflbtoxy.hxx index e01eb79ff146..828435432bb1 100644 --- a/svx/inc/svx/xflbtoxy.hxx +++ b/svx/inc/svx/xflbtoxy.hxx @@ -45,12 +45,12 @@ class SVX_DLLPUBLIC XFillBmpTileOffsetXItem : public SfxUInt16Item public: TYPEINFO(); XFillBmpTileOffsetXItem( USHORT nOffX = 0 ); - XFillBmpTileOffsetXItem( SvStream& rIn ); + SVX_DLLPRIVATE XFillBmpTileOffsetXItem( SvStream& rIn ); - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; @@ -68,12 +68,12 @@ class SVX_DLLPUBLIC XFillBmpTileOffsetYItem : public SfxUInt16Item public: TYPEINFO(); XFillBmpTileOffsetYItem( USHORT nOffX = 0 ); - XFillBmpTileOffsetYItem( SvStream& rIn ); + SVX_DLLPRIVATE XFillBmpTileOffsetYItem( SvStream& rIn ); - virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; - virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create( SvStream& rIn, USHORT nVer ) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; diff --git a/svx/inc/svx/xsflclit.hxx b/svx/inc/svx/xsflclit.hxx index 0b065597fc8f..802d247180a8 100644 --- a/svx/inc/svx/xsflclit.hxx +++ b/svx/inc/svx/xsflclit.hxx @@ -36,24 +36,24 @@ //------------------------------ // class XSecondaryFillColorItem //------------------------------ -class XSecondaryFillColorItem : public XColorItem +class SVX_DLLPUBLIC XSecondaryFillColorItem : public XColorItem { public: TYPEINFO(); - XSecondaryFillColorItem() {} - XSecondaryFillColorItem(INT32 nIndex, const Color& rTheColor); + SVX_DLLPRIVATE XSecondaryFillColorItem() {} + SVX_DLLPRIVATE XSecondaryFillColorItem(INT32 nIndex, const Color& rTheColor); XSecondaryFillColorItem(const String& rName, const Color& rTheColor); - XSecondaryFillColorItem(SvStream& rIn); + SVX_DLLPRIVATE XSecondaryFillColorItem(SvStream& rIn); - virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; - virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; + SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; - virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, + SVX_DLLPRIVATE virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String &rText, const IntlWrapper * = 0 ) const; - virtual USHORT GetVersion( USHORT nFileFormatVersion ) const; + SVX_DLLPRIVATE virtual USHORT GetVersion( USHORT nFileFormatVersion ) const; }; diff --git a/svx/inc/unoapi.hxx b/svx/inc/unoapi.hxx index 128e11d5dc77..afd6cbec14a9 100644 --- a/svx/inc/unoapi.hxx +++ b/svx/inc/unoapi.hxx @@ -97,12 +97,12 @@ SVX_DLLPUBLIC sal_Bool SvxFieldUnitToMeasureUnit( const short nVcl, short& eApi /** if the given name is a predefined name for the current language it is replaced by the corresponding api name. */ -void SvxUnogetApiNameForItem( const sal_Int16 nWhich, const String& rInternalName, rtl::OUString& rApiName ) throw(); +SVX_DLLPUBLIC void SvxUnogetApiNameForItem( const sal_Int16 nWhich, const String& rInternalName, rtl::OUString& rApiName ) throw(); /** if the given name is a predefined api name it is replaced by the predefined name for the current language. */ -void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString& rApiName, String& rInternalName ) throw(); +SVX_DLLPUBLIC void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString& rApiName, String& rInternalName ) throw(); /** returns the which id for the given property name. This only works for properties of shapes (map SVXMAP_SHAPE is used for searching) @@ -115,10 +115,10 @@ void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString& //SVX_DLLPUBLIC sal_Int16 SvxUnoGetWhichIdForNamedProperty( const ::rtl::OUString & rPropName ); /** converts the given any with a metric to 100th/mm if needed */ -void SvxUnoConvertToMM( const SfxMapUnit eSourceMapUnit, com::sun::star::uno::Any & rMetric ) throw(); +SVX_DLLPUBLIC void SvxUnoConvertToMM( const SfxMapUnit eSourceMapUnit, com::sun::star::uno::Any & rMetric ) throw(); /** converts the given any with a metric from 100th/mm to the given metric if needed */ -void SvxUnoConvertFromMM( const SfxMapUnit eDestinationMapUnit, com::sun::star::uno::Any & rMetric ) throw(); +SVX_DLLPUBLIC void SvxUnoConvertFromMM( const SfxMapUnit eDestinationMapUnit, com::sun::star::uno::Any & rMetric ) throw(); #endif // _SVX_UNOAPI_HXX_ diff --git a/svx/inc/unoedhlp.hxx b/svx/inc/unoedhlp.hxx index 83e8d52034d0..b732ba867af1 100644 --- a/svx/inc/unoedhlp.hxx +++ b/svx/inc/unoedhlp.hxx @@ -49,7 +49,7 @@ class EditEngine; case denotes the destination position, the two parameters the start and the end of the moved paragraph range. */ -class SvxEditSourceHint : public TextHint +class SVX_DLLPUBLIC SvxEditSourceHint : public TextHint { private: ULONG mnStart; diff --git a/svx/inc/unolingu.hxx b/svx/inc/unolingu.hxx index d81fe9177587..8dc76a291ceb 100644 --- a/svx/inc/unolingu.hxx +++ b/svx/inc/unolingu.hxx @@ -67,7 +67,7 @@ class SvxLinguConfigUpdate public: - static void UpdateAll( sal_Bool bForceCheck = sal_False ); + SVX_DLLPUBLIC static void UpdateAll( sal_Bool bForceCheck = sal_False ); static BOOL IsNeedUpdateAll( sal_Bool bForceCheck = sal_False ); }; diff --git a/svx/inc/xexch.hxx b/svx/inc/xexch.hxx index cd44f82cfd85..4042303be3ae 100644 --- a/svx/inc/xexch.hxx +++ b/svx/inc/xexch.hxx @@ -60,7 +60,7 @@ public: // Zuweisungsoperator XFillExchangeData& operator=( const XFillExchangeData& rXFillExchangeData ); - friend SvStream& operator<<( SvStream& rOStm, const XFillExchangeData& rXFillExchangeData ); + SVX_DLLPUBLIC friend SvStream& operator<<( SvStream& rOStm, const XFillExchangeData& rXFillExchangeData ); SVX_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStm, XFillExchangeData& rXFillExchangeData ); static ULONG RegisterClipboardFormatName(); diff --git a/svx/inc/xmlgrhlp.hxx b/svx/inc/xmlgrhlp.hxx index f36733706ab5..77e6eb0be322 100644 --- a/svx/inc/xmlgrhlp.hxx +++ b/svx/inc/xmlgrhlp.hxx @@ -95,7 +95,7 @@ private: SVX_DLLPRIVATE sal_Bool ImplWriteGraphic( const ::rtl::OUString& rPictureStorageName, const ::rtl::OUString& rPictureStreamName, const ::rtl::OUString& rGraphicId ); - SVX_DLLPRIVATE void ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos ); + SVX_DLLPRIVATE void ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos, rtl::OUString& rRequestedFileName ); protected: SvXMLGraphicHelper(); @@ -142,9 +142,9 @@ namespace svx uses eCreateMode == GRAPHICHELPER_MODE_READ, bDirect == TRUE in SvXMLGraphicHelper */ -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvXMLGraphicImportHelper_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); -::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicImportHelper_getSupportedServiceNames() throw(); -::rtl::OUString SAL_CALL SvXMLGraphicImportHelper_getImplementationName() throw(); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvXMLGraphicImportHelper_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); +SVX_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicImportHelper_getSupportedServiceNames() throw(); +SVX_DLLPUBLIC ::rtl::OUString SAL_CALL SvXMLGraphicImportHelper_getImplementationName() throw(); /** Create this with createInstanceWithArguments. service name "com.sun.star.comp.Svx.GraphicExportHelper", one argument which is the @@ -158,9 +158,9 @@ namespace svx uses eCreateMode == GRAPHICHELPER_MODE_WRITE, bDirect == TRUE in SvXMLGraphicHelper */ -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvXMLGraphicExportHelper_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); -::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicExportHelper_getSupportedServiceNames() throw(); -::rtl::OUString SAL_CALL SvXMLGraphicExportHelper_getImplementationName() throw(); +SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvXMLGraphicExportHelper_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); +SVX_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL SvXMLGraphicExportHelper_getSupportedServiceNames() throw(); +SVX_DLLPUBLIC ::rtl::OUString SAL_CALL SvXMLGraphicExportHelper_getImplementationName() throw(); } #endif diff --git a/svx/inc/xoutbmp.hxx b/svx/inc/xoutbmp.hxx index 3cefd9b60f1f..6bbbb0b1073a 100644 --- a/svx/inc/xoutbmp.hxx +++ b/svx/inc/xoutbmp.hxx @@ -95,6 +95,6 @@ public: // - DitherBitmap - // ---------------- -BOOL DitherBitmap( Bitmap& rBitmap ); +SVX_DLLPUBLIC BOOL DitherBitmap( Bitmap& rBitmap ); #endif // _XOUTBMP_HXX diff --git a/svx/prj/d.lst b/svx/prj/d.lst index 147cfd57d862..227dac4db601 100644 --- a/svx/prj/d.lst +++ b/svx/prj/d.lst @@ -10,7 +10,7 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\global\accelerator\es ..\%__SRC%\inc\svxslots.ilb %_DEST%\inc%_EXT%\svxslots.ilb ..\%__SRC%\inc\*.ilb* %_DEST%\inc%_EXT%\*.ilb* ..\%__SRC%\lib\lib*.* %_DEST%\lib%_EXT%\lib*.* -..\%__SRC%\lib\isvx.lib %_DEST%\lib%_EXT%\isvx.lib +..\%__SRC%\lib\isvx*.lib %_DEST%\lib%_EXT%\isvx*.lib ..\%__SRC%\bin\gengal* %_DEST%\bin%_EXT%\gengal* ..\%__SRC%\bin\gengalrc %_DEST%\bin%_EXT%\gengal.ini ..\%__SRC%\bin\cui*.dll %_DEST%\bin%_EXT%\cui*.dll @@ -604,6 +604,7 @@ mkdir: %_DEST%\inc%_EXT%\svx\sdr\overlay ..\inc\svx\sdr\overlay\overlaypolypolygon.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlaypolypolygon.hxx ..\inc\svx\sdr\overlay\overlayobjectcell.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlayobjectcell.hxx ..\inc\svx\sdr\overlay\overlayprimitive2dsequenceobject.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlayprimitive2dsequenceobject.hxx +..\inc\svx\sdr\overlay\overlayselection.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlayselection.hxx ..\inc\svx\sdr\overlay\overlaytools.hxx %_DEST%\inc%_EXT%\svx\sdr\overlay\overlaytools.hxx mkdir: %_DEST%\inc%_EXT%\svx\sdr\animation diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index a69aae4cf9fd..3c819229ee4c 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -14911,3 +14911,54 @@ SfxVoidItem RecheckDocument SID_RECHECK_DOCUMENT GroupId = GID_DOCUMENT; ] +//-------------------------------------------------------------------------- + +SfxVoidItem InsertColumnDialog SID_TABLE_INSERT_COL_DLG +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = TRUE, + HasCoreId = FALSE, + HasDialog = TRUE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + /* config: */ + AccelConfig = FALSE, + MenuConfig = FALSE, + StatusBarConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = GID_TABLE; +] + +//-------------------------------------------------------------------------- + +SfxVoidItem InsertRowDialog SID_TABLE_INSERT_ROW_DLG +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = TRUE, + HasCoreId = FALSE, + HasDialog = TRUE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + /* config: */ + AccelConfig = FALSE, + MenuConfig = FALSE, + StatusBarConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = GID_TABLE; +] diff --git a/svx/source/accessibility/AccessibleEditableTextPara.cxx b/svx/source/accessibility/AccessibleEditableTextPara.cxx index 27963bfdffc4..1c0ce04bb1d6 100644 --- a/svx/source/accessibility/AccessibleEditableTextPara.cxx +++ b/svx/source/accessibility/AccessibleEditableTextPara.cxx @@ -806,7 +806,7 @@ namespace accessibility // must provide XAccesibleText by hand, since it comes publicly inherited by XAccessibleEditableText if ( rType == ::getCppuType((uno::Reference< XAccessibleText > *)0) ) { - uno::Reference< XAccessibleText > aAccText = this; + uno::Reference< XAccessibleText > aAccText = static_cast< XAccessibleEditableText * >(this); aRet <<= aAccText; } else if ( rType == ::getCppuType((uno::Reference< XAccessibleEditableText > *)0) ) @@ -912,65 +912,18 @@ namespace accessibility { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); - - // append first 40 characters from text, or first line, if shorter - // (writer takes first sentence here, but that's not supported - // from EditEngine) - // throws if defunc - ::rtl::OUString aLine; - - if( getCharacterCount() ) - aLine = getTextAtIndex(0, AccessibleTextType::LINE).SegmentText; - - // Get the string from the resource for the specified id. - String sStr = ::rtl::OUString( SVX_RESSTR (RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION ) ); - String sParaIndex = ::rtl::OUString::valueOf( GetParagraphIndex() ); - sStr.SearchAndReplace( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "$(ARG)" )), - sParaIndex ); - - if( aLine.getLength() > MaxDescriptionLen ) - { - ::rtl::OUString aCurrWord; - sal_Int32 i; - - // search backward from MaxDescriptionLen for previous word start - for( aCurrWord=getTextAtIndex(MaxDescriptionLen, AccessibleTextType::WORD).SegmentText, - i=MaxDescriptionLen, - aLine=::rtl::OUString(); - i>=0; - --i ) - { - if( getTextAtIndex(i, AccessibleTextType::WORD).SegmentText != aCurrWord ) - { - if( i == 0 ) - // prevent completely empty string - aLine = getTextAtIndex(0, AccessibleTextType::WORD).SegmentText; - else - aLine = getTextRange(0, i); - } - } - } +// ::vos::OGuard aGuard( Application::GetSolarMutex() ); - return ::rtl::OUString( sStr ) + aLine; + return ::rtl::OUString(); } ::rtl::OUString SAL_CALL AccessibleEditableTextPara::getAccessibleName() throw (uno::RuntimeException) { DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); - ::vos::OGuard aGuard( Application::GetSolarMutex() ); - - // throws if defunc - sal_Int32 nPara( GetParagraphIndex() ); - - // Get the string from the resource for the specified id. - String sStr = ::rtl::OUString( SVX_RESSTR (RID_SVXSTR_A11Y_PARAGRAPH_NAME) ); - String sParaIndex = ::rtl::OUString::valueOf( nPara ); - sStr.SearchAndReplace( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "$(ARG)" )), - sParaIndex ); +// ::vos::OGuard aGuard( Application::GetSolarMutex() ); - return ::rtl::OUString( sStr ); + return ::rtl::OUString(); } uno::Reference< XAccessibleRelationSet > SAL_CALL AccessibleEditableTextPara::getAccessibleRelationSet() throw (uno::RuntimeException) @@ -2113,6 +2066,99 @@ namespace accessibility return aOutSequence; } + // XAccessibleMultiLineText + sal_Int32 SAL_CALL AccessibleEditableTextPara::getLineNumberAtIndex( sal_Int32 nIndex ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) + { + DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); + + sal_Int32 nRes = -1; + sal_Int32 nPara = GetParagraphIndex(); + + SvxTextForwarder &rCacheTF = GetTextForwarder(); + const bool bValidPara = 0 <= nPara && nPara < rCacheTF.GetParagraphCount(); + DBG_ASSERT( bValidPara, "getLineNumberAtIndex: current paragraph index out of range" ); + if (bValidPara) + { + // we explicitly allow for the index to point at the character right behind the text + if (0 <= nIndex && nIndex <= rCacheTF.GetTextLen( static_cast< USHORT >(nPara) )) + nRes = rCacheTF.GetLineNumberAtIndex( static_cast< USHORT >(nPara), static_cast< USHORT >(nIndex) ); + else + throw lang::IndexOutOfBoundsException(); + } + return nRes; + } + + // XAccessibleMultiLineText + ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleEditableTextPara::getTextAtLineNumber( sal_Int32 nLineNo ) throw (lang::IndexOutOfBoundsException, uno::RuntimeException) + { + DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); + + ::com::sun::star::accessibility::TextSegment aResult; + sal_Int32 nPara = GetParagraphIndex(); + SvxTextForwarder &rCacheTF = GetTextForwarder(); + const bool bValidPara = 0 <= nPara && nPara < rCacheTF.GetParagraphCount(); + DBG_ASSERT( bValidPara, "getTextAtLineNumber: current paragraph index out of range" ); + if (bValidPara) + { + if (0 <= nLineNo && nLineNo < rCacheTF.GetLineCount( static_cast< USHORT >(nPara) )) + { + USHORT nStart = 0, nEnd = 0; + rCacheTF.GetLineBoundaries( nStart, nEnd, static_cast< USHORT >(nPara), static_cast< USHORT >(nLineNo) ); + if (nStart != 0xFFFF && nEnd != 0xFFFF) + { + try + { + aResult.SegmentText = getTextRange( nStart, nEnd ); + aResult.SegmentStart = nStart; + aResult.SegmentEnd = nEnd; + } + catch (lang::IndexOutOfBoundsException) + { + // this is not the exception that should be raised in this function ... + DBG_ASSERT( 0, "unexpected exception" ); + } + } + } + else + throw lang::IndexOutOfBoundsException(); + } + return aResult; + } + + // XAccessibleMultiLineText + ::com::sun::star::accessibility::TextSegment SAL_CALL AccessibleEditableTextPara::getTextAtLineWithCaret( ) throw (uno::RuntimeException) + { + DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); + + ::com::sun::star::accessibility::TextSegment aResult; + try + { + aResult = getTextAtLineNumber( getNumberOfLineWithCaret() ); + } + catch (lang::IndexOutOfBoundsException &) + { + // this one needs to be catched since this interface does not allow for it. + } + return aResult; + } + + // XAccessibleMultiLineText + sal_Int32 SAL_CALL AccessibleEditableTextPara::getNumberOfLineWithCaret( ) throw (uno::RuntimeException) + { + DBG_CHKTHIS( AccessibleEditableTextPara, NULL ); + + sal_Int32 nRes = -1; + try + { + nRes = getLineNumberAtIndex( getCaretPosition() ); + } + catch (lang::IndexOutOfBoundsException &) + { + // this one needs to be catched since this interface does not allow for it. + } + return nRes; + } + // XServiceInfo ::rtl::OUString SAL_CALL AccessibleEditableTextPara::getImplementationName (void) throw (uno::RuntimeException) diff --git a/svx/source/accessibility/AccessibleEditableTextPara.hxx b/svx/source/accessibility/AccessibleEditableTextPara.hxx index 5cf8c5361d20..4e297f44c3b5 100644 --- a/svx/source/accessibility/AccessibleEditableTextPara.hxx +++ b/svx/source/accessibility/AccessibleEditableTextPara.hxx @@ -34,12 +34,10 @@ #include <tools/gen.hxx> #include <tools/string.hxx> #include <cppuhelper/weakref.hxx> -#include <cppuhelper/compbase7.hxx> +#include <cppuhelper/compbase8.hxx> #include <cppuhelper/typeprovider.hxx> - -#ifndef _CPPUHELPER_INTERFACECONTAINER_H_ #include <cppuhelper/interfacecontainer.hxx> -#endif + #include <com/sun/star/uno/Reference.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/accessibility/XAccessible.hpp> @@ -47,6 +45,8 @@ #include <com/sun/star/accessibility/XAccessibleComponent.hpp> #include <com/sun/star/accessibility/XAccessibleEditableText.hpp> #include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp> +#include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp> + #include <comphelper/accessibletexthelper.hxx> #include <comphelper/broadcasthelper.hxx> #include "AccessibleParaManager.hxx" @@ -55,12 +55,13 @@ namespace accessibility { - typedef ::cppu::WeakComponentImplHelper7< ::com::sun::star::accessibility::XAccessible, + typedef ::cppu::WeakComponentImplHelper8< ::com::sun::star::accessibility::XAccessible, ::com::sun::star::accessibility::XAccessibleContext, ::com::sun::star::accessibility::XAccessibleComponent, ::com::sun::star::accessibility::XAccessibleEditableText, ::com::sun::star::accessibility::XAccessibleEventBroadcaster, ::com::sun::star::accessibility::XAccessibleTextAttributes, + ::com::sun::star::accessibility::XAccessibleMultiLineText, ::com::sun::star::lang::XServiceInfo > AccessibleTextParaInterfaceBase; /** This class implements the actual text paragraphs for the EditEngine/Outliner UAA @@ -128,7 +129,7 @@ namespace accessibility virtual sal_Int32 SAL_CALL getForeground( ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getBackground( ) throw (::com::sun::star::uno::RuntimeException); - // XAccessibleText (this comes implicitely inherited by XAccessibleEditableText) + // XAccessibleText (this comes implicitely inherited by XAccessibleEditableText AND by XAccessibleMultiLineText) virtual sal_Int32 SAL_CALL getCaretPosition() throw (::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL setCaretPosition( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual sal_Unicode SAL_CALL getCharacter( sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); @@ -163,6 +164,12 @@ namespace accessibility virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getDefaultAttributes( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRunAttributes( ::sal_Int32 Index, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& RequestedAttributes ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + // XAccessibleMultiLineText + virtual ::sal_Int32 SAL_CALL getLineNumberAtIndex( ::sal_Int32 nIndex ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineNumber( ::sal_Int32 nLineNo ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::accessibility::TextSegment SAL_CALL getTextAtLineWithCaret( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getNumberOfLineWithCaret( ) throw (::com::sun::star::uno::RuntimeException); + // XServiceInfo virtual ::rtl::OUString SAL_CALL getImplementationName (void) throw (::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL supportsService (const ::rtl::OUString& sServiceName) throw (::com::sun::star::uno::RuntimeException); diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx index 072d6347f3f4..6420a14c98ae 100644 --- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx +++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx @@ -161,6 +161,8 @@ namespace accessibility sal_Bool GetAttributeRun( USHORT&, USHORT&, USHORT, USHORT ) const { return sal_False; } USHORT GetLineCount( USHORT nPara ) const { return nPara == 0 ? 1 : 0; } USHORT GetLineLen( USHORT, USHORT ) const { return 0; } + void GetLineBoundaries( /*out*/USHORT & rStart, /*out*/USHORT & rEnd, USHORT /*nParagraph*/, USHORT /*nLine*/ ) const { rStart = rEnd = 0; } + USHORT GetLineNumberAtIndex( USHORT /*nPara*/, USHORT /*nIndex*/ ) const { return 0; } // the following two methods would, strictly speaking, require // a switch to a real EditSource, too. Fortunately, the diff --git a/svx/source/accessibility/AccessibleImageBullet.cxx b/svx/source/accessibility/AccessibleImageBullet.cxx index 2ea02d03bf28..694043d69f4e 100644 --- a/svx/source/accessibility/AccessibleImageBullet.cxx +++ b/svx/source/accessibility/AccessibleImageBullet.cxx @@ -172,16 +172,8 @@ namespace accessibility ::vos::OGuard aGuard( Application::GetSolarMutex() ); - // throws if defunc - sal_Int32 nPara( GetParagraphIndex() ); - // Get the string from the resource for the specified id. - String sStr = ::rtl::OUString( SVX_RESSTR (RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION) ); - String sParaIndex = ::rtl::OUString::valueOf( nPara ); - sStr.SearchAndReplace( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "$(ARG)" )), - sParaIndex ); - - return ::rtl::OUString( sStr ); + return ::rtl::OUString( SVX_RESSTR (RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION) ); } ::rtl::OUString SAL_CALL AccessibleImageBullet::getAccessibleName() throw (uno::RuntimeException) @@ -190,16 +182,8 @@ namespace accessibility ::vos::OGuard aGuard( Application::GetSolarMutex() ); - // throws if defunc - sal_Int32 nPara( GetParagraphIndex() ); - // Get the string from the resource for the specified id. - String sStr = ::rtl::OUString( SVX_RESSTR (RID_SVXSTR_A11Y_IMAGEBULLET_NAME) ); - String sParaIndex = ::rtl::OUString::valueOf( nPara ); - sStr.SearchAndReplace( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "$(ARG)" )), - sParaIndex ); - - return ::rtl::OUString( sStr ); + return ::rtl::OUString( SVX_RESSTR (RID_SVXSTR_A11Y_IMAGEBULLET_NAME) ); } uno::Reference< XAccessibleRelationSet > SAL_CALL AccessibleImageBullet::getAccessibleRelationSet() throw (uno::RuntimeException) diff --git a/svx/source/accessibility/AccessibleStaticTextBase.cxx b/svx/source/accessibility/AccessibleStaticTextBase.cxx index b611b62b47e6..333c555bb746 100644 --- a/svx/source/accessibility/AccessibleStaticTextBase.cxx +++ b/svx/source/accessibility/AccessibleStaticTextBase.cxx @@ -173,12 +173,16 @@ namespace accessibility AccessibleEditableTextPara& GetParagraph( sal_Int32 nPara ) const; sal_Int32 GetParagraphCount() const; + sal_Int32 GetParagraphIndex() const; + sal_Int32 GetLineCount( sal_Int32 nParagraph ) const; + EPosition Index2Internal( sal_Int32 nFlatIndex ) const { DBG_CHKTHIS( AccessibleStaticTextBase_Impl, NULL ); return ImpCalcInternal( nFlatIndex, false ); } + EPosition Range2Internal( sal_Int32 nFlatIndex ) const { DBG_CHKTHIS( AccessibleStaticTextBase_Impl, NULL ); @@ -327,6 +331,26 @@ namespace accessibility return mpTextParagraph->GetTextForwarder().GetParagraphCount(); } + sal_Int32 AccessibleStaticTextBase_Impl::GetParagraphIndex() const + { + DBG_CHKTHIS( AccessibleStaticTextBase_Impl, NULL ); + + sal_Int32 nIndex = -1; + if( mpTextParagraph ) + nIndex = mpTextParagraph->GetParagraphIndex(); + return nIndex; + } + + sal_Int32 AccessibleStaticTextBase_Impl::GetLineCount( sal_Int32 nParagraph ) const + { + DBG_CHKTHIS( AccessibleStaticTextBase_Impl, NULL ); + + sal_Int32 nIndex = 0; + if( mpTextParagraph ) + nIndex = mpTextParagraph->GetTextForwarder().GetLineCount( static_cast< USHORT >(nParagraph) ); + return nIndex; + } + sal_Int32 AccessibleStaticTextBase_Impl::Internal2Index( EPosition nEEIndex ) const { sal_Int32 aRes(0); @@ -1001,10 +1025,25 @@ namespace accessibility return ::comphelper::concatSequences( aRunAttrSeq, aDiffVec.getAsConstList() ); } - Rectangle AccessibleStaticTextBase::GetParagraphBoundingBox() const - { - return mpImpl->GetParagraphBoundingBox(); - } + Rectangle AccessibleStaticTextBase::GetParagraphBoundingBox() const + { + return mpImpl->GetParagraphBoundingBox(); + } + + sal_Int32 AccessibleStaticTextBase::GetParagraphIndex() const + { + return mpImpl->GetParagraphIndex(); + } + + sal_Int32 AccessibleStaticTextBase::GetParagraphCount() const + { + return mpImpl->GetParagraphCount(); + } + + sal_Int32 AccessibleStaticTextBase::GetLineCount( sal_Int32 nParagraph ) const + { + return mpImpl->GetLineCount( nParagraph ); + } } // end of namespace accessibility diff --git a/svx/source/accessibility/accessibility.src b/svx/source/accessibility/accessibility.src index 323ff7982876..418236a0107d 100644 --- a/svx/source/accessibility/accessibility.src +++ b/svx/source/accessibility/accessibility.src @@ -196,19 +196,9 @@ String RID_SVXSTR_GRAPHCTRL_ACC_DESCRIPTION Text [ en-US ] = "This is where you can edit the contour." ; }; -String RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION -{ - Text [ en-US ] = "Paragraph: $(ARG) " ; -}; - -String RID_SVXSTR_A11Y_PARAGRAPH_NAME -{ - Text [ en-US ] = "Paragraph $(ARG)" ; -}; - String RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION { - Text [ en-US ] = "Image bullet in paragraph: $(ARG)" ; + Text [ en-US ] = "Image bullet in paragraph" ; }; String RID_SVXSTR_A11Y_IMAGEBULLET_NAME diff --git a/svx/source/accessibility/makefile.mk b/svx/source/accessibility/makefile.mk index f953adc1dda0..8b1802bf1a25 100755 --- a/svx/source/accessibility/makefile.mk +++ b/svx/source/accessibility/makefile.mk @@ -33,6 +33,7 @@ PRJ=..$/.. PRJNAME=svx TARGET=accessibility +LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- @@ -42,7 +43,12 @@ ENABLE_EXCEPTIONS=TRUE # --- Files -------------------------------------------------------- -SLOFILES = \ +LIB1TARGET= $(SLB)$/$(TARGET)-core.lib +LIB1OBJFILES= \ + $(SLO)$/AccessibleStringWrap.obj + +LIB2TARGET= $(SLB)$/$(TARGET).lib +LIB2OBJFILES= \ $(SLO)$/charmapacc.obj \ $(SLO)$/svxrectctaccessiblecontext.obj \ $(SLO)$/GraphCtlAccessibleContext.obj \ @@ -63,13 +69,14 @@ SLOFILES = \ $(SLO)$/AccessibleStaticTextBase.obj \ $(SLO)$/AccessibleParaManager.obj \ $(SLO)$/AccessibleEditableTextPara.obj \ - $(SLO)$/AccessibleStringWrap.obj \ $(SLO)$/AccessibleImageBullet.obj \ $(SLO)$/ShapeTypeHandler.obj \ $(SLO)$/SvxShapeTypes.obj \ $(SLO)$/AccessibleControlShape.obj \ $(SLO)$/DGColorNameLookUp.obj \ $(SLO)$/AccessibleFrameSelector.obj + +SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) SRS2NAME = accessibility SRC2FILES = accessibility.src diff --git a/svx/source/cui/autocdlg.cxx b/svx/source/cui/autocdlg.cxx index 5d957b831d54..330459b224f1 100644 --- a/svx/source/cui/autocdlg.cxx +++ b/svx/source/cui/autocdlg.cxx @@ -2308,7 +2308,7 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage( Window* pParent, aCBAppendSpace (this, SVX_RES(CB_APPEND_SPACE)), aCBAsTip (this, SVX_RES(CB_AS_TIP)), aCBCollect (this, SVX_RES(CB_COLLECT)), - aCBKeepList (this, SVX_RES(CB_KEEP_LIST)), + aCBRemoveList (this, SVX_RES(CB_REMOVE_LIST)), aFTExpandKey (this, SVX_RES(FT_EXPAND_KEY)), aDCBExpandKey (this, SVX_RES(DCB_EXPAND_KEY)), aFTMinWordlen (this, SVX_RES(FT_MIN_WORDLEN)), @@ -2369,7 +2369,7 @@ BOOL OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) bCheck = aCBCollect.IsChecked(); bModified |= pOpt->bAutoCmpltCollectWords != bCheck; pOpt->bAutoCmpltCollectWords = bCheck; - bCheck = aCBKeepList.IsChecked(); + bCheck = !aCBRemoveList.IsChecked(); // inverted value! bModified |= pOpt->bAutoCmpltKeepList != bCheck; pOpt->bAutoCmpltKeepList = bCheck; bCheck = aCBAppendSpace.IsChecked(); @@ -2416,7 +2416,7 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) aCBActiv.Check( 0 != pOpt->bAutoCompleteWords ); aCBCollect.Check( 0 != pOpt->bAutoCmpltCollectWords ); - aCBKeepList.Check( 0 != pOpt->bAutoCmpltKeepList); + aCBRemoveList.Check( !pOpt->bAutoCmpltKeepList ); //inverted value! aCBAppendSpace.Check( 0 != pOpt->bAutoCmpltAppendBlanc ); aCBAsTip.Check( 0 != pOpt->bAutoCmpltShowAsTip ); @@ -2487,7 +2487,7 @@ IMPL_LINK( OfaAutoCompleteTabPage, CheckHdl, CheckBox*, pBox ) aDCBExpandKey.Enable( bEnable ); } else if(&aCBCollect == pBox) - aCBKeepList.Enable( bEnable ); + aCBRemoveList.Enable( bEnable ); return 0; } diff --git a/svx/source/cui/autocdlg.hrc b/svx/source/cui/autocdlg.hrc index d3c34e3e48a2..6a698b4397d7 100644 --- a/svx/source/cui/autocdlg.hrc +++ b/svx/source/cui/autocdlg.hrc @@ -129,7 +129,7 @@ #define CB_ACTIV 121 #define CB_COLLECT 122 #define CB_APPEND_SPACE 123 -#define CB_KEEP_LIST 124 +#define CB_REMOVE_LIST 124 #define CB_AS_TIP 125 #define FT_MIN_WORDLEN 126 #define FT_MAX_ENTRIES 127 diff --git a/svx/source/cui/autocdlg.hxx b/svx/source/cui/autocdlg.hxx index d9d16f8ed064..dba6ce826cc3 100644 --- a/svx/source/cui/autocdlg.hxx +++ b/svx/source/cui/autocdlg.hxx @@ -406,7 +406,7 @@ class OfaAutoCompleteTabPage : public SfxTabPage CheckBox aCBAsTip; //Show as tip CheckBox aCBCollect;//Collect words - CheckBox aCBKeepList;//...save the list for later use... + CheckBox aCBRemoveList;//...save the list for later use... //--removed--CheckBox aCBEndless;// FixedText aFTExpandKey; diff --git a/svx/source/cui/autocdlg.src b/svx/source/cui/autocdlg.src index 9ec079a5daae..a087bd7d59dc 100644 --- a/svx/source/cui/autocdlg.src +++ b/svx/source/cui/autocdlg.src @@ -656,12 +656,12 @@ TabPage RID_OFAPAGE_AUTOCOMPLETE_OPTIONS Size = MAP_APPFONT( 116, 10 ); Text [ en-US ] = "C~ollect words"; }; - CheckBox CB_KEEP_LIST + CheckBox CB_REMOVE_LIST { Pos = MAP_APPFONT( 10, 59 ); Size = MAP_APPFONT( 110, 40 ); WordBreak = TRUE; - Text [ en-US ] = "~When closing a document, save the list for later use in other documents."; + Text [ en-US ] = "~When closing a document, remove the words collected from it from the list"; }; FixedText FT_EXPAND_KEY { diff --git a/svx/source/cui/commonlingui.src b/svx/source/cui/commonlingui.src index b69d3449db4c..c229953ad3c8 100644 --- a/svx/source/cui/commonlingui.src +++ b/svx/source/cui/commonlingui.src @@ -47,7 +47,7 @@ Window RID_SVX_WND_COMMON_LINGU { HelpId=HID_SPELLDLG_SETWORD; Pos = MAP_APPFONT( 51, 9 ); - Size = MAP_APPFONT( 149, 10 ); + Size = MAP_APPFONT( 164, 10 ); Border =FALSE; TabStop = TRUE; }; @@ -62,7 +62,7 @@ Window RID_SVX_WND_COMMON_LINGU Edit ED_NEWWORD { Pos = MAP_APPFONT( 51, 24 ); - Size = MAP_APPFONT( 122, 12 ); + Size = MAP_APPFONT( 137, 12 ); Border = TRUE; }; @@ -75,21 +75,21 @@ Window RID_SVX_WND_COMMON_LINGU PushButton BTN_IGNORE { - Pos = MAP_APPFONT( 209, 6 ); + Pos = MAP_APPFONT( 224, 6 ); Size = MAP_APPFONT( 55, 14 ); Text [ en-US ] = "~Ignore" ; }; PushButton BTN_IGNOREALL { - Pos = MAP_APPFONT( 209, 22 ); + Pos = MAP_APPFONT( 224, 22 ); Size = MAP_APPFONT( 55, 14 ); Text [ en-US ] = "Always I~gnore" ; }; PushButton BTN_CHANGE { - Pos = MAP_APPFONT( 209, 40 ); + Pos = MAP_APPFONT( 224, 40 ); Size = MAP_APPFONT( 55, 14 ); Text [ en-US ] = "~Replace" ; DefButton = TRUE ; @@ -97,14 +97,14 @@ Window RID_SVX_WND_COMMON_LINGU PushButton BTN_CHANGEALL { - Pos = MAP_APPFONT( 209, 56 ); + Pos = MAP_APPFONT( 224, 56 ); Size = MAP_APPFONT( 55, 14 ); Text [ en-US ] = "Always R~eplace" ; }; PushButton BTN_OPTIONS { - Pos = MAP_APPFONT( 209, 129 ); + Pos = MAP_APPFONT( 224, 129 ); Size = MAP_APPFONT( 55, 14 ); Hide = TRUE ; Text [ en-US ] = "Options..." ; @@ -119,19 +119,19 @@ Window RID_SVX_WND_COMMON_LINGU GroupBox GB_AUDIT { Pos = MAP_APPFONT( 1, 1 ); - Size = MAP_APPFONT( 268, 148 ); + Size = MAP_APPFONT( 283, 148 ); Hide=TRUE; }; HelpButton BTN_SPL_HELP { - Pos = MAP_APPFONT( 145, 153 ); + Pos = MAP_APPFONT( 160, 153 ); Size = MAP_APPFONT( 55, 14 ); }; CancelButton BTN_SPL_CANCEL { - Pos = MAP_APPFONT ( 209 , 153 ) ; + Pos = MAP_APPFONT ( 224 , 153 ) ; Size = MAP_APPFONT ( 55 , 14 ) ; TabStop = TRUE ; Text [ en-US ] = "~Close" ; diff --git a/svx/source/cui/dlgfact.cxx b/svx/source/cui/dlgfact.cxx index 5fe71d5eb8af..996d0f63f9e9 100644 --- a/svx/source/cui/dlgfact.cxx +++ b/svx/source/cui/dlgfact.cxx @@ -112,6 +112,7 @@ #include "newtabledlg.hxx" #include "macroass.hxx" #include "acccfg.hxx" +#include "insrc.hxx" using namespace ::com::sun::star; using namespace ::com::sun::star::frame; @@ -2385,3 +2386,8 @@ VclAbstractDialog* AbstractDialogFactory_Impl::CreateOptionsDialog( { return new VclAbstractDialog_Impl( new OfaTreeOptionsDialog( pParent, rExtensionId ) ); } + +SvxAbstractInsRowColDlg* AbstractDialogFactory_Impl::CreateSvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId ) +{ + return new SvxInsRowColDlg( pParent, bCol, nHelpId ); +} diff --git a/svx/source/cui/dlgfact.hxx b/svx/source/cui/dlgfact.hxx index e6c1325b4b38..e52c21fc597a 100644 --- a/svx/source/cui/dlgfact.hxx +++ b/svx/source/cui/dlgfact.hxx @@ -810,6 +810,8 @@ public: virtual VclAbstractDialog* CreateOptionsDialog( Window* pParent, const rtl::OUString& rExtensionId, const rtl::OUString& rApplicationContext ); + + virtual SvxAbstractInsRowColDlg* CreateSvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId ); }; #endif diff --git a/svx/source/cui/hangulhanjadlg.src b/svx/source/cui/hangulhanjadlg.src index 91439e285f7d..920f99e03aec 100644 --- a/svx/source/cui/hangulhanjadlg.src +++ b/svx/source/cui/hangulhanjadlg.src @@ -37,7 +37,7 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA { HelpId = HID_DIALOG_HANGULHANJA; - Size = MAP_APPFONT( 287, 175 ); + Size = MAP_APPFONT( 302, 175 ); OutputSize = TRUE; Closeable = TRUE ; Moveable = TRUE ; @@ -47,7 +47,7 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA PushButton PB_FIND { - Pos = MAP_APPFONT( 192, 23 ); + Pos = MAP_APPFONT( 207, 23 ); Size = MAP_APPFONT( 30, 14 ); Text [ en-US ] = "~Find"; @@ -56,7 +56,7 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA Control CTL_SUGGESTIONS { Pos = MAP_APPFONT( 51, 46 ); - Size = MAP_APPFONT( 171, 30 ); + Size = MAP_APPFONT( 186, 30 ); TabStop = TRUE ; }; @@ -71,7 +71,7 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA RadioButton RB_SIMPLE_CONVERSION { Pos = MAP_APPFONT( 51, 81 ); - Size = MAP_APPFONT( 55, 8 ); + Size = MAP_APPFONT( 60, 8 ); Group = TRUE; @@ -80,16 +80,16 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA RadioButton RB_HANJA_HANGUL_BRACKETED { - Pos = MAP_APPFONT( 109, 81 ); - Size = MAP_APPFONT( 55, 8 ); + Pos = MAP_APPFONT( 114, 81 ); + Size = MAP_APPFONT( 60, 8 ); Text [ en-US ] = "Hanja (Han~gul)"; }; RadioButton RB_HANGUL_HANJA_BRACKETED { - Pos = MAP_APPFONT( 167, 81 ); - Size = MAP_APPFONT( 55, 8 ); + Pos = MAP_APPFONT( 177, 81 ); + Size = MAP_APPFONT( 60, 8 ); Text [ en-US ] = "Hang~ul (Hanja)"; }; @@ -97,7 +97,7 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA RadioButton RB_HANGUL_HANJA_ABOVE { Pos = MAP_APPFONT( 51, 95 ); - Size = MAP_APPFONT( 55, 16 ); + Size = MAP_APPFONT( 60, 16 ); // this is the _primary_ text Text [ en-US ] = "Hangu~l"; @@ -105,8 +105,8 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA RadioButton RB_HANGUL_HANJA_BELOW { - Pos = MAP_APPFONT( 109, 95 ); - Size = MAP_APPFONT( 55, 16 ); + Pos = MAP_APPFONT( 114, 95 ); + Size = MAP_APPFONT( 60, 16 ); // this is the _primary_ text Text [ en-US ] = "Hang~ul"; @@ -114,8 +114,8 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA RadioButton RB_HANJA_HANGUL_ABOVE { - Pos = MAP_APPFONT( 51, 114 ); - Size = MAP_APPFONT( 55, 16 ); + Pos = MAP_APPFONT( 56, 114 ); + Size = MAP_APPFONT( 60, 16 ); // this is the _primary_ text Text [ en-US ] = "Han~ja"; @@ -123,8 +123,8 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA RadioButton RB_HANJA_HANGUL_BELOW { - Pos = MAP_APPFONT( 109, 114 ); - Size = MAP_APPFONT( 55, 16 ); + Pos = MAP_APPFONT( 114, 114 ); + Size = MAP_APPFONT( 60, 16 ); // this is the _primary_ text Text [ en-US ] = "Ha~nja"; @@ -141,14 +141,14 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA CheckBox CB_HANGUL_ONLY { Pos = MAP_APPFONT( 51, 134 ); - Size = MAP_APPFONT( 55, 8 ); + Size = MAP_APPFONT( 60, 8 ); Text [ en-US ] = "Hangul ~only"; }; CheckBox CB_HANJA_ONLY { - Pos = MAP_APPFONT( 109, 134 ); + Pos = MAP_APPFONT( 114, 134 ); Size = MAP_APPFONT( 55, 8 ); Text [ en-US ] = "Hanja onl~y"; @@ -157,12 +157,12 @@ ModalDialog RID_SVX_MDLG_HANGULHANJA // this element is only for determining where our radio button group ends (in both directions) FixedText FT_RESIZE_ANCHOR { - Pos = MAP_APPFONT( 226, 133 ); + Pos = MAP_APPFONT( 241, 133 ); }; CheckBox CB_REPLACE_BY_CHARACTER { - Pos = MAP_APPFONT( 226, 81 ); + Pos = MAP_APPFONT( 241, 81 ); Size = MAP_APPFONT( 55, 24 ); WordBreak = TRUE; diff --git a/svx/source/cui/insrc.cxx b/svx/source/cui/insrc.cxx new file mode 100644 index 000000000000..10b0a5d713a3 --- /dev/null +++ b/svx/source/cui/insrc.cxx @@ -0,0 +1,88 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: insrc.cxx,v $ + * $Revision: 1.10 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svx.hxx" +#ifdef SVX_DLLIMPLEMENTATION +#undef SVX_DLLIMPLEMENTATION +#endif + +#include <svx/dialmgr.hxx> +#include <svx/svxdlg.hxx> +#include <svx/dialogs.hrc> +#include "insrc.hxx" +#include "insrc.hrc" + +bool SvxInsRowColDlg::isInsertBefore() const +{ + return !aAfterBtn.IsChecked(); +} + +sal_uInt16 SvxInsRowColDlg::getInsertCount() const +{ + return static_cast< sal_uInt16 >( aCountEdit.GetValue() ); +} + +SvxInsRowColDlg::SvxInsRowColDlg(Window* pParent, bool bCol, ULONG nHelpId ) + : ModalDialog( pParent, SVX_RES(DLG_INS_ROW_COL) ), + aCount( this, SVX_RES( FT_COUNT ) ), + aCountEdit( this, SVX_RES( ED_COUNT ) ), + aInsFL( this, SVX_RES( FL_INS ) ), + aBeforeBtn( this, SVX_RES( CB_POS_BEFORE ) ), + aAfterBtn( this, SVX_RES( CB_POS_AFTER ) ), + aPosFL( this, SVX_RES( FL_POS ) ), + aRow(SVX_RES(STR_ROW)), + aCol(SVX_RES(STR_COL)), + aOKBtn( this, SVX_RES( BT_OK ) ), + aCancelBtn( this, SVX_RES( BT_CANCEL ) ), + aHelpBtn( this, SVX_RES( BT_HELP ) ), + bColumn( bCol ) +{ + FreeResource(); + String aTmp( GetText() ); + if( bColumn ) + { + aTmp += aCol; + } + else + { + aTmp += aRow; + } + SetText( aTmp ); + SetHelpId( nHelpId ); +} + +short SvxInsRowColDlg::Execute(void) +{ + return ModalDialog::Execute(); +} + + + diff --git a/svx/source/cui/insrc.hrc b/svx/source/cui/insrc.hrc new file mode 100644 index 000000000000..e07c7cb2f1d5 --- /dev/null +++ b/svx/source/cui/insrc.hrc @@ -0,0 +1,43 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: insrc.hrc,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#define FT_COUNT 1 +#define ED_COUNT 2 +#define FL_INS 3 + +#define CB_POS_BEFORE 10 +#define CB_POS_AFTER 11 +#define FL_POS 12 + +#define STR_ROW 20 +#define STR_COL 21 + +#define BT_OK 100 +#define BT_CANCEL 101 +#define BT_HELP 102 diff --git a/svx/source/cui/insrc.hxx b/svx/source/cui/insrc.hxx new file mode 100644 index 000000000000..e187313bdd03 --- /dev/null +++ b/svx/source/cui/insrc.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: insrc.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SVX_INSRC_HXX +#define _SVX_INSRC_HXX + +#include <svx/stddlg.hxx> + +#include <vcl/fixed.hxx> +#include <vcl/field.hxx> +#include <vcl/button.hxx> +#include <vcl/group.hxx> +#include <vcl/button.hxx> + +#include <tools/string.hxx> + +class SvxInsRowColDlg : public SvxAbstractInsRowColDlg, public ModalDialog +{ + FixedText aCount; + NumericField aCountEdit; + FixedLine aInsFL; + + RadioButton aBeforeBtn; + RadioButton aAfterBtn; + FixedLine aPosFL; + + String aRow; + String aCol; + + OKButton aOKBtn; + CancelButton aCancelBtn; + HelpButton aHelpBtn; + + bool bColumn; + +public: + SvxInsRowColDlg( Window* pParent, bool bCol, ULONG nHelpId ); + + virtual short Execute(void); + + virtual bool isInsertBefore() const; + virtual sal_uInt16 getInsertCount() const; +}; + +#endif + diff --git a/svx/source/cui/insrc.src b/svx/source/cui/insrc.src new file mode 100644 index 000000000000..6023e94604ef --- /dev/null +++ b/svx/source/cui/insrc.src @@ -0,0 +1,118 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: insrc.src,v $ + * $Revision: 1.32 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + +#include <svx/dialogs.hrc> +#include "insrc.hrc" + +ModalDialog DLG_INS_ROW_COL +{ + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 136 , 84 ) ; + Text [ en-US ] = "Insert" ; + Moveable = TRUE ; + OKButton BT_OK + { + Pos = MAP_APPFONT ( 80 , 6 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + DefButton = TRUE ; + }; + CancelButton BT_CANCEL + { + Pos = MAP_APPFONT ( 80 , 23 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + HelpButton BT_HELP + { + Pos = MAP_APPFONT ( 80 , 43 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + RadioButton CB_POS_BEFORE + { + Pos = MAP_APPFONT ( 12 , 49 ) ; + Size = MAP_APPFONT ( 56 , 10 ) ; + Text [ en-US ] = "~Before" ; + TabStop = TRUE ; + }; + RadioButton CB_POS_AFTER + { + Pos = MAP_APPFONT ( 12 , 62 ) ; + Size = MAP_APPFONT ( 56 , 10 ) ; + Text [ en-US ] = "A~fter" ; + TabStop = TRUE ; + Check = TRUE ; + }; + NumericField ED_COUNT + { + Border = TRUE ; + Pos = MAP_APPFONT ( 44 , 14 ) ; + Size = MAP_APPFONT ( 24 , 12 ) ; + TabStop = TRUE ; + Left = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 1 ; + Maximum = 99 ; + Value = 1 ; + First = 1 ; + Last = 5 ; + }; + FixedLine FL_INS + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 68 , 8 ) ; + Text [ en-US ] = "Insert" ; + }; + FixedLine FL_POS + { + Pos = MAP_APPFONT ( 6 , 38 ) ; + Size = MAP_APPFONT ( 68 , 8 ) ; + Text [ en-US ] = "Position"; + }; + FixedText FT_COUNT + { + Pos = MAP_APPFONT ( 12 , 16 ) ; + Size = MAP_APPFONT ( 30 , 8 ) ; + Text [ en-US ] = "~Number" ; + Left = TRUE ; + }; + String STR_ROW + { + Text [ en-US ] = " Rows" ; + }; + String STR_COL + { + Text [ en-US ] = " Columns" ; + }; +}; diff --git a/svx/source/cui/makefile.mk b/svx/source/cui/makefile.mk index 7db32bb15f7a..7a1db4a85f19 100755 --- a/svx/source/cui/makefile.mk +++ b/svx/source/cui/makefile.mk @@ -100,7 +100,8 @@ SRC1FILES = \ textattr.src \ treeopt.src \ webconninfo.src \ - zoom.src + zoom.src \ + insrc.src SRS2NAME=cuidrawdlgs SRC2FILES = \ @@ -221,7 +222,8 @@ SLOFILES+=\ $(SLO)$/macroass.obj \ $(SLO)$/cfg.obj \ $(SLO)$/cfgutil.obj \ - $(SLO)$/optchart.obj + $(SLO)$/optchart.obj \ + $(SLO)$/insrc.obj .IF "$(GUI)"=="WNT" SLOFILES+=$(SLO)$/winpluginlib.obj diff --git a/svx/source/cui/optgdlg.cxx b/svx/source/cui/optgdlg.cxx index ca8c361fa615..2f39bdc7a7b3 100644 --- a/svx/source/cui/optgdlg.cxx +++ b/svx/source/cui/optgdlg.cxx @@ -136,7 +136,6 @@ int OfaMiscTabPage::DeactivatePage( SfxItemSet* pSet_ ) return LEAVE_PAGE; } -# ifdef ENABLE_GTK namespace { ::rtl::OUString impl_SystemFileOpenServiceName() @@ -146,13 +145,33 @@ namespace if ( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "gnome" ) ) { + #ifdef ENABLE_GTK return ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.GtkFilePicker" ); + #else + return rtl::OUString(); + #endif + } + else if ( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde4" ) ) + { + #ifdef ENABLE_KDE4 + return ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.KDE4FilePicker" ); + #else + return rtl::OUString(); + #endif } else if ( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde" ) ) { + #ifdef ENABLE_KDE return ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.KDEFilePicker" ); + #else + return rtl::OUString(); + #endif } + #if defined WNT || (defined MACOSX && defined QUARTZ) return ::rtl::OUString::createFromAscii( "com.sun.star.ui.dialogs.SystemFilePicker" ); + #else + return rtl::OUString(); + #endif } sal_Bool lcl_HasSystemFilePicker() @@ -180,8 +199,6 @@ namespace } } -#endif - // ----------------------------------------------------------------------- OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) : @@ -210,20 +227,11 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) : { FreeResource(); - //system fileopen only available in Windows and with gtk vclplug based - //picker and on MacOSX (aqua version) -#if !defined( WNT ) && !defined( ENABLE_GTK ) && !(defined(MACOSX) && defined(QUARTZ)) - aFileDlgFL.Hide(); - aFileDlgCB.Hide(); -#else -# ifdef ENABLE_GTK if (!lcl_HasSystemFilePicker()) { aFileDlgFL.Hide(); aFileDlgCB.Hide(); } -# endif -#endif #if ! defined(QUARTZ) aPrintDlgFL.Hide(); @@ -691,6 +699,12 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet ) : aMousePosLB ( this, SVX_RES( LB_MOUSEPOS ) ), aMouseMiddleFT ( this, SVX_RES( FT_MOUSEMIDDLE ) ), aMouseMiddleLB ( this, SVX_RES( LB_MOUSEMIDDLE ) ), + + // #i97672# + maSelectionFL(this, SVX_RES(FL_SELECTION)), + maSelectionCB(this, SVX_RES(CB_SELECTION)), + maSelectionMF(this, SVX_RES(MF_SELECTION)), + nSizeLB_InitialSelection(0), nStyleLB_InitialSelection(0), pAppearanceCfg(new SvtTabAppearanceCfg), @@ -753,6 +767,9 @@ OfaViewTabPage::OfaViewTabPage(Window* pParent, const SfxItemSet& rSet ) : #endif + // #i97672# + maSelectionCB.SetToggleHdl( LINK( this, OfaViewTabPage, OnSelectionToggled ) ); + FreeResource(); if( ! Application::ValidateSystemFont() ) @@ -807,6 +824,15 @@ IMPL_LINK( OfaViewTabPage, OnAntialiasingToggled, void*, NOTINTERESTEDIN ) } #endif +// #i97672# +IMPL_LINK( OfaViewTabPage, OnSelectionToggled, void*, NOTINTERESTEDIN ) +{ + (void)NOTINTERESTEDIN; + const bool bSelectionEnabled(maSelectionCB.IsChecked()); + maSelectionMF.Enable(bSelectionEnabled); + return 0; +} + /*-----------------06.12.96 11.50------------------- --------------------------------------------------*/ @@ -828,6 +854,7 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) BOOL bModified = FALSE; BOOL bMenuOptModified = FALSE; + bool bRepaintWindows(false); SvtMiscOptions aMiscOptions; UINT16 nSizeLB_NewSelection = aIconSizeLB.GetSelectEntryPos(); @@ -953,16 +980,30 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) { mpDrawinglayerOpt->SetAntiAliasing(aUseAntiAliase.IsChecked()); bModified = TRUE; + bRepaintWindows = true; + } + } - // react on AA change; invalidate all windows to force - // a repaint when changing from AA to non-AA or vice-versa - Window* pAppWindow = Application::GetFirstTopLevelWindow(); + // #i97672# + if(maSelectionCB.IsEnabled()) + { + const bool bNewSelection(maSelectionCB.IsChecked()); + const sal_uInt16 nNewTransparence((sal_uInt16)maSelectionMF.GetValue()); - while(pAppWindow) - { - pAppWindow->Invalidate(); - pAppWindow = Application::GetNextTopLevelWindow(pAppWindow); - } + if(bNewSelection != (bool)mpDrawinglayerOpt->IsTransparentSelection()) + { + mpDrawinglayerOpt->SetTransparentSelection(maSelectionCB.IsChecked()); + bModified = TRUE; + bRepaintWindows = true; + } + + // #i104150# even read the value when maSelectionMF is disabled; it may have been + // modified by enabling-modify-disabling by the user + if(nNewTransparence != mpDrawinglayerOpt->GetTransparentSelectionPercent()) + { + mpDrawinglayerOpt->SetTransparentSelectionPercent(nNewTransparence); + bModified = TRUE; + bRepaintWindows = true; } } @@ -993,6 +1034,17 @@ BOOL OfaViewTabPage::FillItemSet( SfxItemSet& ) pAppearanceCfg->SetApplicationDefaults ( GetpApp() ); } + if(bRepaintWindows) + { + Window* pAppWindow = Application::GetFirstTopLevelWindow(); + + while(pAppWindow) + { + pAppWindow->Invalidate(); + pAppWindow = Application::GetNextTopLevelWindow(pAppWindow); + } + } + return bModified; } @@ -1082,6 +1134,27 @@ void OfaViewTabPage::Reset( const SfxItemSet& ) aUseAntiAliase.SaveValue(); } + { + // #i97672# Selection + // check if transparent selection is possible on this system + const bool bTransparentSelectionPossible( + !GetSettings().GetStyleSettings().GetHighContrastMode() + && supportsOperation(OutDevSupport_TransparentRect)); + + // enter values + if(bTransparentSelectionPossible) + { + maSelectionCB.Check(mpDrawinglayerOpt->IsTransparentSelection()); + } + else + { + maSelectionCB.Enable(false); + } + + maSelectionMF.SetValue(mpDrawinglayerOpt->GetTransparentSelectionPercent()); + maSelectionMF.Enable(mpDrawinglayerOpt->IsTransparentSelection() && bTransparentSelectionPossible); + } + #if defined( UNX ) aFontAntiAliasing.SaveValue(); aAAPointLimit.SaveValue(); diff --git a/svx/source/cui/optgdlg.hrc b/svx/source/cui/optgdlg.hrc index b8dc903879ed..3ad985caa706 100644 --- a/svx/source/cui/optgdlg.hrc +++ b/svx/source/cui/optgdlg.hrc @@ -91,6 +91,10 @@ #define ROW_FT_MOUSEMIDDLE (ROW_LB_MOUSEPOS + RSC_CD_DROPDOWN_HEIGHT + ROWSPACE) #define ROW_LB_MOUSEMIDDLE (ROW_FT_MOUSEMIDDLE + RSC_CD_FIXEDTEXT_HEIGHT + ROWSPACE) +// #i97672# +#define ROW_FL_SELECTION (ROW_LB_MOUSEMIDDLE + RSC_CD_DROPDOWN_HEIGHT + RSC_SP_FLGR_SPACE_X) +#define ROW_CB_SELECTION (ROW_FL_SELECTION + RSC_CD_FIXEDLINE_HEIGHT + ROWSPACE) + // tabpage general ------------------------------------------------------- #define FL_HELP 10 @@ -150,6 +154,11 @@ #define CB_USE_HARDACCELL 68 #define CB_USE_ANTIALIASE 69 +// #i97672# +#define FL_SELECTION 70 +#define CB_SELECTION 71 +#define MF_SELECTION 72 + // tabpage languages ----------------------------------------------------- #define FL_UI_LANG 1 diff --git a/svx/source/cui/optgdlg.hxx b/svx/source/cui/optgdlg.hxx index c44087708b31..4b86896fa58f 100644 --- a/svx/source/cui/optgdlg.hxx +++ b/svx/source/cui/optgdlg.hxx @@ -129,6 +129,11 @@ private: FixedText aMouseMiddleFT; ListBox aMouseMiddleLB; + // #i97672# + FixedLine maSelectionFL; + CheckBox maSelectionCB; + MetricField maSelectionMF; + UINT16 nSizeLB_InitialSelection; UINT16 nStyleLB_InitialSelection; BOOL bSfxSymbolsAuto; @@ -140,6 +145,9 @@ private: #if defined( UNX ) DECL_LINK( OnAntialiasingToggled, void* ); #endif + // #i97672# + DECL_LINK( OnSelectionToggled, void* ); + public: OfaViewTabPage( Window* pParent, const SfxItemSet& rSet ); ~OfaViewTabPage(); diff --git a/svx/source/cui/optgdlg.src b/svx/source/cui/optgdlg.src index 7f3ad6968079..a711be6bf0fc 100644 --- a/svx/source/cui/optgdlg.src +++ b/svx/source/cui/optgdlg.src @@ -404,6 +404,38 @@ TabPage OFA_TP_VIEW }; }; + // #i97672# + FixedLine FL_SELECTION + { + Pos = MAP_APPFONT ( 133 , ROW_FL_SELECTION ) ; + Size = MAP_APPFONT ( 120 , 8 ) ; + Text [ en-US ] = "Selection"; + }; + + CheckBox CB_SELECTION + { + Pos = MAP_APPFONT ( 139, ROW_CB_SELECTION + (((12 - RSC_CD_CHECKBOX_HEIGHT) / 2) + 1)) ; + Size = MAP_APPFONT ( 118 - 34 , RSC_CD_CHECKBOX_HEIGHT ) ; + Text [ en-US ] = "Transparency" ; + }; + + MetricField MF_SELECTION + { + Pos = MAP_APPFONT ( 139 + (95 - 12), ROW_CB_SELECTION ) ; + Size = MAP_APPFONT ( 31 , 12 ) ; + Border = TRUE ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 10 ; + Maximum = 90 ; + DecimalDigits = 0 ; + First = 10 ; + Last = 90 ; + SpinSize = 5 ; + Unit = FUNIT_CUSTOM ; + CustomUnitText [ en-US ] = "%" ; + }; }; // ******************************************************************* diff --git a/svx/source/cui/showcols.cxx b/svx/source/cui/showcols.cxx index bf225508310e..734b59e1f6fe 100644 --- a/svx/source/cui/showcols.cxx +++ b/svx/source/cui/showcols.cxx @@ -36,19 +36,17 @@ #endif #include "showcols.hxx" -#ifndef _SVX_FMRESIDS_HRC #include "fmresids.hrc" -#endif #include <tools/shl.hxx> #include <svx/dialmgr.hxx> #include <vcl/msgbox.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <comphelper/extract.hxx> #include <comphelper/types.hxx> -#include "fmstatic.hxx" //CHINA001 -IMPLEMENT_CONSTASCII_USTRING(CUIFM_PROP_HIDDEN, "Hidden"); -IMPLEMENT_CONSTASCII_USTRING(CUIFM_PROP_LABEL,"Label"); +#define CUIFM_PROP_HIDDEN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Hidden" ) ) +#define CUIFM_PROP_LABEL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Label" ) ) + //========================================================================== // FmShowColsDialog //========================================================================== diff --git a/svx/source/cui/svuidlg.src b/svx/source/cui/svuidlg.src index a00a09e919e6..cc8f2db676ae 100644 --- a/svx/source/cui/svuidlg.src +++ b/svx/source/cui/svuidlg.src @@ -156,37 +156,37 @@ ModalDialog MD_UPDATE_BASELINKS }; CancelButton 1 { - Pos = MAP_APPFONT ( 275 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT ( 270 , 6 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Close" ; }; HelpButton 1 { - Pos = MAP_APPFONT ( 275 , 26 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT ( 270 , 26 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; }; PushButton PB_UPDATE_NOW { - Pos = MAP_APPFONT ( 275 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT ( 270 , 43 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Update" ; }; PushButton PB_OPEN_SOURCE { - Pos = MAP_APPFONT ( 275 , 60 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT ( 270 , 60 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Open" ; }; PushButton PB_CHANGE_SOURCE { - Pos = MAP_APPFONT ( 275 , 77 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT ( 270 , 77 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Modify..." ; }; PushButton PB_BREAK_LINK { - Pos = MAP_APPFONT ( 275 , 94 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT ( 270 , 94 ) ; + Size = MAP_APPFONT ( 60 , 14 ) ; Text [ en-US ] = "~Break Link" ; }; FixedText FT_FILES2 diff --git a/svx/source/cui/treeopt.cxx b/svx/source/cui/treeopt.cxx index 7491b2bb1cc5..744f9d5c1dbe 100644 --- a/svx/source/cui/treeopt.cxx +++ b/svx/source/cui/treeopt.cxx @@ -64,6 +64,8 @@ #include <com/sun/star/awt/XContainerWindowEventHandler.hpp> #include <com/sun/star/awt/PosSize.hpp> #include <com/sun/star/awt/XTopWindow.hpp> +#include <com/sun/star/awt/XControl.hpp> +#include <com/sun/star/awt/XTabController.hpp> #include <vcl/help.hxx> #ifndef _LINGUISTIC_MISC_HHX_ #include <linguistic/misc.hxx> @@ -2745,10 +2747,23 @@ void ExtensionsTabPage::CreateDialogWithHandler() if ( !bWithHandler || m_xEventHdl.is() ) { + SetStyle( GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL ); Reference< awt::XWindowPeer > xParent( VCLUnoHelper::GetInterface( this ), UNO_QUERY ); m_xPage = Reference < awt::XWindow >( m_xWinProvider->createContainerWindow( m_sPageURL, rtl::OUString(), xParent, m_xEventHdl ), UNO_QUERY ); + + Reference< awt::XControl > xPageControl( m_xPage, UNO_QUERY ); + if ( xPageControl.is() ) + { + Reference< awt::XWindowPeer > xWinPeer( xPageControl->getPeer() ); + if ( xWinPeer.is() ) + { + Window* pWindow = VCLUnoHelper::GetWindow( xWinPeer ); + if ( pWindow ) + pWindow->SetStyle( pWindow->GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL ); + } + } } } catch ( ::com::sun::star::lang::IllegalArgumentException& ) diff --git a/svx/source/cui/zoom.src b/svx/source/cui/zoom.src index dca32260ab8d..197d1e2f2959 100644 --- a/svx/source/cui/zoom.src +++ b/svx/source/cui/zoom.src @@ -37,48 +37,48 @@ ModalDialog RID_SVXDLG_ZOOM HelpId = SID_ATTR_ZOOM ; OutputSize = TRUE ; SvLook = TRUE ; - Size = MAP_APPFONT ( 218 , 112 ) ; + Size = MAP_APPFONT ( 242 , 112 ) ; Moveable = TRUE ; Text [ en-US ] = "Zoom & View Layout"; FixedLine FL_ZOOM { Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; + Size = MAP_APPFONT ( 112 , 8 ) ; Text [ en-US ] = "Zoom factor"; }; RadioButton BTN_OPTIMAL { Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 91 , 10 ) ; + Size = MAP_APPFONT ( 105 , 10 ) ; Text [ en-US ] = "~Optimal" ; }; RadioButton BTN_WHOLE_PAGE { Pos = MAP_APPFONT ( 12 , 27 ) ; - Size = MAP_APPFONT ( 91 , 10 ) ; + Size = MAP_APPFONT ( 105 , 10 ) ; Text [ en-US ] = "~Fit width and height" ; }; RadioButton BTN_PAGE_WIDTH { Pos = MAP_APPFONT ( 12 , 40 ) ; - Size = MAP_APPFONT ( 91 , 10 ) ; + Size = MAP_APPFONT ( 105, 10 ) ; Text [ en-US ] = "Fit ~width" ; }; RadioButton BTN_100 { Pos = MAP_APPFONT ( 12 , 53 ) ; - Size = MAP_APPFONT ( 91 , 10 ) ; + Size = MAP_APPFONT ( 105, 10 ) ; Text = "~100 %" ; }; RadioButton BTN_USER { Pos = MAP_APPFONT ( 12 , 67 ) ; - Size = MAP_APPFONT ( 59 , 10 ) ; + Size = MAP_APPFONT ( 72 , 10 ) ; Text [ en-US ] = "~Variable" ; }; MetricField ED_USER { - Pos = MAP_APPFONT ( 74 , 66 ) ; + Pos = MAP_APPFONT ( 86 , 66 ) ; Size = MAP_APPFONT ( 32 , 12 ) ; Border = TRUE ; Group = TRUE ; @@ -91,31 +91,31 @@ ModalDialog RID_SVXDLG_ZOOM }; FixedLine FL_VIEWLAYOUT { - Pos = MAP_APPFONT ( 112 , 3 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; + Pos = MAP_APPFONT ( 124 , 3 ) ; + Size = MAP_APPFONT ( 112 , 8 ) ; Text [ en-US ] = "View layout"; }; RadioButton BTN_AUTOMATIC { - Pos = MAP_APPFONT ( 118 , 14 ) ; - Size = MAP_APPFONT ( 91 , 10 ) ; + Pos = MAP_APPFONT ( 130 , 14 ) ; + Size = MAP_APPFONT ( 106 , 10 ) ; Text [ en-US ] = "~Automatic" ; }; RadioButton BTN_SINGLE { - Pos = MAP_APPFONT ( 118 , 27 ) ; - Size = MAP_APPFONT ( 91 , 10 ) ; + Pos = MAP_APPFONT ( 130, 27 ) ; + Size = MAP_APPFONT ( 106, 10 ) ; Text [ en-US ] = "~Single page" ; }; RadioButton BTN_COLUMNS { - Pos = MAP_APPFONT ( 118 , 41 ) ; - Size = MAP_APPFONT ( 64 , 10 ) ; + Pos = MAP_APPFONT ( 130, 41 ) ; + Size = MAP_APPFONT ( 75 , 10 ) ; Text [ en-US ] = "~Columns" ; }; MetricField ED_COLUMNS { - Pos = MAP_APPFONT ( 185 , 40 ) ; + Pos = MAP_APPFONT ( 209 , 40 ) ; Size = MAP_APPFONT ( 24 , 12 ) ; Border = TRUE ; Group = TRUE ; @@ -128,29 +128,29 @@ ModalDialog RID_SVXDLG_ZOOM }; CheckBox CHK_BOOK { - Pos = MAP_APPFONT ( 124 , 55 ) ; + Pos = MAP_APPFONT ( 136 , 55 ) ; Size = MAP_APPFONT ( 85 , 10 ) ; Text [ en-US ] = "~Book mode" ; }; FixedLine FL_BOTTOM { Pos = MAP_APPFONT ( 6 , 81 ) ; - Size = MAP_APPFONT ( 206 , 8 ) ; + Size = MAP_APPFONT ( 230 , 8 ) ; }; OKButton BTN_ZOOM_OK { - Pos = MAP_APPFONT ( 53 , 92 ) ; + Pos = MAP_APPFONT ( 77 , 92 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; DefButton = TRUE ; }; CancelButton BTN_ZOOM_CANCEL { - Pos = MAP_APPFONT ( 106 , 92 ) ; + Pos = MAP_APPFONT ( 130 , 92 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; }; HelpButton BTN_ZOOM_HELP { - Pos = MAP_APPFONT ( 162 , 92 ) ; + Pos = MAP_APPFONT ( 186 , 92 ) ; Size = MAP_APPFONT ( 50 , 14 ) ; }; }; diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index fb95a5bfbb15..f066cd6a4729 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -751,30 +751,9 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : } break; case mso_sptCurvedLeftArrow : - { - if ( ( seqAdjustmentValues.getLength() > 2 ) && ( seqAdjustmentValues[ 2 ].State == com::sun::star::beans::PropertyState_DIRECT_VALUE ) ) - { - double fValue; - seqAdjustmentValues[ 2 ].Value >>= fValue; - fValue = 21600 - fValue; - seqAdjustmentValues[ 2 ].Value <<= fValue; - } - nFlags |= DFF_CUSTOMSHAPE_FLIP_H; - } - break; + case mso_sptCurvedRightArrow : case mso_sptCurvedUpArrow : - { - if ( ( seqAdjustmentValues.getLength() > 2 ) && ( seqAdjustmentValues[ 2 ].State == com::sun::star::beans::PropertyState_DIRECT_VALUE ) ) - { - double fValue; - seqAdjustmentValues[ 2 ].Value >>= fValue; - fValue = 21600 - fValue; - seqAdjustmentValues[ 2 ].Value <<= fValue; - } - nFlags |= DFF_CUSTOMSHAPE_FLIP_V | DFF_CUSTOMSHAPE_EXCH; - } - break; - case mso_sptCurvedDownArrow : nFlags |= DFF_CUSTOMSHAPE_EXCH; break; + case mso_sptCurvedDownArrow : nColorData = 0x2d000000; break; case mso_sptRibbon2 : nColorData = 0x30dd0000; break; case mso_sptRibbon : nColorData = 0x30dd0000; break; diff --git a/svx/source/customshapes/EnhancedCustomShape2d.hxx b/svx/source/customshapes/EnhancedCustomShape2d.hxx index 7f42ad751edc..25a537db072a 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.hxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.hxx @@ -32,28 +32,19 @@ #define _ENHANCEDCUSTOMSHAPE2D_HXX #include <svx/msdffdef.hxx> -#include <svx/msdffimp.hxx> #include <svx/sdasitm.hxx> #include <com/sun/star/uno/Sequence.h> -#ifndef _com_sun_star_beans_PropertyValues_hpp__ #include <com/sun/star/beans/PropertyValues.hpp> -#endif #include <com/sun/star/awt/Point.hpp> #include <svtools/itemset.hxx> -#ifndef __com_sun_star_drawing_EnhancedCustomShapeParameterPair_hpp__ #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp> -#endif #include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeParameter.hpp> -#ifndef __COM_SUN_STAR_DRAWING_ENHANCEDCUSTOMSHAPETEXTFRAME_HPP__ #include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp> -#endif #include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp> #include <EnhancedCustomShapeFunctionParser.hxx> -#ifndef BOOST_SHARED_PTR_HPP_INCLUDED #include <boost/shared_ptr.hpp> -#endif #include <vector> #define DFF_CUSTOMSHAPE_FLIP_V 1 @@ -84,6 +75,7 @@ class SvxMSDffAdjustmentHandle; // between X_RANGE and Y_RANGE class SdrPathObj; + class EnhancedCustomShape2d : public SfxItemSet { SdrObject* pCustomShapeObj; @@ -164,17 +156,17 @@ class EnhancedCustomShape2d : public SfxItemSet sal_Bool IsFlipHorz() { return bFlipH; }; sal_Int32 GetRotateAngle() { return nRotateAngle; }; - SdrObject* CreateLineGeometry(); - SdrObject* CreateObject( sal_Bool bLineGeometryNeededOnly ); - void ApplyGluePoints( SdrObject* pObj ); - Rectangle GetTextRect() const; + SVX_DLLPUBLIC SdrObject* CreateLineGeometry(); + SVX_DLLPUBLIC SdrObject* CreateObject( sal_Bool bLineGeometryNeededOnly ); + SVX_DLLPUBLIC void ApplyGluePoints( SdrObject* pObj ); + SVX_DLLPUBLIC Rectangle GetTextRect() const; - sal_uInt32 GetHdlCount() const; - sal_Bool GetHandlePosition( const sal_uInt32 nIndex, Point& rReturnPosition ) const; - sal_Bool SetHandleControllerPosition( const sal_uInt32 nIndex, const com::sun::star::awt::Point& rPosition ); + SVX_DLLPUBLIC sal_uInt32 GetHdlCount() const; + SVX_DLLPUBLIC sal_Bool GetHandlePosition( const sal_uInt32 nIndex, Point& rReturnPosition ) const; + SVX_DLLPUBLIC sal_Bool SetHandleControllerPosition( const sal_uInt32 nIndex, const com::sun::star::awt::Point& rPosition ); - EnhancedCustomShape2d( SdrObject* pSdrObjCustomShape ); - ~EnhancedCustomShape2d(); + SVX_DLLPUBLIC EnhancedCustomShape2d( SdrObject* pSdrObjCustomShape ); + SVX_DLLPUBLIC ~EnhancedCustomShape2d(); enum EnumFunc { @@ -198,15 +190,15 @@ class EnhancedCustomShape2d : public SfxItemSet double GetEquationValueAsDouble( const sal_Int32 nIndex ) const; sal_Int32 GetAdjustValueAsInteger( const sal_Int32 nIndex, const sal_Int32 nDefault = 0 ) const; - static rtl::OUString GetEquation( const sal_uInt16 nFlags, sal_Int16 nPara1, sal_Int16 nPara2, sal_Int16 nPara3 ); + SVX_DLLPUBLIC static rtl::OUString GetEquation( const sal_uInt16 nFlags, sal_Int16 nPara1, sal_Int16 nPara2, sal_Int16 nPara3 ); static void AppendEnhancedCustomShapeEquationParameter( rtl::OUString& rParameter, const sal_Int16 nPara, const sal_Bool bIsSpecialValue ); static void SetEnhancedCustomShapeEquationParameter( com::sun::star::drawing::EnhancedCustomShapeParameter& rParameter, const sal_Int16 nPara, const sal_Bool bIsSpecialValue ); - static void SetEnhancedCustomShapeParameter( com::sun::star::drawing::EnhancedCustomShapeParameter& + SVX_DLLPUBLIC static void SetEnhancedCustomShapeParameter( com::sun::star::drawing::EnhancedCustomShapeParameter& rParameter, const sal_Int32 nValue ); - static void SetEnhancedCustomShapeHandleParameter( com::sun::star::drawing::EnhancedCustomShapeParameter& + SVX_DLLPUBLIC static void SetEnhancedCustomShapeHandleParameter( com::sun::star::drawing::EnhancedCustomShapeParameter& rParameter, const sal_Int32 nPara, const sal_Bool bIsSpecialValue, sal_Bool bHorz ); static sal_Bool ConvertSequenceToEnhancedCustomShape2dHandle( const com::sun::star::beans::PropertyValues& rHandleProperties, EnhancedCustomShape2d::Handle& rDestinationHandle ); diff --git a/svx/source/customshapes/EnhancedCustomShape3d.hxx b/svx/source/customshapes/EnhancedCustomShape3d.hxx index 3451007a2b28..6d885d51e012 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.hxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.hxx @@ -31,14 +31,15 @@ #ifndef _ENHANCEDCUSTOMSHAPE3D_HXX #define _ENHANCEDCUSTOMSHAPE3D_HXX -#include <svx/msdffimp.hxx> #include <vector> -//#include <poly3d.hxx> -//#include <goodies/point3d.hxx> #include <com/sun/star/drawing/ProjectionMode.hpp> #include <basegfx/point/b3dpoint.hxx> #include <basegfx/polygon/b3dpolygon.hxx> +#include <tools/gen.hxx> + +class SdrObject; + class EnhancedCustomShape3d { class Transformation2D diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx index 9cb3c414de37..0b41dda45eaa 100644 --- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx @@ -54,10 +54,6 @@ static const SvxMSDffTextRect TextRect[] = { { { 0, 0 }, { 0, 0 } } }; -static const sal_Int32 BoundRect[] = -{ - 0, 0, 21600, 21600 -}; static const mso_CustomShape mso = { (SvxMSDffVertPair*)mso_sptVert, sizeof( mso_sptVert ) / sizeof( SvxMSDffVertPair ), @@ -668,10 +664,6 @@ static const SvxMSDffVertPair mso_sptCanGluePoints[] = { { 44, 6 MSO_I }, { 44, 0 }, { 0, 10800 }, { 44, 21600 }, { 88, 10800 } }; -static const sal_Int32 mso_sptCanBoundRect[] = -{ - 0, 0, 88, 21600 -}; static const SvxMSDffHandle mso_sptCanHandle[] = { { MSDFF_HANDLE_FLAGS_RANGE, @@ -1197,60 +1189,422 @@ static const mso_CustomShape msoBentUpArrow = (SvxMSDffHandle*)mso_sptBentUpArrowHandle, sizeof( mso_sptBentUpArrowHandle ) / sizeof( SvxMSDffHandle ) }; -static const SvxMSDffVertPair mso_sptCurvedArrowVert[] = // adjustment1 : y 10800 - 21600, adjustment2 : y 16424 - 21600 -{ // adjustment3 : x 0 - 21600 - { 21600, 0 }, - { 9675, 0 }, { 0, 10 MSO_I }, { 0, 9 MSO_I }, // ccp - { 0, 11 MSO_I }, - { 0, 14 MSO_I }, { 15 MSO_I, 1 MSO_I }, { 2 MSO_I, 1 MSO_I }, // ccp - { 2 MSO_I, 21600 }, { 21600, 7 MSO_I }, { 2 MSO_I, 0 MSO_I }, { 2 MSO_I, 16 MSO_I },// pppp - { 2 MSO_I, 16 MSO_I }, { 80, 8 MSO_I }, { 80, 8 MSO_I }, // ccp - { 80, 8 MSO_I }, { 21600, 5 MSO_I }, { 21600, 0 } // ccp -}; -static const sal_uInt16 mso_sptCurvedArrowSegm[] = -{ - 0x4000, 0x2001, 0x0001, 0x2001, 0x0004, 0x2002, 0x6001, 0x8000 -}; -static const SvxMSDffCalculationData mso_sptCurvedArrowCalc[] = -{ - { 0x2000, { DFF_Prop_adjustValue, 0, 0 } }, // 0 - { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } }, // 1 - { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } }, // 2 - { 0x8000, { 21600, 0, DFF_Prop_adjust2Value } }, // 3 - { 0xa000, { DFF_Prop_adjust2Value, 0, DFF_Prop_adjustValue } }, // 4 - { 0xa000, { 0x0404, 0, 0x0403 } }, // 5 - { 0x2001, { 0x0405, 1, 2 } }, // 6 - { 0xa000, { DFF_Prop_adjust2Value, 0, 0x0406 } }, // 7 - { 0x2001, { DFF_Prop_adjust2Value, 1, 2 } }, // 8 - { 0xa000, { 0x0408, 0, 0x0406 } }, // 9 - { 0x2001, { 0x0409, 10000, 22326 } }, // 10 - { 0x6000, { 0x0409, 0x0405, 0 } }, // 11 - { 0xa000, { DFF_Prop_adjust2Value, 0, 0x040b } }, // 12 - { 0x2001, { 0x040c, 10000, 23148 } }, // 13 - { 0x6000, { 0x040d, 0x040b, 0 } }, // 14 - { 0x2001, { DFF_Prop_adjust3Value, 10000, 25467 } }, // 15 - { 0x6000, { DFF_Prop_adjustValue, 0x0403, 0 } } // 16 -}; -static const sal_Int32 mso_sptCurvedArrowDefault[] = -{ - 3, 13000, 19400, 14400 -}; -static const SvxMSDffTextRectangles mso_sptCurvedArrowTextRect[] = // todo + +static const SvxMSDffVertPair mso_sptCurvedDownVert[] = { - { { 0, 0 }, { 21600, 21600 } } + { 0, 0 }, { 3 MSO_I, 21 MSO_I }, { 0, 21600 }, { 4 MSO_I, 0 }, + { 0, 0 }, { 3 MSO_I, 21 MSO_I }, { 4 MSO_I, 0 }, { 17 MSO_I, 24 MSO_I }, + { 15 MSO_I, 0 }, { 1 MSO_I, 21 MSO_I }, { 17 MSO_I, 24 MSO_I }, { 15 MSO_I, 21600 }, + { 15 MSO_I, 0 }, { 1 MSO_I, 21 MSO_I }, { 7 MSO_I, 0 }, { 13 MSO_I, 2 MSO_I }, + { 14 MSO_I, 2 MSO_I }, { 8 MSO_I, 21600 }, { 12 MSO_I, 2 MSO_I }, + { 0, 0 }, { 3 MSO_I, 21 MSO_I }, { 11 MSO_I, 2 MSO_I }, { 17 MSO_I, 24 MSO_I }, + { 0, 0 }, { 3 MSO_I, 21 MSO_I }, { 17 MSO_I, 24 MSO_I }, { 4 MSO_I, 0 } +}; +static const sal_uInt16 mso_sptCurvedDownSegm[] = +{ + 0xa508, + 0xa304, + 0x6000, + 0x8000, + 0xa604, + 0x0003, + 0xa308, + 0x6000, + 0x8000 +}; +static const SvxMSDffCalculationData mso_sptCurvedDownCalc[] = +{ + { 0x2000, { DFF_Prop_adjustValue, 0, 0 } }, + { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } }, + { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } }, + { 0xa000, { DFF_Prop_adjustValue, 21600, DFF_Prop_adjust2Value } }, + { 0x2001, { 0x403, 1, 2 } }, + { 0x6000, { DFF_Prop_adjust2Value, DFF_Prop_adjust2Value, 21600 } }, + { 0xe000, { 0x405, DFF_Prop_adjust2Value, DFF_Prop_adjustValue } }, + { 0x2001, { 0x406, 1, 2 } }, + { 0x4002, { 21600, DFF_Prop_adjustValue, 0 } }, + { 0x8000, { 21600, 0, DFF_Prop_adjust3Value } }, + { 0xa00f, { 0x409, 21600, 0x404 } }, + { 0x6000, { 0x404, 0x40a, 0 } }, + { 0x6000, { 0x40b, DFF_Prop_adjust2Value, 21600 } }, + { 0x6000, { 0x407, 0x40a, 0 } }, + { 0xa000, { 0x40c, 21600, DFF_Prop_adjustValue } }, + { 0xa000, { 0x405, 0, DFF_Prop_adjustValue } }, + { 0x2001, { 0x40f, 1, 2 } }, + { 0x6002, { 0x404, 0x407, 0 } }, + { 0x6000, { DFF_Prop_adjustValue, DFF_Prop_adjust2Value, 21600 } }, + { 0x2001, { 0x412, 1, 2 } }, + { 0xa000, { 0x411, 0, 0x413 } }, + { 0x0001, { 21600, 2, 1 } }, + { 0xa000, { 0x411, 0, 0x404 } }, + { 0x600f, { 0x416, 0x404, 21600 } }, + { 0x8000, { 21600, 0, 0x417 } }, + { 0x2000, { 0x408, 128, 0 } }, + { 0x2001, { 0x405, 1, 2 } }, + { 0x2000, { 0x405, 0, 128 } }, + { 0xe000, { DFF_Prop_adjustValue, 0x411, 0x40c } }, + { 0x600f, { 0x414, 0x404, 21600 } }, + { 0x8000, { 21600, 0, DFF_Prop_adjustValue } }, + { 0x2001, { 0x41e, 1, 2 } }, + { 0x0001, { 21600, 21600, 1 } }, + { 0x6001, { 0x409, 0x409, 1 } }, + { 0xa000, { 0x420, 0, 0x421 } }, + { 0x200d, { 0x422, 0, 0 } }, + { 0x2000, { 0x423, 21600, 0 } }, + { 0x8001, { 21600, 21600, 0x424 } }, + { 0x2000, { 0x425, 64, 0 } }, + { 0x2001, { DFF_Prop_adjustValue, 1, 2 } }, + { 0x600f, { 0x41f, 0x427, 21600 } }, + { 0x8000, { 21600, 0, 0x428 } }, + { 0x2000, { 0x429, 64, 0 } }, + { 0x2001, { 0x404, 1, 2 } }, + { 0xa000, { DFF_Prop_adjust2Value, 0, 0x42b } }, + { 0x0001, { 21600, 2195, 16384 } }, + { 0x0001, { 21600, 14189, 16384 } } }; -static const mso_CustomShape msoCurvedArrow = +static const sal_Int32 mso_sptCurvedDownDefault[] = { - (SvxMSDffVertPair*)mso_sptCurvedArrowVert, sizeof( mso_sptCurvedArrowVert ) / sizeof( SvxMSDffVertPair ), - (sal_uInt16*)mso_sptCurvedArrowSegm, sizeof( mso_sptCurvedArrowSegm ) >> 1, - (SvxMSDffCalculationData*)mso_sptCurvedArrowCalc, sizeof( mso_sptCurvedArrowCalc ) / sizeof( SvxMSDffCalculationData ), - (sal_Int32*)mso_sptCurvedArrowDefault, - (SvxMSDffTextRectangles*)mso_sptCurvedArrowTextRect, sizeof( mso_sptCurvedArrowTextRect ) / sizeof( SvxMSDffTextRectangles ), + 3, 12960, 19440, 14400 +}; +static const SvxMSDffTextRectangles mso_sptCurvedDownTextRect[] = +{ + { { 43 MSO_I, 45 MSO_I }, { 44 MSO_I, 46 MSO_I } } +}; +static const SvxMSDffVertPair mso_sptCurvedDownGluePoints[] = +{ + { 17 MSO_I, 0 }, { 16 MSO_I, 21600 }, { 12 MSO_I, 2 MSO_I }, { 8 MSO_I, 21600 }, { 14 MSO_I, 2 MSO_I } +}; +static const SvxMSDffHandle mso_sptCurvedDownHandles[] = +{ + { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL, + 0x100, 21600, 10800, 10800, 3 + 0x26, 3 + 0x1b, 0, 10800 }, + { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL, + 0x101, 21600, 10800, 10800, 3 + 0x19, 21600, 0, 10800 }, + { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL, + 21600, 0x102, 10800, 10800, 3375, 21600, 3 + 0x2a, 21600 } +}; +static const mso_CustomShape msoCurvedDownArrow = +{ + (SvxMSDffVertPair*)mso_sptCurvedDownVert, sizeof( mso_sptCurvedDownVert ) / sizeof( SvxMSDffVertPair ), + (sal_uInt16*)mso_sptCurvedDownSegm, sizeof( mso_sptCurvedDownSegm ) >> 1, + (SvxMSDffCalculationData*)mso_sptCurvedDownCalc, sizeof( mso_sptCurvedDownCalc ) / sizeof( SvxMSDffCalculationData ), + (sal_Int32*)mso_sptCurvedDownDefault, + (SvxMSDffTextRectangles*)mso_sptCurvedDownTextRect, sizeof( mso_sptCurvedDownTextRect ) / sizeof( SvxMSDffTextRectangles ), 21600, 21600, 0x80000000, 0x80000000, - NULL, 0, - NULL, 0 // handles + (SvxMSDffVertPair*)mso_sptCurvedDownGluePoints, sizeof( mso_sptCurvedDownGluePoints ) / sizeof( SvxMSDffVertPair ), + (SvxMSDffHandle*)mso_sptCurvedDownHandles, sizeof( mso_sptCurvedDownHandles ) / sizeof( SvxMSDffHandle ) +}; + +static const SvxMSDffVertPair mso_sptCurvedUpVert[] = +{ + { 0, 22 MSO_I }, { 3 MSO_I, 21 MSO_I }, { 0, 0 }, { 4 MSO_I, 21 MSO_I }, + { 14 MSO_I, 22 MSO_I }, { 1 MSO_I, 21 MSO_I }, { 7 MSO_I, 21 MSO_I }, { 12 MSO_I, 2 MSO_I }, + { 13 MSO_I, 2 MSO_I }, { 8 MSO_I, 0 }, { 11 MSO_I, 2 MSO_I }, + { 0, 22 MSO_I }, { 3 MSO_I, 21 MSO_I }, { 10 MSO_I, 2 MSO_I }, { 16 MSO_I, 24 MSO_I }, + { 14 MSO_I, 22 MSO_I }, { 1 MSO_I, 21 MSO_I }, { 16 MSO_I, 24 MSO_I }, { 14 MSO_I, 0 }, + { 14 MSO_I, 22 MSO_I }, { 1 MSO_I, 21 MSO_I }, { 7 MSO_I, 21 MSO_I }, { 16 MSO_I, 24 MSO_I } +}; +static const sal_uInt16 mso_sptCurvedUpSegm[] = +{ + 0xa408, + 0x0003, + 0xa508, + 0x6000, + 0x8000, + 0xa604, + 0xaa00, + 0x8000 +}; +static const SvxMSDffCalculationData mso_sptCurvedUpCalc[] = +{ + { 0x2000, { DFF_Prop_adjustValue, 0, 0 } }, + { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } }, + { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } }, + { 0xa000, { DFF_Prop_adjustValue, 21600, DFF_Prop_adjust2Value } }, + { 0x2001, { 0x403, 1, 2 } }, + { 0x6000, { DFF_Prop_adjust2Value, DFF_Prop_adjust2Value, 21600 } }, + { 0xe000, { 0x405, DFF_Prop_adjust2Value, DFF_Prop_adjustValue } }, + { 0x2001, { 0x406, 1, 2 } }, + { 0x4002, { 21600, DFF_Prop_adjustValue, 0 } }, + { 0xa00f, { DFF_Prop_adjust3Value, 21600, 0x404 } }, + { 0x6000, { 0x404, 0x409, 0 } }, + { 0x6000, { 0x40a, DFF_Prop_adjust2Value, 21600 } }, + { 0x6000, { 0x407, 0x409, 0 } }, + { 0xa000, { 0x40b, 21600, DFF_Prop_adjustValue } }, + { 0xa000, { 0x405, 0, DFF_Prop_adjustValue } }, + { 0x2001, { 0x40e, 1, 2 } }, + { 0x6002, { 0x404, 0x407, 0 } }, + { 0x6000, { DFF_Prop_adjustValue, DFF_Prop_adjust2Value, 21600 } }, + { 0x2001, { 0x411, 1, 2 } }, + { 0xa000, { 0x410, 0, 0x412 } }, + { 0x0000, { 21600, 0, 0 } }, + { 0x0000, { 21600, 0, 0 } }, + { 0x0000, { 0, 0, 21600 } }, + { 0xa000, { 0x410, 0, 0x404 } }, + { 0x600f, { 0x417, 0x404, 21600 } }, + { 0x2000, { 0x408, 128, 0 } }, + { 0x2001, { 0x405, 1, 2 } }, + { 0x2000, { 0x405, 0, 128 } }, + { 0xe000, { DFF_Prop_adjustValue, 0x410, 0x40b } }, + { 0x8000, { 21600, 0, DFF_Prop_adjustValue } }, + { 0x2001, { 0x41d, 1, 2 } }, + { 0x0001, { 21600, 21600, 1 } }, + { 0x6001, { DFF_Prop_adjust3Value, DFF_Prop_adjust3Value, 1 } }, + { 0xa000, { 0x41f, 0, 0x420 } }, + { 0x200d, { 0x421, 0, 0 } }, + { 0x2000, { 0x422, 21600, 0 } }, + { 0x8001, { 21600, 21600, 0x423 } }, + { 0x2000, { 0x424, 64, 0 } }, + { 0x2001, { DFF_Prop_adjustValue, 1, 2 } }, + { 0x600f, { 0x41e, 0x426, 21600 } }, + { 0x2000, { 0x427, 0, 64 } }, + { 0x2001, { 0x404, 1, 2 } }, + { 0xa000, { DFF_Prop_adjust2Value, 0, 0x429 } }, + { 0x0001, { 21600, 2195, 16384 } }, + { 0x0001, { 21600, 14189, 16384 } } +}; +static const sal_Int32 mso_sptCurvedUpDefault[] = +{ + 3, 12960, 19440, 7200 +}; +static const SvxMSDffTextRectangles mso_sptCurvedUpTextRect[] = +{ + { { 41 MSO_I, 43 MSO_I }, { 42 MSO_I, 44 MSO_I } } +}; +static const SvxMSDffVertPair mso_sptCurvedUpGluePoints[] = +{ + { 8 MSO_I, 0 }, { 11 MSO_I, 2 MSO_I }, { 15 MSO_I, 0 }, { 16 MSO_I, 21 MSO_I }, { 13 MSO_I, 2 MSO_I } +}; +static const SvxMSDffHandle mso_sptCurvedUpHandles[] = +{ + { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL, + 0x100, 0, 10800, 10800, 3 + 37, 3 + 27, 0, 10800 }, + { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL, + 0x101, 0, 10800, 10800, 3 + 25, 3 + 20, 0, 10800 }, + { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL, + 21600, 0x102, 10800, 10800, 3375, 21600, 0, 3 + 40 } +}; +static const mso_CustomShape msoCurvedUpArrow = +{ + (SvxMSDffVertPair*)mso_sptCurvedUpVert, sizeof( mso_sptCurvedUpVert ) / sizeof( SvxMSDffVertPair ), + (sal_uInt16*)mso_sptCurvedUpSegm, sizeof( mso_sptCurvedUpSegm ) >> 1, + (SvxMSDffCalculationData*)mso_sptCurvedUpCalc, sizeof( mso_sptCurvedUpCalc ) / sizeof( SvxMSDffCalculationData ), + (sal_Int32*)mso_sptCurvedUpDefault, + (SvxMSDffTextRectangles*)mso_sptCurvedUpTextRect, sizeof( mso_sptCurvedUpTextRect ) / sizeof( SvxMSDffTextRectangles ), + 21600, 21600, + 0x80000000, 0x80000000, + (SvxMSDffVertPair*)mso_sptCurvedUpGluePoints, sizeof( mso_sptCurvedUpGluePoints ) / sizeof( SvxMSDffVertPair ), + (SvxMSDffHandle*)mso_sptCurvedUpHandles, sizeof( mso_sptCurvedUpHandles ) / sizeof( SvxMSDffHandle ) +}; + +static const SvxMSDffVertPair mso_sptCurvedRightVert[] = +{ + { 0, 0 }, { 23 MSO_I, 3 MSO_I }, { 22 MSO_I, 0 }, { 0, 4 MSO_I }, { 0, 15 MSO_I }, { 23 MSO_I, 1 MSO_I }, { 0, 7 MSO_I }, { 2 MSO_I, 13 MSO_I }, + { 2 MSO_I, 14 MSO_I }, { 22 MSO_I, 8 MSO_I }, { 2 MSO_I, 12 MSO_I }, + { 0, 0 }, { 23 MSO_I, 3 MSO_I }, { 2 MSO_I, 11 MSO_I }, { 26 MSO_I, 17 MSO_I }, { 0, 15 MSO_I }, { 23 MSO_I, 1 MSO_I }, { 26 MSO_I, 17 MSO_I }, { 22 MSO_I, 15 MSO_I }, + { 0, 0 }, { 23 MSO_I, 3 MSO_I }, { 0, 4 MSO_I }, { 26 MSO_I, 17 MSO_I } +}; +static const sal_uInt16 mso_sptCurvedRightSegm[] = +{ + 0xa408, + 0x0003, + 0xa508, + 0x6000, + 0x8000, + 0xa404, + 0xaa00, + 0x8000 +}; +static const SvxMSDffCalculationData mso_sptCurvedRightCalc[] = +{ + { 0x2000, { DFF_Prop_adjustValue, 0, 0 } }, + { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } }, + { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } }, + { 0xa000, { DFF_Prop_adjustValue, 21600, DFF_Prop_adjust2Value } }, + { 0x2001, { 0x403, 1, 2 } }, + { 0x6000, { DFF_Prop_adjust2Value, DFF_Prop_adjust2Value, 21600 } }, + { 0xe000, { 0x405, DFF_Prop_adjust2Value, DFF_Prop_adjustValue } }, + { 0x2001, { 0x406, 1, 2 } }, + { 0x4002, { 21600, DFF_Prop_adjustValue, 0 } }, + { 0x8000, { 21600, 0, DFF_Prop_adjust3Value } }, + { 0xa00f, { 0x409, 21600, 0x404 } }, + { 0x6000, { 0x404, 0x40a, 0 } }, + { 0x6000, { 0x40b, DFF_Prop_adjust2Value, 21600 } }, + { 0x6000, { 0x407, 0x40a, 0 } }, + { 0xa000, { 0x40c, 21600, DFF_Prop_adjustValue } }, + { 0xa000, { 0x405, 0, DFF_Prop_adjustValue } }, + { 0x2001, { 0x40f, 1, 2 } }, + { 0x6002, { 0x404, 0x407, 0 } }, + { 0x6000, { DFF_Prop_adjustValue, DFF_Prop_adjust2Value, 21600 } }, + { 0x2001, { 0x412, 1, 2 } }, + { 0xa000, { 0x411, 0, 0x413 } }, + { 0x0000, { 21600, 0, 0 } }, + { 0x0000, { 21600, 0, 0 } }, + { 0x0001, { 21600, 2, 1 } }, + { 0xa000, { 0x411, 0, 0x404 } }, + { 0x600f, { 0x418, 0x404, 21600 } }, + { 0x8000, { 21600, 0, 0x419 } }, + { 0x2000, { 0x408, 128, 0 } }, + { 0x2001, { 0x405, 1, 2 } }, + { 0x2000, { 0x405, 0, 128 } }, + { 0xe000, { DFF_Prop_adjustValue, 0x411, 0x40c } }, + { 0x600f, { 0x414, 0x404, 21600 } }, + { 0x8000, { 21600, 0, DFF_Prop_adjustValue } }, + { 0x2001, { 0x420, 1, 2 } }, + { 0x0001, { 21600, 21600, 1 } }, + { 0x6001, { 0x409, 0x409, 1 } }, + { 0xa000, { 0x422, 0, 0x423 } }, + { 0x200d, { 0x424, 0, 0 } }, + { 0x2000, { 0x425, 21600, 0 } }, + { 0x8001, { 21600, 21600, 0x426 } }, + { 0x2000, { 0x427, 64, 0 } }, + { 0x2001, { DFF_Prop_adjustValue, 1, 2 } }, + { 0x600f, { 0x421, 0x429, 21600 } }, + { 0x8000, { 21600, 0, 0x42a } }, + { 0x2000, { 0x42b, 64, 0 } }, + { 0x2001, { 0x404, 1, 2 } }, + { 0xa000, { DFF_Prop_adjust2Value, 0, 0x42d } }, + { 0x0001, { 21600, 2195, 16384 } }, + { 0x0001, { 21600, 14189, 16384 } } +}; +static const sal_Int32 mso_sptCurvedRightDefault[] = +{ + 3, 12960, 19440, 14400 +}; +static const SvxMSDffTextRectangles mso_sptCurvedRightTextRect[] = +{ + { { 47 MSO_I, 45 MSO_I }, { 48 MSO_I, 46 MSO_I } } +}; +static const SvxMSDffVertPair mso_sptCurvedRightGluePoints[] = +{ + { 0, 17 MSO_I }, { 2 MSO_I, 14 MSO_I }, { 22 MSO_I, 8 MSO_I }, { 2 MSO_I, 12 MSO_I }, { 22 MSO_I, 16 MSO_I } +}; +static const SvxMSDffHandle mso_sptCurvedRightHandles[] = +{ + { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL, + 21600, 0x100, 10800, 10800, 0, 10800, 3 + 40, 3 + 29 }, + { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL, + 21600, 0x101, 10800, 10800, 0, 10800, 3 + 27, 3 + 21 }, + { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL, + 0x102, 21600, 10800, 10800, 3 + 44, 3 + 22, 3375, 21600 } +}; +static const mso_CustomShape msoCurvedRightArrow = +{ + (SvxMSDffVertPair*)mso_sptCurvedRightVert, sizeof( mso_sptCurvedRightVert ) / sizeof( SvxMSDffVertPair ), + (sal_uInt16*)mso_sptCurvedRightSegm, sizeof( mso_sptCurvedRightSegm ) >> 1, + (SvxMSDffCalculationData*)mso_sptCurvedRightCalc, sizeof( mso_sptCurvedRightCalc ) / sizeof( SvxMSDffCalculationData ), + (sal_Int32*)mso_sptCurvedRightDefault, + (SvxMSDffTextRectangles*)mso_sptCurvedRightTextRect, sizeof( mso_sptCurvedRightTextRect ) / sizeof( SvxMSDffTextRectangles ), + 21600, 21600, + 0x80000000, 0x80000000, + (SvxMSDffVertPair*)mso_sptCurvedRightGluePoints, sizeof( mso_sptCurvedRightGluePoints ) / sizeof( SvxMSDffVertPair ), + (SvxMSDffHandle*)mso_sptCurvedRightHandles, sizeof( mso_sptCurvedRightHandles ) / sizeof( SvxMSDffHandle ) +}; + +static const SvxMSDffVertPair mso_sptCurvedLeftVert[] = +{ + { 22 MSO_I, 0 }, { 21 MSO_I, 3 MSO_I }, { 0, 0 }, { 21 MSO_I, 4 MSO_I }, { 22 MSO_I, 14 MSO_I }, { 21 MSO_I, 1 MSO_I }, { 21 MSO_I, 7 MSO_I }, { 2 MSO_I, 12 MSO_I }, + { 2 MSO_I, 13 MSO_I }, { 0, 8 MSO_I }, { 2 MSO_I, 11 MSO_I }, + { 22 MSO_I, 0 }, { 21 MSO_I, 3 MSO_I }, { 2 MSO_I, 10 MSO_I }, { 24 MSO_I, 16 MSO_I }, { 22 MSO_I, 14 MSO_I }, { 21 MSO_I, 1 MSO_I }, { 24 MSO_I, 16 MSO_I }, { 0, 14 MSO_I }, + { 22 MSO_I, 14 MSO_I }, { 21 MSO_I, 1 MSO_I }, { 21 MSO_I, 7 MSO_I }, { 24 MSO_I, 16 MSO_I } +}; +static const sal_uInt16 mso_sptCurvedLeftSegm[] = +{ + 0xa608, + 0x0003, + 0xa308, + 0x6000, + 0x8000, + 0xa404, + 0xaa00, + 0x8000 +}; +static const SvxMSDffCalculationData mso_sptCurvedLeftCalc[] = +{ + { 0x2000, { DFF_Prop_adjustValue, 0, 0 } }, + { 0x2000, { DFF_Prop_adjust2Value, 0, 0 } }, + { 0x2000, { DFF_Prop_adjust3Value, 0, 0 } }, + { 0xa000, { DFF_Prop_adjustValue, 21600, DFF_Prop_adjust2Value } }, + { 0x2001, { 0x403, 1, 2 } }, + { 0x6000, { DFF_Prop_adjust2Value, DFF_Prop_adjust2Value, 21600 } }, + { 0xe000, { 0x405, DFF_Prop_adjust2Value, DFF_Prop_adjustValue } }, + { 0x2001, { 0x406, 1, 2 } }, + { 0x4002, { 21600, DFF_Prop_adjustValue, 0 } }, + { 0xa00f, { DFF_Prop_adjust3Value, 21600, 0x404 } }, + { 0x6000, { 0x404, 0x409, 0 } }, + { 0x6000, { 0x40a, DFF_Prop_adjust2Value, 21600 } }, + { 0x6000, { 0x407, 0x409, 0 } }, + { 0xa000, { 0x40b, 21600, DFF_Prop_adjustValue } }, + { 0xa000, { 0x405, 0, DFF_Prop_adjustValue } }, + { 0x2001, { 0x40e, 1, 2 } }, + { 0x6002, { 0x404, 0x407, 0 } }, + { 0x6000, { DFF_Prop_adjustValue, DFF_Prop_adjust2Value, 21600 } }, + { 0x2001, { 0x411, 1, 2 } }, + { 0xa000, { 0x410, 0, 0x412 } }, + { 0x0000, { 21600, 0, 0 } }, + { 0x0000, { 21600, 0, 0 } }, + { 0x0000, { 0, 0, 21600 } }, + { 0xa000, { 0x410, 0, 0x404 } }, + { 0x600f, { 0x417, 0x404, 21600 } }, + { 0x2000, { 0x408, 128, 0 } }, + { 0x2001, { 0x405, 1, 2 } }, + { 0x2000, { 0x405, 0, 128 } }, + { 0xe000, { DFF_Prop_adjustValue, 0x410, 0x40b } }, + { 0x8000, { 21600, 0, DFF_Prop_adjustValue } }, + { 0x2001, { 0x41d, 1, 2 } }, + { 0x0001, { 21600, 21600, 1 } }, + { 0x6001, { DFF_Prop_adjust3Value, DFF_Prop_adjust3Value, 1 } }, + { 0xa000, { 0x41f, 0, 0x420 } }, + { 0x200d, { 0x421, 0, 0 } }, + { 0x2000, { 0x422, 21600, 0 } }, + { 0x8001, { 21600, 21600, 0x423 } }, + { 0x2000, { 0x424, 64, 0 } }, + { 0x2001, { DFF_Prop_adjustValue, 1, 2 } }, + { 0x600f, { 0x41e, 0x426, 21600 } }, + { 0x2000, { 0x427, 0, 64 } }, + { 0x2001, { 0x404, 1, 2 } }, + { 0xa000, { DFF_Prop_adjust2Value, 0, 0x429 } }, + { 0x0001, { 21600, 2195, 16384 } }, + { 0x0001, { 21600, 14189, 16384 } } +}; +static const sal_Int32 mso_sptCurvedLeftDefault[] = +{ + 3, 12960, 19440, 7200 +}; +static const SvxMSDffTextRectangles mso_sptCurvedLeftTextRect[] = +{ + { { 43 MSO_I, 41 MSO_I }, { 44 MSO_I, 42 MSO_I } } }; +static const SvxMSDffVertPair mso_sptCurvedLeftGluePoints[] = +{ + { 0, 15 MSO_I }, { 2 MSO_I, 11 MSO_I }, { 0, 8 MSO_I }, { 2 MSO_I, 13 MSO_I }, { 21 MSO_I, 16 MSO_I } +}; +static const SvxMSDffHandle mso_sptCurvedLeftHandles[] = +{ + { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL, + 0, 0x100, 10800, 10800, 0, 10800, 3 + 37, 3 + 27 }, + { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL | MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL, + 0, 0x101, 10800, 10800, 0, 10800, 3 + 25, 3 + 20 }, + { MSDFF_HANDLE_FLAGS_RANGE | MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL, + 0x102, 21600, 10800, 10800, 0, 3 + 40, 3375, 21600 } +}; +static const mso_CustomShape msoCurvedLeftArrow = +{ + (SvxMSDffVertPair*)mso_sptCurvedLeftVert, sizeof( mso_sptCurvedLeftVert ) / sizeof( SvxMSDffVertPair ), + (sal_uInt16*)mso_sptCurvedLeftSegm, sizeof( mso_sptCurvedLeftSegm ) >> 1, + (SvxMSDffCalculationData*)mso_sptCurvedLeftCalc, sizeof( mso_sptCurvedLeftCalc ) / sizeof( SvxMSDffCalculationData ), + (sal_Int32*)mso_sptCurvedLeftDefault, + (SvxMSDffTextRectangles*)mso_sptCurvedLeftTextRect, sizeof( mso_sptCurvedLeftTextRect ) / sizeof( SvxMSDffTextRectangles ), + 21600, 21600, + 0x80000000, 0x80000000, + (SvxMSDffVertPair*)mso_sptCurvedLeftGluePoints, sizeof( mso_sptCurvedLeftGluePoints ) / sizeof( SvxMSDffVertPair ), + (SvxMSDffHandle*)mso_sptCurvedLeftHandles, sizeof( mso_sptCurvedLeftHandles ) / sizeof( SvxMSDffHandle ) +}; + + + + static const SvxMSDffVertPair mso_sptStripedRightArrowVert[] = // adjustment1 : x 3375 - 21600 { // adjustment2 : y 0 - 10800 @@ -3046,10 +3400,6 @@ static const SvxMSDffVertPair mso_sptHeartGluePoints[] = { { 10800, 2180 }, { 3090, 10800 }, { 10800, 21600 }, { 18490, 10800 } }; -static const sal_Int32 mso_sptHeartBoundRect[] = -{ - -9, 0, 21606, 21602 -}; static const mso_CustomShape msoHeart = { (SvxMSDffVertPair*)mso_sptHeartVert, sizeof( mso_sptHeartVert ) / sizeof( SvxMSDffVertPair ), @@ -7772,10 +8122,10 @@ const mso_CustomShape* GetCustomShapeContent( MSO_SPT eSpType ) case mso_sptUturnArrow : pCustomShape = &msoUturnArrow; break; case mso_sptLeftUpArrow : pCustomShape = &msoLeftUpArrow; break; case mso_sptBentUpArrow : pCustomShape = &msoBentUpArrow; break; - case mso_sptCurvedRightArrow : pCustomShape = &msoCurvedArrow; break; - case mso_sptCurvedLeftArrow : pCustomShape = &msoCurvedArrow; break; - case mso_sptCurvedUpArrow : pCustomShape = &msoCurvedArrow; break; - case mso_sptCurvedDownArrow : pCustomShape = &msoCurvedArrow; break; + case mso_sptCurvedRightArrow : pCustomShape = &msoCurvedRightArrow; break; + case mso_sptCurvedLeftArrow : pCustomShape = &msoCurvedLeftArrow; break; + case mso_sptCurvedUpArrow : pCustomShape = &msoCurvedUpArrow; break; + case mso_sptCurvedDownArrow : pCustomShape = &msoCurvedDownArrow; break; case mso_sptStripedRightArrow : pCustomShape = &msoStripedRightArrow; break; case mso_sptNotchedRightArrow : pCustomShape = &msoNotchedRightArrow; break; case mso_sptHomePlate : pCustomShape = &msoHomePlate; break; diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.hxx b/svx/source/customshapes/EnhancedCustomShapeGeometry.hxx index b3544b8185da..8f43d8ac23a2 100644 --- a/svx/source/customshapes/EnhancedCustomShapeGeometry.hxx +++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.hxx @@ -93,12 +93,12 @@ struct mso_CustomShape #define MSO_I | (sal_Int32)0x80000000 sal_Bool SortFilledObjectsToBackByDefault( MSO_SPT eSpType ); -sal_Bool IsCustomShapeFilledByDefault( MSO_SPT eSpType ); -sal_Int16 GetCustomShapeConnectionTypeDefault( MSO_SPT eSpType ); +SVX_DLLPUBLIC sal_Bool IsCustomShapeFilledByDefault( MSO_SPT eSpType ); +SVX_DLLPUBLIC sal_Int16 GetCustomShapeConnectionTypeDefault( MSO_SPT eSpType ); // #i28269# -sal_Bool IsCustomShapeStrokedByDefault( MSO_SPT eSpType ); +SVX_DLLPUBLIC sal_Bool IsCustomShapeStrokedByDefault( MSO_SPT eSpType ); -const mso_CustomShape* GetCustomShapeContent( MSO_SPT eSpType ); +SVX_DLLPUBLIC const mso_CustomShape* GetCustomShapeContent( MSO_SPT eSpType ); #endif diff --git a/svx/source/customshapes/EnhancedCustomShapeTypeNames.hxx b/svx/source/customshapes/EnhancedCustomShapeTypeNames.hxx index 7b23629d625d..544500c34091 100644 --- a/svx/source/customshapes/EnhancedCustomShapeTypeNames.hxx +++ b/svx/source/customshapes/EnhancedCustomShapeTypeNames.hxx @@ -33,12 +33,10 @@ #include <svx/msdffdef.hxx> #include <rtl/ustring.hxx> -class EnhancedCustomShapeTypeNames +namespace EnhancedCustomShapeTypeNames { - public : - - static MSO_SPT Get( const rtl::OUString& ); - static rtl::OUString Get( const MSO_SPT ); -}; + SVX_DLLPUBLIC MSO_SPT Get( const rtl::OUString& ); + SVX_DLLPUBLIC rtl::OUString Get( const MSO_SPT ); +} #endif diff --git a/svx/source/customshapes/makefile.mk b/svx/source/customshapes/makefile.mk index a81910b83038..9940a9bb21bc 100644 --- a/svx/source/customshapes/makefile.mk +++ b/svx/source/customshapes/makefile.mk @@ -32,6 +32,7 @@ PRJ=..$/.. PRJNAME=svx TARGET=customshapes +LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE # --- Settings ---------------------------------- @@ -50,16 +51,23 @@ NOOPTFILES= $(SLO)$/EnhancedCustomShapeFunctionParser.obj # --- Files ------------------------------------- -SLOFILES= $(SLO)$/EnhancedCustomShapeEngine.obj \ +LIB1TARGET= $(SLB)$/$(TARGET)-core.lib +LIB1OBJFILES= \ $(SLO)$/EnhancedCustomShapeTypeNames.obj \ $(SLO)$/EnhancedCustomShapeGeometry.obj \ $(SLO)$/EnhancedCustomShape2d.obj \ + $(SLO)$/EnhancedCustomShapeFunctionParser.obj + +LIB2TARGET= $(SLB)$/$(TARGET).lib +LIB2OBJFILES= \ + $(SLO)$/EnhancedCustomShapeEngine.obj \ $(SLO)$/EnhancedCustomShape3d.obj \ $(SLO)$/EnhancedCustomShapeFontWork.obj \ $(SLO)$/EnhancedCustomShapeHandle.obj \ - $(SLO)$/EnhancedCustomShapeFunctionParser.obj \ $(SLO)$/tbxcustomshapes.obj +SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) + # --- Targets ---------------------------------- .INCLUDE : target.mk diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 5076b06f52c5..5018bd28a640 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -36,6 +36,7 @@ #include <sfx2/printer.hxx> // SfxPrinter #include <vcl/metric.hxx> #include <vcl/svapp.hxx> +#include <unicode/uchar.h> #include <com/sun/star/uno/Reference.h> #include <com/sun/star/i18n/XBreakIterator.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -244,7 +245,25 @@ void FontPrevWin_Impl::_CheckScript() do { nChg = (xub_StrLen)xBreak->endOfScript( aText, nChg, nScript ); - aScriptChg.Insert( nChg, nCnt ); + if (nChg < aText.Len() && nChg > 0 && + (com::sun::star::i18n::ScriptType::WEAK == + xBreak->getScriptType(aText, nChg - 1))) + { + int8_t nType = u_charType(aText.GetChar(nChg) ); + if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK || + nType == U_COMBINING_SPACING_MARK ) + { + aScriptChg.Insert( nChg - 1, nCnt ); + } + else + { + aScriptChg.Insert( nChg, nCnt ); + } + } + else + { + aScriptChg.Insert( nChg, nCnt ); + } aScriptType.Insert( nScript, nCnt ); aTextWidth.Insert( ULONG(0), nCnt++ ); @@ -604,6 +623,14 @@ void SvxFontPrevWindow::SetColor(const Color &rColor) pImpl->pColor = new Color( rColor ); Invalidate(); } +// ----------------------------------------------------------------------- + +void SvxFontPrevWindow::ResetColor() +{ + delete pImpl->pColor; + pImpl->pColor = 0; + Invalidate(); +} // ----------------------------------------------------------------------- diff --git a/svx/source/dialog/makefile.mk b/svx/source/dialog/makefile.mk index 04865246a915..c54081365a11 100644 --- a/svx/source/dialog/makefile.mk +++ b/svx/source/dialog/makefile.mk @@ -31,6 +31,7 @@ PRJ=..$/.. PRJNAME=svx TARGET=dialogs +LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- @@ -76,9 +77,28 @@ SRC1FILES = \ SRS2NAME=drawdlgs SRC2FILES = \ - sdstring.src \ + sdstring.src -SLOFILES= \ +LIB1TARGET=$(SLB)$/$(TARGET)-core.lib + +LIB1OBJFILES= \ + $(SLO)$/dialmgr.obj\ + $(SLO)$/dlgutil.obj \ + $(SLO)$/framelink.obj\ + $(SLO)$/hangulhanja.obj \ + $(SLO)$/hyphen.obj \ + $(SLO)$/impgrf.obj \ + $(SLO)$/langbox.obj \ + $(SLO)$/opengrf.obj \ + $(SLO)$/simptabl.obj \ + $(SLO)$/splwrap.obj \ + $(SLO)$/svxdlg.obj \ + $(SLO)$/stddlg.obj \ + $(SLO)$/thesdlg.obj + +LIB2TARGET=$(SLB)$/$(TARGET).lib + +LIB2OBJFILES= \ $(SLO)$/charmap.obj \ $(SLO)$/checklbx.obj \ $(SLO)$/connctrl.obj \ @@ -86,31 +106,23 @@ SLOFILES= \ $(SLO)$/ctredlin.obj \ $(SLO)$/databaseregistrationui.obj \ $(SLO)$/dialcontrol.obj \ - $(SLO)$/dialmgr.obj\ $(SLO)$/dlgctl3d.obj \ $(SLO)$/dlgctrl.obj \ - $(SLO)$/dlgutil.obj \ $(SLO)$/docrecovery.obj \ $(SLO)$/fntctrl.obj \ $(SLO)$/fontlb.obj \ $(SLO)$/fontwork.obj \ - $(SLO)$/framelink.obj\ $(SLO)$/framelinkarray.obj \ $(SLO)$/frmdirlbox.obj \ $(SLO)$/frmsel.obj \ $(SLO)$/graphctl.obj \ $(SLO)$/grfflt.obj \ - $(SLO)$/hangulhanja.obj \ $(SLO)$/hdft.obj \ $(SLO)$/hyperdlg.obj \ - $(SLO)$/hyphen.obj \ $(SLO)$/hyprlink.obj \ $(SLO)$/imapdlg.obj \ $(SLO)$/imapwnd.obj \ - $(SLO)$/impgrf.obj \ - $(SLO)$/langbox.obj \ $(SLO)$/measctrl.obj \ - $(SLO)$/opengrf.obj \ $(SLO)$/orienthelper.obj \ $(SLO)$/pagectrl.obj \ $(SLO)$/paraprev.obj \ @@ -122,21 +134,16 @@ SLOFILES= \ $(SLO)$/rlrcitem.obj \ $(SLO)$/rubydialog.obj \ $(SLO)$/rulritem.obj \ - $(SLO)$/simptabl.obj \ $(SLO)$/SpellDialogChildWindow.obj \ - $(SLO)$/splwrap.obj \ $(SLO)$/srchctrl.obj \ $(SLO)$/srchdlg.obj \ - $(SLO)$/stddlg.obj \ $(SLO)$/strarray.obj \ $(SLO)$/svxbmpnumvalueset.obj\ $(SLO)$/svxbox.obj \ - $(SLO)$/svxdlg.obj \ $(SLO)$/svxgrahicitem.obj \ $(SLO)$/svxruler.obj \ $(SLO)$/swframeexample.obj \ $(SLO)$/swframeposstrings.obj \ - $(SLO)$/thesdlg.obj \ $(SLO)$/txencbox.obj \ $(SLO)$/txenctab.obj \ $(SLO)$/wrapfield.obj \ @@ -144,15 +151,17 @@ SLOFILES= \ $(SLO)$/_contdlg.obj .IF "$(GUI)"=="UNX" -SLOFILES += $(SLO)$/sendreportunx.obj +LIB2OBJFILES += $(SLO)$/sendreportunx.obj .ELSE .IF "$(GUI)"=="WNT" -SLOFILES += $(SLO)$/sendreportw32.obj +LIB2OBJFILES += $(SLO)$/sendreportw32.obj .ELSE -SLOFILES += $(SLO)$/sendreportgen.obj +LIB2OBJFILES += $(SLO)$/sendreportgen.obj .ENDIF .ENDIF +SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) + # --- Targets ------------------------------------------------------- .INCLUDE : target.mk diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 8d0ec6ac4d59..918234222135 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -394,7 +394,7 @@ void SvxJSearchOptionsDialog::SetTransliterationFlags( INT32 nSettings ) aCalcStr ( THIS_SVX_RES( STR_WORDCALC ) ), \ pImpl ( NULL ), \ pSearchList ( NULL ), \ - pReplaceList ( NULL ), \ + pReplaceList ( new SearchAttrItemList ), \ pSearchItem ( NULL ), \ pSearchController ( NULL ), \ pOptionsController ( NULL ), \ diff --git a/svx/source/editeng/editeng.cxx b/svx/source/editeng/editeng.cxx index 9a0b1d593f40..059dae19c8f8 100644 --- a/svx/source/editeng/editeng.cxx +++ b/svx/source/editeng/editeng.cxx @@ -86,11 +86,9 @@ #include <vcl/help.hxx> #include <svx/xpoly.hxx> #include <com/sun/star/datatransfer/clipboard/XClipboard.hpp> -#ifndef _COM_SUN_STAR_I18N_XINPUTSEQUENCECHECKER_HPP_ #include <com/sun/star/i18n/InputSequenceCheckMode.hpp> -#endif -#include <srchdlg.hxx> +#include <sfx2/srchdefs.hxx> #if OSL_DEBUG_LEVEL > 1 #include <svx/frmdiritem.hxx> @@ -99,18 +97,11 @@ // Spaeter -> TOOLS\STRING.H (fuer Grep: WS_TARGET) -//using namespace ::rtl; -//using namespace ::utl; using namespace ::com::sun::star; -//using namespace ::com::sun::star::util; using namespace ::com::sun::star::uno; -//using namespace ::com::sun::star::lang; -//using namespace ::com::sun::star::beans; -//using namespace ::com::sun::star::frame; using namespace ::com::sun::star::linguistic2; - DBG_NAME( EditEngine ) DBG_NAMEEX( EditView ) @@ -706,15 +697,35 @@ sal_uInt16 EditEngine::GetParagraphCount() const sal_uInt16 EditEngine::GetLineCount( sal_uInt16 nParagraph ) const { DBG_CHKTHIS( EditEngine, 0 ); + if ( !pImpEditEngine->IsFormatted() ) + pImpEditEngine->FormatDoc(); return pImpEditEngine->GetLineCount( nParagraph ); } sal_uInt16 EditEngine::GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const { DBG_CHKTHIS( EditEngine, 0 ); + if ( !pImpEditEngine->IsFormatted() ) + pImpEditEngine->FormatDoc(); return pImpEditEngine->GetLineLen( nParagraph, nLine ); } +void EditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const +{ + DBG_CHKTHIS( EditEngine, 0 ); + if ( !pImpEditEngine->IsFormatted() ) + pImpEditEngine->FormatDoc(); + return pImpEditEngine->GetLineBoundaries( rStart, rEnd, nParagraph, nLine ); +} + +USHORT EditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +{ + DBG_CHKTHIS( EditEngine, 0 ); + if ( !pImpEditEngine->IsFormatted() ) + pImpEditEngine->FormatDoc(); + return pImpEditEngine->GetLineNumberAtIndex( nPara, nIndex ); +} + sal_uInt32 EditEngine::GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine ) { DBG_CHKTHIS( EditEngine, 0 ); diff --git a/svx/source/editeng/eertfpar.cxx b/svx/source/editeng/eertfpar.cxx index e0628d086767..a659b0e513f0 100644 --- a/svx/source/editeng/eertfpar.cxx +++ b/svx/source/editeng/eertfpar.cxx @@ -43,6 +43,19 @@ #include <svtools/rtftoken.h> +// alle Werte auf default; wird nach einlesen der Bitmap aufgerufen ! +void SvxRTFPictureType::ResetValues() +{ // setze alle Werte RTF-Defaults + eStyle = RTF_BITMAP; + nMode = HEX_MODE; + nType = nGoalWidth = nGoalHeight = 0; + nWidth = nHeight = nWidthBytes = 0; + uPicLen = 0; + nBitsPerPixel = nPlanes = 1; + nScalX = nScalY = 100; // Skalierung in Prozent + nCropT = nCropB = nCropL = nCropR = 0; +} + ImportInfo::ImportInfo( ImportState eSt, SvParser* pPrsrs, const ESelection& rSel ) : aSelection( rSel ) { diff --git a/svx/source/editeng/impedit.cxx b/svx/source/editeng/impedit.cxx index 2e27bd744637..16f0c1f5277d 100644 --- a/svx/source/editeng/impedit.cxx +++ b/svx/source/editeng/impedit.cxx @@ -670,6 +670,8 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, US USHORT nTextPortionStart = 0; USHORT nPara = pEditEngine->pImpEditEngine->aEditDoc.GetPos( aPaM.GetNode() ); + if (nPara == USHRT_MAX) // #i94322 + return; ParaPortion* pParaPortion = pEditEngine->pImpEditEngine->GetParaPortions().GetObject( nPara ); nShowCursorFlags |= nExtraCursorFlags; diff --git a/svx/source/editeng/impedit.hxx b/svx/source/editeng/impedit.hxx index 5df4b0f5ed29..25b7cec4f449 100644 --- a/svx/source/editeng/impedit.hxx +++ b/svx/source/editeng/impedit.hxx @@ -813,6 +813,8 @@ public: sal_uInt32 CalcLineWidth( ParaPortion* pPortion, EditLine* pLine, BOOL bIgnoreExtraSpace ); sal_uInt16 GetLineCount( sal_uInt16 nParagraph ) const; sal_uInt16 GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const; + void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; + USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; sal_uInt16 GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine ); sal_uInt32 GetParaHeight( sal_uInt16 nParagraph ); diff --git a/svx/source/editeng/impedit2.cxx b/svx/source/editeng/impedit2.cxx index 1299cfd1520a..f8cd7e67a4c9 100644 --- a/svx/source/editeng/impedit2.cxx +++ b/svx/source/editeng/impedit2.cxx @@ -1777,7 +1777,7 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) ::rtl::OUString aOUText( aText ); USHORT nTextLen = (USHORT)aOUText.getLength(); - long nPos = 0; + sal_Int32 nPos = 0; short nScriptType = _xBI->getScriptType( aOUText, nPos ); rTypes.Insert( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ), rTypes.Count() ); nPos = _xBI->endOfScript( aOUText, nPos, nScriptType ); @@ -1795,6 +1795,17 @@ void ImpEditEngine::InitScriptTypes( USHORT nPara ) } else { + if ( _xBI->getScriptType( aOUText, nPos - 1 ) == i18n::ScriptType::WEAK ) + { + switch ( u_charType(aOUText.iterateCodePoints(&nPos, 0) ) ) { + case U_NON_SPACING_MARK: + case U_ENCLOSING_MARK: + case U_COMBINING_SPACING_MARK: + --nPos; + rTypes[rTypes.Count()-1].nEndPos--; + break; + } + } rTypes.Insert( ScriptTypePosInfo( nScriptType, (USHORT)nPos, nTextLen ), rTypes.Count() ); } @@ -3289,9 +3300,9 @@ USHORT ImpEditEngine::GetLineCount( USHORT nParagraph ) const xub_StrLen ImpEditEngine::GetLineLen( USHORT nParagraph, USHORT nLine ) const { - DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" ); + DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineLen: Out of range" ); ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph ); - DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetLineHeight" ); + DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetLineLen" ); if ( pPPortion && ( nLine < pPPortion->GetLines().Count() ) ) { EditLine* pLine = pPPortion->GetLines().GetObject( nLine ); @@ -3302,6 +3313,48 @@ xub_StrLen ImpEditEngine::GetLineLen( USHORT nParagraph, USHORT nLine ) const return 0xFFFF; } +void ImpEditEngine::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const +{ + DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" ); + ParaPortion* pPPortion = GetParaPortions().SaveGetObject( nParagraph ); + DBG_ASSERT( pPPortion, "Absatz nicht gefunden: GetLineBoundaries" ); + rStart = rEnd = 0xFFFF; // default values in case of error + if ( pPPortion && ( nLine < pPPortion->GetLines().Count() ) ) + { + EditLine* pLine = pPPortion->GetLines().GetObject( nLine ); + DBG_ASSERT( pLine, "Zeile nicht gefunden: GetLineBoundaries" ); + rStart = pLine->GetStart(); + rEnd = pLine->GetEnd(); + } +} + +USHORT ImpEditEngine::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +{ + USHORT nLineNo = 0xFFFF; + ContentNode* pNode = GetEditDoc().SaveGetObject( nPara ); + DBG_ASSERT( pNode, "GetLineNumberAtIndex: invalid paragraph index" ); + if (pNode) + { + // we explicitly allow for the index to point at the character right behind the text + const bool bValidIndex = /*0 <= nIndex &&*/ nIndex <= pNode->Len(); + DBG_ASSERT( bValidIndex, "GetLineNumberAtIndex: invalid index" ); + const USHORT nLineCount = GetLineCount( nPara ); + if (nIndex == pNode->Len()) + nLineNo = nLineCount > 0 ? nLineCount - 1 : 0; + else if (bValidIndex) // nIndex < pNode->Len() + { + USHORT nStart = USHRT_MAX, nEnd = USHRT_MAX; + for (USHORT i = 0; i < nLineCount && nLineNo == 0xFFFF; ++i) + { + GetLineBoundaries( nStart, nEnd, nPara, i ); + if (nStart <= nIndex && nIndex < nEnd) + nLineNo = i; + } + } + } + return nLineNo; +} + USHORT ImpEditEngine::GetLineHeight( USHORT nParagraph, USHORT nLine ) { DBG_ASSERT( nParagraph < GetParaPortions().Count(), "GetLineCount: Out of range" ); diff --git a/svx/source/engine3d/helperhittest3d.cxx b/svx/source/engine3d/helperhittest3d.cxx index 3df2e40b8145..821c0ba07c32 100644 --- a/svx/source/engine3d/helperhittest3d.cxx +++ b/svx/source/engine3d/helperhittest3d.cxx @@ -92,7 +92,12 @@ namespace drawinglayer basegfx::B3DPoint maBack; // the found cut points - ::std::vector< basegfx::B3DPoint > mo_rResult; + ::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. @@ -105,11 +110,12 @@ namespace drawinglayer : BaseProcessor3D(rViewInformation), maFront(rFront), maBack(rBack), - mo_rResult() + maResult(), + maCombinedTransform() {} // data access - const ::std::vector< basegfx::B3DPoint >& getCutPoints() const { return mo_rResult; } + const ::std::vector< basegfx::B3DPoint >& getCutPoints() const { return maResult; } }; void CutFindProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) @@ -119,9 +125,8 @@ namespace drawinglayer { case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D : { - // transform group. Remember current transformations + // transform group. const primitive3d::TransformPrimitive3D& rPrimitive = static_cast< const primitive3d::TransformPrimitive3D& >(rCandidate); - const geometry::ViewInformation3D aLastViewInformation3D(getViewInformation3D()); // remember old and transform front, back to object coordinates const basegfx::B3DPoint aLastFront(maFront); @@ -131,7 +136,8 @@ namespace drawinglayer maFront *= aInverseTrans; maBack *= aInverseTrans; - // create new transformation; add new object transform from right side + // 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(), @@ -141,10 +147,15 @@ namespace drawinglayer 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; @@ -207,7 +218,10 @@ namespace drawinglayer if(basegfx::tools::isInside(rPolyPolygon, aCutPoint, false)) { - mo_rResult.push_back(aCutPoint); + // #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); } } } @@ -376,9 +390,9 @@ SVX_DLLPUBLIC void getAllHit3DObjectsSortedFrontToBack( ::std::vector< basegfx::B3DPoint > aHitsWithObject; getAllHit3DObjectWithRelativePoint(aFront, aBack, *pCandidate, aViewInfo3D, aHitsWithObject); - if(aHitsWithObject.size()) + for(sal_uInt32 a(0); a < aHitsWithObject.size(); a++) { - const basegfx::B3DPoint aPointInViewCoordinates(aViewInfo3D.getObjectToView() * aHitsWithObject[0]); + const basegfx::B3DPoint aPointInViewCoordinates(aViewInfo3D.getObjectToView() * aHitsWithObject[a]); aDepthAndObjectResults.push_back(ImplPairDephAndObject(pCandidate, aPointInViewCoordinates.getZ())); } } diff --git a/svx/source/engine3d/makefile.mk b/svx/source/engine3d/makefile.mk index 4c03f949e939..bb590bd76c71 100644 --- a/svx/source/engine3d/makefile.mk +++ b/svx/source/engine3d/makefile.mk @@ -33,6 +33,7 @@ PRJ=..$/.. PRJNAME=svx TARGET=engine3d +LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- @@ -42,7 +43,8 @@ ENABLE_EXCEPTIONS=TRUE # --- Files -------------------------------------------------------- -SLOFILES= \ +LIB1TARGET= $(SLB)$/$(TARGET)-core.lib +LIB1OBJFILES= \ $(SLO)$/e3dsceneupdater.obj \ $(SLO)$/helperminimaldepth3d.obj \ $(SLO)$/helperhittest3d.obj \ @@ -57,16 +59,21 @@ SLOFILES= \ $(SLO)$/svx3ditems.obj \ $(SLO)$/deflt3d.obj \ $(SLO)$/e3dundo.obj \ - $(SLO)$/volume3d.obj \ - $(SLO)$/viewpt3d.obj \ $(SLO)$/viewpt3d2.obj \ $(SLO)$/camera3d.obj \ $(SLO)$/objfac3d.obj \ $(SLO)$/dragmt3d.obj \ $(SLO)$/view3d.obj \ - $(SLO)$/view3d1.obj \ + $(SLO)$/view3d1.obj + +LIB2TARGET= $(SLB)$/$(TARGET).lib +LIB2OBJFILES= \ + $(SLO)$/volume3d.obj \ + $(SLO)$/viewpt3d.obj \ $(SLO)$/float3d.obj +SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) + #disable optimizer for MSCompiler and ICC .IF "$(COM)"=="ICC" || "$(COM)"=="MSC" NOOPTFILES=\ diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx index d92b1dd4bbca..99abbd9853f7 100644 --- a/svx/source/fmcomp/dbaexchange.cxx +++ b/svx/source/fmcomp/dbaexchange.cxx @@ -61,7 +61,6 @@ namespace svx using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::container; using namespace ::com::sun::star::datatransfer; - using namespace ::svxform; using namespace ::comphelper; //==================================================================== diff --git a/svx/source/fmcomp/dbaobjectex.cxx b/svx/source/fmcomp/dbaobjectex.cxx index 21381d9c8709..26c0d04a891e 100644 --- a/svx/source/fmcomp/dbaobjectex.cxx +++ b/svx/source/fmcomp/dbaobjectex.cxx @@ -60,7 +60,6 @@ namespace svx using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::container; using namespace ::com::sun::star::datatransfer; - using namespace ::svxform; using namespace ::comphelper; //==================================================================== diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 8f5a895e0c33..0bfc7c768973 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -1919,7 +1919,7 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V sal_Bool bVoid = !Value.hasValue(); - if ( 0 == PropertyName.compareToAscii( FM_PROP_TEXTLINECOLOR ) ) + if ( 0 == PropertyName.compareTo( FM_PROP_TEXTLINECOLOR ) ) { ::Color aTextLineColor( bVoid ? COL_TRANSPARENT : ::comphelper::getINT32( Value ) ); if (bVoid) @@ -1953,21 +1953,21 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V if (isDesignMode()) pGrid->Invalidate(); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_FONTEMPHASISMARK ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_FONTEMPHASISMARK ) ) { Font aGridFont = pGrid->GetControlFont(); sal_Int16 nValue = ::comphelper::getINT16(Value); aGridFont.SetEmphasisMark( nValue ); pGrid->SetControlFont( aGridFont ); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_FONTRELIEF ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_FONTRELIEF ) ) { Font aGridFont = pGrid->GetControlFont(); sal_Int16 nValue = ::comphelper::getINT16(Value); aGridFont.SetRelief( (FontRelief)nValue ); pGrid->SetControlFont( aGridFont ); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_HELPURL ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_HELPURL ) ) { String sHelpURL(::comphelper::getString(Value)); String sPattern; @@ -1978,11 +1978,11 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V pGrid->SetHelpId(sID.ToInt32()); } } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_DISPLAYSYNCHRON ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_DISPLAYSYNCHRON ) ) { pGrid->setDisplaySynchron(::comphelper::getBOOL(Value)); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_CURSORCOLOR ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_CURSORCOLOR ) ) { if (bVoid) pGrid->SetCursorColor(COL_TRANSPARENT); @@ -1991,13 +1991,13 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V if (isDesignMode()) pGrid->Invalidate(); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_ALWAYSSHOWCURSOR ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_ALWAYSSHOWCURSOR ) ) { pGrid->EnablePermanentCursor(::comphelper::getBOOL(Value)); if (isDesignMode()) pGrid->Invalidate(); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_FONT ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_FONT ) ) { if ( bVoid ) pGrid->SetControlFont( Font() ); @@ -2031,7 +2031,7 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V } } } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_BACKGROUNDCOLOR ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_BACKGROUNDCOLOR ) ) { if ( bVoid ) { @@ -2044,7 +2044,7 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V pGrid->SetControlBackground( aColor ); } } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_TEXTCOLOR ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_TEXTCOLOR ) ) { if ( bVoid ) { @@ -2057,7 +2057,7 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V pGrid->SetControlForeground( aColor ); } } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_ROWHEIGHT ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_ROWHEIGHT ) ) { sal_Int32 nLogHeight(0); if (Value >>= nLogHeight) @@ -2070,17 +2070,17 @@ void FmXGridPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& V else if (bVoid) pGrid->SetDataRowHeight(0); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_HASNAVIGATION ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_HASNAVIGATION ) ) { if (Value.getValueType() == ::getBooleanCppuType()) pGrid->EnableNavigationBar(*(sal_Bool*)Value.getValue()); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_RECORDMARKER ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_RECORDMARKER ) ) { if (Value.getValueType() == ::getBooleanCppuType()) pGrid->EnableHandle(*(sal_Bool*)Value.getValue()); } - else if ( 0 == PropertyName.compareToAscii( FM_PROP_ENABLED ) ) + else if ( 0 == PropertyName.compareTo( FM_PROP_ENABLED ) ) { if (Value.getValueType() == ::getBooleanCppuType()) { @@ -2134,37 +2134,37 @@ Any FmXGridPeer::getProperty( const ::rtl::OUString& _rPropertyName ) throw( Run FmGridControl* pGrid = (FmGridControl*) GetWindow(); Window* pDataWindow = &pGrid->GetDataWindow(); - if ( 0 == _rPropertyName.compareToAscii( FM_PROP_NAME ) ) + if ( 0 == _rPropertyName.compareTo( FM_PROP_NAME ) ) { Font aFont = pDataWindow->GetControlFont(); aProp <<= ImplCreateFontDescriptor( aFont ); } - else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_TEXTCOLOR ) ) + else if ( 0 == _rPropertyName.compareTo( FM_PROP_TEXTCOLOR ) ) { aProp <<= (sal_Int32)pDataWindow->GetControlForeground().GetColor(); } - else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_BACKGROUNDCOLOR ) ) + else if ( 0 == _rPropertyName.compareTo( FM_PROP_BACKGROUNDCOLOR ) ) { aProp <<= (sal_Int32)pDataWindow->GetControlBackground().GetColor(); } - else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_ROWHEIGHT ) ) + else if ( 0 == _rPropertyName.compareTo( FM_PROP_ROWHEIGHT ) ) { sal_Int32 nPixelHeight = pGrid->GetDataRowHeight(); // take the zoom factor into account nPixelHeight = pGrid->CalcReverseZoom(nPixelHeight); aProp <<= (sal_Int32)pGrid->PixelToLogic(Point(0,nPixelHeight),MAP_10TH_MM).Y(); } - else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_HASNAVIGATION ) ) + else if ( 0 == _rPropertyName.compareTo( FM_PROP_HASNAVIGATION ) ) { sal_Bool bHasNavBar = pGrid->HasNavigationBar(); aProp <<= (sal_Bool)bHasNavBar; } - else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_RECORDMARKER ) ) + else if ( 0 == _rPropertyName.compareTo( FM_PROP_RECORDMARKER ) ) { sal_Bool bHasHandle = pGrid->HasHandle(); aProp <<= (sal_Bool)bHasHandle; } - else if ( 0 == _rPropertyName.compareToAscii( FM_PROP_ENABLED ) ) + else if ( 0 == _rPropertyName.compareTo( FM_PROP_ENABLED ) ) { aProp <<= (sal_Bool)pDataWindow->IsEnabled(); } @@ -2948,7 +2948,7 @@ IMPL_LINK(FmXGridPeer, OnExecuteGridSlot, void*, pSlot) if (m_pDispatchers[i].is()) { // commit any changes done so far, if it's not the undoRecord URL - if ( 0 == pUrls->Complete.compareToAscii( FMURL_RECORD_UNDO ) || commit() ) + if ( 0 == pUrls->Complete.compareTo( FMURL_RECORD_UNDO ) || commit() ) m_pDispatchers[i]->dispatch(*pUrls, Sequence< PropertyValue>()); return 1; // handled diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index ad645992d53d..45a67a09e52d 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -651,10 +651,10 @@ void DbCellControl::_propertyChanged(const PropertyChangeEvent& _rEvent) throw(R Reference< XPropertySet > xSourceProps( _rEvent.Source, UNO_QUERY ); - if ( _rEvent.PropertyName.equalsAscii( FM_PROP_VALUE ) - || _rEvent.PropertyName.equalsAscii( FM_PROP_STATE ) - || _rEvent.PropertyName.equalsAscii( FM_PROP_TEXT ) - || _rEvent.PropertyName.equalsAscii( FM_PROP_EFFECTIVE_VALUE ) + if ( _rEvent.PropertyName.equals( FM_PROP_VALUE ) + || _rEvent.PropertyName.equals( FM_PROP_STATE ) + || _rEvent.PropertyName.equals( FM_PROP_TEXT ) + || _rEvent.PropertyName.equals( FM_PROP_EFFECTIVE_VALUE ) ) { // it was one of the known "value" properties if ( !isValuePropertyLocked() ) @@ -662,11 +662,11 @@ void DbCellControl::_propertyChanged(const PropertyChangeEvent& _rEvent) throw(R implValuePropertyChanged( ); } } - else if ( _rEvent.PropertyName.equalsAscii( FM_PROP_READONLY ) ) + else if ( _rEvent.PropertyName.equals( FM_PROP_READONLY ) ) { implAdjustReadOnly( xSourceProps ); } - else if ( _rEvent.PropertyName.equalsAscii( FM_PROP_ENABLED ) ) + else if ( _rEvent.PropertyName.equals( FM_PROP_ENABLED ) ) { implAdjustEnabled( xSourceProps ); } @@ -2429,7 +2429,7 @@ DbComboBox::DbComboBox(DbGridColumn& _rColumn) //------------------------------------------------------------------------------ void DbComboBox::_propertyChanged( const PropertyChangeEvent& _rEvent ) throw( RuntimeException ) { - if ( _rEvent.PropertyName.equalsAscii( FM_PROP_STRINGITEMLIST ) ) + if ( _rEvent.PropertyName.equals( FM_PROP_STRINGITEMLIST ) ) { SetList(_rEvent.NewValue); } @@ -2558,7 +2558,7 @@ DbListBox::DbListBox(DbGridColumn& _rColumn) //------------------------------------------------------------------------------ void DbListBox::_propertyChanged( const ::com::sun::star::beans::PropertyChangeEvent& _rEvent ) throw( RuntimeException ) { - if ( _rEvent.PropertyName.equalsAscii( FM_PROP_STRINGITEMLIST ) ) + if ( _rEvent.PropertyName.equals( FM_PROP_STRINGITEMLIST ) ) { SetList(_rEvent.NewValue); } diff --git a/svx/source/fmcomp/gridcols.cxx b/svx/source/fmcomp/gridcols.cxx index cab60f046cf3..da7fe3447b0a 100644 --- a/svx/source/fmcomp/gridcols.cxx +++ b/svx/source/fmcomp/gridcols.cxx @@ -36,23 +36,6 @@ #include "fmservs.hxx" #include "fmtools.hxx" -namespace svxform -{ - - IMPLEMENT_CONSTASCII_USTRING(FM_COL_TEXTFIELD, "TextField"); - IMPLEMENT_CONSTASCII_USTRING(FM_COL_COMBOBOX, "ComboBox"); - IMPLEMENT_CONSTASCII_USTRING(FM_COL_CHECKBOX, "CheckBox"); - IMPLEMENT_CONSTASCII_USTRING(FM_COL_TIMEFIELD, "TimeField"); - IMPLEMENT_CONSTASCII_USTRING(FM_COL_DATEFIELD, "DateField"); - IMPLEMENT_CONSTASCII_USTRING(FM_COL_NUMERICFIELD, "NumericField"); - IMPLEMENT_CONSTASCII_USTRING(FM_COL_CURRENCYFIELD, "CurrencyField"); - IMPLEMENT_CONSTASCII_USTRING(FM_COL_PATTERNFIELD, "PatternField"); - IMPLEMENT_CONSTASCII_USTRING(FM_COL_LISTBOX, "ListBox"); - IMPLEMENT_CONSTASCII_USTRING(FM_COL_FORMATTEDFIELD, "FormattedField"); - -} // namespace svxform -using namespace ::svxform; - //------------------------------------------------------------------------------ const ::comphelper::StringSequence& getColumnTypes() { @@ -81,7 +64,7 @@ sal_Int32 getColumnTypeByModelName(const ::rtl::OUString& aModelName) const ::rtl::OUString aCompatibleModelPrefix = ::rtl::OUString::createFromAscii("stardiv.one.form.component."); sal_Int32 nTypeId = -1; - if (aModelName == ::svxform::FM_COMPONENT_EDIT) + if (aModelName == FM_COMPONENT_EDIT) nTypeId = TYPE_TEXTFIELD; else { diff --git a/svx/source/fmcomp/makefile.mk b/svx/source/fmcomp/makefile.mk index a2387ef180f4..1e86308f9c44 100644 --- a/svx/source/fmcomp/makefile.mk +++ b/svx/source/fmcomp/makefile.mk @@ -33,6 +33,7 @@ PRJ=..$/.. PRJNAME=svx TARGET=fmcomp +LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE @@ -48,25 +49,20 @@ SRC1FILES= \ gridctrl.src \ showcols.src -#SLOFILES= \ -# $(SLO)$/dbaexchange.obj \ -# $(SLO)$/gridcols.obj \ -# $(SLO)$/gridctrl.obj \ -# $(SLO)$/gridcell.obj \ -# $(SLO)$/fmgridcl.obj \ -# $(SLO)$/fmgridif.obj \ -# $(SLO)$/trace.obj - -SLOFILES= \ +LIB1TARGET= $(SLB)$/$(TARGET)-core.lib +LIB1OBJFILES= \ $(SLO)$/dbaexchange.obj \ - $(SLO)$/dbaobjectex.obj \ $(SLO)$/gridcols.obj \ $(SLO)$/gridctrl.obj \ $(SLO)$/gridcell.obj \ $(SLO)$/fmgridcl.obj \ $(SLO)$/fmgridif.obj \ - $(SLO)$/trace.obj \ + $(SLO)$/trace.obj \ $(SLO)$/xmlexchg.obj +LIB2TARGET= $(SLB)$/$(TARGET).lib +LIB2OBJFILES= \ + $(SLO)$/dbaobjectex.obj + .INCLUDE : target.mk diff --git a/svx/source/form/fmprop.cxx b/svx/source/form/fmprop.cxx deleted file mode 100644 index e328e79b9514..000000000000 --- a/svx/source/form/fmprop.cxx +++ /dev/null @@ -1,195 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: fmprop.cxx,v $ - * $Revision: 1.22 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svx.hxx" - -#ifndef _SVX_FMPROP_HRC -#include "fmprop.hrc" -#endif -#include "fmstatic.hxx" - -#include <set> - -namespace svxform -{ - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_NAME,"Name"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CLASSID,"ClassId"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ROWCOUNT,"RowCount"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ROWCOUNTFINAL,"IsRowCountFinal"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FETCHSIZE,"FetchSize"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUE,"Value"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TEXT,"Text"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LABEL,"Label"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CANINSERT,"CanInsert"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CANUPDATE,"CanUpdate"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CANDELETE,"CanDelete"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_NAVIGATION,"NavigationBarMode"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HASNAVIGATION,"HasNavigationBar"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CYCLE,"Cycle"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CONTROLSOURCE,"DataField"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ENABLED,"Enabled"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_READONLY,"ReadOnly"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISREADONLY,"IsReadOnly"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FILTER,"Filter"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_AUTOINCREMENT,"IsAutoIncrement"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATAENTRY,"DataEntry"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_WIDTH,"Width"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SEARCHABLE,"IsSearchable"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_MULTILINE,"MultiLine"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TARGET_URL,"TargetURL"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULTCONTROL,"DefaultControl"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_MAXTEXTLEN,"MaxTextLen"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EDITMASK,"EditMask"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SPIN,"Spin"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATE,"Date"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TIME,"Time"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_STATE,"State"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TRISTATE,"TriState"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_STRINGITEMLIST,"StringItemList"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_TEXT,"DefaultText"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULTCHECKED,"DefaultState"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FORMATKEY,"FormatKey"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FORMATSSUPPLIER,"FormatsSupplier"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LISTSOURCETYPE,"ListSourceType"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LISTSOURCE,"ListSource"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SELECT_SEQ,"SelectedItems"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUE_SEQ,"ValueItemList"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_SELECT_SEQ,"DefaultSelection"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ALIGN,"Align"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_DATE,"DefaultDate"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_TIME,"DefaultTime"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DEFAULT_VALUE,"DefaultValue"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DECIMAL_ACCURACY,"DecimalAccuracy"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURSORSOURCE,"DataSelection"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURSORSOURCETYPE,"DataSelectionType"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FIELDTYPE,"Type"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_REFVALUE,"RefValue"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUEMIN,"ValueMin"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUEMAX,"ValueMax"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_STRICTFORMAT,"StrictFormat"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LITERALMASK,"LiteralMask"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_VALUESTEP,"ValueStep"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SHOWTHOUSANDSEP,"ShowThousandsSeparator"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURRENCYSYMBOL,"CurrencySymbol"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATEFORMAT,"DateFormat"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATEMIN,"DateMin"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATEMAX,"DateMax"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATE_SHOW_CENTURY,"DateShowCentury"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TIMEFORMAT, "TimeFormat"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TIMEMIN, "TimeMin"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TIMEMAX,"TimeMax"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_LINECOUNT,"LineCount"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_BOUNDCOLUMN, "BoundColumn"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONT,"FontDescriptor"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_BACKGROUNDCOLOR,"BackgroundColor"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TEXTCOLOR,"TextColor"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_BORDER,"Border"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DROPDOWN,"Dropdown"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ROWHEIGHT,"RowHeight"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HELPTEXT, "HelpText"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HELPURL, "HelpURL"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_RECORDMARKER, "HasRecordMarker"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_BOUNDFIELD, "BoundField"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_VALUE, "EffectiveValue"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_DEFAULT, "EffectiveDefault"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_MIN, "EffectiveMin"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_MAX, "EffectiveMax"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_HIDDEN, "Hidden"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FILTERPROPOSAL, "UseFilterValueProposal"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FIELDSOURCE, "FieldSource"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TABLENAME, "TableName"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FILTERSUPPLIER, "FilterSupplier"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURRENTFILTER, "CurrentFilter"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SELECTED_FIELDS, "SelectedFields"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SELECTED_TABLES, "SelectedTables"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_THREADSAFE, "ThreadSafe"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISFILTERAPPLIED, "IsFilterApplied"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CONTROLLABEL, "LabelControl"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CURSORCOLOR, "CursorColor"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ALWAYSSHOWCURSOR, "AlwaysShowCursor"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DISPLAYSYNCHRON, "DisplayIsSynchron"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISMODIFIED, "IsModified"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISNEW, "IsNew"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_PRIVILEGES, "Privileges"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_COMMAND,"Command"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_COMMANDTYPE,"CommandType"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_RESULTSET_CONCURRENCY, "ResultSetConcurrency"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_INSERTONLY, "IgnoreResult"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_RESULTSET_TYPE, "ResultSetType"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ESCAPE_PROCESSING, "EscapeProcessing"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_APPLYFILTER, "ApplyFilter"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISNULLABLE, "IsNullable"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ACTIVECOMMAND, "ActiveCommand"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ISCURRENCY, "IsCurrency"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_URL, "URL"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_ACTIVE_CONNECTION, "ActiveConnection"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_SORT, "Order"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_DATASOURCE, "DataSourceName"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_REALNAME,"RealName"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_CONTROLSOURCEPROPERTY,"DataFieldProperty"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_TEXTLINECOLOR, "TextLineColor"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONTEMPHASISMARK, "FontEmphasisMark"); - IMPLEMENT_CONSTASCII_USTRING(FM_PROP_FONTRELIEF, "FontRelief"); - - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_SCROLLVALUE_MIN, "ScrollValueMin" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_SCROLLVALUE_MAX, "ScrollValueMax" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_DEFAULT_SCROLLVALUE, "DefaultScrollValue" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_LINEINCREMENT, "LineIncrement" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_BLOCKINCREMENT, "BlockIncrement" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_ORIENTATION, "Orientation" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_REPEAT, "Repeat" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_REPEATDELAY, "RepeatDelay" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_SYMBOLCOLOR, "SymbolColor" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_VISIBILESIZE, "VisibleSize" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_SPINVALUE_MIN, "SpinValueMin" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_SPINVALUE_MAX, "SpinValueMax" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_DEFAULT_SPINVALUE, "DefaultSpinValue" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_SPININCREMENT, "SpinIncrement" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_LINEENDFORMAT, "LineEndFormat" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_TOGGLE, "Toggle" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_FOCUSONCLICK, "FocusOnClick" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_HIDEINACTIVESELECTION, "HideInactiveSelection" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_VISUALEFFECT, "VisualEffect" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_BORDERCOLOR, "BorderColor" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_DYNAMIC_CONTROL_BORDER, "DynamicControlBorder" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_CONTROL_BORDER_COLOR_FOCUS, "ControlBorderColorOnFocus" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_CONTROL_BORDER_COLOR_MOUSE, "ControlBorderColorOnHover" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_CONTROL_BORDER_COLOR_INVALID,"ControlBorderColorOnInvalid" ); - - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_BUTTON_TYPE, "ButtonType" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_FORM_OPERATIONS, "FormOperations" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_INPUT_REQUIRED, "InputRequired" ); - - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_WRITING_MODE, "WritingMode" ); - IMPLEMENT_CONSTASCII_USTRING( FM_PROP_MOUSE_WHEEL_BEHAVIOR, "MouseWheelBehavior" ); - -} // namespace svxform - diff --git a/svx/source/form/fmservs.cxx b/svx/source/form/fmservs.cxx index fd4ab39e2f91..b9f40b6ddda2 100644 --- a/svx/source/form/fmservs.cxx +++ b/svx/source/form/fmservs.cxx @@ -31,76 +31,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include <com/sun/star/container/XSet.hpp> -#include "fmstatic.hxx" #include <cppuhelper/factory.hxx> #include <comphelper/processfactory.hxx> - -namespace svxform -{ - - // ----------------------- - // service names for compatibility - // ----------------------- - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_EDIT,"stardiv.one.form.component.Edit"); // compatibility - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_TEXTFIELD,"stardiv.one.form.component.TextField"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_LISTBOX,"stardiv.one.form.component.ListBox"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_COMBOBOX,"stardiv.one.form.component.ComboBox"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_RADIOBUTTON,"stardiv.one.form.component.RadioButton"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_GROUPBOX,"stardiv.one.form.component.GroupBox"); // compatibility - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_FIXEDTEXT,"stardiv.one.form.component.FixedText"); // compatibility - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_COMMANDBUTTON,"stardiv.one.form.component.CommandButton"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_CHECKBOX,"stardiv.one.form.component.CheckBox"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_GRID,"stardiv.one.form.component.Grid"); // compatibility - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_GRIDCONTROL,"stardiv.one.form.component.GridControl"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_IMAGEBUTTON,"stardiv.one.form.component.ImageButton"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_FILECONTROL,"stardiv.one.form.component.FileControl"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_TIMEFIELD,"stardiv.one.form.component.TimeField"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_DATEFIELD,"stardiv.one.form.component.DateField"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_NUMERICFIELD,"stardiv.one.form.component.NumericField"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_CURRENCYFIELD,"stardiv.one.form.component.CurrencyField"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_PATTERNFIELD,"stardiv.one.form.component.PatternField"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_HIDDEN,"stardiv.one.form.component.Hidden"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_HIDDENCONTROL,"stardiv.one.form.component.HiddenControl"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_IMAGECONTROL,"stardiv.one.form.component.ImageControl"); - IMPLEMENT_CONSTASCII_USTRING(FM_COMPONENT_FORMATTEDFIELD,"stardiv.one.form.component.FormattedField"); - - IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_GRID,"stardiv.one.form.control.Grid"); // compatibility - IMPLEMENT_CONSTASCII_USTRING(FM_CONTROL_GRIDCONTROL,"stardiv.one.form.control.GridControl"); - - // ----------------------- - // new (sun) service names - // ----------------------- - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_FORM,"com.sun.star.form.component.Form"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_TEXTFIELD,"com.sun.star.form.component.TextField"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_LISTBOX,"com.sun.star.form.component.ListBox"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_COMBOBOX,"com.sun.star.form.component.ComboBox"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_RADIOBUTTON,"com.sun.star.form.component.RadioButton"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_GROUPBOX,"com.sun.star.form.component.GroupBox"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_FIXEDTEXT,"com.sun.star.form.component.FixedText"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_COMMANDBUTTON,"com.sun.star.form.component.CommandButton"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_CHECKBOX,"com.sun.star.form.component.CheckBox"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_GRIDCONTROL,"com.sun.star.form.component.GridControl"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_IMAGEBUTTON,"com.sun.star.form.component.ImageButton"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_FILECONTROL,"com.sun.star.form.component.FileControl"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_TIMEFIELD,"com.sun.star.form.component.TimeField"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_DATEFIELD,"com.sun.star.form.component.DateField"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_NUMERICFIELD,"com.sun.star.form.component.NumericField"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_CURRENCYFIELD,"com.sun.star.form.component.CurrencyField"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_PATTERNFIELD,"com.sun.star.form.component.PatternField"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_HIDDENCONTROL,"com.sun.star.form.component.HiddenControl"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_IMAGECONTROL,"com.sun.star.form.component.DatabaseImageControl"); - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_COMPONENT_FORMATTEDFIELD,"com.sun.star.form.component.FormattedField"); - IMPLEMENT_CONSTASCII_USTRING( FM_SUN_COMPONENT_SCROLLBAR, "com.sun.star.form.component.ScrollBar" ); - IMPLEMENT_CONSTASCII_USTRING( FM_SUN_COMPONENT_SPINBUTTON, "com.sun.star.form.component.SpinButton" ); - IMPLEMENT_CONSTASCII_USTRING( FM_SUN_COMPONENT_NAVIGATIONBAR,"com.sun.star.form.component.NavigationToolBar" ); - - IMPLEMENT_CONSTASCII_USTRING(FM_SUN_CONTROL_GRIDCONTROL,"com.sun.star.form.control.GridControl"); - - IMPLEMENT_CONSTASCII_USTRING(FM_NUMBER_FORMATTER,"com.sun.star.util.NumberFormatter"); - IMPLEMENT_CONSTASCII_USTRING(FM_FORM_CONTROLLER,"com.sun.star.form.FormController"); - IMPLEMENT_CONSTASCII_USTRING(SRV_SDB_CONNECTION,"com.sun.star.sdb.Connection"); - IMPLEMENT_CONSTASCII_USTRING(SRV_SDB_INTERACTION_HANDLER,"com.sun.star.sdb.InteractionHandler"); -} // namespace svxform +#include "fmservs.hxx" // ------------------------------------------------------------------------ #define DECL_SERVICE(ImplName) \ diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index f7e59ce41888..10c0978288a6 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -94,7 +94,6 @@ namespace svx using namespace ::com::sun::star::util; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; - using namespace ::svxform; //==================================================================== typedef USHORT WhichId; diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx index 95f1ae30f41c..18ca68b14bb0 100644 --- a/svx/source/form/fmtools.cxx +++ b/svx/source/form/fmtools.cxx @@ -100,7 +100,6 @@ #include <connectivity/dbtools.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequence.hxx> -#include "fmstatic.hxx" #include <comphelper/extract.hxx> #include <comphelper/uno3.hxx> #include <connectivity/dbexception.hxx> @@ -109,14 +108,6 @@ #include <algorithm> #include <rtl/logfile.hxx> -namespace svxform -{ - - IMPLEMENT_CONSTASCII_USTRING(DATA_MODE,"DataMode"); - IMPLEMENT_CONSTASCII_USTRING(FILTER_MODE,"FilterMode"); - -} // namespace svxform - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::util; using namespace ::com::sun::star::lang; diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index 6f4dff9d7fb3..1c4e64929dae 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -459,7 +459,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt) return; // if it's a "default value" property of a control model, set the according "value" property - static const sal_Char* pDefaultValueProperties[] = { + static ::rtl::OUString pDefaultValueProperties[] = { FM_PROP_DEFAULT_TEXT, FM_PROP_DEFAULTCHECKED, FM_PROP_DEFAULT_DATE, FM_PROP_DEFAULT_TIME, FM_PROP_DEFAULT_VALUE, FM_PROP_DEFAULT_SELECT_SEQ, FM_PROP_EFFECTIVE_DEFAULT }; @@ -472,7 +472,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt) "FmXUndoEnvironment::propertyChange: inconsistence!"); for (sal_Int32 i=0; i<nDefaultValueProps; ++i) { - if (0 == evt.PropertyName.compareToAscii(pDefaultValueProperties[i])) + if (0 == evt.PropertyName.compareTo(pDefaultValueProperties[i])) { try { diff --git a/svx/source/form/fmurl.cxx b/svx/source/form/fmurl.cxx deleted file mode 100644 index 32a40c0949e4..000000000000 --- a/svx/source/form/fmurl.cxx +++ /dev/null @@ -1,74 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: fmurl.cxx,v $ - * $Revision: 1.7 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svx.hxx" -#include "fmurl.hxx" - - -namespace svxform -{ - - IMPLEMENT_CONSTASCII_USTRING(FMURL_FORMSLOTS_PREFIX, ".uno:FormController/"); - - IMPLEMENT_CONSTASCII_USTRING(FMURL_FORM_POSITION, ".uno:FormController/positionForm" ); - IMPLEMENT_CONSTASCII_USTRING(FMURL_FORM_RECORDCOUNT, ".uno:FormController/RecordCount" ); - IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVEFIRST, ".uno:FormController/moveToFirst" ); - IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVEPREV, ".uno:FormController/moveToPrev" ); - IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVENEXT, ".uno:FormController/moveToNext" ); - IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVELAST, ".uno:FormController/moveToLast" ); - IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_MOVETONEW, ".uno:FormController/moveToNew" ); - IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_UNDO, ".uno:FormController/undoRecord" ); - IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_SAVE, ".uno:FormController/saveRecord" ); - IMPLEMENT_CONSTASCII_USTRING(FMURL_RECORD_DELETE, ".uno:FormController/deleteRecord" ); - IMPLEMENT_CONSTASCII_USTRING(FMURL_FORM_REFRESH, ".uno:FormController/refreshForm" ); - IMPLEMENT_CONSTASCII_USTRING(FMURL_FORM_REFRESH_CURRENT_CONTROL, - ".uno:FormController/refreshCurrentControl" ); - - IMPLEMENT_CONSTASCII_USTRING( FMURL_FORM_SORT_UP, ".uno:FormController/sortUp" ); - IMPLEMENT_CONSTASCII_USTRING( FMURL_FORM_SORT_DOWN, ".uno:FormController/sortDown" ); - IMPLEMENT_CONSTASCII_USTRING( FMURL_FORM_SORT, ".uno:FormController/sort" ); - IMPLEMENT_CONSTASCII_USTRING( FMURL_FORM_AUTO_FILTER, ".uno:FormController/autoFilter" ); - IMPLEMENT_CONSTASCII_USTRING( FMURL_FORM_FILTER, ".uno:FormController/filter" ); - IMPLEMENT_CONSTASCII_USTRING( FMURL_FORM_APPLY_FILTER, ".uno:FormController/applyFilter" ); - IMPLEMENT_CONSTASCII_USTRING( FMURL_FORM_REMOVE_FILTER,".uno:FormController/removeFilterOrder" ); - - IMPLEMENT_CONSTASCII_USTRING(FMURL_CONFIRM_DELETION,".uno:FormSlots/ConfirmDeletion"); - - IMPLEMENT_CONSTASCII_USTRING(FMURL_COMPONENT_FORMGRIDVIEW,".component:DB/FormGridView"); - IMPLEMENT_CONSTASCII_USTRING(FMURL_GRIDVIEW_CLEARVIEW,".uno:FormSlots/ClearView"); - IMPLEMENT_CONSTASCII_USTRING(FMURL_GRIDVIEW_ADDCOLUMN,".uno:FormSlots/AddGridColumn"); - IMPLEMENT_CONSTASCII_USTRING(FMURL_GRIDVIEW_ATTACHTOFORM,".uno:FormSlots/AttachToForm"); - - IMPLEMENT_CONSTASCII_USTRING(FMARG_ATTACHTO_MASTERFORM,"MasterForm"); - IMPLEMENT_CONSTASCII_USTRING(FMARG_ADDCOL_COLUMNTYPE,"ColumnType"); - IMPLEMENT_CONSTASCII_USTRING(FMARG_ADDCOL_COLUMNPOS,"ColumnPosition"); - -} // namespace svxform diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx index 9c9c76b9d403..104d2f423eb5 100644 --- a/svx/source/form/formcontrolling.cxx +++ b/svx/source/form/formcontrolling.cxx @@ -57,7 +57,6 @@ namespace svx { //........................................................................ - using namespace ::svxform; /** === begin UNO using === **/ using ::com::sun::star::uno::Reference; using ::com::sun::star::lang::XMultiServiceFactory; diff --git a/svx/source/form/makefile.mk b/svx/source/form/makefile.mk index 3d405edc00f1..b649be94d106 100644 --- a/svx/source/form/makefile.mk +++ b/svx/source/form/makefile.mk @@ -33,6 +33,7 @@ PRJ=..$/.. PRJNAME=svx TARGET=form +LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE @@ -53,7 +54,8 @@ SRC1FILES= \ formshell.src \ datanavi.src -SLOFILES = \ +LIB1TARGET= $(SLB)$/$(TARGET)-core.lib +LIB1OBJFILES= \ $(SLO)$/formtoolbars.obj \ $(SLO)$/fmdocumentclassification.obj \ $(SLO)$/fmcontrolbordermanager.obj \ @@ -61,7 +63,6 @@ SLOFILES = \ $(SLO)$/fmtextcontroldialogs.obj \ $(SLO)$/fmtextcontrolfeature.obj \ $(SLO)$/fmtextcontrolshell.obj \ - $(SLO)$/dbcharsethelper.obj \ $(SLO)$/ParseContext.obj \ $(SLO)$/typeconversionclient.obj \ $(SLO)$/confirmdelete.obj \ @@ -69,9 +70,7 @@ SLOFILES = \ $(SLO)$/sqlparserclient.obj \ $(SLO)$/dataaccessdescriptor.obj \ $(SLO)$/fmpage.obj \ - $(SLO)$/fmPropBrw.obj \ $(SLO)$/fmundo.obj \ - $(SLO)$/fmprop.obj \ $(SLO)$/fmmodel.obj \ $(SLO)$/navigatortree.obj \ $(SLO)$/navigatortreemodel.obj \ @@ -81,21 +80,14 @@ SLOFILES = \ $(SLO)$/fmvwimp.obj \ $(SLO)$/fmdpage.obj \ $(SLO)$/fmitems.obj \ - $(SLO)$/tbxform.obj \ $(SLO)$/fmobj.obj \ $(SLO)$/fmdmod.obj \ - $(SLO)$/fmobjfac.obj \ - $(SLO)$/fmsrccfg.obj \ $(SLO)$/fmservs.obj \ $(SLO)$/typemap.obj \ $(SLO)$/fmexch.obj \ - $(SLO)$/tabwin.obj \ - $(SLO)$/fmurl.obj \ - $(SLO)$/filtnav.obj \ $(SLO)$/fmtools.obj \ $(SLO)$/fmshimp.obj \ $(SLO)$/fmshell.obj \ - $(SLO)$/fmsrcimp.obj \ $(SLO)$/fmview.obj \ $(SLO)$/sdbdatacolumn.obj \ $(SLO)$/formcontrolling.obj \ @@ -105,13 +97,22 @@ SLOFILES = \ $(SLO)$/datalistener.obj \ $(SLO)$/fmscriptingenv.obj \ $(SLO)$/stringlistresource.obj \ - $(SLO)$/databaselocationinput.obj \ $(SLO)$/delayedevent.obj \ $(SLO)$/formcontrolfactory.obj -.IF "$(OS)$(CPU)"=="SOLARISI" -NOOPTFILES=$(SLO)$/fmprop.obj -.ENDIF +LIB2TARGET= $(SLB)$/$(TARGET).lib +LIB2OBJFILES= \ + $(SLO)$/dbcharsethelper.obj \ + $(SLO)$/fmPropBrw.obj \ + $(SLO)$/tbxform.obj \ + $(SLO)$/fmobjfac.obj \ + $(SLO)$/fmsrccfg.obj \ + $(SLO)$/tabwin.obj \ + $(SLO)$/filtnav.obj \ + $(SLO)$/fmsrcimp.obj \ + $(SLO)$/databaselocationinput.obj + +SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) # --- Targets ---------------------------------- diff --git a/svx/source/gengal/makefile.mk b/svx/source/gengal/makefile.mk index 703f730433c9..ae1f36e5f742 100644 --- a/svx/source/gengal/makefile.mk +++ b/svx/source/gengal/makefile.mk @@ -66,7 +66,7 @@ APP1STDLIBS=$(TOOLSLIB) \ $(SALLIB) \ $(VCLLIB) \ $(UCBHELPERLIB) \ - $(SVXLIB) + $(SVXCORELIB) #.IF "$(COM)"=="GCC" #ADDOPTFILES=$(OBJ)$/gengal.obj diff --git a/svx/source/inc/AccessibleStringWrap.hxx b/svx/source/inc/AccessibleStringWrap.hxx index 032c5b5472c7..e85e36b7b8ac 100644 --- a/svx/source/inc/AccessibleStringWrap.hxx +++ b/svx/source/inc/AccessibleStringWrap.hxx @@ -34,6 +34,8 @@ #include <sal/types.h> #include <tools/string.hxx> +#include <svx/svxdllapi.h> + class OutputDevice; class SvxFont; class Rectangle; @@ -49,10 +51,10 @@ class AccessibleStringWrap { public: - AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont, const String& rText ); + SVX_DLLPUBLIC AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont, const String& rText ); - sal_Bool GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect ); - sal_Int32 GetIndexAtPoint( const Point& rPoint ); + SVX_DLLPUBLIC sal_Bool GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect ); + SVX_DLLPUBLIC sal_Int32 GetIndexAtPoint( const Point& rPoint ); private: diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx index 81e77be20b8e..deac560db58b 100644 --- a/svx/source/inc/datanavi.hxx +++ b/svx/source/inc/datanavi.hxx @@ -307,10 +307,10 @@ namespace svxform }; //======================================================================== - class DataNavigatorManager : public SfxChildWindow + class SVX_DLLPUBLIC DataNavigatorManager : public SfxChildWindow { public: - DataNavigatorManager( Window* pParent, sal_uInt16 nId, + SVX_DLLPRIVATE DataNavigatorManager( Window* pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ); SFX_DECL_CHILDWINDOW( DataNavigatorManager ); }; diff --git a/svx/source/inc/dbtoolsclient.hxx b/svx/source/inc/dbtoolsclient.hxx index 15174b85ef69..45e0019eb67d 100644 --- a/svx/source/inc/dbtoolsclient.hxx +++ b/svx/source/inc/dbtoolsclient.hxx @@ -36,6 +36,7 @@ #include <osl/module.h> #include <tools/solar.h> #include <unotools/sharedunocomponent.hxx> +#include <svx/svxdllapi.h> //........................................................................ namespace svxform @@ -50,7 +51,7 @@ namespace svxform /** base class for classes which want to use dbtools features with load-on-call of the dbtools lib. */ - class ODbtoolsClient + class SVX_DLLPUBLIC ODbtoolsClient { private: static ::osl::Mutex s_aMutex; @@ -82,7 +83,7 @@ namespace svxform //==================================================================== //= OStaticDataAccessTools //==================================================================== - class OStaticDataAccessTools : public ODbtoolsClient + class SVX_DLLPUBLIC OStaticDataAccessTools : public ODbtoolsClient { protected: mutable ::rtl::Reference< ::connectivity::simple::IDataAccessTools > m_xDataAccessTools; @@ -93,7 +94,7 @@ namespace svxform public: OStaticDataAccessTools(); - const ::rtl::Reference< ::connectivity::simple::IDataAccessTools >& getDataAccessTools() const { return m_xDataAccessTools; } + SVX_DLLPRIVATE const ::rtl::Reference< ::connectivity::simple::IDataAccessTools >& getDataAccessTools() const { return m_xDataAccessTools; } // ------------------------------------------------ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier> getNumberFormats( @@ -102,13 +103,13 @@ namespace svxform ) const; // ------------------------------------------------ - sal_Int32 getDefaultNumberFormat( + SVX_DLLPRIVATE sal_Int32 getDefaultNumberFormat( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xColumn, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatTypes >& _xTypes, const ::com::sun::star::lang::Locale& _rLocale ); // ------------------------------------------------ - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection_withFeedback( + SVX_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection_withFeedback( const ::rtl::OUString& _rDataSourceName, const ::rtl::OUString& _rUser, const ::rtl::OUString& _rPwd, @@ -130,26 +131,26 @@ namespace svxform const SAL_THROW ( (::com::sun::star::uno::RuntimeException) ); // ------------------------------------------------ - void TransferFormComponentProperties( + SVX_DLLPRIVATE void TransferFormComponentProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxOld, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxNew, const ::com::sun::star::lang::Locale& _rLocale ) const; // ------------------------------------------------ - ::rtl::OUString quoteName( + SVX_DLLPRIVATE ::rtl::OUString quoteName( const ::rtl::OUString& _rQuote, const ::rtl::OUString& _rName ) const; // ------------------------------------------------ - ::rtl::OUString composeTableNameForSelect( + SVX_DLLPRIVATE ::rtl::OUString composeTableNameForSelect( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xTable ) const; // ------------------------------------------------ - ::com::sun::star::sdb::SQLContext prependContextInfo( + SVX_DLLPRIVATE ::com::sun::star::sdb::SQLContext prependContextInfo( ::com::sun::star::sdbc::SQLException& _rException, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContext, const ::rtl::OUString& _rContextDescription, @@ -157,7 +158,7 @@ namespace svxform ) const; // ------------------------------------------------ - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > getDataSource( + SVX_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > getDataSource( const ::rtl::OUString& _rsRegisteredName, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory ) const; @@ -166,22 +167,22 @@ namespace svxform /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::INSERT @param _rxCursorSet the property set */ - sal_Bool canInsert(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const; + SVX_DLLPRIVATE sal_Bool canInsert(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const; // ------------------------------------------------ /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::UPDATE @param _rxCursorSet the property set */ - sal_Bool canUpdate(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const; + SVX_DLLPRIVATE sal_Bool canUpdate(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const; // ------------------------------------------------ /** check if the property "Privileges" supports ::com::sun::star::sdbcx::Privilege::DELETE @param _rxCursorSet the property set */ - sal_Bool canDelete(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const; + SVX_DLLPRIVATE sal_Bool canDelete(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxCursorSet) const; // ------------------------------------------------ - ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > + SVX_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > getFieldsByCommandDescriptor( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, const sal_Int32 _nCommandType, @@ -200,13 +201,13 @@ namespace svxform ) SAL_THROW( ( ) ); // ------------------------------------------------ - bool isEmbeddedInDatabase( + SVX_DLLPRIVATE bool isEmbeddedInDatabase( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent, ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxActualConnection ); // ------------------------------------------------ - bool isEmbeddedInDatabase( + SVX_DLLPRIVATE bool isEmbeddedInDatabase( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent ); }; diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx index 5f48c24e1085..2bb298836d02 100644 --- a/svx/source/inc/filtnav.hxx +++ b/svx/source/inc/filtnav.hxx @@ -43,13 +43,8 @@ #include <vcl/image.hxx> #include <svtools/svtreebx.hxx> -#ifndef _DIALOG_HXX //autogen #include <vcl/dialog.hxx> -#endif - -#ifndef _GROUP_HXX //autogen #include <vcl/group.hxx> -#endif #include <vcl/dockwin.hxx> #include "fmtools.hxx" #include "fmexch.hxx" diff --git a/svx/source/inc/fmctrler.hxx b/svx/source/inc/fmctrler.hxx index 5684a4c0bd55..7a973e129280 100644 --- a/svx/source/inc/fmctrler.hxx +++ b/svx/source/inc/fmctrler.hxx @@ -273,7 +273,7 @@ public: // XUnoTunnel virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId(); - static FmXFormController* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent ); + SVX_DLLPUBLIC static FmXFormController* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent ); // XDispatch virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& _rURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rArgs ) throw (::com::sun::star::uno::RuntimeException); @@ -462,7 +462,7 @@ public: --m_nCurrentFilterPosition; } - void setCurrentFilterPosition(sal_Int32 nPos); + SVX_DLLPUBLIC void setCurrentFilterPosition(sal_Int32 nPos); sal_Int32 getCurrentFilterPosition() const {return m_nCurrentFilterPosition;} protected: diff --git a/svx/source/inc/fmexch.hxx b/svx/source/inc/fmexch.hxx index f85f61fdd126..689d02396d23 100644 --- a/svx/source/inc/fmexch.hxx +++ b/svx/source/inc/fmexch.hxx @@ -36,6 +36,8 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <tools/link.hxx> +#include <svx/svxdllapi.h> + class FmFormShell; class FmFormPage; class SvLBoxEntry; @@ -63,7 +65,7 @@ namespace svxform //==================================================================== //= OLocalExchange //==================================================================== - class OLocalExchange : public TransferableHelper + class SVX_DLLPUBLIC OLocalExchange : public TransferableHelper { private: Link m_aClipboardListener; @@ -110,7 +112,7 @@ namespace svxform //= OLocalExchangeHelper //==================================================================== /// a helper for navigator windows (SvTreeListBox'es) which allow DnD within themself - class OLocalExchangeHelper + class SVX_DLLPUBLIC OLocalExchangeHelper { protected: Window* m_pDragSource; @@ -130,13 +132,13 @@ namespace svxform inline sal_Bool isDataExchangeActive( ) const { return isDragSource() || isClipboardOwner(); } inline void clear() { if ( isDataExchangeActive() ) m_pTransferable->clear(); } - void setClipboardListener( const Link& _rListener ) { if ( m_pTransferable ) m_pTransferable->setClipboardListener( _rListener ); } + SVX_DLLPRIVATE void setClipboardListener( const Link& _rListener ) { if ( m_pTransferable ) m_pTransferable->setClipboardListener( _rListener ); } protected: - virtual OLocalExchange* createExchange() const = 0; + SVX_DLLPRIVATE virtual OLocalExchange* createExchange() const = 0; protected: - void implReset(); + SVX_DLLPRIVATE void implReset(); }; //==================================================================== diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx index 7b66a9968f13..df60ba931739 100644 --- a/svx/source/inc/fmexpl.hxx +++ b/svx/source/inc/fmexpl.hxx @@ -595,10 +595,10 @@ namespace svxform }; //======================================================================== - class NavigatorFrameManager : public SfxChildWindow + class SVX_DLLPUBLIC NavigatorFrameManager : public SfxChildWindow { public: - NavigatorFrameManager( Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, + SVX_DLLPRIVATE NavigatorFrameManager( Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo ); SFX_DECL_CHILDWINDOW( NavigatorFrameManager ); }; diff --git a/svx/source/inc/fmobj.hxx b/svx/source/inc/fmobj.hxx index e37b6a32e74e..4099f241b72a 100644 --- a/svx/source/inc/fmobj.hxx +++ b/svx/source/inc/fmobj.hxx @@ -62,8 +62,8 @@ class FmFormObj: public SdrUnoObj // only to be used for comparison with the current ref device! public: - FmFormObj(const ::rtl::OUString& rModelName,sal_Int32 _nType); - FmFormObj(sal_Int32 _nType); + SVX_DLLPUBLIC FmFormObj(const ::rtl::OUString& rModelName,sal_Int32 _nType); + SVX_DLLPUBLIC FmFormObj(sal_Int32 _nType); TYPEINFO(); diff --git a/svx/source/inc/fmpgeimp.hxx b/svx/source/inc/fmpgeimp.hxx index 90a7a4027b46..350fbedd709e 100644 --- a/svx/source/inc/fmpgeimp.hxx +++ b/svx/source/inc/fmpgeimp.hxx @@ -154,8 +154,7 @@ public: /** returns an object mapping from control models to drawing shapes. */ - ::com::sun::star::uno::Reference< ::com::sun::star::container::XMap > - getControlToShapeMap(); + SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::container::XMap > getControlToShapeMap(); private: /** validates whether <member>xCurrentForm</member> is still valid and to be used diff --git a/svx/source/inc/fmprop.hrc b/svx/source/inc/fmprop.hrc index 3deec41981d4..34d88b325731 100644 --- a/svx/source/inc/fmprop.hrc +++ b/svx/source/inc/fmprop.hrc @@ -30,9 +30,6 @@ #ifndef _SVX_FMPROP_HRC #define _SVX_FMPROP_HRC -#ifndef _FM_STATIC_HXX_ -#include "fmstatic.hxx" -#endif // PropertyId's, welche eine Zuordnung zu einen PropertyName haben, das koennten // auch in Zukunft WhichIds sein -> Itemset #define FM_ATTR_START 0 @@ -40,151 +37,145 @@ #define FM_ATTR_FILTER ( FM_ATTR_START + 1 ) #define FM_ATTR_FORM_OPERATIONS ( FM_ATTR_START + 2 ) - -namespace svxform -{ - DECLARE_CONSTASCII_USTRING(FM_PROP_NAME); - DECLARE_CONSTASCII_USTRING(FM_PROP_CLASSID); - DECLARE_CONSTASCII_USTRING(FM_PROP_ALIGN); - DECLARE_CONSTASCII_USTRING(FM_PROP_ROWCOUNT); - DECLARE_CONSTASCII_USTRING(FM_PROP_ROWCOUNTFINAL); - DECLARE_CONSTASCII_USTRING(FM_PROP_FETCHSIZE); - DECLARE_CONSTASCII_USTRING(FM_PROP_VALUE); - DECLARE_CONSTASCII_USTRING(FM_PROP_VALUEMIN); - DECLARE_CONSTASCII_USTRING(FM_PROP_VALUEMAX); - DECLARE_CONSTASCII_USTRING(FM_PROP_VALUESTEP); - DECLARE_CONSTASCII_USTRING(FM_PROP_TEXT); - DECLARE_CONSTASCII_USTRING(FM_PROP_LABEL); - DECLARE_CONSTASCII_USTRING(FM_PROP_NAVIGATION); - DECLARE_CONSTASCII_USTRING(FM_PROP_CYCLE); - DECLARE_CONSTASCII_USTRING(FM_PROP_CONTROLSOURCE); - DECLARE_CONSTASCII_USTRING(FM_PROP_ENABLED); - DECLARE_CONSTASCII_USTRING(FM_PROP_SPIN); - DECLARE_CONSTASCII_USTRING(FM_PROP_READONLY); - DECLARE_CONSTASCII_USTRING(FM_PROP_FILTER); - DECLARE_CONSTASCII_USTRING(FM_PROP_AUTOINCREMENT); - DECLARE_CONSTASCII_USTRING(FM_PROP_WIDTH); - DECLARE_CONSTASCII_USTRING(FM_PROP_SEARCHABLE); - DECLARE_CONSTASCII_USTRING(FM_PROP_MULTILINE); - DECLARE_CONSTASCII_USTRING(FM_PROP_TARGET_URL); - DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULTCONTROL); - DECLARE_CONSTASCII_USTRING(FM_PROP_MAXTEXTLEN); - DECLARE_CONSTASCII_USTRING(FM_PROP_DATE); - DECLARE_CONSTASCII_USTRING(FM_PROP_TIME); - DECLARE_CONSTASCII_USTRING(FM_PROP_STATE); - DECLARE_CONSTASCII_USTRING(FM_PROP_TRISTATE); - DECLARE_CONSTASCII_USTRING(FM_PROP_STRINGITEMLIST); - DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_TEXT); - DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULTCHECKED); - DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_DATE); - DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_TIME); - DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_VALUE); - DECLARE_CONSTASCII_USTRING(FM_PROP_FORMATKEY); - DECLARE_CONSTASCII_USTRING(FM_PROP_FORMATSSUPPLIER); - DECLARE_CONSTASCII_USTRING(FM_PROP_LISTSOURCETYPE); - DECLARE_CONSTASCII_USTRING(FM_PROP_LISTSOURCE); - DECLARE_CONSTASCII_USTRING(FM_PROP_SELECT_SEQ); - DECLARE_CONSTASCII_USTRING(FM_PROP_VALUE_SEQ); - DECLARE_CONSTASCII_USTRING(FM_PROP_DEFAULT_SELECT_SEQ); - DECLARE_CONSTASCII_USTRING(FM_PROP_DECIMAL_ACCURACY); - DECLARE_CONSTASCII_USTRING(FM_PROP_EDITMASK); - DECLARE_CONSTASCII_USTRING(FM_PROP_ISREADONLY); - DECLARE_CONSTASCII_USTRING(FM_PROP_FIELDTYPE); - DECLARE_CONSTASCII_USTRING(FM_PROP_REFVALUE); - DECLARE_CONSTASCII_USTRING(FM_PROP_STRICTFORMAT); - DECLARE_CONSTASCII_USTRING(FM_PROP_DATASOURCE); - DECLARE_CONSTASCII_USTRING(FM_PROP_LITERALMASK); - DECLARE_CONSTASCII_USTRING(FM_PROP_SHOWTHOUSANDSEP); - DECLARE_CONSTASCII_USTRING(FM_PROP_CURRENCYSYMBOL); - DECLARE_CONSTASCII_USTRING(FM_PROP_DATEFORMAT); - DECLARE_CONSTASCII_USTRING(FM_PROP_DATEMIN); - DECLARE_CONSTASCII_USTRING(FM_PROP_DATEMAX); - DECLARE_CONSTASCII_USTRING(FM_PROP_DATE_SHOW_CENTURY); - DECLARE_CONSTASCII_USTRING(FM_PROP_TIMEFORMAT); - DECLARE_CONSTASCII_USTRING(FM_PROP_TIMEMIN); - DECLARE_CONSTASCII_USTRING(FM_PROP_TIMEMAX); - DECLARE_CONSTASCII_USTRING(FM_PROP_LINECOUNT); - DECLARE_CONSTASCII_USTRING(FM_PROP_BOUNDCOLUMN); - DECLARE_CONSTASCII_USTRING(FM_PROP_HASNAVIGATION); - DECLARE_CONSTASCII_USTRING(FM_PROP_FONT); - DECLARE_CONSTASCII_USTRING(FM_PROP_BACKGROUNDCOLOR); - DECLARE_CONSTASCII_USTRING(FM_PROP_TEXTCOLOR); - DECLARE_CONSTASCII_USTRING(FM_PROP_BORDER); - DECLARE_CONSTASCII_USTRING(FM_PROP_DROPDOWN); - DECLARE_CONSTASCII_USTRING(FM_PROP_ROWHEIGHT); - DECLARE_CONSTASCII_USTRING(FM_PROP_HELPTEXT); - DECLARE_CONSTASCII_USTRING(FM_PROP_HELPURL); - DECLARE_CONSTASCII_USTRING(FM_PROP_RECORDMARKER); - DECLARE_CONSTASCII_USTRING(FM_PROP_BOUNDFIELD); - DECLARE_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_VALUE); - DECLARE_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_DEFAULT); - DECLARE_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_MIN); - DECLARE_CONSTASCII_USTRING(FM_PROP_EFFECTIVE_MAX); - DECLARE_CONSTASCII_USTRING(FM_PROP_HIDDEN); - DECLARE_CONSTASCII_USTRING(FM_PROP_FILTERPROPOSAL); - DECLARE_CONSTASCII_USTRING(FM_PROP_FIELDSOURCE); - DECLARE_CONSTASCII_USTRING(FM_PROP_TABLENAME); - DECLARE_CONSTASCII_USTRING(FM_PROP_FILTERSUPPLIER); - DECLARE_CONSTASCII_USTRING(FM_PROP_CURRENTFILTER); - DECLARE_CONSTASCII_USTRING(FM_PROP_SELECTED_FIELDS); - DECLARE_CONSTASCII_USTRING(FM_PROP_SELECTED_TABLES); - DECLARE_CONSTASCII_USTRING(FM_PROP_THREADSAFE); - DECLARE_CONSTASCII_USTRING(FM_PROP_CONTROLLABEL); - DECLARE_CONSTASCII_USTRING(FM_PROP_CURSORCOLOR); - DECLARE_CONSTASCII_USTRING(FM_PROP_ALWAYSSHOWCURSOR); - DECLARE_CONSTASCII_USTRING(FM_PROP_DISPLAYSYNCHRON); - DECLARE_CONSTASCII_USTRING(FM_PROP_ISMODIFIED); - DECLARE_CONSTASCII_USTRING(FM_PROP_ISNEW); - DECLARE_CONSTASCII_USTRING(FM_PROP_PRIVILEGES); - DECLARE_CONSTASCII_USTRING(FM_PROP_COMMAND); - DECLARE_CONSTASCII_USTRING(FM_PROP_COMMANDTYPE); - DECLARE_CONSTASCII_USTRING(FM_PROP_RESULTSET_CONCURRENCY); - DECLARE_CONSTASCII_USTRING(FM_PROP_INSERTONLY); - DECLARE_CONSTASCII_USTRING(FM_PROP_RESULTSET_TYPE); - DECLARE_CONSTASCII_USTRING(FM_PROP_ESCAPE_PROCESSING); - DECLARE_CONSTASCII_USTRING(FM_PROP_APPLYFILTER); - DECLARE_CONSTASCII_USTRING(FM_PROP_ISNULLABLE); - DECLARE_CONSTASCII_USTRING(FM_PROP_ACTIVECOMMAND); - DECLARE_CONSTASCII_USTRING(FM_PROP_ISCURRENCY); - DECLARE_CONSTASCII_USTRING(FM_PROP_URL); - DECLARE_CONSTASCII_USTRING(FM_PROP_ACTIVE_CONNECTION); - DECLARE_CONSTASCII_USTRING(FM_PROP_SORT); - DECLARE_CONSTASCII_USTRING(FM_PROP_CONTROLSOURCEPROPERTY); - DECLARE_CONSTASCII_USTRING(FM_PROP_REALNAME); - DECLARE_CONSTASCII_USTRING(FM_PROP_TEXTLINECOLOR); - DECLARE_CONSTASCII_USTRING(FM_PROP_FONTEMPHASISMARK); - DECLARE_CONSTASCII_USTRING(FM_PROP_FONTRELIEF); - DECLARE_CONSTASCII_USTRING( FM_PROP_SCROLLVALUE_MIN ); - DECLARE_CONSTASCII_USTRING( FM_PROP_SCROLLVALUE_MAX ); - DECLARE_CONSTASCII_USTRING( FM_PROP_DEFAULT_SCROLLVALUE ); - DECLARE_CONSTASCII_USTRING( FM_PROP_LINEINCREMENT ); - DECLARE_CONSTASCII_USTRING( FM_PROP_BLOCKINCREMENT ); - DECLARE_CONSTASCII_USTRING( FM_PROP_ORIENTATION ); - DECLARE_CONSTASCII_USTRING( FM_PROP_REPEAT ); - DECLARE_CONSTASCII_USTRING( FM_PROP_REPEATDELAY ); - DECLARE_CONSTASCII_USTRING( FM_PROP_SYMBOLCOLOR ); - DECLARE_CONSTASCII_USTRING( FM_PROP_VISIBILESIZE ); - DECLARE_CONSTASCII_USTRING( FM_PROP_SPINVALUE_MIN ); - DECLARE_CONSTASCII_USTRING( FM_PROP_SPINVALUE_MAX ); - DECLARE_CONSTASCII_USTRING( FM_PROP_DEFAULT_SPINVALUE ); - DECLARE_CONSTASCII_USTRING( FM_PROP_SPININCREMENT ); - DECLARE_CONSTASCII_USTRING( FM_PROP_LINEENDFORMAT ); - DECLARE_CONSTASCII_USTRING( FM_PROP_TOGGLE ); - DECLARE_CONSTASCII_USTRING( FM_PROP_FOCUSONCLICK ); - DECLARE_CONSTASCII_USTRING( FM_PROP_HIDEINACTIVESELECTION ); - DECLARE_CONSTASCII_USTRING( FM_PROP_VISUALEFFECT ); - DECLARE_CONSTASCII_USTRING( FM_PROP_BORDERCOLOR ); - DECLARE_CONSTASCII_USTRING( FM_PROP_DYNAMIC_CONTROL_BORDER ); - DECLARE_CONSTASCII_USTRING( FM_PROP_CONTROL_BORDER_COLOR_FOCUS ); - DECLARE_CONSTASCII_USTRING( FM_PROP_CONTROL_BORDER_COLOR_MOUSE ); - DECLARE_CONSTASCII_USTRING( FM_PROP_CONTROL_BORDER_COLOR_INVALID ); - DECLARE_CONSTASCII_USTRING( FM_PROP_BUTTON_TYPE ); - DECLARE_CONSTASCII_USTRING( FM_PROP_FORM_OPERATIONS ); - DECLARE_CONSTASCII_USTRING( FM_PROP_INPUT_REQUIRED ); - DECLARE_CONSTASCII_USTRING( FM_PROP_WRITING_MODE ); - DECLARE_CONSTASCII_USTRING( FM_PROP_MOUSE_WHEEL_BEHAVIOR ); - -} // namespace svxform +#define FM_PROP_NAME rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Name" ) ) +#define FM_PROP_CLASSID rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ClassId" ) ) +#define FM_PROP_ALIGN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Align" ) ) +#define FM_PROP_ROWCOUNT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RowCount" ) ) +#define FM_PROP_ROWCOUNTFINAL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsRowCountFinal" ) ) +#define FM_PROP_FETCHSIZE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FetchSize" ) ) +#define FM_PROP_VALUE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Value" ) ) +#define FM_PROP_VALUEMIN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ValueMin" ) ) +#define FM_PROP_VALUEMAX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ValueMax" ) ) +#define FM_PROP_VALUESTEP rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ValueStep" ) ) +#define FM_PROP_TEXT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ) ) +#define FM_PROP_LABEL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Label" ) ) +#define FM_PROP_NAVIGATION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NavigationBarMode" ) ) +#define FM_PROP_CYCLE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Cycle" ) ) +#define FM_PROP_CONTROLSOURCE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataField" ) ) +#define FM_PROP_ENABLED rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Enabled" ) ) +#define FM_PROP_SPIN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Spin" ) ) +#define FM_PROP_READONLY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ReadOnly" ) ) +#define FM_PROP_FILTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Filter" ) ) +#define FM_PROP_AUTOINCREMENT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsAutoIncrement" ) ) +#define FM_PROP_WIDTH rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Width" ) ) +#define FM_PROP_SEARCHABLE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsSearchable" ) ) +#define FM_PROP_MULTILINE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MultiLine" ) ) +#define FM_PROP_TARGET_URL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TargetURL" ) ) +#define FM_PROP_DEFAULTCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultControl" ) ) +#define FM_PROP_MAXTEXTLEN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxTextLen" ) ) +#define FM_PROP_DATE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Date" ) ) +#define FM_PROP_TIME rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Time" ) ) +#define FM_PROP_STATE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "State" ) ) +#define FM_PROP_TRISTATE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TriState" ) ) +#define FM_PROP_STRINGITEMLIST rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StringItemList" ) ) +#define FM_PROP_DEFAULT_TEXT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultText" ) ) +#define FM_PROP_DEFAULTCHECKED rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultState" ) ) +#define FM_PROP_DEFAULT_DATE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultDate" ) ) +#define FM_PROP_DEFAULT_TIME rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultTime" ) ) +#define FM_PROP_DEFAULT_VALUE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultValue" ) ) +#define FM_PROP_FORMATKEY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FormatKey" ) ) +#define FM_PROP_FORMATSSUPPLIER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FormatsSupplier" ) ) +#define FM_PROP_LISTSOURCETYPE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ListSourceType" ) ) +#define FM_PROP_LISTSOURCE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ListSource" ) ) +#define FM_PROP_SELECT_SEQ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedItems" ) ) +#define FM_PROP_VALUE_SEQ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ValueItemList" ) ) +#define FM_PROP_DEFAULT_SELECT_SEQ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultSelection" ) ) +#define FM_PROP_DECIMAL_ACCURACY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DecimalAccuracy" ) ) +#define FM_PROP_EDITMASK rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EditMask" ) ) +#define FM_PROP_ISREADONLY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsReadOnly" ) ) +#define FM_PROP_FIELDTYPE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Type" ) ) +#define FM_PROP_REFVALUE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RefValue" ) ) +#define FM_PROP_STRICTFORMAT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StrictFormat" ) ) +#define FM_PROP_DATASOURCE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataSourceName" ) ) +#define FM_PROP_LITERALMASK rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LiteralMask" ) ) +#define FM_PROP_SHOWTHOUSANDSEP rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ShowThousandsSeparator" ) ) +#define FM_PROP_CURRENCYSYMBOL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CurrencySymbol" ) ) +#define FM_PROP_DATEFORMAT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateFormat" ) ) +#define FM_PROP_DATEMIN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateMin" ) ) +#define FM_PROP_DATEMAX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateMax" ) ) +#define FM_PROP_DATE_SHOW_CENTURY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateShowCentury" ) ) +#define FM_PROP_TIMEFORMAT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TimeFormat" ) ) +#define FM_PROP_TIMEMIN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TimeMin" ) ) +#define FM_PROP_TIMEMAX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TimeMax" ) ) +#define FM_PROP_LINECOUNT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineCount" ) ) +#define FM_PROP_BOUNDCOLUMN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BoundColumn" ) ) +#define FM_PROP_HASNAVIGATION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasNavigationBar" ) ) +#define FM_PROP_FONT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontDescriptor" ) ) +#define FM_PROP_BACKGROUNDCOLOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BackgroundColor" ) ) +#define FM_PROP_TEXTCOLOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextColor" ) ) +#define FM_PROP_BORDER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Border" ) ) +#define FM_PROP_DROPDOWN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Dropdown" ) ) +#define FM_PROP_ROWHEIGHT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RowHeight" ) ) +#define FM_PROP_HELPTEXT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpText" ) ) +#define FM_PROP_HELPURL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpURL" ) ) +#define FM_PROP_RECORDMARKER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HasRecordMarker" ) ) +#define FM_PROP_BOUNDFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BoundField" ) ) +#define FM_PROP_EFFECTIVE_VALUE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EffectiveValue" ) ) +#define FM_PROP_EFFECTIVE_DEFAULT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EffectiveDefault" ) ) +#define FM_PROP_EFFECTIVE_MIN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EffectiveMin" ) ) +#define FM_PROP_EFFECTIVE_MAX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EffectiveMax" ) ) +#define FM_PROP_HIDDEN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Hidden" ) ) +#define FM_PROP_FILTERPROPOSAL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UseFilterValueProposal" ) ) +#define FM_PROP_FIELDSOURCE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FieldSource" ) ) +#define FM_PROP_TABLENAME rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TableName" ) ) +#define FM_PROP_FILTERSUPPLIER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterSupplier" ) ) +#define FM_PROP_CURRENTFILTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CurrentFilter" ) ) +#define FM_PROP_SELECTED_FIELDS rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedFields" ) ) +#define FM_PROP_SELECTED_TABLES rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SelectedTables" ) ) +#define FM_PROP_THREADSAFE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ThreadSafe" ) ) +#define FM_PROP_CONTROLLABEL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LabelControl" ) ) +#define FM_PROP_CURSORCOLOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CursorColor" ) ) +#define FM_PROP_ALWAYSSHOWCURSOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "AlwaysShowCursor" ) ) +#define FM_PROP_DISPLAYSYNCHRON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DisplayIsSynchron" ) ) +#define FM_PROP_ISMODIFIED rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsModified" ) ) +#define FM_PROP_ISNEW rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsNew" ) ) +#define FM_PROP_PRIVILEGES rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Privileges" ) ) +#define FM_PROP_COMMAND rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Command" ) ) +#define FM_PROP_COMMANDTYPE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CommandType" ) ) +#define FM_PROP_RESULTSET_CONCURRENCY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResultSetConcurrency" ) ) +#define FM_PROP_INSERTONLY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IgnoreResult" ) ) +#define FM_PROP_RESULTSET_TYPE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ResultSetType" ) ) +#define FM_PROP_ESCAPE_PROCESSING rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "EscapeProcessing" ) ) +#define FM_PROP_APPLYFILTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ApplyFilter" ) ) +#define FM_PROP_ISNULLABLE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsNullable" ) ) +#define FM_PROP_ACTIVECOMMAND rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ActiveCommand" ) ) +#define FM_PROP_ISCURRENCY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsCurrency" ) ) +#define FM_PROP_URL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ) +#define FM_PROP_ACTIVE_CONNECTION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ActiveConnection" ) ) +#define FM_PROP_SORT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Order" ) ) +#define FM_PROP_CONTROLSOURCEPROPERTY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataFieldProperty" ) ) +#define FM_PROP_REALNAME rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RealName" ) ) +#define FM_PROP_TEXTLINECOLOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextLineColor" ) ) +#define FM_PROP_FONTEMPHASISMARK rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontEmphasisMark" ) ) +#define FM_PROP_FONTRELIEF rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontRelief" ) ) +#define FM_PROP_SCROLLVALUE_MIN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ScrollValueMin" ) ) +#define FM_PROP_SCROLLVALUE_MAX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ScrollValueMax" ) ) +#define FM_PROP_DEFAULT_SCROLLVALUE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultScrollValue" ) ) +#define FM_PROP_LINEINCREMENT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineIncrement" ) ) +#define FM_PROP_BLOCKINCREMENT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BlockIncrement" ) ) +#define FM_PROP_ORIENTATION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Orientation" ) ) +#define FM_PROP_REPEAT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Repeat" ) ) +#define FM_PROP_REPEATDELAY rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RepeatDelay" ) ) +#define FM_PROP_SYMBOLCOLOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SymbolColor" ) ) +#define FM_PROP_VISIBILESIZE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VisibleSize" ) ) +#define FM_PROP_SPINVALUE_MIN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SpinValueMin" ) ) +#define FM_PROP_SPINVALUE_MAX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SpinValueMax" ) ) +#define FM_PROP_DEFAULT_SPINVALUE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultSpinValue" ) ) +#define FM_PROP_SPININCREMENT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SpinIncrement" ) ) +#define FM_PROP_LINEENDFORMAT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineEndFormat" ) ) +#define FM_PROP_TOGGLE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Toggle" ) ) +#define FM_PROP_FOCUSONCLICK rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FocusOnClick" ) ) +#define FM_PROP_HIDEINACTIVESELECTION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HideInactiveSelection" ) ) +#define FM_PROP_VISUALEFFECT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "VisualEffect" ) ) +#define FM_PROP_BORDERCOLOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BorderColor" ) ) +#define FM_PROP_DYNAMIC_CONTROL_BORDER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DynamicControlBorder" ) ) +#define FM_PROP_CONTROL_BORDER_COLOR_FOCUS rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlBorderColorOnFocus" ) ) +#define FM_PROP_CONTROL_BORDER_COLOR_MOUSE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlBorderColorOnHover" ) ) +#define FM_PROP_CONTROL_BORDER_COLOR_INVALID rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlBorderColorOnInvalid" ) ) +#define FM_PROP_BUTTON_TYPE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ButtonType" ) ) +#define FM_PROP_FORM_OPERATIONS rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FormOperations" ) ) +#define FM_PROP_INPUT_REQUIRED rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "InputRequired" ) ) +#define FM_PROP_WRITING_MODE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WritingMode" ) ) +#define FM_PROP_MOUSE_WHEEL_BEHAVIOR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MouseWheelBehavior" ) ) #endif // _SVX_FMPROP_HRC - diff --git a/svx/source/inc/fmservs.hxx b/svx/source/inc/fmservs.hxx index e538ee994d8f..201a5a351224 100644 --- a/svx/source/inc/fmservs.hxx +++ b/svx/source/inc/fmservs.hxx @@ -30,76 +30,64 @@ #ifndef _SVX_FMSERVS_HXX #define _SVX_FMSERVS_HXX -#include "fmstatic.hxx" +#include <svx/svxdllapi.h> + +#define FM_NUMBER_FORMATTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.NumberFormatter" ) ) +#define FM_COMPONENT_EDIT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.Edit" ) ) +#define FM_COMPONENT_TEXTFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.TextField" ) ) +#define FM_COMPONENT_LISTBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.ListBox" ) ) +#define FM_COMPONENT_COMBOBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.ComboBox" ) ) +#define FM_COMPONENT_RADIOBUTTON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.RadioButton" ) ) +#define FM_COMPONENT_GROUPBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.GroupBox" ) ) +#define FM_COMPONENT_FIXEDTEXT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.FixedText" ) ) +#define FM_COMPONENT_COMMANDBUTTON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.CommandButton" ) ) +#define FM_COMPONENT_CHECKBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.CheckBox" ) ) +#define FM_COMPONENT_GRID rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.Grid" ) ) +#define FM_COMPONENT_GRIDCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.GridControl" ) ) +#define FM_COMPONENT_IMAGEBUTTON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.ImageButton" ) ) +#define FM_COMPONENT_FILECONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.FileControl" ) ) +#define FM_COMPONENT_TIMEFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.TimeField" ) ) +#define FM_COMPONENT_DATEFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.DateField" ) ) +#define FM_COMPONENT_NUMERICFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.NumericField" ) ) +#define FM_COMPONENT_CURRENCYFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.CurrencyField" ) ) +#define FM_COMPONENT_PATTERNFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.PatternField" ) ) +#define FM_COMPONENT_FORMATTEDFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.FormattedField" ) ) +#define FM_COMPONENT_HIDDEN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.Hidden" ) ) +#define FM_COMPONENT_HIDDENCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.HiddenControl" ) ) +#define FM_COMPONENT_IMAGECONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.ImageControl" ) ) +#define FM_CONTROL_GRID rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.control.Grid" ) ) +#define FM_CONTROL_GRIDCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.control.GridControl" ) ) +#define FM_FORM_CONTROLLER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.FormController" ) ) +#define SRV_SDB_CONNECTION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.Connection" ) ) +#define SRV_SDB_INTERACTION_HANDLER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.InteractionHandler" ) ) +#define FM_SUN_COMPONENT_FORM rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.Form" ) ) +#define FM_SUN_COMPONENT_TEXTFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.TextField" ) ) +#define FM_SUN_COMPONENT_LISTBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ListBox" ) ) +#define FM_SUN_COMPONENT_COMBOBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ComboBox" ) ) +#define FM_SUN_COMPONENT_RADIOBUTTON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.RadioButton" ) ) +#define FM_SUN_COMPONENT_GROUPBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.GroupBox" ) ) +#define FM_SUN_COMPONENT_FIXEDTEXT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.FixedText" ) ) +#define FM_SUN_COMPONENT_COMMANDBUTTON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.CommandButton" ) ) +#define FM_SUN_COMPONENT_CHECKBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.CheckBox" ) ) +#define FM_SUN_COMPONENT_GRIDCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.GridControl" ) ) +#define FM_SUN_COMPONENT_IMAGEBUTTON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ImageButton" ) ) +#define FM_SUN_COMPONENT_FILECONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.FileControl" ) ) +#define FM_SUN_COMPONENT_TIMEFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.TimeField" ) ) +#define FM_SUN_COMPONENT_DATEFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.DateField" ) ) +#define FM_SUN_COMPONENT_NUMERICFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.NumericField" ) ) +#define FM_SUN_COMPONENT_CURRENCYFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.CurrencyField" ) ) +#define FM_SUN_COMPONENT_PATTERNFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.PatternField" ) ) +#define FM_SUN_COMPONENT_HIDDENCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.HiddenControl" ) ) +#define FM_SUN_COMPONENT_IMAGECONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.DatabaseImageControl" ) ) +#define FM_SUN_COMPONENT_FORMATTEDFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.FormattedField" ) ) +#define FM_SUN_COMPONENT_SCROLLBAR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.ScrollBar" ) ) +#define FM_SUN_COMPONENT_SPINBUTTON rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.SpinButton" ) ) +#define FM_SUN_COMPONENT_NAVIGATIONBAR rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.component.NavigationToolBar" ) ) +#define FM_SUN_CONTROL_GRIDCONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.form.control.GridControl" ) ) namespace svxform { - - DECLARE_CONSTASCII_USTRING(FM_NUMBER_FORMATTER); - - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_EDIT); // alter service name (5.0) - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_TEXTFIELD); - - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_LISTBOX); - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_COMBOBOX); - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_RADIOBUTTON); - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_GROUPBOX); - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_FIXEDTEXT); - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_COMMANDBUTTON); - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_CHECKBOX); - - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_GRID); // alter service name (5.0) - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_GRIDCONTROL); - - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_IMAGEBUTTON); - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_FILECONTROL); - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_TIMEFIELD); - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_DATEFIELD); - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_NUMERICFIELD); - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_CURRENCYFIELD); - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_PATTERNFIELD); - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_FORMATTEDFIELD); - - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_HIDDEN); // alter service name (5.0) - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_HIDDENCONTROL); - - DECLARE_CONSTASCII_USTRING(FM_COMPONENT_IMAGECONTROL); - - DECLARE_CONSTASCII_USTRING(FM_CONTROL_GRID); - DECLARE_CONSTASCII_USTRING(FM_CONTROL_GRIDCONTROL); - - DECLARE_CONSTASCII_USTRING(FM_FORM_CONTROLLER); - DECLARE_CONSTASCII_USTRING(SRV_SDB_CONNECTION); - DECLARE_CONSTASCII_USTRING(SRV_SDB_INTERACTION_HANDLER); - - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_FORM); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_TEXTFIELD); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_LISTBOX); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_COMBOBOX); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_RADIOBUTTON); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_GROUPBOX); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_FIXEDTEXT); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_COMMANDBUTTON); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_CHECKBOX); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_GRIDCONTROL); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_IMAGEBUTTON); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_FILECONTROL); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_TIMEFIELD); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_DATEFIELD); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_NUMERICFIELD); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_CURRENCYFIELD); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_PATTERNFIELD); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_HIDDENCONTROL); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_IMAGECONTROL); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_FORMATTEDFIELD); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_SCROLLBAR); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_SPINBUTTON); - DECLARE_CONSTASCII_USTRING(FM_SUN_COMPONENT_NAVIGATIONBAR); - - DECLARE_CONSTASCII_USTRING(FM_SUN_CONTROL_GRIDCONTROL); - - void ImplSmartRegisterUnoServices(); - + SVX_DLLPUBLIC void ImplSmartRegisterUnoServices(); } // namespace svxform #endif // _SVX_FMSERVS_HXX diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx index d3e8e8ce0327..438aee48d969 100644 --- a/svx/source/inc/fmshimp.hxx +++ b/svx/source/inc/fmshimp.hxx @@ -422,7 +422,7 @@ public: /** retrieves the current selection */ - void getCurrentSelection( InterfaceBag& /* [out] */ _rSelection ) const; + SVX_DLLPUBLIC void getCurrentSelection( InterfaceBag& /* [out] */ _rSelection ) const; /** sets a new current selection as indicated by a mark list @return @@ -631,7 +631,7 @@ public: // ======================================================================== SV_DECL_PTRARR_DEL(StatusForwarderArray, SfxStatusForwarder*, 16, 0) -class SAL_DLLPRIVATE ControlConversionMenuController : public SfxMenuControl +class SVX_DLLPUBLIC ControlConversionMenuController : public SfxMenuControl { protected: StatusForwarderArray m_aStatusForwarders; @@ -639,11 +639,11 @@ protected: PopupMenu* m_pConversionMenu; public: - ControlConversionMenuController(sal_uInt16 nId, Menu& rMenu, SfxBindings& rBindings); - virtual ~ControlConversionMenuController(); + SVX_DLLPRIVATE ControlConversionMenuController(sal_uInt16 nId, Menu& rMenu, SfxBindings& rBindings); + SVX_DLLPRIVATE virtual ~ControlConversionMenuController(); SFX_DECL_MENU_CONTROL(); - virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState); + SVX_DLLPRIVATE virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState); }; //================================================================== diff --git a/svx/source/inc/fmstatic.hxx b/svx/source/inc/fmstatic.hxx deleted file mode 100644 index cd58a79df753..000000000000 --- a/svx/source/inc/fmstatic.hxx +++ /dev/null @@ -1,81 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: fmstatic.hxx,v $ - * $Revision: 1.6 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _FM_STATIC_HXX_ -#define _FM_STATIC_HXX_ -#include <tools/string.hxx> - -struct ConstAsciiString -{ - const sal_Char* ascii; - sal_Int32 length; - - inline operator const ::rtl::OUString () const; - inline operator const sal_Char* () const { return ascii; } - - inline ConstAsciiString(const sal_Char* _pAsciiZeroTerminated, const sal_Int32 _nLength); - inline ~ConstAsciiString(); - -private: - mutable ::rtl::OUString* ustring; -}; - -//------------------------------------------------------------ -inline ConstAsciiString::ConstAsciiString(const sal_Char* _pAsciiZeroTerminated, const sal_Int32 _nLength) - :ascii(_pAsciiZeroTerminated) - ,length(_nLength) - ,ustring(NULL) -{ -} - -//------------------------------------------------------------ -inline ConstAsciiString::~ConstAsciiString() -{ - delete ustring; - ustring = NULL; -} - -//------------------------------------------------------------ -inline ConstAsciiString::operator const ::rtl::OUString () const -{ - if (!ustring) - ustring = new ::rtl::OUString(ascii, length, RTL_TEXTENCODING_ASCII_US); - return *ustring; -} - -#define DECLARE_CONSTASCII_USTRING(name) \ - extern ConstAsciiString name - -#define IMPLEMENT_CONSTASCII_USTRING(name, asciivalue) \ - ConstAsciiString name(asciivalue, sizeof(asciivalue) - 1) - - -#endif // _FM_STATIC_HXX_ - diff --git a/svx/source/inc/fmtools.hxx b/svx/source/inc/fmtools.hxx index 44495a1002e9..935e84c6448e 100644 --- a/svx/source/inc/fmtools.hxx +++ b/svx/source/inc/fmtools.hxx @@ -96,7 +96,8 @@ #include <cppuhelper/implbase2.hxx> #include <cppuhelper/implbase3.hxx> #include <cppuhelper/component.hxx> -#include "fmstatic.hxx" + +#include <svx/svxdllapi.h> #include <set> @@ -109,19 +110,12 @@ class Window; // display info about a simple ::com::sun::star::sdbc::SQLException void displayException(const ::com::sun::star::sdbc::SQLException&, Window* _pParent = NULL); void displayException(const ::com::sun::star::sdbc::SQLWarning&, Window* _pParent = NULL); -void displayException(const ::com::sun::star::sdb::SQLContext&, Window* _pParent = NULL); +SVX_DLLPUBLIC void displayException(const ::com::sun::star::sdb::SQLContext&, Window* _pParent = NULL); void displayException(const ::com::sun::star::sdb::SQLErrorEvent&, Window* _pParent = NULL); void displayException(const ::com::sun::star::uno::Any&, Window* _pParent = NULL); -// StringConversion -namespace svxform -{ - // modes for the XModeSelector - DECLARE_CONSTASCII_USTRING(DATA_MODE); - DECLARE_CONSTASCII_USTRING(FILTER_MODE); - -} // namespace svxform - +#define DATA_MODE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DataMode" ) ) +#define FILTER_MODE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterMode" ) ) // Kopieren von Persistenten Objecten ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> cloneUsingProperties(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XPersistObject>& _xObj); @@ -139,7 +133,7 @@ String getFormComponentAccessPath(const ::com::sun::star::uno::Reference< ::com: ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel> getXModel(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& xIface); -::rtl::OUString getLabelName(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xControlModel); +SVX_DLLPUBLIC ::rtl::OUString getLabelName(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xControlModel); // =================================================================================================== // = class CursorWrapper - eine Hilfsklasse, die parallel mit je einem ::com::sun::star::uno::Reference<XDatabaseUpdateCursor>, @@ -159,7 +153,7 @@ public: // Construction/Destruction CursorWrapper() { } CursorWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet>& _rxCursor, sal_Bool bUseCloned = sal_False); - CursorWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _rxCursor, sal_Bool bUseCloned = sal_False); + SVX_DLLPUBLIC CursorWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _rxCursor, sal_Bool bUseCloned = sal_False); // bei bUseCloned == sal_True wird der Cursor ueber das XCloneable-Interface (dass er besitzen muss) gedoubled und // erst dann benutzt diff --git a/svx/source/inc/fmurl.hxx b/svx/source/inc/fmurl.hxx index 3f90948620da..21030d294a10 100644 --- a/svx/source/inc/fmurl.hxx +++ b/svx/source/inc/fmurl.hxx @@ -31,46 +31,33 @@ #ifndef _SVX_FMURL_HXX #define _SVX_FMURL_HXX -#include "fmstatic.hxx" - -namespace svxform -{ - - DECLARE_CONSTASCII_USTRING(FMURL_FORMSLOTS_PREFIX); - - DECLARE_CONSTASCII_USTRING(FMURL_FORM_POSITION); - DECLARE_CONSTASCII_USTRING(FMURL_FORM_RECORDCOUNT); - DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVEFIRST); - DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVEPREV); - DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVENEXT); - DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVELAST); - DECLARE_CONSTASCII_USTRING(FMURL_RECORD_MOVETONEW); - DECLARE_CONSTASCII_USTRING(FMURL_RECORD_UNDO); - DECLARE_CONSTASCII_USTRING(FMURL_RECORD_SAVE); - DECLARE_CONSTASCII_USTRING(FMURL_RECORD_DELETE); - DECLARE_CONSTASCII_USTRING(FMURL_FORM_REFRESH); - DECLARE_CONSTASCII_USTRING(FMURL_FORM_REFRESH_CURRENT_CONTROL); - - DECLARE_CONSTASCII_USTRING(FMURL_FORM_SORT_UP); - DECLARE_CONSTASCII_USTRING(FMURL_FORM_SORT_DOWN); - DECLARE_CONSTASCII_USTRING(FMURL_FORM_SORT); - DECLARE_CONSTASCII_USTRING(FMURL_FORM_AUTO_FILTER); - DECLARE_CONSTASCII_USTRING(FMURL_FORM_FILTER); - DECLARE_CONSTASCII_USTRING(FMURL_FORM_APPLY_FILTER); - DECLARE_CONSTASCII_USTRING(FMURL_FORM_REMOVE_FILTER); - - DECLARE_CONSTASCII_USTRING(FMURL_CONFIRM_DELETION); - - DECLARE_CONSTASCII_USTRING(FMURL_COMPONENT_FORMGRIDVIEW); - DECLARE_CONSTASCII_USTRING(FMURL_GRIDVIEW_CLEARVIEW); - DECLARE_CONSTASCII_USTRING(FMURL_GRIDVIEW_ADDCOLUMN); - DECLARE_CONSTASCII_USTRING(FMURL_GRIDVIEW_ATTACHTOFORM); - - DECLARE_CONSTASCII_USTRING(FMARG_ATTACHTO_MASTERFORM); - DECLARE_CONSTASCII_USTRING(FMARG_ADDCOL_COLUMNTYPE); - DECLARE_CONSTASCII_USTRING(FMARG_ADDCOL_COLUMNPOS); - -} // namespace svxform +#define FMURL_FORMSLOTS_PREFIX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/" ) ) +#define FMURL_FORM_POSITION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/positionForm" ) ) +#define FMURL_FORM_RECORDCOUNT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/RecordCount" ) ) +#define FMURL_RECORD_MOVEFIRST rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/moveToFirst" ) ) +#define FMURL_RECORD_MOVEPREV rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/moveToPrev" ) ) +#define FMURL_RECORD_MOVENEXT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/moveToNext" ) ) +#define FMURL_RECORD_MOVELAST rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/moveToLast" ) ) +#define FMURL_RECORD_MOVETONEW rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/moveToNew" ) ) +#define FMURL_RECORD_UNDO rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/undoRecord" ) ) +#define FMURL_RECORD_SAVE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/saveRecord" ) ) +#define FMURL_RECORD_DELETE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/deleteRecord" ) ) +#define FMURL_FORM_REFRESH rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/refreshForm" ) ) +#define FMURL_FORM_REFRESH_CURRENT_CONTROL rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/refreshCurrentControl" ) ) +#define FMURL_FORM_SORT_UP rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/sortUp" ) ) +#define FMURL_FORM_SORT_DOWN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/sortDown" ) ) +#define FMURL_FORM_SORT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/sort" ) ) +#define FMURL_FORM_AUTO_FILTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/autoFilter" ) ) +#define FMURL_FORM_FILTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/filter" ) ) +#define FMURL_FORM_APPLY_FILTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/applyFilter" ) ) +#define FMURL_FORM_REMOVE_FILTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormController/removeFilterOrder" ) ) +#define FMURL_CONFIRM_DELETION rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormSlots/ConfirmDeletion" ) ) +#define FMURL_COMPONENT_FORMGRIDVIEW rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".component:DB/FormGridView" ) ) +#define FMURL_GRIDVIEW_CLEARVIEW rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormSlots/ClearView" ) ) +#define FMURL_GRIDVIEW_ADDCOLUMN rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormSlots/AddGridColumn" ) ) +#define FMURL_GRIDVIEW_ATTACHTOFORM rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FormSlots/AttachToForm" ) ) +#define FMARG_ATTACHTO_MASTERFORM rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MasterForm" ) ) +#define FMARG_ADDCOL_COLUMNTYPE rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnType" ) ) +#define FMARG_ADDCOL_COLUMNPOS rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnPosition" ) ) #endif // _SVX_FMURL_HXX - diff --git a/svx/source/inc/formtoolbars.hxx b/svx/source/inc/formtoolbars.hxx index 5e8eae756b89..2090b7e6b667 100644 --- a/svx/source/inc/formtoolbars.hxx +++ b/svx/source/inc/formtoolbars.hxx @@ -31,14 +31,13 @@ #ifndef SVX_SOURCE_INC_FORMTOOLBARS_HXX #define SVX_SOURCE_INC_FORMTOOLBARS_HXX -/** === begin UNO includes === **/ -/** === end UNO includes === **/ - #include "fmdocumentclassification.hxx" #include <com/sun/star/frame/XLayoutManager.hpp> #include <tools/solar.h> +#include <svx/svxdllapi.h> + //........................................................................ namespace svxform { @@ -58,7 +57,7 @@ namespace svxform @param _rxFrame the frame to analyze */ - FormToolboxes( + SVX_DLLPUBLIC FormToolboxes( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame ); @@ -66,16 +65,16 @@ namespace svxform /** retrieves the URI for the toolbox associated with the given slot, depending on the type of our document */ - ::rtl::OUString + SVX_DLLPUBLIC ::rtl::OUString getToolboxResourceName( USHORT _nSlotId ) const; /** toggles the toolbox associated with the given slot */ - void toggleToolbox( USHORT _nSlotId ) const; + SVX_DLLPUBLIC void toggleToolbox( USHORT _nSlotId ) const; /** determines whether the toolbox associated with the given slot is currently visible */ - bool isToolboxVisible( USHORT _nSlotId ) const; + SVX_DLLPUBLIC bool isToolboxVisible( USHORT _nSlotId ) const; /** ensures that a given toolbox is visible */ diff --git a/svx/source/inc/gridcols.hxx b/svx/source/inc/gridcols.hxx index a68e28270591..3b4c3582f314 100644 --- a/svx/source/inc/gridcols.hxx +++ b/svx/source/inc/gridcols.hxx @@ -30,25 +30,20 @@ #ifndef _SVX_GRIDCOLS_HXX #define _SVX_GRIDCOLS_HXX -#include "fmstatic.hxx" +#include <sal/types.h> -namespace svxform -{ - - // list of possible controls - DECLARE_CONSTASCII_USTRING(FM_COL_TEXTFIELD); - DECLARE_CONSTASCII_USTRING(FM_COL_CHECKBOX); - DECLARE_CONSTASCII_USTRING(FM_COL_COMBOBOX); - DECLARE_CONSTASCII_USTRING(FM_COL_LISTBOX); - DECLARE_CONSTASCII_USTRING(FM_COL_NUMERICFIELD); - DECLARE_CONSTASCII_USTRING(FM_COL_DATEFIELD); - DECLARE_CONSTASCII_USTRING(FM_COL_TIMEFIELD); - DECLARE_CONSTASCII_USTRING(FM_COL_CURRENCYFIELD); - DECLARE_CONSTASCII_USTRING(FM_COL_PATTERNFIELD); - DECLARE_CONSTASCII_USTRING(FM_COL_FORMATTEDFIELD); - -} // namespace svxform +namespace rtl { class OUString; } +#define FM_COL_TEXTFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TextField" ) ) +#define FM_COL_COMBOBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ComboBox" ) ) +#define FM_COL_CHECKBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CheckBox" ) ) +#define FM_COL_TIMEFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "TimeField" ) ) +#define FM_COL_DATEFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateField" ) ) +#define FM_COL_NUMERICFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "NumericField" ) ) +#define FM_COL_CURRENCYFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CurrencyField" ) ) +#define FM_COL_PATTERNFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PatternField" ) ) +#define FM_COL_LISTBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ListBox" ) ) +#define FM_COL_FORMATTEDFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FormattedField" ) ) // column type ids #define TYPE_CHECKBOX 0 diff --git a/svx/source/inc/sqlparserclient.hxx b/svx/source/inc/sqlparserclient.hxx index 2f7e43073b8b..f60af20e05fd 100644 --- a/svx/source/inc/sqlparserclient.hxx +++ b/svx/source/inc/sqlparserclient.hxx @@ -43,7 +43,7 @@ namespace svxform //==================================================================== //= OSQLParserClient //==================================================================== - class OSQLParserClient : public ODbtoolsClient + class SVX_DLLPUBLIC OSQLParserClient : public ODbtoolsClient ,public ::svxform::OParseContextClient { private: diff --git a/svx/source/inc/stringlistresource.hxx b/svx/source/inc/stringlistresource.hxx index 496993f7fbe1..76c7d1c92df7 100644 --- a/svx/source/inc/stringlistresource.hxx +++ b/svx/source/inc/stringlistresource.hxx @@ -31,11 +31,10 @@ #ifndef SVX_STRINGLISTRESOURCE_HXX #define SVX_STRINGLISTRESOURCE_HXX -/** === begin UNO includes === **/ -/** === end UNO includes === **/ - #include <tools/rc.hxx> +#include <svx/svxdllapi.h> + #include <memory> //........................................................................ @@ -52,8 +51,8 @@ namespace svx class StringListResource : public Resource { public: - StringListResource( const ResId& _rResId ); - ~StringListResource(); + SVX_DLLPUBLIC StringListResource( const ResId& _rResId ); + SVX_DLLPUBLIC ~StringListResource(); inline void get( ::std::vector< String >& _rStrings ) { diff --git a/svx/source/inc/unoedprx.hxx b/svx/source/inc/unoedprx.hxx index 070367f26dd9..4758b17dd621 100644 --- a/svx/source/inc/unoedprx.hxx +++ b/svx/source/inc/unoedprx.hxx @@ -79,6 +79,9 @@ public: virtual sal_Bool GetAttributeRun( USHORT& nStartIndex, USHORT& nEndIndex, USHORT nPara, USHORT nIndex ) const; virtual USHORT GetLineCount( USHORT nPara ) const; virtual USHORT GetLineLen( USHORT nPara, USHORT nLine ) const; + virtual void GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const; + virtual USHORT GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const; + virtual sal_Bool Delete( const ESelection& ); virtual sal_Bool InsertText( const String&, const ESelection& ); virtual sal_Bool QuickFormatDoc( BOOL bFull=FALSE ); @@ -118,12 +121,13 @@ public: SvxAccessibleTextEditViewAdapter(); virtual ~SvxAccessibleTextEditViewAdapter(); + // SvxViewForwarder interface virtual BOOL IsValid() const; - virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const; virtual Point PixelToLogic( const Point& rPoint, const MapMode& rMapMode ) const; + // SvxEditViewForwarder interface virtual sal_Bool GetSelection( ESelection& rSelection ) const; virtual sal_Bool SetSelection( const ESelection& rSelection ); virtual sal_Bool Copy(); diff --git a/svx/source/inc/unogalthemeprovider.hxx b/svx/source/inc/unogalthemeprovider.hxx index dd8391e89c12..555e7f380ab3 100644 --- a/svx/source/inc/unogalthemeprovider.hxx +++ b/svx/source/inc/unogalthemeprovider.hxx @@ -36,6 +36,8 @@ #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/gallery/XGalleryThemeProvider.hpp> +#include <svx/svxdllapi.h> + class Gallery; namespace unogallery { @@ -60,8 +62,8 @@ public: GalleryThemeProvider(); ~GalleryThemeProvider(); - static ::rtl::OUString getImplementationName_Static() throw(); - static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw(); + SVX_DLLPUBLIC static ::rtl::OUString getImplementationName_Static() throw(); + SVX_DLLPUBLIC static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw(); protected: diff --git a/svx/source/inc/unopolyhelper.hxx b/svx/source/inc/unopolyhelper.hxx index 8b299aa9ddb9..373b6ecc0f4a 100644 --- a/svx/source/inc/unopolyhelper.hxx +++ b/svx/source/inc/unopolyhelper.hxx @@ -33,6 +33,8 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> +#include <svx/svxdllapi.h> + namespace com { namespace sun { namespace star { namespace drawing { struct PolyPolygonBezierCoords; } } } } @@ -48,7 +50,7 @@ basegfx::B2DPolyPolygon SvxConvertPolyPolygonBezierToB2DPolyPolygon( const com:: /** convert a B2DPolyPolygon to a drawing::PolyPolygonBezierCoords */ -void SvxConvertB2DPolyPolygonToPolyPolygonBezier( const basegfx::B2DPolyPolygon& rPolyPoly, com::sun::star::drawing::PolyPolygonBezierCoords& rRetval ); +SVX_DLLPUBLIC void SvxConvertB2DPolyPolygonToPolyPolygonBezier( const basegfx::B2DPolyPolygon& rPolyPoly, com::sun::star::drawing::PolyPolygonBezierCoords& rRetval ); #endif diff --git a/svx/source/items/makefile.mk b/svx/source/items/makefile.mk index c6cae5464735..ef4bf0b00149 100644 --- a/svx/source/items/makefile.mk +++ b/svx/source/items/makefile.mk @@ -38,6 +38,7 @@ PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch PRJNAME=svx TARGET=items +LIBTARGET=NO # --- Settings ----------------------------------------------------- @@ -51,41 +52,45 @@ SRC1FILES = \ svxerr.src \ svxitems.src -SLOFILES= \ - $(SLO)$/ofaitem.obj \ +LIB1TARGET= $(SLB)$/$(TARGET)-core.lib +LIB1OBJFILES= \ $(SLO)$/writingmodeitem.obj \ $(SLO)$/frmitems.obj \ $(SLO)$/paraitem.obj \ $(SLO)$/textitem.obj \ - $(SLO)$/postattr.obj \ $(SLO)$/flditem.obj \ - $(SLO)$/hlnkitem.obj \ $(SLO)$/svxfont.obj \ - $(SLO)$/pageitem.obj \ - $(SLO)$/viewlayoutitem.obj \ - $(SLO)$/paperinf.obj \ + $(SLO)$/paperinf.obj \ $(SLO)$/drawitem.obj \ - $(SLO)$/algitem.obj \ $(SLO)$/itemtype.obj \ - $(SLO)$/rotmodit.obj \ - $(SLO)$/numinf.obj \ - $(SLO)$/svxerr.obj \ - $(SLO)$/numfmtsh.obj \ - $(SLO)$/zoomitem.obj \ $(SLO)$/chrtitem.obj \ $(SLO)$/bulitem.obj \ $(SLO)$/e3ditem.obj \ $(SLO)$/numitem.obj \ $(SLO)$/grfitem.obj \ $(SLO)$/clipfmtitem.obj \ - $(SLO)$/svxempty.obj \ $(SLO)$/xmlcnitm.obj \ $(SLO)$/customshapeitem.obj \ - $(SLO)$/charhiddenitem.obj \ + $(SLO)$/charhiddenitem.obj + +LIB2TARGET= $(SLB)$/$(TARGET).lib +LIB2OBJFILES= \ + $(SLO)$/ofaitem.obj \ + $(SLO)$/postattr.obj \ + $(SLO)$/hlnkitem.obj \ + $(SLO)$/pageitem.obj \ + $(SLO)$/viewlayoutitem.obj \ + $(SLO)$/algitem.obj \ + $(SLO)$/rotmodit.obj \ + $(SLO)$/numinf.obj \ + $(SLO)$/svxerr.obj \ + $(SLO)$/numfmtsh.obj \ + $(SLO)$/zoomitem.obj \ + $(SLO)$/svxempty.obj \ $(SLO)$/SmartTagItem.obj \ $(SLO)$/zoomslideritem.obj \ - +SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) EXCEPTIONSFILES= \ $(SLO)$/paraitem.obj \ diff --git a/svx/source/items/textitem.cxx b/svx/source/items/textitem.cxx index 50c18cd14b17..2d1e5b6ebf9f 100644 --- a/svx/source/items/textitem.cxx +++ b/svx/source/items/textitem.cxx @@ -485,6 +485,13 @@ SfxItemPresentation SvxFontItem::GetPresentation return SFX_ITEM_PRESENTATION_NONE; } +//------------------------------------------------------------------------ + +void SvxFontItem::EnableStoreUnicodeNames( BOOL bEnable ) +{ + bEnableStoreUnicodeNames = bEnable; +} + // class SvxPostureItem -------------------------------------------------- SvxPostureItem::SvxPostureItem( const FontItalic ePosture, const USHORT nId ) : diff --git a/svx/source/msfilter/escherex.cxx b/svx/source/msfilter/escherex.cxx index c327cec80d1b..5bb1b77efc35 100644 --- a/svx/source/msfilter/escherex.cxx +++ b/svx/source/msfilter/escherex.cxx @@ -156,14 +156,6 @@ EscherExClientAnchor_Base::~EscherExClientAnchor_Base() // --------------------------------------------------------------------------------------------- -struct EscherPropSortStruct -{ - sal_uInt8* pBuf; - sal_uInt32 nPropSize; - sal_uInt32 nPropValue; - sal_uInt16 nPropId; -}; - void EscherPropertyContainer::ImplInit() { nSortCount = 0; @@ -275,21 +267,40 @@ void EscherPropertyContainer::AddOpt( sal_uInt16 nPropID, sal_Bool bBlib, sal_uI } } -sal_Bool EscherPropertyContainer::GetOpt( sal_uInt16 nPropId, sal_uInt32& nPropValue ) const +sal_Bool EscherPropertyContainer::GetOpt( sal_uInt16 nPropId, sal_uInt32& rPropValue ) const +{ + EscherPropSortStruct aPropStruct; + + if ( GetOpt( nPropId, aPropStruct ) ) + { + rPropValue = aPropStruct.nPropValue; + return sal_True; + } + return sal_False; +} + +sal_Bool EscherPropertyContainer::GetOpt( sal_uInt16 nPropId, EscherPropSortStruct& rPropValue ) const { - sal_Bool bRetValue = sal_False; for( sal_uInt32 i = 0; i < nSortCount; i++ ) { if ( ( pSortStruct[ i ].nPropId &~0xc000 ) == ( nPropId &~0xc000 ) ) { - nPropValue = pSortStruct[ i ].nPropValue; - bRetValue = sal_True; - break; + rPropValue = pSortStruct[ i ]; + return sal_True; } } - return bRetValue; + return sal_False; } +EscherProperties EscherPropertyContainer::GetOpts() const +{ + EscherProperties aVector; + + for ( sal_uInt32 i = 0; i < nSortCount; ++i ) + aVector.push_back( pSortStruct[ i ] ); + + return aVector; +} extern "C" int __LOADONCALLAPI EscherPropSortFunc( const void* p1, const void* p2 ) { @@ -715,7 +726,7 @@ void EscherPropertyContainer::CreateTextProperties( AddOpt( ESCHER_Prop_lTxid, nTextId ); } -static sal_Bool GetLineArrow( const sal_Bool bLineStart, +sal_Bool EscherPropertyContainer::GetLineArrow( const sal_Bool bLineStart, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet, ESCHER_LineEnd& reLineEnd, sal_Int32& rnArrowLength, sal_Int32& rnArrowWidth ) { @@ -2084,6 +2095,68 @@ void ConvertEnhancedCustomShapeEquation( SdrObjCustomShape* pCustoShape, } } +sal_Bool EscherPropertyContainer::IsDefaultObject( SdrObjCustomShape* pCustoShape ) +{ + sal_Bool bIsDefaultObject = sal_False; + if ( pCustoShape ) + { + if ( pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_EQUATIONS ) + && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_VIEWBOX ) + && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_PATH ) + && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_GLUEPOINTS ) + && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_SEGMENTS ) + && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_STRETCHX ) + && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_STRETCHY ) +// && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_HANDLES ) + && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_TEXTFRAMES ) ) + bIsDefaultObject = sal_True; + } + + return bIsDefaultObject; +} + +void EscherPropertyContainer::LookForPolarHandles( const MSO_SPT eShapeType, sal_Int32& nAdjustmentsWhichNeedsToBeConverted ) +{ + const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( eShapeType ); + if ( pDefCustomShape && pDefCustomShape->nHandles && pDefCustomShape->pHandles ) + { + sal_Int32 k, nkCount = pDefCustomShape->nHandles; + const SvxMSDffHandle* pData = pDefCustomShape->pHandles; + for ( k = 0; k < nkCount; k++, pData++ ) + { + if ( pData->nFlags & MSDFF_HANDLE_FLAGS_POLAR ) + { + if ( ( pData->nPositionY >= 0x256 ) || ( pData->nPositionY <= 0x107 ) ) + nAdjustmentsWhichNeedsToBeConverted |= ( 1 << k ); + } + } + } +} + +sal_Bool EscherPropertyContainer::GetAdjustmentValue( const com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue & rkProp, sal_Int32 nIndex, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, sal_Int32& nValue ) +{ + if ( rkProp.State != beans::PropertyState_DIRECT_VALUE ) + return FALSE; + + sal_Bool bUseFixedFloat = ( nAdjustmentsWhichNeedsToBeConverted & ( 1 << nIndex ) ) != 0; + if ( rkProp.Value.getValueTypeClass() == uno::TypeClass_DOUBLE ) + { + double fValue; + rkProp.Value >>= fValue; + if ( bUseFixedFloat ) + fValue *= 65536.0; + nValue = (sal_Int32)fValue; + } + else + { + rkProp.Value >>= nValue; + if ( bUseFixedFloat ) + nValue <<= 16; + } + + return TRUE; +} + void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeType, const uno::Reference< drawing::XShape > & rXShape ) { uno::Reference< beans::XPropertySet > aXPropSet( rXShape, uno::UNO_QUERY ); @@ -2108,22 +2181,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT sal_Int32 nAdjustmentsWhichNeedsToBeConverted = 0; uno::Sequence< beans::PropertyValues > aHandlesPropSeq; sal_Bool bPredefinedHandlesUsed = sal_True; - - - sal_Bool bIsDefaultObject = sal_False; - if ( pCustoShape ) - { - if ( pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_EQUATIONS ) - && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_VIEWBOX ) - && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_PATH ) - && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_GLUEPOINTS ) - && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_SEGMENTS ) - && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_STRETCHX ) - && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_STRETCHY ) -// && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_HANDLES ) - && pCustoShape->IsDefaultGeometry( SdrObjCustomShape::DEFAULT_TEXTFRAMES ) ) - bIsDefaultObject = sal_True; - } + sal_Bool bIsDefaultObject = IsDefaultObject( pCustoShape ); // convert property "Equations" into std::vector< EnhancedCustomShapeEquationEquation > std::vector< EnhancedCustomShapeEquation > aEquations; @@ -3185,46 +3243,12 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT if ( pAdjustmentValuesProp->Value >>= aAdjustmentSeq ) { if ( bPredefinedHandlesUsed ) - { - const mso_CustomShape* pDefCustomShape = GetCustomShapeContent( eShapeType ); - if ( pDefCustomShape && pDefCustomShape->nHandles && pDefCustomShape->pHandles ) - { - sal_Int32 k, nkCount = pDefCustomShape->nHandles; - const SvxMSDffHandle* pData = pDefCustomShape->pHandles; - for ( k = 0; k < nkCount; k++, pData++ ) - { - if ( pData->nFlags & MSDFF_HANDLE_FLAGS_POLAR ) - { - if ( ( pData->nPositionY >= 0x256 ) || ( pData->nPositionY <= 0x107 ) ) - nAdjustmentsWhichNeedsToBeConverted |= ( 1 << k ); - } - } - } - } + LookForPolarHandles( eShapeType, nAdjustmentsWhichNeedsToBeConverted ); + sal_Int32 k, nValue = 0, nAdjustmentValues = aAdjustmentSeq.getLength(); for ( k = 0; k < nAdjustmentValues; k++ ) - { - const com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue & rkProp = aAdjustmentSeq[ k ]; - if ( rkProp.State == beans::PropertyState_DIRECT_VALUE ) - { - sal_Bool bUseFixedFloat = ( nAdjustmentsWhichNeedsToBeConverted & ( 1 << k ) ) != 0; - if ( rkProp.Value.getValueTypeClass() == uno::TypeClass_DOUBLE ) - { - double fValue; - rkProp.Value >>= fValue; - if ( bUseFixedFloat ) - fValue *= 65536.0; - nValue = (sal_Int32)fValue; - } - else - { - rkProp.Value >>= nValue; - if ( bUseFixedFloat ) - nValue <<= 16; - } + if( GetAdjustmentValue( aAdjustmentSeq[ k ], k, nAdjustmentsWhichNeedsToBeConverted, nValue ) ) AddOpt( (sal_uInt16)( DFF_Prop_adjustValue + k ), (sal_uInt32)nValue ); - } - } } } } @@ -3923,30 +3947,6 @@ struct EscherConnectorRule sal_uInt32 ncptiB; // Connection site Index of shape B }; -struct EscherConnectorListEntry -{ - ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnector; - ::com::sun::star::awt::Point maPointA; - ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnectToA; - ::com::sun::star::awt::Point maPointB; - ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mXConnectToB; - - sal_uInt32 GetConnectorRule( sal_Bool bFirst ); - - EscherConnectorListEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rC, - const ::com::sun::star::awt::Point& rPA, - ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rSA , - const ::com::sun::star::awt::Point& rPB, - ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rSB ) : - mXConnector ( rC ), - maPointA ( rPA ), - mXConnectToA( rSA ), - maPointB ( rPB ), - mXConnectToB( rSB ) {} - - sal_uInt32 GetClosestPoint( const Polygon& rPoly, const ::com::sun::star::awt::Point& rP ); -}; - struct EscherShapeListEntry { ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > aXShape; @@ -4650,6 +4650,17 @@ void EscherEx::AddAtom( UINT32 nAtomSize, UINT16 nRecType, int nRecVersion, int // --------------------------------------------------------------------------------------------- +void EscherEx::AddChildAnchor( const Rectangle& rRect ) +{ + AddAtom( 16, ESCHER_ChildAnchor ); + GetStream() << (INT32)rRect.Left() + << (INT32)rRect.Top() + << (INT32)rRect.Right() + << (INT32)rRect.Bottom(); +} + +// --------------------------------------------------------------------------------------------- + void EscherEx::AddClientAnchor( const Rectangle& rRect ) { AddAtom( 8, ESCHER_ClientAnchor ); @@ -4699,15 +4710,10 @@ UINT32 EscherEx::EnterGroup( const String& rShapeName, const Rectangle* pBoundRe if( rShapeName.Len() > 0 ) aPropOpt.AddOpt( ESCHER_Prop_wzName, rShapeName ); - aPropOpt.Commit( *mpOutStrm ); + Commit( aPropOpt, aRect ); if ( mnGroupLevel > 1 ) - { - AddAtom( 16, ESCHER_ChildAnchor ); - *mpOutStrm << (INT32)aRect.Left() - << (INT32)aRect.Top() - << (INT32)aRect.Right() - << (INT32)aRect.Bottom(); - } + AddChildAnchor( aRect ); + EscherExHostAppData* pAppData = mpImplEscherExSdr->ImplGetHostData(); if( pAppData ) { @@ -4805,6 +4811,13 @@ UINT32 EscherEx::GetShapeID() // --------------------------------------------------------------------------------------------- +void EscherEx::Commit( EscherPropertyContainer& rProps, const Rectangle& ) +{ + rProps.Commit( GetStream() ); +} + +// --------------------------------------------------------------------------------------------- + UINT32 EscherEx::GetColor( const UINT32 nSOColor, BOOL bSwap ) { if ( bSwap ) diff --git a/svx/source/msfilter/eschesdo.cxx b/svx/source/msfilter/eschesdo.cxx index 8057eded6131..65157df81baa 100644 --- a/svx/source/msfilter/eschesdo.cxx +++ b/svx/source/msfilter/eschesdo.cxx @@ -736,16 +736,10 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, if( rObj.GetAngle() ) ImplFlipBoundingBox( rObj, aPropOpt ); - aPropOpt.Commit( mpEscherEx->GetStream() ); + mpEscherEx->Commit( aPropOpt, rObj.GetRect() ); if( mpEscherEx->GetGroupLevel() > 1 ) - { - mpEscherEx->AddAtom( 16, ESCHER_ChildAnchor ); - const Rectangle& rRect = rObj.GetRect(); - mpEscherEx->GetStream() << (INT32)rRect.Left() - << (INT32)rRect.Top() - << (INT32)rRect.Right() - << (INT32)rRect.Bottom(); - } + mpEscherEx->AddChildAnchor( rObj.GetRect() ); + if ( mpHostAppData ) { //! with AdditionalText the App has to control whether these are written or not mpHostAppData->WriteClientAnchor( *mpEscherEx, rObj.GetRect() ); @@ -839,15 +833,10 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj, rObj.GetRect() ); } rObj.SetAngle( nAngle ); - aPropOpt.Commit( mpEscherEx->GetStream() ); + mpEscherEx->Commit( aPropOpt, rObj.GetRect() ); // write the childanchor - mpEscherEx->AddAtom( 16, ESCHER_ChildAnchor ); - const Rectangle& rRect = rObj.GetRect(); - mpEscherEx->GetStream() << (INT32)rRect.Left() - << (INT32)rRect.Top() - << (INT32)rRect.Right() - << (INT32)rRect.Bottom(); + mpEscherEx->AddChildAnchor( rObj.GetRect() ); #if defined EES_WRITE_EPP // ClientAnchor diff --git a/svx/source/msfilter/makefile.mk b/svx/source/msfilter/makefile.mk index 85c120f88d1b..adbe8b104860 100644 --- a/svx/source/msfilter/makefile.mk +++ b/svx/source/msfilter/makefile.mk @@ -33,6 +33,7 @@ PRJ=..$/.. PRJNAME=svx TARGET=msfilter +LIBTARGET=NO AUTOSEG=true # --- Settings ----------------------------------------------------- @@ -42,7 +43,8 @@ AUTOSEG=true # --- Files -------------------------------------------------------- -SLOFILES=\ +LIB1TARGET= $(SLB)$/$(TARGET)-msfilter.lib +LIB1OBJFILES= \ $(SLO)$/countryid.obj \ $(SLO)$/escherex.obj \ $(SLO)$/eschesdo.obj \ @@ -54,6 +56,12 @@ SLOFILES=\ $(SLO)$/mscodec.obj \ $(SLO)$/msfiltertracer.obj +LIB2TARGET= $(SLB)$/$(TARGET)-core.lib +LIB2OBJFILES= \ + $(SLO)$/svxmsbas2.obj + +SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) + EXCEPTIONSFILES= \ $(SLO)$/eschesdo.obj \ $(SLO)$/escherex.obj \ diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx index 5a8c149fa2bf..5830a737e790 100644 --- a/svx/source/msfilter/msdffimp.cxx +++ b/svx/source/msfilter/msdffimp.cxx @@ -4754,13 +4754,13 @@ SdrObject* SvxMSDffManager::ImportGroup( const DffRecordHeader& rHd, SvStream& r if ( ( nGroupRotateAngle > 4500 && nGroupRotateAngle <= 13500 ) || ( nGroupRotateAngle > 22500 && nGroupRotateAngle <= 31500 ) ) { - sal_Int32 nHalfWidth = ( aGlobalChildRect.GetWidth() + 1 ) >> 1; - sal_Int32 nHalfHeight = ( aGlobalChildRect.GetHeight() + 1 ) >> 1; - Point aTopLeft( aGlobalChildRect.Left() + nHalfWidth - nHalfHeight, - aGlobalChildRect.Top() + nHalfHeight - nHalfWidth ); - Size aNewSize( aGlobalChildRect.GetHeight(), aGlobalChildRect.GetWidth() ); + sal_Int32 nHalfWidth = ( aClientRect.GetWidth() + 1 ) >> 1; + sal_Int32 nHalfHeight = ( aClientRect.GetHeight() + 1 ) >> 1; + Point aTopLeft( aClientRect.Left() + nHalfWidth - nHalfHeight, + aClientRect.Top() + nHalfHeight - nHalfWidth ); + Size aNewSize( aClientRect.GetHeight(), aClientRect.GetWidth() ); Rectangle aNewRect( aTopLeft, aNewSize ); - aGlobalChildRect = aNewRect; + aClientRect = aNewRect; } // now importing the inner objects of the group diff --git a/svx/source/msfilter/svxmsbas.cxx b/svx/source/msfilter/svxmsbas.cxx index 17674c4254ca..48823640af61 100644 --- a/svx/source/msfilter/svxmsbas.cxx +++ b/svx/source/msfilter/svxmsbas.cxx @@ -403,53 +403,4 @@ BOOL SvxImportMSVBasic::ImportCode_Impl( const String& rStorageName, return bRet; } -ULONG SvxImportMSVBasic::SaveOrDelMSVBAStorage( BOOL bSaveInto, - const String& rStorageName ) -{ - ULONG nRet = ERRCODE_NONE; - uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() ); - String aDstStgName( GetMSBasicStorageName() ); - SotStorageRef xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName, - STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYALL ) ); - if( xVBAStg.Is() && !xVBAStg->GetError() ) - { - xVBAStg = 0; - if( bSaveInto ) - { - BasicManager *pBasicMan = rDocSh.GetBasicManager(); - if( pBasicMan && pBasicMan->IsBasicModified() ) - nRet = ERRCODE_SVX_MODIFIED_VBASIC_STORAGE; - - SotStorageRef xSrc = SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName, STREAM_STD_READ ); - SotStorageRef xDst = xRoot->OpenSotStorage( rStorageName, STREAM_READWRITE | STREAM_TRUNC ); - xSrc->CopyTo( xDst ); - xDst->Commit(); - ErrCode nError = xDst->GetError(); - if ( nError == ERRCODE_NONE ) - nError = xSrc->GetError(); - if ( nError != ERRCODE_NONE ) - xRoot->SetError( nError ); - } - } - - return nRet; -} - -// check if the MS-VBA-Storage exists in the RootStorage of the DocShell. -// If it exists, then return the WarningId for losing the information. -ULONG SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocSh) -{ - uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() ); - SvStorageRef xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, GetMSBasicStorageName(), - STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYALL )); - return ( xVBAStg.Is() && !xVBAStg->GetError() ) - ? ERRCODE_SVX_VBASIC_STORAGE_EXIST - : ERRCODE_NONE; -} - -String SvxImportMSVBasic::GetMSBasicStorageName() -{ - return String( RTL_CONSTASCII_USTRINGPARAM( "_MS_VBA_Macros" ) ); -} - /* vi:set tabstop=4 shiftwidth=4 expandtab: */ diff --git a/svx/source/msfilter/svxmsbas2.cxx b/svx/source/msfilter/svxmsbas2.cxx new file mode 100644 index 000000000000..afd772bbd7e4 --- /dev/null +++ b/svx/source/msfilter/svxmsbas2.cxx @@ -0,0 +1,88 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: svxmsbas.cxx,v $ + * $Revision: 1.24 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svx.hxx" + +#include <basic/basmgr.hxx> +#include <sfx2/objsh.hxx> +#include <svxerr.hxx> +#include <svxmsbas.hxx> + +using namespace com::sun::star; + +ULONG SvxImportMSVBasic::SaveOrDelMSVBAStorage( BOOL bSaveInto, + const String& rStorageName ) +{ + ULONG nRet = ERRCODE_NONE; + uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() ); + String aDstStgName( GetMSBasicStorageName() ); + SotStorageRef xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName, + STREAM_READWRITE | STREAM_NOCREATE | STREAM_SHARE_DENYALL ) ); + if( xVBAStg.Is() && !xVBAStg->GetError() ) + { + xVBAStg = 0; + if( bSaveInto ) + { + BasicManager *pBasicMan = rDocSh.GetBasicManager(); + if( pBasicMan && pBasicMan->IsBasicModified() ) + nRet = ERRCODE_SVX_MODIFIED_VBASIC_STORAGE; + + SotStorageRef xSrc = SotStorage::OpenOLEStorage( xSrcRoot, aDstStgName, STREAM_STD_READ ); + SotStorageRef xDst = xRoot->OpenSotStorage( rStorageName, STREAM_READWRITE | STREAM_TRUNC ); + xSrc->CopyTo( xDst ); + xDst->Commit(); + ErrCode nError = xDst->GetError(); + if ( nError == ERRCODE_NONE ) + nError = xSrc->GetError(); + if ( nError != ERRCODE_NONE ) + xRoot->SetError( nError ); + } + } + + return nRet; +} + +// check if the MS-VBA-Storage exists in the RootStorage of the DocShell. +// If it exists, then return the WarningId for losing the information. +ULONG SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocSh) +{ + uno::Reference < embed::XStorage > xSrcRoot( rDocSh.GetStorage() ); + SvStorageRef xVBAStg( SotStorage::OpenOLEStorage( xSrcRoot, GetMSBasicStorageName(), + STREAM_READ | STREAM_NOCREATE | STREAM_SHARE_DENYALL )); + return ( xVBAStg.Is() && !xVBAStg->GetError() ) + ? ERRCODE_SVX_VBASIC_STORAGE_EXIST + : ERRCODE_NONE; +} + +String SvxImportMSVBasic::GetMSBasicStorageName() +{ + return String( RTL_CONSTASCII_USTRINGPARAM( "_MS_VBA_Macros" ) ); +} diff --git a/svx/source/options/makefile.mk b/svx/source/options/makefile.mk index c4828b81f324..d68703983ebd 100644 --- a/svx/source/options/makefile.mk +++ b/svx/source/options/makefile.mk @@ -36,6 +36,7 @@ PROJECTPCHSOURCE=$(PRJ)$/util\svxpch PRJNAME=svx TARGET=options +LIBTARGET=NO # --- Settings ----------------------------------------------------- @@ -62,39 +63,23 @@ SRC1FILES=\ optchart.src \ optimprove.src -#EXCEPTIONSFILES=\ -# $(SLO)$/optasian.obj \ -# $(SLO)$/optlingu.obj \ -# $(SLO)$/optaccessibility.obj \ -# $(SLO)$/optsave.obj \ -# $(SLO)$/optpath.obj - -#SLOFILES=\ -# $(EXCEPTIONSFILES) \ -# $(SLO)$/asiancfg.obj \ -# $(SLO)$/htmlcfg.obj \ -# $(SLO)$/optcolor.obj \ -# $(SLO)$/optjsearch.obj \ -# $(SLO)$/optitems.obj \ -# $(SLO)$/optgenrl.obj \ -# $(SLO)$/adritem.obj \ -# $(SLO)$/optgrid.obj \ -# $(SLO)$/optinet2.obj \ -# $(SLO)$/optextbr.obj \ -# $(SLO)$/srchcfg.obj \ -# $(SLO)$/optctl.obj - EXCEPTIONSFILES=\ $(SLO)$/optlingu.obj -SLOFILES=\ - $(EXCEPTIONSFILES) \ - $(SLO)$/asiancfg.obj \ +LIB1TARGET= $(SLB)$/$(TARGET)-core.lib +LIB1OBJFILES= \ + $(SLO)$/asiancfg.obj + +LIB2TARGET= $(SLB)$/$(TARGET).lib +LIB2OBJFILES= \ + $(SLO)$/optlingu.obj \ $(SLO)$/htmlcfg.obj \ $(SLO)$/optitems.obj \ $(SLO)$/optgrid.obj \ $(SLO)$/srchcfg.obj +SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) + # --- Targets ------------------------------------------------------- .INCLUDE : target.mk diff --git a/svx/source/options/optimprove.src b/svx/source/options/optimprove.src index 148d7391c905..86fc6d1c1a5d 100644 --- a/svx/source/options/optimprove.src +++ b/svx/source/options/optimprove.src @@ -87,7 +87,7 @@ TabPage RID_SVXPAGE_IMPROVEMENT { Pos = MAP_APPFONT ( 12 , 132 ) ; Size = MAP_APPFONT ( 80 , 8 ) ; - Text [ en-US ] = "Number of reports send:" ; + Text [ en-US ] = "Number of reports sent:" ; }; FixedText FT_NR_REPORTS_VALUE { diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx index e1b2867b0d66..3c239b12113c 100644 --- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx @@ -45,6 +45,7 @@ #include <svtools/colorcfg.hxx> #include <svx/sdr/primitive2d/sdrattributecreator.hxx> #include <vcl/svapp.hxx> +#include <svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx> ////////////////////////////////////////////////////////////////////////////// @@ -71,7 +72,8 @@ namespace sdr { } - drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createPrimitive2DSequenceWithGivenGraphic(const Graphic& rOLEGraphic, bool bScaleContent) const + drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createPrimitive2DSequenceWithParameters( + bool bHighContrast) const { drawinglayer::primitive2d::Primitive2DSequence xRetval; SdrText* pSdrText = GetOle2Obj().getText(0); @@ -103,80 +105,24 @@ namespace sdr pAttribute = new drawinglayer::attribute::SdrLineFillShadowTextAttribute(0, 0, 0, 0, 0, 0); } - // Prepare OLE filling. This is normally the metafile describing OLE content, but may also - // be the empty OLE bitmap for empty/not loaded OLEs - const GraphicObject aGraphicObject(rOLEGraphic); - const GraphicAttr aGraphicAttr; - drawinglayer::primitive2d::Primitive2DSequence xOLEContent; - - if(bScaleContent) - { - // Create outline and placeholder graphic with some scaling - // #i94431# for some reason, i forgot to take the PrefMapMode of the graphic - // into account. Since EmptyPresObj's are only used in Draw/Impress, it is - // safe to assume 100th mm as target. - Size aPrefSize(rOLEGraphic.GetPrefSize()); - - if(MAP_PIXEL == rOLEGraphic.GetPrefMapMode().GetMapUnit()) - { - aPrefSize = Application::GetDefaultDevice()->PixelToLogic(aPrefSize, MAP_100TH_MM); - } - else - { - aPrefSize = Application::GetDefaultDevice()->LogicToLogic(aPrefSize, rOLEGraphic.GetPrefMapMode(), MAP_100TH_MM); - } - - const double fOffsetX((aObjectRange.getWidth() - aPrefSize.getWidth()) / 2.0); - const double fOffsetY((aObjectRange.getHeight() - aPrefSize.getHeight()) / 2.0); - - if(basegfx::fTools::moreOrEqual(fOffsetX, 0.0) && basegfx::fTools::moreOrEqual(fOffsetY, 0.0)) - { - // if content fits into frame, create it - basegfx::B2DHomMatrix aInnerObjectMatrix; - - aInnerObjectMatrix.scale(aPrefSize.getWidth(), aPrefSize.getHeight()); - aInnerObjectMatrix.translate(fOffsetX, fOffsetY); - aInnerObjectMatrix.shearX(fShearX); - aInnerObjectMatrix.rotate(fRotate); - aInnerObjectMatrix.translate(aObjectRange.getMinX(), aObjectRange.getMinY()); - - drawinglayer::primitive2d::Primitive2DReference xScaledContent( - new drawinglayer::primitive2d::GraphicPrimitive2D(aInnerObjectMatrix, aGraphicObject, aGraphicAttr)); - xOLEContent = drawinglayer::primitive2d::Primitive2DSequence(&xScaledContent, 1); - } - } - else - { - // create graphic primitive for content - drawinglayer::primitive2d::Primitive2DReference xDirectContent( - new drawinglayer::primitive2d::GraphicPrimitive2D(aObjectMatrix, aGraphicObject, aGraphicAttr)); - xOLEContent = drawinglayer::primitive2d::Primitive2DSequence(&xDirectContent, 1); - } + // #i102063# embed OLE content in an own primitive; this will be able to decompose accessing + // the weak SdrOle2 reference and will also implement getB2DRange() for fast BoundRect + // calculations without OLE Graphic access (which may trigger e.g. chart recalculation). + // It will also take care of HighContrast and ScaleContent + const drawinglayer::primitive2d::Primitive2DReference xOleContent( + new drawinglayer::primitive2d::SdrOleContentPrimitive2D( + GetOle2Obj(), + aObjectMatrix, + bHighContrast)); // create primitive. Use Ole2 primitive here. Prepare attribute settings, will be used soon anyways. + const drawinglayer::primitive2d::Primitive2DSequence xOLEContent(&xOleContent, 1); const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::SdrOle2Primitive2D( xOLEContent, aObjectMatrix, *pAttribute)); xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); delete pAttribute; - - // a standard gray outline is created for scaled content - if(bScaleContent) - { - const svtools::ColorConfig aColorConfig; - const svtools::ColorConfigValue aColor(aColorConfig.GetColorValue(svtools::OBJECTBOUNDARIES)); - - if(aColor.bIsVisible) - { - basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0, 0, 1, 1))); - const Color aVclColor(aColor.nColor); - aOutline.transform(aObjectMatrix); - const drawinglayer::primitive2d::Primitive2DReference xOutline( - new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aVclColor.getBColor())); - drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xOutline); - } - } } return xRetval; @@ -184,21 +130,8 @@ namespace sdr drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createViewIndependentPrimitive2DSequence() const { - const Graphic* pOLEGraphic = GetOle2Obj().GetGraphic(); - - if(pOLEGraphic) - { - // there is a graphic set, use it - return createPrimitive2DSequenceWithGivenGraphic(*pOLEGraphic, GetOle2Obj().IsEmptyPresObj()); - } - else - { - // no graphic, use default empty OLE bitmap - const Bitmap aEmptyOLEBitmap(GetOle2Obj().GetEmtyOLEReplacementBitmap()); - const Graphic aEmtyOLEGraphic(aEmptyOLEBitmap); - - return createPrimitive2DSequenceWithGivenGraphic(aEmtyOLEGraphic, true); - } + // do as if no HC and call standard creator + return createPrimitive2DSequenceWithParameters(false); } } // end of namespace contact } // end of namespace sdr diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx index c48d110faaf2..8ba8ae8ab4c9 100644 --- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx @@ -105,8 +105,14 @@ namespace sdr drawinglayer::primitive2d::calculateRelativeCornerRadius(nCornerRadius, aObjectRange, fCornerRadiusX, fCornerRadiusY); // create primitive - const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::SdrRectanglePrimitive2D( - aObjectMatrix, *pAttribute, fCornerRadiusX, fCornerRadiusY)); + const drawinglayer::primitive2d::Primitive2DReference xReference( + new drawinglayer::primitive2d::SdrRectanglePrimitive2D( + aObjectMatrix, + *pAttribute, + fCornerRadiusX, + fCornerRadiusY, + GetRectObj().IsTextFrame())); + xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); } diff --git a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx index 902e8e7d8153..5e9ab788e392 100644 --- a/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofgraphic.cxx @@ -220,6 +220,11 @@ namespace sdr SdrGrafObj& rGrafObj = getSdrGrafObj(); rGrafObj.ForceSwapIn(); + // #i103720# forget event to avoid possible deletion by the following ActionChanged call + // which may use createPrimitive2DSequence/impPrepareGraphicWithAsynchroniousLoading again. + // Deletion is actally done by the scheduler who leaded to coming here + mpAsynchLoadEvent = 0; + // Invalidate all paint areas and check existing animation (which may have changed). GetViewContact().ActionChanged(); } @@ -230,11 +235,15 @@ namespace sdr void ViewObjectContactOfGraphic::forgetAsynchGraphicLoadingEvent(sdr::event::AsynchGraphicLoadingEvent* pEvent) { (void) pEvent; // suppress warning - DBG_ASSERT(mpAsynchLoadEvent, "ViewObjectContactOfGraphic::forgetAsynchGraphicLoadingEvent: I did not trigger a event, why am i called (?)"); - DBG_ASSERT(mpAsynchLoadEvent == pEvent, "ViewObjectContactOfGraphic::forgetAsynchGraphicLoadingEvent: Forced to forget another event then i have scheduled (?)"); - // forget event - mpAsynchLoadEvent = 0; + if(mpAsynchLoadEvent) + { + OSL_ENSURE(!pEvent || mpAsynchLoadEvent == pEvent, + "ViewObjectContactOfGraphic::forgetAsynchGraphicLoadingEvent: Forced to forget another event then i have scheduled (?)"); + + // forget event + mpAsynchLoadEvent = 0; + } } SdrGrafObj& ViewObjectContactOfGraphic::getSdrGrafObj() diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx index 6145e0acc301..635ae9c7fcc8 100644 --- a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx @@ -60,197 +60,176 @@ namespace sdr return static_cast< ViewContactOfSdrOle2Obj& >(GetViewContact()).GetOle2Obj(); } - drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfSdrOle2Obj::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const + drawinglayer::primitive2d::Primitive2DSequence ViewObjectContactOfSdrOle2Obj::createPrimitive2DSequence( + const DisplayInfo& /*rDisplayInfo*/) const { // this method is overloaded to do some things the old SdrOle2Obj::DoPaintObject did. - // In the future, some of these may be solved different, but ATM try to stay compatible - // with the old behaviour - drawinglayer::primitive2d::Primitive2DSequence xRetval; - const SdrOle2Obj& rSdrOle2 = getSdrOle2Object(); - sal_Int32 nState = -1; + // In the future, some of these may be solved different, but ATM try to stay compatible + // with the old behaviour + drawinglayer::primitive2d::Primitive2DSequence xRetval; + const SdrOle2Obj& rSdrOle2 = getSdrOle2Object(); + sal_Int32 nState(-1); + + { + const svt::EmbeddedObjectRef& xObjRef = rSdrOle2.getEmbeddedObjectRef(); + if ( xObjRef.is() ) + nState = xObjRef->getCurrentState(); + } + + const bool bIsOutplaceActive(nState == embed::EmbedStates::ACTIVE); + const bool bIsInplaceActive((nState == embed::EmbedStates::INPLACE_ACTIVE) || (nState == embed::EmbedStates::UI_ACTIVE)); + const bool bIsChart(rSdrOle2.IsChart()); + bool bDone(false); + + if(!bDone && bIsInplaceActive) + { + if( !GetObjectContact().isOutputToPrinter() && !GetObjectContact().isOutputToRecordingMetaFile() ) { - const svt::EmbeddedObjectRef& xObjRef = rSdrOle2.getEmbeddedObjectRef(); - if ( xObjRef.is() ) - nState = xObjRef->getCurrentState(); + //no need to create a primitive sequence here as the OLE object does render itself + //in case of charts the superfluous creation of a metafile is strongly performance relevant! + bDone = true; } - const bool bIsOutplaceActive = (nState == embed::EmbedStates::ACTIVE); - const bool bIsInplaceActive = (nState == embed::EmbedStates::INPLACE_ACTIVE) || (nState == embed::EmbedStates::UI_ACTIVE); - const bool bIsChart = rSdrOle2.IsChart(); + } - bool bDone = false; - if( !bDone && bIsInplaceActive ) + if( !bDone ) + { + const Rectangle& rObjectRectangle(rSdrOle2.GetGeoRect()); + const basegfx::B2DRange aObjectRange(rObjectRectangle.Left(), rObjectRectangle.Top(), rObjectRectangle.Right(), rObjectRectangle.Bottom()); + + // create object transform + basegfx::B2DHomMatrix aObjectTransform; + aObjectTransform.set(0, 0, aObjectRange.getWidth()); + aObjectTransform.set(1, 1, aObjectRange.getHeight()); + aObjectTransform.set(0, 2, aObjectRange.getMinX()); + aObjectTransform.set(1, 2, aObjectRange.getMinY()); + + if(bIsChart) { - if( !GetObjectContact().isOutputToPrinter() && !GetObjectContact().isOutputToRecordingMetaFile() ) + //charts must be painted resolution dependent!! #i82893#, #i75867# + + // for chart, to not lose the current better quality visualisation which + // uses a direct paint, use a primtive wrapper for that exceptional case. The renderers + // will then ATM paint it to an OutputDevice directly. + // In later versions this should be replaced by getting the Primitive2DSequnce from + // the chart and using it. + // to be able to render something in non-VCL using renderers, the wrapper is a + // GroupPrimitive2D which automatically decomposes to the already created Metafile + // content. + // For being completely compatible, ATM Window and VDEV PrettyPrinting is suppressed. + // It works in the VCL renderers, though. So for activating again with VCL primitive + // renderers, change conditions here. + + // determine if embedding and PrettyPrinting shall be done at all + uno::Reference< frame::XModel > xChartModel; + bool bDoChartPrettyPrinting(true); + + // the original ChartPrettyPainter does not do it for Window + if(bDoChartPrettyPrinting && GetObjectContact().isOutputToWindow()) { - bDone = true; - //no need to create a primitive sequence here as the OLE object does render itself - //in case of charts the superfluous creation of a metafile is strongly performance relevant! + bDoChartPrettyPrinting = false; } - } - - if( !bDone ) - { - const Rectangle& rObjectRectangle(rSdrOle2.GetGeoRect()); - const basegfx::B2DRange aObjectRange(rObjectRectangle.Left(), rObjectRectangle.Top(), rObjectRectangle.Right(), rObjectRectangle.Bottom()); - // create object transform - basegfx::B2DHomMatrix aObjectTransform; - aObjectTransform.set(0, 0, aObjectRange.getWidth()); - aObjectTransform.set(1, 1, aObjectRange.getHeight()); - aObjectTransform.set(0, 2, aObjectRange.getMinX()); - aObjectTransform.set(1, 2, aObjectRange.getMinY()); - - if(bIsChart) + // the original ChartPrettyPainter does not do it for VDEV + if(bDoChartPrettyPrinting && GetObjectContact().isOutputToVirtualDevice()) { - //charts must be painted resolution dependent!! #i82893#, #i75867# - - // for chart, to not lose the current better quality visualisation which - // uses a direct paint, use a primtive wrapper for that exceptional case. The renderers - // will then ATM paint it to an OutputDevice directly. - // In later versions this should be replaced by getting the Primitive2DSequnce from - // the chart and using it. - // to be able to render something in non-VCL using renderers, the wrapper is a - // GroupPrimitive2D which automatically decomposes to the already created Metafile - // content. - // For being completely compatible, ATM Window and VDEV PrettyPrinting is suppressed. - // It works in the VCL renderers, though. So for activating again with VCL primitive - // renderers, change conditions here. - - // determine if embedding and PrettyPrinting shall be done at all - uno::Reference< frame::XModel > xChartModel; - bool bDoChartPrettyPrinting(true); - - // the original ChartPrettyPainter does not do it for Window - if(bDoChartPrettyPrinting && GetObjectContact().isOutputToWindow()) + if(GetObjectContact().isOutputToPDFFile()) { - bDoChartPrettyPrinting = false; + // #i97982# + // For PDF files, allow PrettyPrinting } - - // the original ChartPrettyPainter does not do it for VDEV - if(bDoChartPrettyPrinting && GetObjectContact().isOutputToVirtualDevice()) + else { - if(GetObjectContact().isOutputToPDFFile()) - { - // #i97982# - // For PDF files, allow PrettyPrinting - } - else - { - bDoChartPrettyPrinting = false; - } + bDoChartPrettyPrinting = false; } + } - // the chart model is needed. Check if it's available - if(bDoChartPrettyPrinting) - { - // get chart model - xChartModel = rSdrOle2.getXModel(); - - if(!xChartModel.is()) - { - bDoChartPrettyPrinting = false; - } - } + // the chart model is needed. Check if it's available + if(bDoChartPrettyPrinting) + { + // get chart model + xChartModel = rSdrOle2.getXModel(); - if(bDoChartPrettyPrinting) + if(!xChartModel.is()) { - // embed MetaFile data in a specialized Wrapper Primitive which holds also the ChartModel needed - // for PrettyPrinting - const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::ChartPrimitive2D( - xChartModel, aObjectTransform, xRetval)); - xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); - bDone = true; + bDoChartPrettyPrinting = false; } } - if( !bDone ) + if(bDoChartPrettyPrinting) { - //old stuff that should be reworked - { - //if no replacement image is available load the OLE object - if(!rSdrOle2.GetGraphic()) //try to fetch the metafile - this can lead to the actual creation of the metafile what can be extremely expensive (e.g. for big charts)!!! #i101925# - { - // try to create embedded object - rSdrOle2.GetObjRef(); //this loads the OLE object if it is not loaded already - } - const svt::EmbeddedObjectRef& xObjRef = rSdrOle2.getEmbeddedObjectRef(); - if(xObjRef.is()) - { - const sal_Int64 nMiscStatus(xObjRef->getStatus(rSdrOle2.GetAspect())); - - // this hack (to change model data during PAINT argh(!)) should be reworked - if(!rSdrOle2.IsResizeProtect() && (nMiscStatus & embed::EmbedMisc::EMBED_NEVERRESIZE)) - { - const_cast< SdrOle2Obj* >(&rSdrOle2)->SetResizeProtect(true); - } - - SdrPageView* pPageView = GetObjectContact().TryToGetSdrPageView(); - if(pPageView && (nMiscStatus & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE)) - { - // connect plugin object - pPageView->GetView().DoConnect(const_cast< SdrOle2Obj* >(&rSdrOle2)); - } - } - }//end old stuff to rework + // embed MetaFile data in a specialized Wrapper Primitive which holds also the ChartModel needed + // for PrettyPrinting + const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::ChartPrimitive2D( + xChartModel, aObjectTransform, xRetval)); + xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1); + bDone = true; + } + } - if(GetObjectContact().isDrawModeHighContrast()) + if( !bDone ) + { + //old stuff that should be reworked + { + //if no replacement image is available load the OLE object + if(!rSdrOle2.GetGraphic()) //try to fetch the metafile - this can lead to the actual creation of the metafile what can be extremely expensive (e.g. for big charts)!!! #i101925# + { + // try to create embedded object + rSdrOle2.GetObjRef(); //this loads the OLE object if it is not loaded already + } + const svt::EmbeddedObjectRef& xObjRef = rSdrOle2.getEmbeddedObjectRef(); + if(xObjRef.is()) { - // directly call at the corresponding VC and force OLE Graphic to HighContrast - const ViewContactOfSdrOle2Obj& rVC = static_cast< const ViewContactOfSdrOle2Obj& >(GetViewContact()); - Graphic* pOLEHighContrastGraphic = rSdrOle2.getEmbeddedObjectRef().GetHCGraphic(); + const sal_Int64 nMiscStatus(xObjRef->getStatus(rSdrOle2.GetAspect())); - if(pOLEHighContrastGraphic) + // this hack (to change model data during PAINT argh(!)) should be reworked + if(!rSdrOle2.IsResizeProtect() && (nMiscStatus & embed::EmbedMisc::EMBED_NEVERRESIZE)) { - // there is a graphic set, use it - xRetval = rVC.createPrimitive2DSequenceWithGivenGraphic(*pOLEHighContrastGraphic, rSdrOle2.IsEmptyPresObj()); + const_cast< SdrOle2Obj* >(&rSdrOle2)->SetResizeProtect(true); } - else - { - // no HighContrast graphic, use default empty OLE bitmap - const Bitmap aEmptyOLEBitmap(rSdrOle2.GetEmtyOLEReplacementBitmap()); - const Graphic aEmtyOLEGraphic(aEmptyOLEBitmap); - xRetval = rVC.createPrimitive2DSequenceWithGivenGraphic(aEmtyOLEGraphic, true); + SdrPageView* pPageView = GetObjectContact().TryToGetSdrPageView(); + if(pPageView && (nMiscStatus & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE)) + { + // connect plugin object + pPageView->GetView().DoConnect(const_cast< SdrOle2Obj* >(&rSdrOle2)); } } - else - { - // call parent which will use the regular createViewIndependentPrimitive2DSequence - // at the corresponding VC - xRetval = ViewObjectContactOfSdrObj::createPrimitive2DSequence(rDisplayInfo); - } + }//end old stuff to rework - } + // create OLE primitive stuff directly at VC with HC as parameter + const ViewContactOfSdrOle2Obj& rVC = static_cast< const ViewContactOfSdrOle2Obj& >(GetViewContact()); + xRetval = rVC.createPrimitive2DSequenceWithParameters(GetObjectContact().isDrawModeHighContrast()); + } - if(bIsOutplaceActive) + if(bIsOutplaceActive) + { + // do not shade when printing or PDF exporting + if(!GetObjectContact().isOutputToPrinter() && !GetObjectContact().isOutputToRecordingMetaFile()) { - // do not shade when printing or PDF exporting - if(!GetObjectContact().isOutputToPrinter() && !GetObjectContact().isOutputToRecordingMetaFile()) - { - // shade the representation if the object is activated outplace - basegfx::B2DPolygon aObjectOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0))); - aObjectOutline.transform(aObjectTransform); - - // Use a FillHatchPrimitive2D with necessary attributes - const drawinglayer::attribute::FillHatchAttribute aFillHatch( - drawinglayer::attribute::HATCHSTYLE_SINGLE, // single hatch - 125.0, // 1.25 mm - 45.0 * F_PI180, // 45 degree diagonal - Color(COL_BLACK).getBColor(), // black color - false); // no filling - - const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolyPolygonHatchPrimitive2D( - basegfx::B2DPolyPolygon(aObjectOutline), - Color(COL_BLACK).getBColor(), - aFillHatch)); - - drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xReference); - } + // shade the representation if the object is activated outplace + basegfx::B2DPolygon aObjectOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0))); + aObjectOutline.transform(aObjectTransform); + + // Use a FillHatchPrimitive2D with necessary attributes + const drawinglayer::attribute::FillHatchAttribute aFillHatch( + drawinglayer::attribute::HATCHSTYLE_SINGLE, // single hatch + 125.0, // 1.25 mm + 45.0 * F_PI180, // 45 degree diagonal + Color(COL_BLACK).getBColor(), // black color + false); // no filling + + const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::PolyPolygonHatchPrimitive2D( + basegfx::B2DPolyPolygon(aObjectOutline), + Color(COL_BLACK).getBColor(), + aFillHatch)); + + drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(xRetval, xReference); } - } - return xRetval; + } + + return xRetval; } ViewObjectContactOfSdrOle2Obj::ViewObjectContactOfSdrOle2Obj(ObjectContact& rObjectContact, ViewContact& rViewContact) diff --git a/svx/source/sdr/overlay/makefile.mk b/svx/source/sdr/overlay/makefile.mk index bb6489606283..d202992c090d 100644 --- a/svx/source/sdr/overlay/makefile.mk +++ b/svx/source/sdr/overlay/makefile.mk @@ -56,6 +56,7 @@ SLOFILES=\ $(SLO)$/overlaypolypolygon.obj \ $(SLO)$/overlayprimitive2dsequenceobject.obj \ $(SLO)$/overlayrollingrectangle.obj \ + $(SLO)$/overlayselection.obj \ $(SLO)$/overlaytools.obj \ $(SLO)$/overlaytriangle.obj diff --git a/svx/source/sdr/overlay/overlayobject.cxx b/svx/source/sdr/overlay/overlayobject.cxx index 4c05fbd48a23..5cddc3c63627 100644 --- a/svx/source/sdr/overlay/overlayobject.cxx +++ b/svx/source/sdr/overlay/overlayobject.cxx @@ -107,7 +107,7 @@ namespace sdr OSL_ENSURE(0 == getOverlayManager(), "OverlayObject is destructed which is still registered at OverlayManager (!)"); } - const drawinglayer::primitive2d::Primitive2DSequence& OverlayObject::getOverlayObjectPrimitive2DSequence() const + drawinglayer::primitive2d::Primitive2DSequence OverlayObject::getOverlayObjectPrimitive2DSequence() const { if(!getPrimitive2DSequence().hasElements()) { diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx new file mode 100644 index 000000000000..2411ca3c31b4 --- /dev/null +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -0,0 +1,233 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: overlayline.cxx,v $ + * $Revision: 1.5 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_svx.hxx" +#include <svx/sdr/overlay/overlayselection.hxx> +#include <basegfx/polygon/b2dpolygontools.hxx> +#include <basegfx/polygon/b2dpolygon.hxx> +#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx> +#include <svtools/optionsdrawinglayer.hxx> +#include <vcl/svapp.hxx> +#include <vcl/outdev.hxx> +#include <drawinglayer/primitive2d/invertprimitive2d.hxx> +#include <drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx> +#include <basegfx/polygon/b2dpolypolygoncutter.hxx> +#include <svx/sdr/overlay/overlaymanager.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace sdr +{ + namespace overlay + { + // combine rages geometrically to a single, ORed polygon + basegfx::B2DPolyPolygon impCombineRangesToPolyPolygon(const std::vector< basegfx::B2DRange >& rRanges) + { + const sal_uInt32 nCount(rRanges.size()); + basegfx::B2DPolyPolygon aRetval; + + for(sal_uInt32 a(0); a < nCount; a++) + { + const basegfx::B2DPolygon aDiscretePolygon(basegfx::tools::createPolygonFromRect(rRanges[a])); + + if(0 == a) + { + aRetval.append(aDiscretePolygon); + } + else + { + aRetval = basegfx::tools::solvePolygonOperationOr(aRetval, basegfx::B2DPolyPolygon(aDiscretePolygon)); + } + } + + return aRetval; + } + + // check if wanted type OVERLAY_TRANSPARENT or OVERLAY_SOLID + // is possible. If not, fallback to invert mode (classic mode) + OverlayType impCheckPossibleOverlayType(OverlayType aOverlayType) + { + if(OVERLAY_INVERT != aOverlayType) + { + const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; + + if(!aSvtOptionsDrawinglayer.IsTransparentSelection()) + { + // not possible when switched off by user + return OVERLAY_INVERT; + } + else + { + const OutputDevice *pOut = Application::GetDefaultDevice(); + + if(pOut->GetSettings().GetStyleSettings().GetHighContrastMode()) + { + // not possible when in high contrast mode + return OVERLAY_INVERT; + } + + if(!pOut->supportsOperation(OutDevSupport_TransparentRect)) + { + // not possible when no fast transparence paint is supported on the system + return OVERLAY_INVERT; + } + } + } + + return aOverlayType; + } + + drawinglayer::primitive2d::Primitive2DSequence OverlaySelection::createOverlayObjectPrimitive2DSequence() + { + drawinglayer::primitive2d::Primitive2DSequence aRetval; + const sal_uInt32 nCount(getRanges().size()); + + if(nCount) + { + // create range primitives + const basegfx::BColor aRGBColor(getBaseColor().getBColor()); + aRetval.realloc(nCount); + + for(sal_uInt32 a(0);a < nCount; a++) + { + const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(maRanges[a])); + aRetval[a] = drawinglayer::primitive2d::Primitive2DReference( + new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D( + basegfx::B2DPolyPolygon(aPolygon), + aRGBColor)); + } + + if(OVERLAY_INVERT == maLastOverlayType) + { + // embed all in invert primitive + const drawinglayer::primitive2d::Primitive2DReference aInvert( + new drawinglayer::primitive2d::InvertPrimitive2D( + aRetval)); + aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aInvert, 1); + } + else if(OVERLAY_TRANSPARENT == maLastOverlayType) + { + // embed all rectangles in transparent paint + const double fTransparence(mnLastTransparence / 100.0); + const drawinglayer::primitive2d::Primitive2DReference aUnifiedAlpha( + new drawinglayer::primitive2d::UnifiedAlphaPrimitive2D( + aRetval, + fTransparence)); + + if(getBorder()) + { + const basegfx::B2DPolyPolygon aPolyPolygon(impCombineRangesToPolyPolygon(getRanges())); + const drawinglayer::primitive2d::Primitive2DReference aSelectionOutline( + new drawinglayer::primitive2d::PolyPolygonHairlinePrimitive2D( + aPolyPolygon, + aRGBColor)); + + // add both to result + aRetval.realloc(2); + aRetval[0] = aUnifiedAlpha; + aRetval[1] = aSelectionOutline; + } + else + { + // just add transparent part + aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aUnifiedAlpha, 1); + } + } + } + + return aRetval; + } + + OverlaySelection::OverlaySelection( + OverlayType eType, + const Color& rColor, + const std::vector< basegfx::B2DRange >& rRanges, + bool bBorder) + : OverlayObject(rColor), + meOverlayType(eType), + maRanges(rRanges), + maLastOverlayType(eType), + mnLastTransparence(0), + mbBorder(bBorder) + { + // no AA for selection overlays + allowAntiAliase(false); + } + + OverlaySelection::~OverlaySelection() + { + if(getOverlayManager()) + { + getOverlayManager()->remove(*this); + } + } + + drawinglayer::primitive2d::Primitive2DSequence OverlaySelection::getOverlayObjectPrimitive2DSequence() const + { + // get current values + const OverlayType aNewOverlayType(impCheckPossibleOverlayType(meOverlayType)); + const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer; + const sal_uInt16 nNewTransparence(aSvtOptionsDrawinglayer.GetTransparentSelectionPercent()); + + if(getPrimitive2DSequence().hasElements()) + { + if(aNewOverlayType != maLastOverlayType + || nNewTransparence != mnLastTransparence) + { + // conditions of last local decomposition have changed, delete + const_cast< OverlaySelection* >(this)->setPrimitive2DSequence(drawinglayer::primitive2d::Primitive2DSequence()); + } + } + + if(!getPrimitive2DSequence().hasElements()) + { + // remember new values + const_cast< OverlaySelection* >(this)->maLastOverlayType = aNewOverlayType; + const_cast< OverlaySelection* >(this)->mnLastTransparence = nNewTransparence; + } + + // call base implementation + return OverlayObject::getOverlayObjectPrimitive2DSequence(); + } + + void OverlaySelection::setRanges(const std::vector< basegfx::B2DRange >& rNew) + { + if(rNew != maRanges) + { + maRanges = rNew; + objectChange(); + } + } + } // end of namespace overlay +} // end of namespace sdr + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/svx/source/sdr/primitive2d/makefile.mk b/svx/source/sdr/primitive2d/makefile.mk index e9e976d434ed..7510b6a23b35 100644 --- a/svx/source/sdr/primitive2d/makefile.mk +++ b/svx/source/sdr/primitive2d/makefile.mk @@ -51,6 +51,7 @@ SLOFILES=\ $(SLO)$/sdrcaptionprimitive2d.obj \ $(SLO)$/sdrgrafprimitive2d.obj \ $(SLO)$/sdrole2primitive2d.obj \ + $(SLO)$/sdrolecontentprimitive2d.obj \ $(SLO)$/sdrpathprimitive2d.obj \ $(SLO)$/sdrprimitivetools.obj \ $(SLO)$/sdrmeasureprimitive2d.obj \ diff --git a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx index 80067901483b..3c8feb7ff2b2 100644 --- a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx @@ -50,62 +50,95 @@ namespace drawinglayer Primitive2DSequence SdrCaptionPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; + Primitive2DSequence aHitTestContent; // create unit outline polygon - ::basegfx::B2DPolygon aUnitOutline(::basegfx::tools::createPolygonFromRect(::basegfx::B2DRange(0.0, 0.0, 1.0, 1.0), getCornerRadiusX(), getCornerRadiusY())); + const basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromRect( + basegfx::B2DRange(0.0, 0.0, 1.0, 1.0), + getCornerRadiusX(), + getCornerRadiusY())); // add fill if(getSdrLFSTAttribute().getFill()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolyPolygonFillPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getFill(), getSdrLFSTAttribute().getFillFloatTransGradient())); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, + createPolyPolygonFillPrimitive( + basegfx::B2DPolyPolygon(aUnitOutline), + getTransform(), + *getSdrLFSTAttribute().getFill(), + getSdrLFSTAttribute().getFillFloatTransGradient())); + } + else + { + // if no fill, create one for HitTest and BoundRect fallback + appendPrimitive2DReferenceToPrimitive2DSequence(aHitTestContent, + createPolyPolygonFillPrimitive( + basegfx::B2DPolyPolygon(aUnitOutline), + getTransform(), + attribute::SdrFillAttribute(0.0, basegfx::BColor(0.0, 0.0, 0.0)), + getSdrLFSTAttribute().getFillFloatTransGradient())); } // add line if(getSdrLFSTAttribute().getLine()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolygonLinePrimitive(aUnitOutline, getTransform(), *getSdrLFSTAttribute().getLine())); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolygonLinePrimitive(getTail(), getTransform(), *getSdrLFSTAttribute().getLine(), getSdrLFSTAttribute().getLineStartEnd())); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, + createPolygonLinePrimitive( + aUnitOutline, + getTransform(), + *getSdrLFSTAttribute().getLine())); + + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, + createPolygonLinePrimitive( + getTail(), + getTransform(), + *getSdrLFSTAttribute().getLine(), + getSdrLFSTAttribute().getLineStartEnd())); } else { - // if initially no line is defined, create one for HitTest and BoundRect - Primitive2DSequence aLineSequence(2); - const attribute::SdrLineAttribute aBlackHairline(basegfx::BColor(0.0, 0.0, 0.0)); - - aLineSequence[0] = createPolygonLinePrimitive(aUnitOutline, getTransform(), aBlackHairline); - aLineSequence[1] = createPolygonLinePrimitive(getTail(), getTransform(), aBlackHairline); + // if initially no line is defined, create one for HitTest and BoundRect. It + // is sufficient to use the tail; the body is already ensured with fill creation + appendPrimitive2DReferenceToPrimitive2DSequence(aHitTestContent, + createPolygonLinePrimitive( + getTail(), + getTransform(), + attribute::SdrLineAttribute(basegfx::BColor(0.0, 0.0, 0.0)))); + } - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, Primitive2DReference(new HitTestPrimitive2D(aLineSequence))); + // add HitTest and BoundRect helper geometry (if exists) + if(aHitTestContent.hasElements()) + { + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, + Primitive2DReference(new HitTestPrimitive2D(aHitTestContent))); } // 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)); } // add shadow if(getSdrLFSTAttribute().getShadow()) { - // attention: shadow is added BEFORE object stuff to render it BEHIND object (!) - const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow())); - - if(xShadow.is()) - { - Primitive2DSequence aContentWithShadow(2L); - aContentWithShadow[0L] = xShadow; - aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval)); - aRetval = aContentWithShadow; - } + aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow()); } return aRetval; } SdrCaptionPrimitive2D::SdrCaptionPrimitive2D( - const ::basegfx::B2DHomMatrix& rTransform, + const basegfx::B2DHomMatrix& rTransform, const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, - const ::basegfx::B2DPolygon& rTail, + const basegfx::B2DPolygon& rTail, double fCornerRadiusX, double fCornerRadiusY) : BasePrimitive2D(), @@ -118,7 +151,7 @@ namespace drawinglayer // transform maTail to unit polygon if(getTail().count()) { - ::basegfx::B2DHomMatrix aInverse(getTransform()); + basegfx::B2DHomMatrix aInverse(getTransform()); aInverse.invert(); maTail.transform(aInverse); } diff --git a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx index 5ee00133588f..0edbe1a35046 100644 --- a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx @@ -78,15 +78,7 @@ namespace drawinglayer // add shadow if(getSdrLSTAttribute().getShadow()) { - const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrLSTAttribute().getShadow())); - - if(xShadow.is()) - { - Primitive2DSequence aContentWithShadow(2L); - aContentWithShadow[0L] = xShadow; - aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval)); - aRetval = aContentWithShadow; - } + aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLSTAttribute().getShadow()); } return aRetval; diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx index 51be7cd03033..c8847624bcdd 100644 --- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx @@ -60,18 +60,9 @@ namespace drawinglayer } // add shadow - if(getSdrSTAttribute().getShadow()) + if(aRetval.hasElements() && getSdrSTAttribute().getShadow()) { - // attention: shadow is added BEFORE object stuff to render it BEHIND object (!) - const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow())); - - if(xShadow.is()) - { - Primitive2DSequence aContentWithShadow(2L); - aContentWithShadow[0L] = xShadow; - aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval)); - aRetval = aContentWithShadow; - } + aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow()); } return aRetval; diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx index 366b934b5473..9666bd2c1ac1 100644 --- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx +++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx @@ -67,13 +67,13 @@ namespace drawinglayer namespace primitive2d { Primitive2DReference createPolyPolygonFillPrimitive( - const ::basegfx::B2DPolyPolygon& rUnitPolyPolygon, - const ::basegfx::B2DHomMatrix& rObjectTransform, + const basegfx::B2DPolyPolygon& rUnitPolyPolygon, + const basegfx::B2DHomMatrix& rObjectTransform, const attribute::SdrFillAttribute& rFill, const attribute::FillGradientAttribute* pFillGradient) { // prepare fully scaled polygon - ::basegfx::B2DPolyPolygon aScaledPolyPolygon(rUnitPolyPolygon); + basegfx::B2DPolyPolygon aScaledPolyPolygon(rUnitPolyPolygon); aScaledPolyPolygon.transform(rObjectTransform); BasePrimitive2D* pNewFillPrimitive = 0L; @@ -87,7 +87,7 @@ namespace drawinglayer } else if(rFill.isBitmap()) { - const ::basegfx::B2DRange aRange(::basegfx::tools::getRange(aScaledPolyPolygon)); + const basegfx::B2DRange aRange(basegfx::tools::getRange(aScaledPolyPolygon)); pNewFillPrimitive = new PolyPolygonBitmapPrimitive2D(aScaledPolyPolygon, rFill.getColor(), rFill.getBitmap()->getFillBitmapAttribute(aRange)); } else @@ -110,7 +110,7 @@ namespace drawinglayer // create FillGradientPrimitive2D for transparence and add to new sequence // fillGradientPrimitive is enough here (compared to PolyPolygonGradientPrimitive2D) since float transparence will be masked anyways - const ::basegfx::B2DRange aRange(::basegfx::tools::getRange(aScaledPolyPolygon)); + const basegfx::B2DRange aRange(basegfx::tools::getRange(aScaledPolyPolygon)); const Primitive2DReference xRefB(new FillGradientPrimitive2D(aRange, *pFillGradient)); const Primitive2DSequence aAlpha(&xRefB, 1L); @@ -125,13 +125,13 @@ namespace drawinglayer } Primitive2DReference createPolygonLinePrimitive( - const ::basegfx::B2DPolygon& rUnitPolygon, - const ::basegfx::B2DHomMatrix& rObjectTransform, + const basegfx::B2DPolygon& rUnitPolygon, + const basegfx::B2DHomMatrix& rObjectTransform, const attribute::SdrLineAttribute& rLine, const attribute::SdrLineStartEndAttribute* pStroke) { // prepare fully scaled polygon - ::basegfx::B2DPolygon aScaledPolygon(rUnitPolygon); + basegfx::B2DPolygon aScaledPolygon(rUnitPolygon); aScaledPolygon.transform(rObjectTransform); // create line and stroke attribute @@ -168,14 +168,14 @@ namespace drawinglayer } Primitive2DReference createTextPrimitive( - const ::basegfx::B2DPolyPolygon& rUnitPolyPolygon, - const ::basegfx::B2DHomMatrix& rObjectTransform, + const basegfx::B2DPolyPolygon& rUnitPolyPolygon, + const basegfx::B2DHomMatrix& rObjectTransform, const attribute::SdrTextAttribute& rText, const attribute::SdrLineAttribute* pStroke, bool bCellText, bool bWordWrap) { - ::basegfx::B2DHomMatrix aAnchorTransform(rObjectTransform); + basegfx::B2DHomMatrix aAnchorTransform(rObjectTransform); SdrTextPrimitive2D* pNew = 0; if(rText.isContour()) @@ -185,20 +185,20 @@ namespace drawinglayer { // take line width into account and shrink contour polygon accordingly // decompose to get scale - ::basegfx::B2DVector aScale, aTranslate; + basegfx::B2DVector aScale, aTranslate; double fRotate, fShearX; rObjectTransform.decompose(aScale, aTranslate, fRotate, fShearX); // scale outline to object's size to allow growing with value relative to that size // and also to keep aspect ratio - ::basegfx::B2DHomMatrix aScaleTransform; + basegfx::B2DHomMatrix aScaleTransform; aScaleTransform.set(0, 0, fabs(aScale.getX())); aScaleTransform.set(1, 1, fabs(aScale.getY())); - ::basegfx::B2DPolyPolygon aScaledUnitPolyPolygon(rUnitPolyPolygon); + basegfx::B2DPolyPolygon aScaledUnitPolyPolygon(rUnitPolyPolygon); aScaledUnitPolyPolygon.transform(aScaleTransform); // grow the polygon. To shrink, use negative value (half width) - aScaledUnitPolyPolygon = ::basegfx::tools::growInNormalDirection(aScaledUnitPolyPolygon, -(pStroke->getWidth() * 0.5)); + aScaledUnitPolyPolygon = basegfx::tools::growInNormalDirection(aScaledUnitPolyPolygon, -(pStroke->getWidth() * 0.5)); // scale back to unit polygon aScaleTransform.set(0, 0, 0.0 != aScale.getX() ? 1.0 / aScale.getX() : 1.0); @@ -225,7 +225,7 @@ namespace drawinglayer else if(rText.getSdrFormTextAttribute()) { // text on path, use scaled polygon - ::basegfx::B2DPolyPolygon aScaledPolyPolygon(rUnitPolyPolygon); + basegfx::B2DPolyPolygon aScaledPolyPolygon(rUnitPolyPolygon); aScaledPolyPolygon.transform(rObjectTransform); pNew = new SdrPathTextPrimitive2D( &rText.getSdrText(), @@ -237,29 +237,29 @@ namespace drawinglayer { // rObjectTransform is the whole SdrObject transformation from unit rectangle // to it's size and position. Decompose to allow working with single values. - ::basegfx::B2DVector aScale, aTranslate; + basegfx::B2DVector aScale, aTranslate; double fRotate, fShearX; rObjectTransform.decompose(aScale, aTranslate, fRotate, fShearX); // extract mirroring - const bool bMirrorX(::basegfx::fTools::less(aScale.getX(), 0.0)); - const bool bMirrorY(::basegfx::fTools::less(aScale.getY(), 0.0)); + const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0)); + const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0)); aScale = basegfx::absolute(aScale); // Get the real size, since polygon ountline and scale // from the object transformation may vary (e.g. ellipse segments) - ::basegfx::B2DHomMatrix aJustScaleTransform; + basegfx::B2DHomMatrix aJustScaleTransform; aJustScaleTransform.set(0, 0, aScale.getX()); aJustScaleTransform.set(1, 1, aScale.getY()); - ::basegfx::B2DPolyPolygon aScaledUnitPolyPolygon(rUnitPolyPolygon); + basegfx::B2DPolyPolygon aScaledUnitPolyPolygon(rUnitPolyPolygon); aScaledUnitPolyPolygon.transform(aJustScaleTransform); - const ::basegfx::B2DRange aSnapRange(::basegfx::tools::getRange(aScaledUnitPolyPolygon)); + const basegfx::B2DRange aSnapRange(basegfx::tools::getRange(aScaledUnitPolyPolygon)); // create a range describing the wanted text position and size (aTextAnchorRange). This // means to use the text distance values here - const ::basegfx::B2DPoint aTopLeft(aSnapRange.getMinX() + rText.getTextLeftDistance(), aSnapRange.getMinY() + rText.getTextUpperDistance()); - const ::basegfx::B2DPoint aBottomRight(aSnapRange.getMaxX() - rText.getTextRightDistance(), aSnapRange.getMaxY() - rText.getTextLowerDistance()); - ::basegfx::B2DRange aTextAnchorRange; + const basegfx::B2DPoint aTopLeft(aSnapRange.getMinX() + rText.getTextLeftDistance(), aSnapRange.getMinY() + rText.getTextUpperDistance()); + const basegfx::B2DPoint aBottomRight(aSnapRange.getMaxX() - rText.getTextRightDistance(), aSnapRange.getMaxY() - rText.getTextLowerDistance()); + basegfx::B2DRange aTextAnchorRange; aTextAnchorRange.expand(aTopLeft); aTextAnchorRange.expand(aBottomRight); @@ -331,16 +331,16 @@ namespace drawinglayer const bool bHorizontal(SDRTEXTANI_LEFT == eDirection || SDRTEXTANI_RIGHT == eDirection); // decompose to get separated values for the scroll box - ::basegfx::B2DVector aScale, aTranslate; + basegfx::B2DVector aScale, aTranslate; double fRotate, fShearX; aAnchorTransform.decompose(aScale, aTranslate, fRotate, fShearX); // build transform from scaled only to full AnchorTransform and inverse - ::basegfx::B2DHomMatrix aSRT; + basegfx::B2DHomMatrix aSRT; aSRT.shearX(fShearX); aSRT.rotate(fRotate); aSRT.translate(aTranslate.getX(), aTranslate.getY()); - ::basegfx::B2DHomMatrix aISRT(aSRT); + basegfx::B2DHomMatrix aISRT(aSRT); aISRT.invert(); // bring the primitive back to scaled only and get scaled range, create new clone for this @@ -355,13 +355,13 @@ namespace drawinglayer geometry::ViewInformation2D aViewInformation2D(xViewParameters); // get range - const ::basegfx::B2DRange aScaledRange(pNew->getB2DRange(aViewInformation2D)); + const basegfx::B2DRange aScaledRange(pNew->getB2DRange(aViewInformation2D)); // create left outside and right outside transformations. Also take care // of the clip rectangle - ::basegfx::B2DHomMatrix aLeft, aRight; - ::basegfx::B2DPoint aClipTopLeft(0.0, 0.0); - ::basegfx::B2DPoint aClipBottomRight(aScale.getX(), aScale.getY()); + basegfx::B2DHomMatrix aLeft, aRight; + basegfx::B2DPoint aClipTopLeft(0.0, 0.0); + basegfx::B2DPoint aClipBottomRight(aScale.getX(), aScale.getY()); if(bHorizontal) { @@ -410,10 +410,10 @@ namespace drawinglayer const Primitive2DSequence aContent(&xRefA, 1L); // scrolling needs an encapsulating clipping primitive - const ::basegfx::B2DRange aClipRange(aClipTopLeft, aClipBottomRight); - ::basegfx::B2DPolygon aClipPolygon(::basegfx::tools::createPolygonFromRect(aClipRange)); + const basegfx::B2DRange aClipRange(aClipTopLeft, aClipBottomRight); + basegfx::B2DPolygon aClipPolygon(basegfx::tools::createPolygonFromRect(aClipRange)); aClipPolygon.transform(aSRT); - return Primitive2DReference(new MaskPrimitive2D(::basegfx::B2DPolyPolygon(aClipPolygon), aContent)); + return Primitive2DReference(new MaskPrimitive2D(basegfx::B2DPolyPolygon(aClipPolygon), aContent)); } else { @@ -441,36 +441,43 @@ namespace drawinglayer } } - Primitive2DReference createShadowPrimitive( - const Primitive2DSequence& rSource, + Primitive2DSequence createEmbeddedShadowPrimitive( + const Primitive2DSequence& rContent, const attribute::SdrShadowAttribute& rShadow) { - // create Shadow primitives. Need to be added in front, should use already created primitives - if(rSource.hasElements()) + if(rContent.hasElements()) { + Primitive2DSequence aRetval(2); + basegfx::B2DHomMatrix aShadowOffset; + // prepare shadow offset - ::basegfx::B2DHomMatrix aShadowOffset; aShadowOffset.set(0, 2, rShadow.getOffset().getX()); aShadowOffset.set(1, 2, rShadow.getOffset().getY()); // create shadow primitive and add content - const Primitive2DReference xRefShadow(new ShadowPrimitive2D(aShadowOffset, rShadow.getColor(), rSource)); + aRetval[0] = Primitive2DReference( + new ShadowPrimitive2D( + aShadowOffset, + rShadow.getColor(), + rContent)); if(0.0 != rShadow.getTransparence()) { // create SimpleTransparencePrimitive2D - const Primitive2DSequence aContent(&xRefShadow, 1L); - return Primitive2DReference(new UnifiedAlphaPrimitive2D(aContent, rShadow.getTransparence())); - } - else - { - // return directly - return xRefShadow; + const Primitive2DSequence aTempContent(&aRetval[0], 1); + + aRetval[0] = Primitive2DReference( + new UnifiedAlphaPrimitive2D( + aTempContent, + rShadow.getTransparence())); } + + aRetval[1] = Primitive2DReference(new GroupPrimitive2D(rContent)); + return aRetval; } else { - return Primitive2DReference(); + return rContent; } } } // end of namespace primitive2d diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx index 814c20b681ac..ed3062184f1a 100644 --- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx @@ -100,16 +100,7 @@ namespace drawinglayer // add shadow if(getSdrLFSTAttribute().getShadow()) { - // attention: shadow is added BEFORE object stuff to render it BEHIND object (!) - const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow())); - - if(xShadow.is()) - { - Primitive2DSequence aContentWithShadow(2L); - aContentWithShadow[0L] = xShadow; - aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval)); - aRetval = aContentWithShadow; - } + aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow()); } return aRetval; @@ -206,16 +197,7 @@ namespace drawinglayer // add shadow if(getSdrLFSTAttribute().getShadow()) { - // attention: shadow is added BEFORE object stuff to render it BEHIND object (!) - const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow())); - - if(xShadow.is()) - { - Primitive2DSequence aContentWithShadow(2L); - aContentWithShadow[0L] = xShadow; - aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval)); - aRetval = aContentWithShadow; - } + aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow()); } return aRetval; diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx index f1f88684dc6c..f5f2f4e876dc 100644 --- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx @@ -110,16 +110,7 @@ namespace drawinglayer // add shadow if(getSdrLFSTAttribute().getShadow()) { - // attention: shadow is added BEFORE object stuff to render it BEHIND object (!) - const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow())); - - if(xShadow.is()) - { - Primitive2DSequence aContentWithShadow(2L); - aContentWithShadow[0L] = xShadow; - aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval)); - aRetval = aContentWithShadow; - } + aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow()); } return aRetval; diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index 8d66e8b34d14..f515b9b6a5e9 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -52,71 +52,71 @@ namespace drawinglayer namespace primitive2d { Primitive2DReference SdrMeasurePrimitive2D::impCreatePart( - const ::basegfx::B2DHomMatrix& rObjectMatrix, - const ::basegfx::B2DPoint& rStart, - const ::basegfx::B2DPoint& rEnd, + const basegfx::B2DHomMatrix& rObjectMatrix, + const basegfx::B2DPoint& rStart, + const basegfx::B2DPoint& rEnd, bool bLeftActive, bool bRightActive) const { - ::basegfx::B2DPolygon aPolygon; + basegfx::B2DPolygon aPolygon; aPolygon.append(rStart); aPolygon.append(rEnd); - if(!maSdrLSTAttribute.getLineStartEnd() || (!bLeftActive && !bRightActive)) + if(!getSdrLSTAttribute().getLineStartEnd() || (!bLeftActive && !bRightActive)) { - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *maSdrLSTAttribute.getLine(), 0L); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), 0L); } if(bLeftActive && bRightActive) { - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *maSdrLSTAttribute.getLine(), maSdrLSTAttribute.getLineStartEnd()); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), getSdrLSTAttribute().getLineStartEnd()); } - const attribute::SdrLineStartEndAttribute* pLineStartEnd = maSdrLSTAttribute.getLineStartEnd(); - const ::basegfx::B2DPolyPolygon aEmpty; + const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd(); + const basegfx::B2DPolyPolygon aEmpty; const attribute::SdrLineStartEndAttribute aLineStartEnd( bLeftActive ? pLineStartEnd->getStartPolyPolygon() : aEmpty, bRightActive ? pLineStartEnd->getEndPolyPolygon() : aEmpty, bLeftActive ? pLineStartEnd->getStartWidth() : 0.0, bRightActive ? pLineStartEnd->getEndWidth() : 0.0, bLeftActive ? pLineStartEnd->isStartActive() : false, bRightActive ? pLineStartEnd->isEndActive() : false, bLeftActive ? pLineStartEnd->isStartCentered() : false, bRightActive? pLineStartEnd->isEndCentered() : false); - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *maSdrLSTAttribute.getLine(), &aLineStartEnd); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), &aLineStartEnd); } Primitive2DSequence SdrMeasurePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const { Primitive2DSequence aRetval; SdrBlockTextPrimitive2D* pBlockText = 0L; - ::basegfx::B2DRange aTextRange; - double fTextX((maStart.getX() + maEnd.getX()) * 0.5); - double fTextY((maStart.getX() + maEnd.getX()) * 0.5); - const ::basegfx::B2DVector aLine(maEnd - maStart); + basegfx::B2DRange aTextRange; + double fTextX((getStart().getX() + getEnd().getX()) * 0.5); + double fTextY((getStart().getX() + getEnd().getX()) * 0.5); + const basegfx::B2DVector aLine(getEnd() - getStart()); const double fDistance(aLine.getLength()); const double fAngle(atan2(aLine.getY(), aLine.getX())); bool bAutoUpsideDown(false); - const attribute::SdrTextAttribute* pTextAttribute = maSdrLSTAttribute.getText(); + const attribute::SdrTextAttribute* pTextAttribute = getSdrLSTAttribute().getText(); - ::basegfx::B2DHomMatrix aObjectMatrix; + basegfx::B2DHomMatrix aObjectMatrix; aObjectMatrix.rotate(fAngle); - aObjectMatrix.translate(maStart.getX(), maStart.getY()); + aObjectMatrix.translate(getStart().getX(), getStart().getY()); if(pTextAttribute) { - ::basegfx::B2DHomMatrix aTextMatrix; + basegfx::B2DHomMatrix aTextMatrix; double fTestAngle(fAngle); - if(mbTextRotation) + if(getTextRotation()) { aTextMatrix.rotate(-90.0 * F_PI180); fTestAngle -= (90.0 * F_PI180); - if(mbTextAutoAngle && fTestAngle < -F_PI) + if(getTextAutoAngle() && fTestAngle < -F_PI) { fTestAngle += F_2PI; } } - if(mbTextAutoAngle) + if(getTextAutoAngle()) { if(fTestAngle > (F_PI / 4.0) || fTestAngle < (-F_PI * (3.0 / 4.0))) { @@ -136,7 +136,7 @@ namespace drawinglayer } // prepare line attribute and result - const attribute::SdrLineAttribute* pLineAttribute(maSdrLSTAttribute.getLine()); + const attribute::SdrLineAttribute* pLineAttribute(getSdrLSTAttribute().getLine()); if(!pLineAttribute) { @@ -147,7 +147,7 @@ namespace drawinglayer { bool bArrowsOutside(false); bool bMainLineSplitted(false); - const attribute::SdrLineStartEndAttribute* pLineStartEnd = maSdrLSTAttribute.getLineStartEnd(); + const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd(); double fStartArrowW(0.0); double fStartArrowH(0.0); double fEndArrowW(0.0); @@ -157,7 +157,7 @@ namespace drawinglayer { if(pLineStartEnd->isStartActive()) { - const ::basegfx::B2DRange aArrowRange(::basegfx::tools::getRange(pLineStartEnd->getStartPolyPolygon())); + const basegfx::B2DRange aArrowRange(basegfx::tools::getRange(pLineStartEnd->getStartPolyPolygon())); fStartArrowW = pLineStartEnd->getStartWidth(); fStartArrowH = aArrowRange.getHeight() * fStartArrowW / aArrowRange.getWidth(); @@ -169,7 +169,7 @@ namespace drawinglayer if(pLineStartEnd->isEndActive()) { - const ::basegfx::B2DRange aArrowRange(::basegfx::tools::getRange(pLineStartEnd->getEndPolyPolygon())); + const basegfx::B2DRange aArrowRange(basegfx::tools::getRange(pLineStartEnd->getEndPolyPolygon())); fEndArrowW = pLineStartEnd->getEndWidth(); fEndArrowH = aArrowRange.getHeight() * fEndArrowW / aArrowRange.getWidth(); @@ -189,8 +189,8 @@ namespace drawinglayer bArrowsOutside = true; } - MeasureTextPosition eHorizontal(meHorizontal); - MeasureTextPosition eVertical(meVertical); + MeasureTextPosition eHorizontal(getHorizontal()); + MeasureTextPosition eVertical(getVertical()); if(MEASURETEXTPOSITION_AUTOMATIC == eVertical) { @@ -237,7 +237,7 @@ namespace drawinglayer } // switch text above/below? - if(mbBelow || (bAutoUpsideDown && !mbTextRotation)) + if(getBelow() || (bAutoUpsideDown && !getTextRotation())) { if(MEASURETEXTPOSITION_NEGATIVE == eVertical) { @@ -249,9 +249,9 @@ namespace drawinglayer } } - const double fMainLineOffset(mbBelow ? mfDistance : -mfDistance); - const ::basegfx::B2DPoint aMainLeft(0.0, fMainLineOffset); - const ::basegfx::B2DPoint aMainRight(fDistance, fMainLineOffset); + const double fMainLineOffset(getBelow() ? getDistance() : -getDistance()); + const basegfx::B2DPoint aMainLeft(0.0, fMainLineOffset); + const basegfx::B2DPoint aMainRight(fDistance, fMainLineOffset); // main line if(bArrowsOutside) @@ -271,8 +271,8 @@ namespace drawinglayer } } - const ::basegfx::B2DPoint aMainLeftLeft(aMainLeft.getX() - fLenLeft, aMainLeft.getY()); - const ::basegfx::B2DPoint aMainRightRight(aMainRight.getX() + fLenRight, aMainRight.getY()); + 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)); @@ -287,8 +287,8 @@ namespace drawinglayer if(bMainLineSplitted) { const double fHalfLength((fDistance - (aTextRange.getWidth() + (fStartArrowH + fEndArrowH) * 0.25)) * 0.5); - const ::basegfx::B2DPoint aMainInnerLeft(aMainLeft.getX() + fHalfLength, aMainLeft.getY()); - const ::basegfx::B2DPoint aMainInnerRight(aMainRight.getX() - fHalfLength, aMainRight.getY()); + 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)); @@ -300,19 +300,19 @@ namespace drawinglayer } // left/right help line value preparation - const double fTopEdge(mbBelow ? mfUpper + mfDistance : -mfUpper - mfDistance); - const double fBottomLeft(mbBelow ? mfLower - mfLeftDelta : mfLeftDelta - mfLower); - const double fBottomRight(mbBelow ? mfLower - mfRightDelta : mfRightDelta - mfLower); + const double fTopEdge(getBelow() ? getUpper() + getDistance() : -getUpper() - getDistance()); + const double fBottomLeft(getBelow() ? getLower() - getLeftDelta() : getLeftDelta() - getLower()); + const double fBottomRight(getBelow() ? getLower() - getRightDelta() : getRightDelta() - getLower()); // left help line - const ::basegfx::B2DPoint aLeftUp(0.0, fTopEdge); - const ::basegfx::B2DPoint aLeftDown(0.0, fBottomLeft); + const basegfx::B2DPoint aLeftUp(0.0, fTopEdge); + const basegfx::B2DPoint aLeftDown(0.0, fBottomLeft); appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aLeftDown, aLeftUp, false, false)); // right help line - const ::basegfx::B2DPoint aRightUp(fDistance, fTopEdge); - const ::basegfx::B2DPoint aRightDown(fDistance, fBottomRight); + const basegfx::B2DPoint aRightUp(fDistance, fTopEdge); + const basegfx::B2DPoint aRightDown(fDistance, fBottomRight); appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aRightDown, aRightUp, false, false)); @@ -395,7 +395,7 @@ namespace drawinglayer } } - if(!maSdrLSTAttribute.getLine()) + if(!getSdrLSTAttribute().getLine()) { // embed line geometry to invisible line group const Primitive2DReference xHiddenLines(new HitTestPrimitive2D(aRetval)); @@ -408,7 +408,7 @@ namespace drawinglayer if(pBlockText) { // create transformation to text primitive end position - ::basegfx::B2DHomMatrix aChange; + basegfx::B2DHomMatrix aChange; // handle auto text rotation if(bAutoUpsideDown) @@ -432,18 +432,9 @@ namespace drawinglayer } // add shadow - if(maSdrLSTAttribute.getShadow()) + if(getSdrLSTAttribute().getShadow()) { - // attention: shadow is added BEFORE object stuff to render it BEHIND object (!) - const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *maSdrLSTAttribute.getShadow())); - - if(xShadow.is()) - { - Primitive2DSequence aContentWithShadow(2L); - aContentWithShadow[0L] = xShadow; - aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval)); - aRetval = aContentWithShadow; - } + aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLSTAttribute().getShadow()); } return aRetval; @@ -451,8 +442,8 @@ namespace drawinglayer SdrMeasurePrimitive2D::SdrMeasurePrimitive2D( const attribute::SdrLineShadowTextAttribute& rSdrLSTAttribute, - const ::basegfx::B2DPoint& rStart, - const ::basegfx::B2DPoint& rEnd, + const basegfx::B2DPoint& rStart, + const basegfx::B2DPoint& rEnd, MeasureTextPosition eHorizontal, MeasureTextPosition eVertical, double fDistance, @@ -486,19 +477,19 @@ namespace drawinglayer { const SdrMeasurePrimitive2D& rCompare = (SdrMeasurePrimitive2D&)rPrimitive; - return (maStart == rCompare.maStart - && maEnd == rCompare.maEnd - && meHorizontal == rCompare.meHorizontal - && meVertical == rCompare.meVertical - && mfDistance == rCompare.mfDistance - && mfUpper == rCompare.mfUpper - && mfLower == rCompare.mfLower - && mfLeftDelta == rCompare.mfLeftDelta - && mfRightDelta == rCompare.mfRightDelta - && mbBelow == rCompare.mbBelow - && mbTextRotation == rCompare.mbTextRotation - && mbTextAutoAngle == rCompare.mbTextAutoAngle - && maSdrLSTAttribute == rCompare.maSdrLSTAttribute); + return (getStart() == rCompare.getStart() + && getEnd() == rCompare.getEnd() + && getHorizontal() == rCompare.getHorizontal() + && getVertical() == rCompare.getVertical() + && getDistance() == rCompare.getDistance() + && getUpper() == rCompare.getUpper() + && getLower() == rCompare.getLower() + && getLeftDelta() == rCompare.getLeftDelta() + && getRightDelta() == rCompare.getRightDelta() + && getBelow() == rCompare.getBelow() + && getTextRotation() == rCompare.getTextRotation() + && getTextAutoAngle() == rCompare.getTextAutoAngle() + && getSdrLSTAttribute() == rCompare.getSdrLSTAttribute()); } return false; diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx index 2cedb1bfce29..ab5d23962719 100644 --- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx @@ -116,16 +116,7 @@ namespace drawinglayer // add shadow if(!bBehaveCompatibleToPaintVersion && getSdrLFSTAttribute().getShadow()) { - // attention: shadow is added BEFORE object stuff to render it BEHIND object (!) - const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow())); - - if(xShadow.is()) - { - Primitive2DSequence aContentWithShadow(2L); - aContentWithShadow[0L] = xShadow; - aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval)); - aRetval = aContentWithShadow; - } + aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow()); } return aRetval; diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx new file mode 100644 index 000000000000..67fee9215b73 --- /dev/null +++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx @@ -0,0 +1,200 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sdrcaptionprimitive2d.cxx,v $ + * + * $Revision: 1.2.18.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "precompiled_svx.hxx" +#include <svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx> +#include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx> +#include <svx/svdoole2.hxx> +#include <vcl/svapp.hxx> +#include <drawinglayer/primitive2d/graphicprimitive2d.hxx> +#include <svtools/colorcfg.hxx> +#include <basegfx/polygon/b2dpolygontools.hxx> +#include <basegfx/polygon/b2dpolygon.hxx> +#include <drawinglayer/primitive2d/polygonprimitive2d.hxx> + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive2d + { + Primitive2DSequence SdrOleContentPrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const + { + Primitive2DSequence aRetval; + const SdrOle2Obj* pSource = (mpSdrOle2Obj.is() ? static_cast< SdrOle2Obj* >(mpSdrOle2Obj.get()) : 0); + bool bScaleContent(false); + Graphic aGraphic; + + if(pSource) + { + Graphic* pOLEGraphic = (getHighContrast()) + ? pSource->getEmbeddedObjectRef().GetHCGraphic() + : pSource->GetGraphic(); + + if(pOLEGraphic) + { + aGraphic = *pOLEGraphic; + bScaleContent = pSource->IsEmptyPresObj(); + } + } + + if(GRAPHIC_NONE == aGraphic.GetType()) + { + // no source, use fallback ressource emty OLE graphic + const Bitmap aEmptyOLEBitmap(SdrOle2Obj::GetEmtyOLEReplacementBitmap()); + aGraphic = Graphic(aEmptyOLEBitmap); + bScaleContent = true; + } + + if(GRAPHIC_NONE != aGraphic.GetType()) + { + const GraphicObject aGraphicObject(aGraphic); + const GraphicAttr aGraphicAttr; + drawinglayer::primitive2d::Primitive2DSequence xOLEContent; + + if(bScaleContent) + { + // get transformation atoms + basegfx::B2DVector aScale, aTranslate; + double fRotate, fShearX; + getObjectTransform().decompose(aScale, aTranslate, fRotate, fShearX); + + // get PrefSize from the graphic in 100th mm + Size aPrefSize(aGraphic.GetPrefSize()); + + if(MAP_PIXEL == aGraphic.GetPrefMapMode().GetMapUnit()) + { + aPrefSize = Application::GetDefaultDevice()->PixelToLogic(aPrefSize, MAP_100TH_MM); + } + else + { + aPrefSize = Application::GetDefaultDevice()->LogicToLogic(aPrefSize, aGraphic.GetPrefMapMode(), MAP_100TH_MM); + } + + const double fOffsetX((aScale.getX() - aPrefSize.getWidth()) / 2.0); + const double fOffsetY((aScale.getY() - aPrefSize.getHeight()) / 2.0); + + if(basegfx::fTools::moreOrEqual(fOffsetX, 0.0) && basegfx::fTools::moreOrEqual(fOffsetY, 0.0)) + { + // if content fits into frame, create it + basegfx::B2DHomMatrix aInnerObjectMatrix; + + aInnerObjectMatrix.scale(aPrefSize.getWidth(), aPrefSize.getHeight()); + aInnerObjectMatrix.translate(fOffsetX, fOffsetY); + aInnerObjectMatrix.shearX(fShearX); + aInnerObjectMatrix.rotate(fRotate); + aInnerObjectMatrix.translate(aTranslate.getX(), aTranslate.getY()); + + const drawinglayer::primitive2d::Primitive2DReference aGraphicPrimitive( + new drawinglayer::primitive2d::GraphicPrimitive2D( + aInnerObjectMatrix, + aGraphicObject, + aGraphicAttr)); + drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aGraphicPrimitive); + } + } + else + { + // create graphic primitive for content + const drawinglayer::primitive2d::Primitive2DReference aGraphicPrimitive( + new drawinglayer::primitive2d::GraphicPrimitive2D( + getObjectTransform(), + aGraphicObject, + aGraphicAttr)); + drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aGraphicPrimitive); + } + + // a standard gray outline is created for scaled content + if(bScaleContent) + { + const svtools::ColorConfig aColorConfig; + const svtools::ColorConfigValue aColor(aColorConfig.GetColorValue(svtools::OBJECTBOUNDARIES)); + + if(aColor.bIsVisible) + { + basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0))); + const Color aVclColor(aColor.nColor); + aOutline.transform(getObjectTransform()); + const drawinglayer::primitive2d::Primitive2DReference xOutline( + new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aVclColor.getBColor())); + drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, xOutline); + } + } + } + + // get graphic and check scale content state + return aRetval; + } + + SdrOleContentPrimitive2D::SdrOleContentPrimitive2D( + const SdrOle2Obj& rSdrOle2Obj, + const basegfx::B2DHomMatrix& rObjectTransform, + bool bHighContrast) + : BasePrimitive2D(), + mpSdrOle2Obj(const_cast< SdrOle2Obj* >(&rSdrOle2Obj)), + maObjectTransform(rObjectTransform), + mbHighContrast(bHighContrast) + { + } + + bool SdrOleContentPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const + { + if(BasePrimitive2D::operator==(rPrimitive)) + { + const SdrOleContentPrimitive2D& rCompare = (SdrOleContentPrimitive2D&)rPrimitive; + const bool bBothNot(!mpSdrOle2Obj.is() && !rCompare.mpSdrOle2Obj.is()); + const bool bBothAndEqual(mpSdrOle2Obj.is() && rCompare.mpSdrOle2Obj.is() + && mpSdrOle2Obj.get() == rCompare.mpSdrOle2Obj.get()); + + return ((bBothNot || bBothAndEqual) + && getObjectTransform() == rCompare.getObjectTransform() + && getHighContrast() == rCompare.getHighContrast()); + } + + return false; + } + + basegfx::B2DRange SdrOleContentPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const + { + basegfx::B2DRange aRange(0.0, 0.0, 1.0, 1.0); + aRange.transform(getObjectTransform()); + + return aRange; + } + + // provide unique ID + ImplPrimitrive2DIDBlock(SdrOleContentPrimitive2D, PRIMITIVE2D_ID_SDROLECONTENTPRIMITIVE2D) + + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// eof diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx index 3b6a653a7bc6..91ed0bd2adce 100644 --- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx @@ -52,22 +52,22 @@ namespace drawinglayer Primitive2DSequence aRetval; // add fill - if(maSdrLFSTAttribute.getFill() && maUnitPolyPolygon.isClosed()) + if(getSdrLFSTAttribute().getFill() && getUnitPolyPolygon().isClosed()) { // take care for orientations - ::basegfx::B2DPolyPolygon aOrientedUnitPolyPolygon(::basegfx::tools::correctOrientations(maUnitPolyPolygon)); + basegfx::B2DPolyPolygon aOrientedUnitPolyPolygon(basegfx::tools::correctOrientations(getUnitPolyPolygon())); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolyPolygonFillPrimitive(aOrientedUnitPolyPolygon, maTransform, *maSdrLFSTAttribute.getFill(), maSdrLFSTAttribute.getFillFloatTransGradient())); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolyPolygonFillPrimitive(aOrientedUnitPolyPolygon, getTransform(), *getSdrLFSTAttribute().getFill(), getSdrLFSTAttribute().getFillFloatTransGradient())); } // add line - if(maSdrLFSTAttribute.getLine()) + if(getSdrLFSTAttribute().getLine()) { - Primitive2DSequence aTemp(maUnitPolyPolygon.count()); + Primitive2DSequence aTemp(getUnitPolyPolygon().count()); - for(sal_uInt32 a(0L); a < maUnitPolyPolygon.count(); a++) + for(sal_uInt32 a(0L); a < getUnitPolyPolygon().count(); a++) { - aTemp[a] = createPolygonLinePrimitive(maUnitPolyPolygon.getB2DPolygon(a), maTransform, *maSdrLFSTAttribute.getLine(), maSdrLFSTAttribute.getLineStartEnd()); + aTemp[a] = createPolygonLinePrimitive(getUnitPolyPolygon().getB2DPolygon(a), getTransform(), *getSdrLFSTAttribute().getLine(), getSdrLFSTAttribute().getLineStartEnd()); } appendPrimitive2DSequenceToPrimitive2DSequence(aRetval, aTemp); @@ -76,44 +76,35 @@ namespace drawinglayer { // if initially no line is defined, create one for HitTest and BoundRect const attribute::SdrLineAttribute aBlackHairline(basegfx::BColor(0.0, 0.0, 0.0)); - Primitive2DSequence xHiddenLineSequence(maUnitPolyPolygon.count()); + Primitive2DSequence xHiddenLineSequence(getUnitPolyPolygon().count()); - for(sal_uInt32 a(0); a < maUnitPolyPolygon.count(); a++) + for(sal_uInt32 a(0); a < getUnitPolyPolygon().count(); a++) { - xHiddenLineSequence[a] = createPolygonLinePrimitive(maUnitPolyPolygon.getB2DPolygon(a), maTransform, aBlackHairline); + xHiddenLineSequence[a] = createPolygonLinePrimitive(getUnitPolyPolygon().getB2DPolygon(a), getTransform(), aBlackHairline); } appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, Primitive2DReference(new HitTestPrimitive2D(xHiddenLineSequence))); } // add text - if(maSdrLFSTAttribute.getText()) + if(getSdrLFSTAttribute().getText()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(maUnitPolyPolygon, maTransform, *maSdrLFSTAttribute.getText(), maSdrLFSTAttribute.getLine(), false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(getUnitPolyPolygon(), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false)); } // add shadow - if(maSdrLFSTAttribute.getShadow()) + if(getSdrLFSTAttribute().getShadow()) { - // attention: shadow is added BEFORE object stuff to render it BEHIND object (!) - const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *maSdrLFSTAttribute.getShadow())); - - if(xShadow.is()) - { - Primitive2DSequence aContentWithShadow(2L); - aContentWithShadow[0L] = xShadow; - aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval)); - aRetval = aContentWithShadow; - } + aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow()); } return aRetval; } SdrPathPrimitive2D::SdrPathPrimitive2D( - const ::basegfx::B2DHomMatrix& rTransform, + const basegfx::B2DHomMatrix& rTransform, const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, - const ::basegfx::B2DPolyPolygon& rUnitPolyPolygon) + const basegfx::B2DPolyPolygon& rUnitPolyPolygon) : BasePrimitive2D(), maTransform(rTransform), maSdrLFSTAttribute(rSdrLFSTAttribute), @@ -127,9 +118,9 @@ namespace drawinglayer { const SdrPathPrimitive2D& rCompare = (SdrPathPrimitive2D&)rPrimitive; - return (maUnitPolyPolygon == rCompare.maUnitPolyPolygon - && maTransform == rCompare.maTransform - && maSdrLFSTAttribute == rCompare.maSdrLFSTAttribute); + return (getUnitPolyPolygon() == rCompare.getUnitPolyPolygon() + && getTransform() == rCompare.getTransform() + && getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute()); } return false; diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx index 97aaf2735630..64ac716b40e9 100644 --- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx @@ -50,65 +50,90 @@ namespace drawinglayer Primitive2DSequence SdrRectanglePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& /*aViewInformation*/) const { Primitive2DSequence aRetval; + Primitive2DSequence aHitTestContent; // create unit outline polygon - ::basegfx::B2DPolygon aUnitOutline(::basegfx::tools::createPolygonFromRect(::basegfx::B2DRange(0.0, 0.0, 1.0, 1.0), getCornerRadiusX(), getCornerRadiusY())); + const basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromRect( + basegfx::B2DRange(0.0, 0.0, 1.0, 1.0), + getCornerRadiusX(), + getCornerRadiusY())); // add fill if(getSdrLFSTAttribute().getFill()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolyPolygonFillPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getFill(), getSdrLFSTAttribute().getFillFloatTransGradient())); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, + createPolyPolygonFillPrimitive( + basegfx::B2DPolyPolygon(aUnitOutline), + getTransform(), + *getSdrLFSTAttribute().getFill(), + getSdrLFSTAttribute().getFillFloatTransGradient())); + } + else if(getTextFrame()) + { + // if no fill and it's a text frame, create a fill for HitTest and + // BoundRect fallback + appendPrimitive2DReferenceToPrimitive2DSequence(aHitTestContent, + createPolyPolygonFillPrimitive( + basegfx::B2DPolyPolygon(aUnitOutline), + getTransform(), + attribute::SdrFillAttribute(0.0, basegfx::BColor(0.0, 0.0, 0.0)), + getSdrLFSTAttribute().getFillFloatTransGradient())); } // add line if(getSdrLFSTAttribute().getLine()) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolygonLinePrimitive(aUnitOutline, getTransform(), *getSdrLFSTAttribute().getLine())); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, + createPolygonLinePrimitive( + aUnitOutline, + getTransform(), + *getSdrLFSTAttribute().getLine())); } - else + else if(!getTextFrame()) { - // if initially no line is defined, create one for HitTest and BoundRect - const attribute::SdrLineAttribute aBlackHairline(basegfx::BColor(0.0, 0.0, 0.0)); - const Primitive2DReference xHiddenLineReference(createPolygonLinePrimitive(aUnitOutline, getTransform(), aBlackHairline)); - const Primitive2DSequence xHiddenLineSequence(&xHiddenLineReference, 1); + // if initially no line is defined and it's not a text frame, create + // a line for HitTest and BoundRect + appendPrimitive2DReferenceToPrimitive2DSequence(aHitTestContent, + createPolygonLinePrimitive( + aUnitOutline, + getTransform(), + attribute::SdrLineAttribute(basegfx::BColor(0.0, 0.0, 0.0)))); + } - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, Primitive2DReference(new HitTestPrimitive2D(xHiddenLineSequence))); + // add HitTest and BoundRect helper geometry (if exists) + if(aHitTestContent.hasElements()) + { + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, + Primitive2DReference(new HitTestPrimitive2D(aHitTestContent))); } // 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)); } // add shadow if(getSdrLFSTAttribute().getShadow()) { - // attention: shadow is added BEFORE object stuff to render it BEHIND object (!) - const Primitive2DReference xShadow(createShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow())); - - if(xShadow.is()) - { - Primitive2DSequence aContentWithShadow(2L); - aContentWithShadow[0L] = xShadow; - aContentWithShadow[1L] = Primitive2DReference(new GroupPrimitive2D(aRetval)); - aRetval = aContentWithShadow; - } + aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrLFSTAttribute().getShadow()); } return aRetval; } SdrRectanglePrimitive2D::SdrRectanglePrimitive2D( - const ::basegfx::B2DHomMatrix& rTransform, + const basegfx::B2DHomMatrix& rTransform, const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute, double fCornerRadiusX, - double fCornerRadiusY) + double fCornerRadiusY, + bool bTextFrame) : BasePrimitive2D(), maTransform(rTransform), maSdrLFSTAttribute(rSdrLFSTAttribute), mfCornerRadiusX(fCornerRadiusX), - mfCornerRadiusY(fCornerRadiusY) + mfCornerRadiusY(fCornerRadiusY), + mbTextFrame(bTextFrame) { } @@ -121,7 +146,8 @@ namespace drawinglayer return (getCornerRadiusX() == rCompare.getCornerRadiusX() && getCornerRadiusY() == rCompare.getCornerRadiusY() && getTransform() == rCompare.getTransform() - && getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute()); + && getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute() + && getTextFrame() == rCompare.getTextFrame()); } return false; diff --git a/svx/source/svdraw/makefile.mk b/svx/source/svdraw/makefile.mk index 28eeb84e29d1..e777ad70d3f1 100644 --- a/svx/source/svdraw/makefile.mk +++ b/svx/source/svdraw/makefile.mk @@ -33,6 +33,7 @@ PRJ=..$/.. PRJNAME=svx TARGET=svdraw +LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- @@ -42,11 +43,11 @@ ENABLE_EXCEPTIONS=TRUE # --- Files -------------------------------------------------------- -SLOFILES=\ +LIB1TARGET= $(SLB)$/$(TARGET)-core.lib +LIB1OBJFILES= \ $(SLO)$/svdxcgv.obj \ $(SLO)$/svdmodel.obj \ $(SLO)$/svdpage.obj \ - $(SLO)$/svdoimp.obj \ $(SLO)$/svdobj.obj \ $(SLO)$/svdedtv1.obj \ $(SLO)$/svdcrtv.obj \ @@ -59,7 +60,6 @@ SLOFILES=\ $(SLO)$/svdotextdecomposition.obj \ $(SLO)$/svdotextpathdecomposition.obj \ $(SLO)$/svdouno.obj \ - $(SLO)$/svdfppt.obj \ $(SLO)$/svdpagv.obj \ $(SLO)$/svddrgmt.obj \ $(SLO)$/svdpntv.obj \ @@ -96,7 +96,6 @@ SLOFILES=\ $(SLO)$/svdglev.obj \ $(SLO)$/svdglue.obj \ $(SLO)$/svdhlpln.obj \ - $(SLO)$/svdibrow.obj \ $(SLO)$/svditer.obj \ $(SLO)$/svdlayer.obj \ $(SLO)$/svdmark.obj \ @@ -106,18 +105,29 @@ SLOFILES=\ $(SLO)$/sdrpagewindow.obj \ $(SLO)$/sdrpaintwindow.obj \ $(SLO)$/svdpoev.obj \ - $(SLO)$/svdscrol.obj \ $(SLO)$/svdtrans.obj \ $(SLO)$/svdundo.obj \ $(SLO)$/svdviter.obj \ $(SLO)$/clonelist.obj \ - $(SLO)$/ActionDescriptionProvider.obj \ $(SLO)$/svdedtv.obj \ $(SLO)$/selectioncontroller.obj \ $(SLO)$/polypolygoneditor.obj \ - $(SLO)$/svdomedia.obj \ + $(SLO)$/svdibrow.obj \ + $(SLO)$/svdomedia.obj + +LIB2TARGET= $(SLB)$/$(TARGET).lib +LIB2OBJFILES= \ + $(SLO)$/svdoimp.obj \ + $(SLO)$/svdscrol.obj \ + $(SLO)$/ActionDescriptionProvider.obj \ $(SLO)$/impgrfll.obj +LIB3TARGET= $(SLB)$/$(TARGET)-msfilter.lib +LIB3OBJFILES= \ + $(SLO)$/svdfppt.obj \ + +SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) $(LIB3OBJFILES) + SRS1NAME=svdstr SRC1FILES= svdstr.src diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 49e3fc87ae68..30c3ff62531a 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -476,6 +476,12 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaChordAction& rAct) bool ImpSdrGDIMetaFileImport::CheckLastLineMerge(const basegfx::B2DPolygon& rSrcPoly) { + // #i102706# Do not merge closed polygons + if(rSrcPoly.isClosed()) + { + return false; + } + // #i73407# reformulation to use new B2DPolygon classes if(bLastObjWasLine && (aOldLineColor == aVD.GetLineColor()) && rSrcPoly.count()) { @@ -489,6 +495,12 @@ bool ImpSdrGDIMetaFileImport::CheckLastLineMerge(const basegfx::B2DPolygon& rSrc bool bOk(false); basegfx::B2DPolygon aDstPoly(pLastPoly->GetPathPoly().getB2DPolygon(0L)); + // #i102706# Do not merge closed polygons + if(aDstPoly.isClosed()) + { + return false; + } + if(aDstPoly.count()) { const sal_uInt32 nMaxDstPnt(aDstPoly.count() - 1L); diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 28435b26ff9f..0eab890b49f0 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -1882,6 +1882,11 @@ uno::Reference< uno::XInterface > SdrModel::getUnoModel() return mxUnoModel; } +void SdrModel::setUnoModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xModel ) +{ + mxUnoModel = xModel; +} + uno::Reference< uno::XInterface > SdrModel::createUnoModel() { DBG_ERROR( "SdrModel::createUnoModel() - base implementation should not be called!" ); diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index e272a51a4a7a..7ba4aec3e565 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -129,6 +129,10 @@ #include "svx/shapepropertynotifier.hxx" #include <svx/sdrhittesthelper.hxx> +// --> OD 2009-07-10 #i73249# +#include <svx/svdundo.hxx> +// <-- + using namespace ::com::sun::star; // #104018# replace macros above with type-detecting methods @@ -759,7 +763,29 @@ void SdrObject::SetName(const String& rStr) if(pPlusData && pPlusData->aObjName != rStr) { + // --> OD 2009-07-09 #i73249# + // Undo/Redo for setting object's name + bool bUndo( false ); + if ( GetModel() && GetModel()->IsUndoEnabled() ) + { + bUndo = true; + SdrUndoAction* pUndoAction = + GetModel()->GetSdrUndoFactory().CreateUndoObjectStrAttr( + *this, + SdrUndoObjStrAttr::OBJ_NAME, + GetName(), + rStr ); + GetModel()->BegUndo( pUndoAction->GetComment() ); + GetModel()->AddUndo( pUndoAction ); + } + // <-- pPlusData->aObjName = rStr; + // --> OD 2009-07-09 #i73249# + if ( bUndo ) + { + GetModel()->EndUndo(); + } + // <-- SetChanged(); BroadcastObjectChange(); } @@ -784,7 +810,29 @@ void SdrObject::SetTitle(const String& rStr) if(pPlusData && pPlusData->aObjTitle != rStr) { + // --> OD 2009-07-13 #i73249# + // Undo/Redo for setting object's title + bool bUndo( false ); + if ( GetModel() && GetModel()->IsUndoEnabled() ) + { + bUndo = true; + SdrUndoAction* pUndoAction = + GetModel()->GetSdrUndoFactory().CreateUndoObjectStrAttr( + *this, + SdrUndoObjStrAttr::OBJ_TITLE, + GetTitle(), + rStr ); + GetModel()->BegUndo( pUndoAction->GetComment() ); + GetModel()->AddUndo( pUndoAction ); + } + // <-- pPlusData->aObjTitle = rStr; + // --> OD 2009-07-13 #i73249# + if ( bUndo ) + { + GetModel()->EndUndo(); + } + // <-- SetChanged(); BroadcastObjectChange(); } @@ -809,7 +857,29 @@ void SdrObject::SetDescription(const String& rStr) if(pPlusData && pPlusData->aObjDescription != rStr) { + // --> OD 2009-07-13 #i73249# + // Undo/Redo for setting object's description + bool bUndo( false ); + if ( GetModel() && GetModel()->IsUndoEnabled() ) + { + bUndo = true; + SdrUndoAction* pUndoAction = + GetModel()->GetSdrUndoFactory().CreateUndoObjectStrAttr( + *this, + SdrUndoObjStrAttr::OBJ_DESCRIPTION, + GetDescription(), + rStr ); + GetModel()->BegUndo( pUndoAction->GetComment() ); + GetModel()->AddUndo( pUndoAction ); + } + // <-- pPlusData->aObjDescription = rStr; + // --> OD 2009-07-13 #i73249# + if ( bUndo ) + { + GetModel()->EndUndo(); + } + // <-- SetChanged(); BroadcastObjectChange(); } @@ -2863,8 +2933,8 @@ void SdrObject::impl_setUnoShape( const uno::Reference< uno::XInterface >& _rxUn { maWeakUnoShape = _rxUnoShape; mpSvxShape = SvxShape::getImplementation( _rxUnoShape ); - OSL_ENSURE( mpSvxShape || !_rxUnoShape.is(), - "SdrObject::setUnoShape: not sure it's a good idea to have an XShape which is not implemented by SvxShape ..." ); +// OSL_ENSURE( mpSvxShape || !_rxUnoShape.is(), +// "SdrObject::setUnoShape: not sure it's a good idea to have an XShape which is not implemented by SvxShape ..." ); } /** only for internal use! */ diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 01ef392e941a..8c30bfb88018 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -2208,14 +2208,7 @@ sal_Bool SdrOle2Obj::AddOwnLightClient() ////////////////////////////////////////////////////////////////////////////// -bool SdrOle2Obj::executeOldDoPaintPreparations(SdrPageView* /*pPageVew*/) const -{ - //#i101925# moved this stuff to method ViewObjectContactOfSdrOle2Obj::createPrimitive2DSequence and reorganized it further to avoid superfluous metafile creation for charts - //this method can be removed with the next incompatible build - return false; -} - -Bitmap SdrOle2Obj::GetEmtyOLEReplacementBitmap() const +Bitmap SdrOle2Obj::GetEmtyOLEReplacementBitmap() { return Bitmap(ResId(BMP_SVXOLEOBJ, *ImpGetResMgr())); } diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src index 32c457cf3d02..144db41d515f 100644 --- a/svx/source/svdraw/svdstr.src +++ b/svx/source/svdraw/svdstr.src @@ -1127,6 +1127,20 @@ String STR_UndoMovLayer { Text [ en-US ] = "Change order of layers" ; }; +// --> OD 2009-07-09 #i73249# +String STR_UndoObjName +{ + Text [ en-US ] = "Change object name of %1 to" ; +}; +String STR_UndoObjTitle +{ + Text [ en-US ] = "Change object title of %1" ; +}; +String STR_UndoObjDescription +{ + Text [ en-US ] = "Change object description of %1" ; +}; +// <-- String STR_StandardLayerName { Text [ en-US ] = "Standard" ; diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index b49d087d0251..08cee1eb17d3 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -1219,6 +1219,95 @@ bool SdrUndoObjSetText::CanSdrRepeat(SdrView& rView) const return bOk; } +// --> OD 2009-07-09 #i73249# +SdrUndoObjStrAttr::SdrUndoObjStrAttr( SdrObject& rNewObj, + const ObjStrAttrType eObjStrAttr, + const String& sOldStr, + const String& sNewStr) + : SdrUndoObj( rNewObj ), + meObjStrAttr( eObjStrAttr ), + msOldStr( sOldStr ), + msNewStr( sNewStr ) +{ +} + +void SdrUndoObjStrAttr::Undo() +{ + ImpShowPageOfThisObject(); + + switch ( meObjStrAttr ) + { + case OBJ_NAME: + { + pObj->SetName( msOldStr ); + } + break; + case OBJ_TITLE: + { + pObj->SetTitle( msOldStr ); + } + break; + case OBJ_DESCRIPTION: + { + pObj->SetDescription( msOldStr ); + } + break; + } +} + +void SdrUndoObjStrAttr::Redo() +{ + switch ( meObjStrAttr ) + { + case OBJ_NAME: + { + pObj->SetName( msNewStr ); + } + break; + case OBJ_TITLE: + { + pObj->SetTitle( msNewStr ); + } + break; + case OBJ_DESCRIPTION: + { + pObj->SetDescription( msNewStr ); + } + break; + } + + ImpShowPageOfThisObject(); +} + +String SdrUndoObjStrAttr::GetComment() const +{ + String aStr; + switch ( meObjStrAttr ) + { + case OBJ_NAME: + { + ImpTakeDescriptionStr( STR_UndoObjName, aStr ); + aStr += sal_Unicode(' '); + aStr += sal_Unicode('\''); + aStr += msNewStr; + aStr += sal_Unicode('\''); + } + break; + case OBJ_TITLE: + { + ImpTakeDescriptionStr( STR_UndoObjTitle, aStr ); + } + break; + case OBJ_DESCRIPTION: + { + ImpTakeDescriptionStr( STR_UndoObjDescription, aStr ); + } + break; + } + + return aStr; +} + //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// // @@ -1726,6 +1815,15 @@ SdrUndoAction* SdrUndoFactory::CreateUndoObjectSetText( SdrObject& rNewObj, sal_ return new SdrUndoObjSetText( rNewObj, nText ); } +SdrUndoAction* SdrUndoFactory::CreateUndoObjectStrAttr( SdrObject& rObject, + SdrUndoObjStrAttr::ObjStrAttrType eObjStrAttrType, + String sOldStr, + String sNewStr ) +{ + return new SdrUndoObjStrAttr( rObject, eObjStrAttrType, sOldStr, sNewStr ); +} + + // layer SdrUndoAction* SdrUndoFactory::CreateUndoNewLayer(sal_uInt16 nLayerNum, SdrLayerAdmin& rNewLayerAdmin, SdrModel& rNewModel) { diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 23f3981228e1..b9a197ed89fb 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -697,17 +697,16 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject* aOut.EnableOutput( FALSE ); aOut.SetMapMode( aMap ); aMtf.Record( &aOut ); - - // aXOut.SetOffset( Point( -aBoundRect.Left(), -aBoundRect.Top() ) ); - // #i92760# offset set in wrong direction, corrected - MapMode aOffsetMapMode(aOut.GetMapMode()); - aOffsetMapMode.SetOrigin(Point(-aBoundRect.Left(), -aBoundRect.Top())); - aOut.SetMapMode(aOffsetMapMode); - pObj->SingleObjectPainter( aOut ); // #110094#-17 - aMtf.Stop(); aMtf.WindStart(); + + // #i99268# replace the original offset from using XOutDev's SetOffset + // NOT (as tried with #i92760#) with another MapMode which gets recorded + // by the Metafile itself (what always leads to problems), but by hardly + // moving the result + aMtf.Move(-aBoundRect.Left(), -aBoundRect.Top()); + aMtf.SetPrefMapMode( aMap ); aMtf.SetPrefSize( aBoundRect.GetSize() ); diff --git a/svx/source/svrtf/makefile.mk b/svx/source/svrtf/makefile.mk index 8dbbd79a82fe..950036034d41 100644 --- a/svx/source/svrtf/makefile.mk +++ b/svx/source/svrtf/makefile.mk @@ -36,6 +36,7 @@ PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch PRJNAME=svx TARGET=svxrtf +LIBTARGET=NO AUTOSEG=true # --- Settings ----------------------------------------------------- @@ -48,11 +49,17 @@ AUTOSEG=true EXCEPTIONSFILES= \ $(SLO)$/svxrtf.obj -SLOFILES = \ - $(SLO)$/rtfgrf.obj \ +LIB1TARGET= $(SLB)$/$(TARGET)-core.lib +LIB1OBJFILES= \ $(SLO)$/rtfitem.obj \ $(SLO)$/svxrtf.obj +LIB2TARGET= $(SLB)$/$(TARGET).lib +LIB2OBJFILES= \ + $(SLO)$/rtfgrf.obj + +SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) + # ========================================================================== .INCLUDE : target.mk diff --git a/svx/source/svrtf/rtfgrf.cxx b/svx/source/svrtf/rtfgrf.cxx index 417c72cf02b1..de90302586d0 100644 --- a/svx/source/svrtf/rtfgrf.cxx +++ b/svx/source/svrtf/rtfgrf.cxx @@ -559,17 +559,4 @@ BOOL SvxRTFParser::ReadBmpData( Graphic& rGrf, SvxRTFPictureType& rPicType ) return bValidBmp; } - // alle Werte auf default; wird nach einlesen der Bitmap aufgerufen ! -void SvxRTFPictureType::ResetValues() -{ // setze alle Werte RTF-Defaults - eStyle = RTF_BITMAP; - nMode = HEX_MODE; - nType = nGoalWidth = nGoalHeight = 0; - nWidth = nHeight = nWidthBytes = 0; - uPicLen = 0; - nBitsPerPixel = nPlanes = 1; - nScalX = nScalY = 100; // Skalierung in Prozent - nCropT = nCropB = nCropL = nCropR = 0; -} - /* vi:set tabstop=4 shiftwidth=4 expandtab: */ diff --git a/svx/source/svrtf/rtfitem.cxx b/svx/source/svrtf/rtfitem.cxx index bab67c91b1ef..889298b89f35 100644 --- a/svx/source/svrtf/rtfitem.cxx +++ b/svx/source/svrtf/rtfitem.cxx @@ -1257,12 +1257,16 @@ ATTR_SETEMPHASIS: ReadTabAttr( nToken, *pSet ); /* - cmc: #i76140, he who reads the { must read the } + cmc: #i76140, he who consumed the { must consume the } We rewound to a state of { being the current - token so it is our responsibility to read the } - token. + token so it is our responsibility to consume the } + token if we consumed the {. We will not have consumed + the { if it belonged to our caller, i.e. if the { we + are handling is the "firsttoken" passed to us then + the *caller* must consume it, not us. Otherwise *we* + should consume it. */ - if (nToken == BRACELEFT) + if (nToken == BRACELEFT && !bFirstToken) { nToken = GetNextToken(); DBG_ASSERT( nToken == BRACERIGHT, diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx index 6f4bea3cbd40..d76d5e1b3079 100644 --- a/svx/source/table/accessiblecell.cxx +++ b/svx/source/table/accessiblecell.cxx @@ -573,4 +573,15 @@ sal_Int32 SAL_CALL AccessibleCell::getAccessibleIndexInParent (void) throw (Runt return mnIndexInParent; } +::rtl::OUString SAL_CALL AccessibleCell::getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException) +{ + ThrowIfDisposed (); + ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); + + if( mxCell.is() ) + return mxCell->getName(); + + return AccessibleCellBase::getAccessibleName(); +} + } // end of namespace accessibility diff --git a/svx/source/table/accessiblecell.hxx b/svx/source/table/accessiblecell.hxx index 166495ecc83d..95c8d684fe3b 100644 --- a/svx/source/table/accessiblecell.hxx +++ b/svx/source/table/accessiblecell.hxx @@ -85,6 +85,7 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL getAccessibleChild(sal_Int32 nIndex) throw(::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL getAccessibleStateSet(void) throw(::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getAccessibleIndexInParent(void) throw(::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getAccessibleName (void) throw (::com::sun::star::uno::RuntimeException); // XAccessibleComponent virtual sal_Bool SAL_CALL containsPoint( const ::com::sun::star::awt::Point& aPoint) throw (::com::sun::star::uno::RuntimeException); diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index 89e18137eeb0..455d39eee467 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -160,6 +160,8 @@ Reference< XAccessible > AccessibleTableShapeImpl::getAccessibleChild( sal_Int32 maChildMap[xCell] = xAccessibleCell; + xAccessibleCell->Init(); + Reference< XAccessible > xChild( xAccessibleCell.get() ); return xChild; } @@ -501,10 +503,11 @@ Reference< XAccessible > SAL_CALL AccessibleTableShape::getAccessibleCellAt( sal ::vos::OGuard aSolarGuard (::Application::GetSolarMutex()); checkCellPosition( nColumn, nRow ); - (void)nRow; - (void)nColumn; - Reference< XAccessible > xRet; - return xRet; + sal_Int32 nChildIndex = 0; + if( mxImpl->mxTable.is() ) + nChildIndex = mxImpl->mxTable->getColumnCount() * nRow + nColumn; + + return getAccessibleChild( nChildIndex ); } //-------------------------------------------------------------------- diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 4ac7b4754f8d..46268a68ca02 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -1757,5 +1757,71 @@ void SAL_CALL Cell::disposing( const EventObject& /*Source*/ ) throw (RuntimeExc dispose(); } +static OUString getCellName( sal_Int32 nCol, sal_Int32 nRow ) +{ + rtl::OUStringBuffer aBuf; + + if (nCol < 26*26) + { + if (nCol < 26) + aBuf.append( static_cast<sal_Unicode>( 'A' + + static_cast<sal_uInt16>(nCol))); + else + { + aBuf.append( static_cast<sal_Unicode>( 'A' + + (static_cast<sal_uInt16>(nCol) / 26) - 1)); + aBuf.append( static_cast<sal_Unicode>( 'A' + + (static_cast<sal_uInt16>(nCol) % 26))); + } + } + else + { + String aStr; + while (nCol >= 26) + { + sal_Int32 nC = nCol % 26; + aStr += static_cast<sal_Unicode>( 'A' + + static_cast<sal_uInt16>(nC)); + nCol = nCol - nC; + nCol = nCol / 26 - 1; + } + aStr += static_cast<sal_Unicode>( 'A' + + static_cast<sal_uInt16>(nCol)); + aStr.Reverse(); + aBuf.append( aStr); + } + aBuf.append( OUString::valueOf(nRow+1) ); + return aBuf.makeStringAndClear(); +} + +OUString Cell::getName() +{ + // todo: optimize! + OUString sName; + if( mxTable.is() ) try + { + Reference< XCell > xThis( static_cast< XCell* >( this ) ); + + sal_Int32 nRowCount = mxTable->getRowCount(); + sal_Int32 nColCount = mxTable->getColumnCount(); + for( sal_Int32 nRow = 0; nRow < nRowCount; nRow++ ) + { + for( sal_Int32 nCol = 0; nCol < nColCount; nCol++ ) + { + Reference< XCell > xCell( mxTable->getCellByPosition( nCol, nRow ) ); + if( xCell == xThis ) + { + return getCellName( nCol, nRow ); + } + } + } + } + catch( Exception& ) + { + } + + return sName; +} + } } diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx index e48fe5bf74d9..901fe4735e51 100644 --- a/svx/source/table/cell.hxx +++ b/svx/source/table/cell.hxx @@ -58,7 +58,7 @@ namespace sdr { namespace table { // ----------------------------------------------------------------------------- -class Cell : public SdrText, +class SVX_DLLPUBLIC Cell : public SdrText, public SvxUnoTextBase, public ::com::sun::star::table::XMergeableCell, public ::com::sun::star::awt::XLayoutConstrains, @@ -68,156 +68,158 @@ class Cell : public SdrText, friend class CellUndo; public: - static rtl::Reference< Cell > create( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ); + SVX_DLLPRIVATE static rtl::Reference< Cell > create( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ); // private - void dispose(); + SVX_DLLPRIVATE void dispose(); // SdrTextShape proxy bool IsTextEditActive(); - bool hasText() const; + SVX_DLLPRIVATE bool hasText() const; - void cloneFrom( const CellRef& rCell ); + SVX_DLLPRIVATE void cloneFrom( const CellRef& rCell ); - void setCellRect( ::Rectangle& rCellRect ) { maCellRect = rCellRect; } - const ::Rectangle& getCellRect() const { return maCellRect; } - ::Rectangle& getCellRect() { return maCellRect; } + SVX_DLLPRIVATE void setCellRect( ::Rectangle& rCellRect ) { maCellRect = rCellRect; } + SVX_DLLPRIVATE const ::Rectangle& getCellRect() const { return maCellRect; } + SVX_DLLPRIVATE ::Rectangle& getCellRect() { return maCellRect; } OutlinerParaObject* GetEditOutlinerParaObject() const; - void SetStyleSheet( SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr ); - virtual SfxStyleSheet* GetStyleSheet() const; + SVX_DLLPRIVATE void SetStyleSheet( SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr ); + SVX_DLLPRIVATE virtual SfxStyleSheet* GetStyleSheet() const; SfxStyleSheetPool* GetStyleSheetPool() const; - virtual const Rectangle& GetCurrentBoundRect() const; - virtual void TakeTextAnchorRect(Rectangle& rAnchorRect) const; + SVX_DLLPRIVATE virtual const Rectangle& GetCurrentBoundRect() const; + SVX_DLLPRIVATE virtual void TakeTextAnchorRect(Rectangle& rAnchorRect) const; - virtual const SfxItemSet& GetItemSet() const; - void SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, sal_Bool bClearAllItems); + SVX_DLLPRIVATE virtual const SfxItemSet& GetItemSet() const; + SVX_DLLPRIVATE void SetMergedItemSetAndBroadcast(const SfxItemSet& rSet, sal_Bool bClearAllItems); void SetMergedItem(const SfxPoolItem& rItem); - sal_Int32 getMinimumWidth(); - sal_Int32 getMinimumHeight(); + SVX_DLLPRIVATE sal_Int32 getMinimumWidth(); + SVX_DLLPRIVATE sal_Int32 getMinimumHeight(); - long GetTextLeftDistance() const; - long GetTextRightDistance() const; - long GetTextUpperDistance() const; - long GetTextLowerDistance() const; + SVX_DLLPRIVATE long GetTextLeftDistance() const; + SVX_DLLPRIVATE long GetTextRightDistance() const; + SVX_DLLPRIVATE long GetTextUpperDistance() const; + SVX_DLLPRIVATE long GetTextLowerDistance() const; - SdrTextVertAdjust GetTextVerticalAdjust() const; + SVX_DLLPRIVATE SdrTextVertAdjust GetTextVerticalAdjust() const; SdrTextHorzAdjust GetTextHorizontalAdjust() const; - virtual void SetModel(SdrModel* pNewModel); + SVX_DLLPRIVATE virtual void SetModel(SdrModel* pNewModel); - void merge( sal_Int32 nColumnSpan, sal_Int32 nRowSpan ); - void mergeContent( const CellRef& xSourceCell ); - void replaceContentAndFormating( const CellRef& xSourceCell ); + SVX_DLLPRIVATE void merge( sal_Int32 nColumnSpan, sal_Int32 nRowSpan ); + SVX_DLLPRIVATE void mergeContent( const CellRef& xSourceCell ); + SVX_DLLPRIVATE void replaceContentAndFormating( const CellRef& xSourceCell ); - void setMerged(); + SVX_DLLPRIVATE void setMerged(); // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& Type ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire() throw (); - virtual void SAL_CALL release() throw (); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& Type ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL acquire() throw (); + SVX_DLLPRIVATE virtual void SAL_CALL release() throw (); // XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException); // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); // XLayoutConstrains - virtual ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::awt::Size SAL_CALL getMinimumSize( ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::awt::Size SAL_CALL getPreferredSize( ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::awt::Size SAL_CALL calcAdjustedSize( const ::com::sun::star::awt::Size& aNewSize ) throw (::com::sun::star::uno::RuntimeException); // XMergeableCell - virtual ::sal_Int32 SAL_CALL getRowSpan() throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Int32 SAL_CALL getColumnSpan() throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL isMerged() throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::sal_Int32 SAL_CALL getRowSpan() throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::sal_Int32 SAL_CALL getColumnSpan() throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::sal_Bool SAL_CALL isMerged() throw (::com::sun::star::uno::RuntimeException); // XCell - virtual ::rtl::OUString SAL_CALL getFormula() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setFormula( const ::rtl::OUString& aFormula ) throw (::com::sun::star::uno::RuntimeException); - virtual double SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setValue( double nValue ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::table::CellContentType SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL getError() throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::rtl::OUString SAL_CALL getFormula() throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL setFormula( const ::rtl::OUString& aFormula ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual double SAL_CALL getValue() throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL setValue( double nValue ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::table::CellContentType SAL_CALL getType() throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual sal_Int32 SAL_CALL getError() throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::beans::XPropertySet - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); // XMultiPropertySet - virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::beans::XPropertyState - virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); // XMultiPropertyStates - virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL setAllPropertiesToDefault( ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL setPropertiesToDefault( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyDefaults( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); // XFastPropertySet - virtual void SAL_CALL setFastPropertyValue( ::sal_Int32 nHandle, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue( ::sal_Int32 nHandle ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL setFastPropertyValue( ::sal_Int32 nHandle, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue( ::sal_Int32 nHandle ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); // XText - virtual void SAL_CALL insertTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >& xContent, ::sal_Bool bAbsorb ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >& xContent ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL insertTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >& xContent, ::sal_Bool bAbsorb ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL removeTextContent( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextContent >& xContent ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); // XSimpleText - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& aTextPosition ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL insertString( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, const ::rtl::OUString& aString, ::sal_Bool bAbsorb ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL insertControlCharacter( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, ::sal_Int16 nControlCharacter, ::sal_Bool bAbsorb ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursor( ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL createTextCursorByRange( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& aTextPosition ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL insertString( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, const ::rtl::OUString& aString, ::sal_Bool bAbsorb ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL insertControlCharacter( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xRange, ::sal_Int16 nControlCharacter, ::sal_Bool bAbsorb ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); // XTextRange - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getString( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setString( const ::rtl::OUString& aString ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText( ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getStart( ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL getEnd( ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual ::rtl::OUString SAL_CALL getString( ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL setString( const ::rtl::OUString& aString ) throw (::com::sun::star::uno::RuntimeException); // XEventListener - virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); + SVX_DLLPRIVATE virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); - virtual void SetOutlinerParaObject( OutlinerParaObject* pTextObject ); + SVX_DLLPRIVATE virtual void SetOutlinerParaObject( OutlinerParaObject* pTextObject ); - void AddUndo(); + SVX_DLLPRIVATE void AddUndo(); using SvxUnoTextRangeBase::setPropertyValue; using SvxUnoTextRangeBase::getPropertyValue; - sdr::properties::TextProperties* CloneProperties( SdrObject& rNewObj, Cell& rNewCell ); + SVX_DLLPRIVATE sdr::properties::TextProperties* CloneProperties( SdrObject& rNewObj, Cell& rNewCell ); - static sdr::properties::TextProperties* CloneProperties( sdr::properties::TextProperties* pProperties, SdrObject& rNewObj, Cell& rNewCell ); + SVX_DLLPRIVATE static sdr::properties::TextProperties* CloneProperties( sdr::properties::TextProperties* pProperties, SdrObject& rNewObj, Cell& rNewCell ); - void notifyModified(); + SVX_DLLPRIVATE void notifyModified(); + + ::rtl::OUString getName(); protected: - virtual const SfxItemSet& GetObjectItemSet(); - virtual void SetObjectItem(const SfxPoolItem& rItem); + SVX_DLLPRIVATE virtual const SfxItemSet& GetObjectItemSet(); + SVX_DLLPRIVATE virtual void SetObjectItem(const SfxPoolItem& rItem); - ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap ); + SVX_DLLPRIVATE ::com::sun::star::uno::Any GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleEntry* pMap ); private: - Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ) throw(); - virtual ~Cell() throw(); + SVX_DLLPRIVATE Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ) throw(); + SVX_DLLPRIVATE virtual ~Cell() throw(); const SvxItemPropertySet* mpPropSet; diff --git a/svx/source/table/celleditsource.hxx b/svx/source/table/celleditsource.hxx index 72d0f18c582f..1d097dc6ede5 100644 --- a/svx/source/table/celleditsource.hxx +++ b/svx/source/table/celleditsource.hxx @@ -73,7 +73,7 @@ public: void lock(); void unlock(); - // the viewforwarder interface + // the SvxViewForwarder interface virtual BOOL IsValid() const; virtual Rectangle GetVisArea() const; virtual Point LogicToPixel( const Point&, const MapMode& ) const; diff --git a/svx/source/table/makefile.mk b/svx/source/table/makefile.mk index 8789cd4da86b..ae0dc5eb685a 100644 --- a/svx/source/table/makefile.mk +++ b/svx/source/table/makefile.mk @@ -36,6 +36,7 @@ PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch PRJNAME=svx TARGET=table +LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE; # --- Settings ----------------------------------------------------- @@ -45,9 +46,9 @@ ENABLE_EXCEPTIONS=TRUE; # --- Files -------------------------------------------------------- -SLOFILES= \ +LIB1TARGET= $(SLB)$/$(TARGET)-core.lib +LIB1OBJFILES= \ $(SLO)$/propertyset.obj\ - $(SLO)$/celleditsource.obj\ $(SLO)$/cell.obj\ $(SLO)$/cellrange.obj\ $(SLO)$/cellcursor.obj\ @@ -61,13 +62,19 @@ SLOFILES= \ $(SLO)$/tablelayouter.obj\ $(SLO)$/tablehandles.obj\ $(SLO)$/tablecontroller.obj\ - $(SLO)$/tabledesign.obj\ - $(SLO)$/tableundo.obj\ - $(SLO)$/accessibletableshape.obj\ + $(SLO)$/tableundo.obj + +LIB2TARGET= $(SLB)$/$(TARGET).lib +LIB2OBJFILES= \ + $(SLO)$/celleditsource.obj \ + $(SLO)$/tabledesign.obj \ + $(SLO)$/accessibletableshape.obj \ $(SLO)$/accessiblecell.obj \ $(SLO)$/tablertfexporter.obj \ $(SLO)$/tablertfimporter.obj +SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) + SRS1NAME=table SRC1FILES= table.src diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 3c6ec81cabdb..c99c2b3c2262 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -493,7 +493,7 @@ void SvxTableController::GetState( SfxItemSet& rSet ) // -------------------------------------------------------------------- -void SvxTableController::onInsert( sal_uInt16 nSId ) +void SvxTableController::onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs ) { ::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( mxTableObj.get() ); if( !pTableObj ) @@ -501,6 +501,21 @@ void SvxTableController::onInsert( sal_uInt16 nSId ) if( mxTable.is() ) try { + // + bool bInsertAfter = true; + sal_uInt16 nCount = 0; + if( pArgs ) + { + const SfxPoolItem* pItem = 0; + pArgs->GetItemState(nSId, FALSE, &pItem); + if (pItem) + { + nCount = ((const SfxInt16Item* )pItem)->GetValue(); + if(SFX_ITEM_SET == pArgs->GetItemState(SID_TABLE_PARAM_INSERT_AFTER, TRUE, &pItem)) + bInsertAfter = ((const SfxBoolItem* )pItem)->GetValue(); + } + } + CellPos aStart, aEnd; if( hasSelectedCells() ) { @@ -508,9 +523,12 @@ void SvxTableController::onInsert( sal_uInt16 nSId ) } else { - aStart.mnCol = mxTable->getColumnCount() - 1; - aStart.mnRow = mxTable->getRowCount() - 1; - aEnd = aStart; + if( bInsertAfter ) + { + aStart.mnCol = mxTable->getColumnCount() - 1; + aStart.mnRow = mxTable->getRowCount() - 1; + aEnd = aStart; + } } if( pTableObj->IsTextEditActive() ) @@ -535,8 +553,9 @@ void SvxTableController::onInsert( sal_uInt16 nSId ) } Reference< XTableColumns > xCols( mxTable->getColumns() ); - const sal_Int32 nNewColumns = aEnd.mnCol - aStart.mnCol + 1; - xCols->insertByIndex( aEnd.mnCol + 1, nNewColumns ); + const sal_Int32 nNewColumns = (nCount == 0) ? (aEnd.mnCol - aStart.mnCol + 1) : nCount; + const sal_Int32 nNewStartColumn = aEnd.mnCol + (bInsertAfter ? 1 : 0); + xCols->insertByIndex( nNewStartColumn, nNewColumns ); for( sal_Int32 nOffset = 0; nOffset < nNewColumns; nOffset++ ) { @@ -552,7 +571,7 @@ void SvxTableController::onInsert( sal_uInt16 nSId ) if( mpModel ) mpModel->SetChanged(); - aStart.mnCol = aEnd.mnCol+1; + aStart.mnCol = nNewStartColumn; aStart.mnRow = 0; aEnd.mnCol = aStart.mnCol + nNewColumns - 1; aEnd.mnRow = mxTable->getRowCount() - 1; @@ -570,8 +589,9 @@ void SvxTableController::onInsert( sal_uInt16 nSId ) } Reference< XTableRows > xRows( mxTable->getRows() ); - const sal_Int32 nNewRows = aEnd.mnRow - aStart.mnRow + 1; - xRows->insertByIndex( aEnd.mnRow + 1, nNewRows ); + const sal_Int32 nNewRows = (nCount == 0) ? (aEnd.mnRow - aStart.mnRow + 1) : nCount; + const sal_Int32 nNewRowStart = aEnd.mnRow + (bInsertAfter ? 1 : 0); + xRows->insertByIndex( nNewRowStart, nNewRows ); for( sal_Int32 nOffset = 0; nOffset < nNewRows; nOffset++ ) { @@ -591,7 +611,7 @@ void SvxTableController::onInsert( sal_uInt16 nSId ) mpModel->SetChanged(); aStart.mnCol = 0; - aStart.mnRow = aEnd.mnRow+1; + aStart.mnRow = nNewRowStart; aEnd.mnCol = mxTable->getColumnCount() - 1; aEnd.mnRow = aStart.mnRow + nNewRows - 1; break; @@ -759,7 +779,7 @@ void SvxTableController::Execute( SfxRequest& rReq ) { case SID_TABLE_INSERT_ROW: case SID_TABLE_INSERT_COL: - onInsert( nSId ); + onInsert( nSId, rReq.GetArgs() ); break; case SID_TABLE_DELETE_ROW: case SID_TABLE_DELETE_COL: @@ -1490,7 +1510,7 @@ bool SvxTableController::executeAction( sal_uInt16 nAction, bool bSelect, Window CellPos aNextCell( pTableObj->getNextCell( aSelectionEnd, true ) ); if( aSelectionEnd == aNextCell ) { - onInsert( SID_TABLE_INSERT_ROW ); + onInsert( SID_TABLE_INSERT_ROW, 0 ); aNextCell = pTableObj->getNextCell( aSelectionEnd, true ); } gotoCell( aNextCell, false, pWindow, nAction ); diff --git a/svx/source/table/tablecontroller.hxx b/svx/source/table/tablecontroller.hxx index 4caf7cd957a1..e13fad84179e 100644 --- a/svx/source/table/tablecontroller.hxx +++ b/svx/source/table/tablecontroller.hxx @@ -43,6 +43,7 @@ class SdrObjEditView; class SdrObject; +class SfxItemSet; namespace sdr { namespace table { @@ -50,97 +51,97 @@ const sal_Int16 SELTYPE_NONE = 0; const sal_Int16 SELTYPE_MOUSE = 1; const sal_Int16 SELTYPE_KEYS = 2; -class SvxTableController: public sdr::SelectionController +class SVX_DLLPUBLIC SvxTableController: public sdr::SelectionController { public: - SvxTableController( SdrObjEditView* pView, const SdrObject* pObj ); - virtual ~SvxTableController(); + SVX_DLLPRIVATE SvxTableController( SdrObjEditView* pView, const SdrObject* pObj ); + SVX_DLLPRIVATE virtual ~SvxTableController(); - virtual bool onKeyInput(const KeyEvent& rKEvt, Window* pWin); - virtual bool onMouseButtonDown(const MouseEvent& rMEvt, Window* pWin); - virtual bool onMouseButtonUp(const MouseEvent& rMEvt, Window* pWin); - virtual bool onMouseMove(const MouseEvent& rMEvt, Window* pWin); + SVX_DLLPRIVATE virtual bool onKeyInput(const KeyEvent& rKEvt, Window* pWin); + SVX_DLLPRIVATE virtual bool onMouseButtonDown(const MouseEvent& rMEvt, Window* pWin); + SVX_DLLPRIVATE virtual bool onMouseButtonUp(const MouseEvent& rMEvt, Window* pWin); + SVX_DLLPRIVATE virtual bool onMouseMove(const MouseEvent& rMEvt, Window* pWin); - virtual bool DeleteMarked(); + SVX_DLLPRIVATE virtual bool DeleteMarked(); - virtual void onSelectionHasChanged(); + SVX_DLLPRIVATE virtual void onSelectionHasChanged(); - virtual void GetState( SfxItemSet& rSet ); - virtual void Execute( SfxRequest& rReq ); + SVX_DLLPRIVATE virtual void GetState( SfxItemSet& rSet ); + SVX_DLLPRIVATE virtual void Execute( SfxRequest& rReq ); - virtual bool GetStyleSheet( SfxStyleSheet* &rpStyleSheet ) const; - virtual bool SetStyleSheet( SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr ); + SVX_DLLPRIVATE virtual bool GetStyleSheet( SfxStyleSheet* &rpStyleSheet ) const; + SVX_DLLPRIVATE virtual bool SetStyleSheet( SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr ); // slots - void onInsert( sal_uInt16 nSId ); - void onDelete( sal_uInt16 nSId ); - void onSelect( sal_uInt16 nSId ); - void onFormatTable( SfxRequest& rReq ); - void MergeMarkedCells(); - void SplitMarkedCells(); - void DistributeColumns(); - void DistributeRows(); - void SetVertical( sal_uInt16 nSId ); + SVX_DLLPRIVATE void onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs = 0 ); + SVX_DLLPRIVATE void onDelete( sal_uInt16 nSId ); + SVX_DLLPRIVATE void onSelect( sal_uInt16 nSId ); + SVX_DLLPRIVATE void onFormatTable( SfxRequest& rReq ); + SVX_DLLPRIVATE void MergeMarkedCells(); + SVX_DLLPRIVATE void SplitMarkedCells(); + SVX_DLLPRIVATE void DistributeColumns(); + SVX_DLLPRIVATE void DistributeRows(); + SVX_DLLPRIVATE void SetVertical( sal_uInt16 nSId ); - static rtl::Reference< sdr::SelectionController > create( SdrObjEditView* pView, const SdrObject* pObj, const rtl::Reference< sdr::SelectionController >& xRefController ); + SVX_DLLPRIVATE static rtl::Reference< sdr::SelectionController > create( SdrObjEditView* pView, const SdrObject* pObj, const rtl::Reference< sdr::SelectionController >& xRefController ); - void MergeAttrFromSelectedCells(SfxItemSet& rAttr, bool bOnlyHardAttr) const; - void SetAttrToSelectedCells(const SfxItemSet& rAttr, bool bReplaceAll); + SVX_DLLPRIVATE void MergeAttrFromSelectedCells(SfxItemSet& rAttr, bool bOnlyHardAttr) const; + SVX_DLLPRIVATE void SetAttrToSelectedCells(const SfxItemSet& rAttr, bool bReplaceAll); - virtual bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const; - virtual bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll); + SVX_DLLPRIVATE virtual bool GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const; + SVX_DLLPRIVATE virtual bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll); - virtual bool GetMarkedObjModel( SdrPage* pNewPage ); - virtual bool PasteObjModel( const SdrModel& rModel ); + SVX_DLLPRIVATE virtual bool GetMarkedObjModel( SdrPage* pNewPage ); + SVX_DLLPRIVATE virtual bool PasteObjModel( const SdrModel& rModel ); - bool hasSelectedCells() const { return mbCellSelectionMode || mpView->IsTextEdit(); } + SVX_DLLPRIVATE bool hasSelectedCells() const { return mbCellSelectionMode || mpView->IsTextEdit(); } void getSelectedCells( CellPos& rFirstPos, CellPos& rLastPos ); void setSelectedCells( const CellPos& rFirstPos, const CellPos& rLastPos ); void clearSelection(); void selectAll(); - void onTableModified(); + SVX_DLLPRIVATE void onTableModified(); private: SvxTableController(SvxTableController &); // not defined void operator =(SvxTableController &); // not defined // internals - void ApplyBorderAttr( const SfxItemSet& rAttr ); - void UpdateTableShape(); + SVX_DLLPRIVATE void ApplyBorderAttr( const SfxItemSet& rAttr ); + SVX_DLLPRIVATE void UpdateTableShape(); - void SetTableStyle( const SfxItemSet* pArgs ); - void SetTableStyleSettings( const SfxItemSet* pArgs ); + SVX_DLLPRIVATE void SetTableStyle( const SfxItemSet* pArgs ); + SVX_DLLPRIVATE void SetTableStyleSettings( const SfxItemSet* pArgs ); - bool PasteObject( SdrTableObj* pPasteTableObj ); + SVX_DLLPRIVATE bool PasteObject( SdrTableObj* pPasteTableObj ); - bool checkTableObject(); - bool updateTableObject(); - const CellPos& getSelectionStart(); - void setSelectionStart( const CellPos& rPos ); - const CellPos& getSelectionEnd(); - ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellCursor > getSelectionCursor(); - void checkCell( CellPos& rPos ); + SVX_DLLPRIVATE bool checkTableObject(); + SVX_DLLPRIVATE bool updateTableObject(); + SVX_DLLPRIVATE const CellPos& getSelectionStart(); + SVX_DLLPRIVATE void setSelectionStart( const CellPos& rPos ); + SVX_DLLPRIVATE const CellPos& getSelectionEnd(); + SVX_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellCursor > getSelectionCursor(); + SVX_DLLPRIVATE void checkCell( CellPos& rPos ); - void MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow ); + SVX_DLLPRIVATE void MergeRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow ); - void EditCell( const CellPos& rPos, ::Window* pWindow, const ::com::sun::star::awt::MouseEvent* pMouseEvent = 0, sal_uInt16 nAction = 0 ); - bool StopTextEdit(); + SVX_DLLPRIVATE void EditCell( const CellPos& rPos, ::Window* pWindow, const ::com::sun::star::awt::MouseEvent* pMouseEvent = 0, sal_uInt16 nAction = 0 ); + SVX_DLLPRIVATE bool StopTextEdit(); - void DeleteTable(); + SVX_DLLPRIVATE void DeleteTable(); - sal_uInt16 getKeyboardAction( const KeyEvent& rKEvt, Window* pWindow ); - bool executeAction( sal_uInt16 nAction, bool bSelect, Window* pWindow ); - void gotoCell( const CellPos& rCell, bool bSelect, Window* pWindow, sal_uInt16 nAction = 0 ); + SVX_DLLPRIVATE sal_uInt16 getKeyboardAction( const KeyEvent& rKEvt, Window* pWindow ); + SVX_DLLPRIVATE bool executeAction( sal_uInt16 nAction, bool bSelect, Window* pWindow ); + SVX_DLLPRIVATE void gotoCell( const CellPos& rCell, bool bSelect, Window* pWindow, sal_uInt16 nAction = 0 ); - void StartSelection( const CellPos& rPos ); - void UpdateSelection( const CellPos& rPos ); - void RemoveSelection(); - void updateSelectionOverlay(); - void destroySelectionOverlay(); + SVX_DLLPRIVATE void StartSelection( const CellPos& rPos ); + SVX_DLLPRIVATE void UpdateSelection( const CellPos& rPos ); + SVX_DLLPRIVATE void RemoveSelection(); + SVX_DLLPRIVATE void updateSelectionOverlay(); + SVX_DLLPRIVATE void destroySelectionOverlay(); - void findMergeOrigin( CellPos& rPos ); + SVX_DLLPRIVATE void findMergeOrigin( CellPos& rPos ); DECL_LINK( UpdateHdl, void * ); diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index 5c1aca5a4542..b2620452d31a 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -118,6 +118,7 @@ basegfx::B2ITuple TableLayouter::getCellSize( const CellPos& rPos ) const width += maColumns[aPos.mnCol++].mnSize; nColSpan--; + nColSpan--; } } } @@ -128,6 +129,7 @@ basegfx::B2ITuple TableLayouter::getCellSize( const CellPos& rPos ) const return basegfx::B2ITuple( width, height ); } + // ----------------------------------------------------------------------------- bool TableLayouter::getCellArea( const CellPos& rPos, basegfx::B2IRectangle& rArea ) const diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx index f740bf60258c..45a24211f7b2 100644 --- a/svx/source/table/viewcontactoftableobj.cxx +++ b/svx/source/table/viewcontactoftableobj.cxx @@ -687,17 +687,7 @@ namespace sdr if(pNewShadowAttribute) { - // attention: shadow is added BEFORE object stuff to render it BEHIND object (!) - const drawinglayer::primitive2d::Primitive2DReference xShadow(drawinglayer::primitive2d::createShadowPrimitive(xRetval, *pNewShadowAttribute)); - - if(xShadow.is()) - { - drawinglayer::primitive2d::Primitive2DSequence xContentWithShadow(2); - xContentWithShadow[0] = xShadow; - xContentWithShadow[1] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::GroupPrimitive2D(xRetval)); - xRetval = xContentWithShadow; - } - + xRetval = drawinglayer::primitive2d::createEmbeddedShadowPrimitive(xRetval, *pNewShadowAttribute); delete pNewShadowAttribute; } } diff --git a/svx/source/tbxctrls/makefile.mk b/svx/source/tbxctrls/makefile.mk index 02bbd865d4fb..9bca3b979841 100644 --- a/svx/source/tbxctrls/makefile.mk +++ b/svx/source/tbxctrls/makefile.mk @@ -33,6 +33,7 @@ PRJ=..$/.. PRJNAME=svx TARGET=tbxctrls +LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- @@ -42,10 +43,17 @@ ENABLE_EXCEPTIONS=TRUE # --- Files -------------------------------------------------------- -SLOFILES= \ - $(SLO)$/formatpaintbrushctrl.obj\ +LIB1TARGET= $(SLB)$/$(TARGET)-core.lib +LIB1OBJFILES= \ $(SLO)$/fontworkgallery.obj\ $(SLO)$/extrusioncontrols.obj \ + $(SLO)$/tbcontrl.obj \ + $(SLO)$/toolbarmenu.obj \ + $(SLO)$/tbxcolorupdate.obj + +LIB2TARGET= $(SLB)$/$(TARGET).lib +LIB2OBJFILES= \ + $(SLO)$/formatpaintbrushctrl.obj\ $(SLO)$/colrctrl.obj \ $(SLO)$/fillctrl.obj \ $(SLO)$/grafctrl.obj \ @@ -53,16 +61,15 @@ SLOFILES= \ $(SLO)$/layctrl.obj \ $(SLO)$/lboxctrl.obj \ $(SLO)$/linectrl.obj \ - $(SLO)$/tbcontrl.obj \ $(SLO)$/tbxalign.obj \ $(SLO)$/tbxdrctl.obj \ $(SLO)$/verttexttbxctrl.obj \ - $(SLO)$/toolbarmenu.obj \ $(SLO)$/subtoolboxcontrol.obj \ $(SLO)$/tbxcolor.obj \ - $(SLO)$/tbxcolorupdate.obj \ $(SLO)$/tbunocontroller.obj +SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) + SRS1NAME=$(TARGET) SRC1FILES = \ fontworkgallery.src \ diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 392b4c608ac6..efa49025bbc4 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -292,6 +292,7 @@ class SvxLineWindow_Impl : public SfxPopupWindow { private: ValueSet aLineSet; + bool m_bIsWriter; #if _SOLAR__PRIVATE void MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& rSize, String& rStr, @@ -1335,6 +1336,14 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r aLineSet( this, WinBits( WB_3DLOOK | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD | WB_NONEFIELD | WB_NO_DIRECTSELECT ) ) { + try + { + Reference< lang::XServiceInfo > xServices( rFrame->getController()->getModel(), UNO_QUERY_THROW ); + m_bIsWriter = xServices->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument"))); + } + catch(const uno::Exception& ) + { + } Size aBmpSize( 55, 12 ); CreateBitmaps(); @@ -1598,7 +1607,7 @@ IMPL_LINK( SvxLineWindow_Impl, SelectHdl, void *, EMPTYARG ) Any a; Sequence< PropertyValue > aArgs( 1 ); aArgs[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "LineStyle" )); - aLineItem.QueryValue( a ); + aLineItem.QueryValue( a, m_bIsWriter ? CONVERT_TWIPS : 0 ); aArgs[0].Value = a; /* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call. @@ -2631,7 +2640,6 @@ SfxPopupWindowType SvxFrameLineStyleToolBoxControl::GetPopupWindowType() const SfxPopupWindow* SvxFrameLineStyleToolBoxControl::CreatePopupWindow() { SvxLineWindow_Impl* pLineWin = new SvxLineWindow_Impl( GetSlotId(), m_xFrame, &GetToolBox() ); - pLineWin->StartPopupMode( &GetToolBox(), TRUE ); pLineWin->StartSelection(); SetPopupWindow( pLineWin ); diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.src b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.src index 180724093424..601f2594a080 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.src +++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.src @@ -40,7 +40,7 @@ #define FULL_WIDTH (220) #define FULL_HEIGHT (120) -#define EDITBUTTON_WIDTH (70) +#define EDITBUTTON_WIDTH (75) #define COL_1 (RSC_SP_DLG_INNERBORDER_LEFT) #define COL_2 (COL_1+RSC_SP_FLGR_SPACE_X) diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 098ddb6c31c0..5d1af9af2190 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -201,13 +201,13 @@ namespace svx SdrModel* mpDoc; }; - Reference< XInterface > SAL_CALL GraphicExporter_createInstance(const Reference< XMultiServiceFactory > & ) + SVX_DLLPUBLIC Reference< XInterface > SAL_CALL GraphicExporter_createInstance(const Reference< XMultiServiceFactory > & ) throw( Exception ) { return (XWeak*)new GraphicExporter(); } - Sequence< OUString > SAL_CALL GraphicExporter_getSupportedServiceNames() + SVX_DLLPUBLIC Sequence< OUString > SAL_CALL GraphicExporter_getSupportedServiceNames() throw() { Sequence< OUString > aSupportedServiceNames( 1 ); @@ -215,7 +215,7 @@ namespace svx return aSupportedServiceNames; } - OUString SAL_CALL GraphicExporter_getImplementationName() + SVX_DLLPUBLIC OUString SAL_CALL GraphicExporter_getImplementationName() throw() { return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Draw.GraphicExporter" ) ); diff --git a/svx/source/unodraw/UnoGraphicExporter.hxx b/svx/source/unodraw/UnoGraphicExporter.hxx index e8a4621ac63f..a2fbc38dd3d9 100644 --- a/svx/source/unodraw/UnoGraphicExporter.hxx +++ b/svx/source/unodraw/UnoGraphicExporter.hxx @@ -35,9 +35,9 @@ namespace svx { - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GraphicExporter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); - ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL GraphicExporter_getSupportedServiceNames() throw(); - ::rtl::OUString SAL_CALL GraphicExporter_getImplementationName() throw(); + SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GraphicExporter_createInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( ::com::sun::star::uno::Exception ); + SVX_DLLPUBLIC ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL GraphicExporter_getSupportedServiceNames() throw(); + SVX_DLLPUBLIC ::rtl::OUString SAL_CALL GraphicExporter_getImplementationName() throw(); } #endif diff --git a/svx/source/unodraw/gluepts.cxx b/svx/source/unodraw/gluepts.cxx index 1210a3847a96..d742cf63ece8 100644 --- a/svx/source/unodraw/gluepts.cxx +++ b/svx/source/unodraw/gluepts.cxx @@ -49,19 +49,15 @@ using namespace ::cppu; const USHORT NON_USER_DEFINED_GLUE_POINTS = 4; -class SvxUnoGluePointAccess : public WeakImplHelper2< container::XIndexContainer, container::XIdentifierContainer >, - public SfxListener +class SvxUnoGluePointAccess : public WeakImplHelper2< container::XIndexContainer, container::XIdentifierContainer > { private: - SdrObject* mpObject; + SdrObjectWeakRef mpObject; public: SvxUnoGluePointAccess( SdrObject* pObject ) throw(); virtual ~SvxUnoGluePointAccess() throw(); - // SfxListener - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) throw (); - // XIdentifierContainer virtual sal_Int32 SAL_CALL insert( const uno::Any& aElement ) throw (lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException); virtual void SAL_CALL removeByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException); @@ -223,52 +219,16 @@ static void convert( const drawing::GluePoint2& rUnoGlue, SdrGluePoint& rSdrGlue SvxUnoGluePointAccess::SvxUnoGluePointAccess( SdrObject* pObject ) throw() : mpObject( pObject ) { - StartListening( *mpObject->GetModel() ); - } SvxUnoGluePointAccess::~SvxUnoGluePointAccess() throw() { - if( mpObject && mpObject->GetModel()) - EndListening( *mpObject->GetModel() ); -} - -void SvxUnoGluePointAccess::Notify( SfxBroadcaster&, const SfxHint& rHint ) throw() -{ - const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint ); - - if( pSdrHint && mpObject) - { - if( pSdrHint->GetKind() == HINT_OBJREMOVED ) - { - if( mpObject == pSdrHint->GetObject() ) - mpObject = NULL; - } - else if( pSdrHint->GetKind() == HINT_MODELCLEARED ) - { - mpObject = NULL; - } - // #110094#-9 - //else if( pSdrHint->GetKind() == HINT_OBJLISTCLEAR ) - //{ - // SdrObjList* pObjList = mpObject ? mpObject->GetObjList() : NULL; - // while( pObjList ) - // { - // if( pSdrHint->GetObjList() == pObjList ) - // { - // mpObject = NULL; - // break; - // } - // pObjList = pObjList->GetUpList(); - // } - //} - } } // XIdentifierContainer sal_Int32 SAL_CALL SvxUnoGluePointAccess::insert( const uno::Any& aElement ) throw (lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException) { - if( mpObject ) + if( mpObject.is() ) { SdrGluePointList* pList = mpObject->ForceGluePointList(); if( pList ) @@ -298,7 +258,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::insert( const uno::Any& aElement ) thr void SAL_CALL SvxUnoGluePointAccess::removeByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - if( mpObject && ( Identifier >= NON_USER_DEFINED_GLUE_POINTS )) + if( mpObject.is() && ( Identifier >= NON_USER_DEFINED_GLUE_POINTS )) { const USHORT nId = (USHORT)(Identifier - NON_USER_DEFINED_GLUE_POINTS) + 1; @@ -327,7 +287,7 @@ void SAL_CALL SvxUnoGluePointAccess::removeByIdentifier( sal_Int32 Identifier ) // XIdentifierReplace void SAL_CALL SvxUnoGluePointAccess::replaceByIdentifer( sal_Int32 Identifier, const uno::Any& aElement ) throw (lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - if( mpObject && mpObject->IsNode() ) + if( mpObject.is() && mpObject->IsNode() ) { struct drawing::GluePoint2 aGluePoint; if( (Identifier < NON_USER_DEFINED_GLUE_POINTS) || !(aElement >>= aGluePoint)) @@ -361,7 +321,7 @@ void SAL_CALL SvxUnoGluePointAccess::replaceByIdentifer( sal_Int32 Identifier, c // XIdentifierAccess uno::Any SAL_CALL SvxUnoGluePointAccess::getByIdentifier( sal_Int32 Identifier ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) { - if( mpObject && mpObject->IsNode() ) + if( mpObject.is() && mpObject->IsNode() ) { struct drawing::GluePoint2 aGluePoint; @@ -401,21 +361,29 @@ uno::Any SAL_CALL SvxUnoGluePointAccess::getByIdentifier( sal_Int32 Identifier ) uno::Sequence< sal_Int32 > SAL_CALL SvxUnoGluePointAccess::getIdentifiers() throw (uno::RuntimeException) { - const SdrGluePointList* pList = mpObject->GetGluePointList(); - const USHORT nCount = pList ? pList->GetCount() : 0; + if( mpObject.is() ) + { + const SdrGluePointList* pList = mpObject->GetGluePointList(); + const USHORT nCount = pList ? pList->GetCount() : 0; - USHORT i; + USHORT i; - uno::Sequence< sal_Int32 > aIdSequence( nCount + NON_USER_DEFINED_GLUE_POINTS ); - sal_Int32 *pIdentifier = aIdSequence.getArray(); + uno::Sequence< sal_Int32 > aIdSequence( nCount + NON_USER_DEFINED_GLUE_POINTS ); + sal_Int32 *pIdentifier = aIdSequence.getArray(); - for( i = 0; i < NON_USER_DEFINED_GLUE_POINTS; i++ ) - *pIdentifier++ = (sal_Int32)i; + for( i = 0; i < NON_USER_DEFINED_GLUE_POINTS; i++ ) + *pIdentifier++ = (sal_Int32)i; - for( i = 0; i < nCount; i++ ) - *pIdentifier++ = (sal_Int32) ( (*pList)[i].GetId() + NON_USER_DEFINED_GLUE_POINTS ) - 1; + for( i = 0; i < nCount; i++ ) + *pIdentifier++ = (sal_Int32) ( (*pList)[i].GetId() + NON_USER_DEFINED_GLUE_POINTS ) - 1; - return aIdSequence; + return aIdSequence; + } + else + { + uno::Sequence< sal_Int32 > aEmpty; + return aEmpty; + } } /* deprecated */ @@ -425,7 +393,7 @@ void SAL_CALL SvxUnoGluePointAccess::insertByIndex( sal_Int32, const uno::Any& E throw(lang::IllegalArgumentException, lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { - if( mpObject ) + if( mpObject.is() ) { SdrGluePointList* pList = mpObject->ForceGluePointList(); if( pList ) @@ -455,7 +423,7 @@ void SAL_CALL SvxUnoGluePointAccess::insertByIndex( sal_Int32, const uno::Any& E void SAL_CALL SvxUnoGluePointAccess::removeByIndex( sal_Int32 Index ) throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { - if( mpObject ) + if( mpObject.is() ) { SdrGluePointList* pList = mpObject->ForceGluePointList(); if( pList ) @@ -487,7 +455,7 @@ void SAL_CALL SvxUnoGluePointAccess::replaceByIndex( sal_Int32 Index, const uno: throw lang::IllegalArgumentException(); Index -= 4; - if( mpObject && Index >= 0 ) + if( mpObject.is() && Index >= 0 ) { SdrGluePointList* pList = const_cast< SdrGluePointList* >( mpObject->GetGluePointList() ); if( pList && Index < pList->GetCount() ) @@ -509,7 +477,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::getCount() throw(uno::RuntimeException) { sal_Int32 nCount = 0; - if( mpObject ) + if( mpObject.is() ) { // each node has a default of 4 glue points // and any number of user defined glue points @@ -529,7 +497,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::getCount() uno::Any SAL_CALL SvxUnoGluePointAccess::getByIndex( sal_Int32 Index ) throw(lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException) { - if( Index >= 0 && mpObject && mpObject->IsNode() ) + if( Index >= 0 && mpObject.is() && mpObject->IsNode() ) { struct drawing::GluePoint2 aGluePoint; @@ -571,7 +539,7 @@ uno::Type SAL_CALL SvxUnoGluePointAccess::getElementType() sal_Bool SAL_CALL SvxUnoGluePointAccess::hasElements() throw( uno::RuntimeException) { - return mpObject && mpObject->IsNode(); + return mpObject.is() && mpObject->IsNode(); } /** diff --git a/svx/source/unodraw/makefile.mk b/svx/source/unodraw/makefile.mk index 9b71d644f39d..4b8ecb093df4 100644 --- a/svx/source/unodraw/makefile.mk +++ b/svx/source/unodraw/makefile.mk @@ -33,6 +33,7 @@ PRJ=..$/.. PRJNAME=svx TARGET=unodraw +LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- @@ -42,21 +43,18 @@ ENABLE_EXCEPTIONS=TRUE # --- Files -------------------------------------------------------- -SLOFILES = \ - $(SLO)$/UnoNamespaceMap.obj \ +LIB1TARGET= $(SLB)$/$(TARGET)-core.lib +LIB1OBJFILES= \ $(SLO)$/UnoGraphicExporter.obj \ - $(SLO)$/unopool.obj \ $(SLO)$/XPropertyTable.obj \ $(SLO)$/UnoNameItemTable.obj \ $(SLO)$/unoshape.obj \ $(SLO)$/unoipset.obj \ - $(SLO)$/unoctabl.obj \ $(SLO)$/unoshap2.obj \ $(SLO)$/unoshap3.obj \ $(SLO)$/unoshap4.obj \ $(SLO)$/unopage.obj \ $(SLO)$/unoshtxt.obj \ - $(SLO)$/unoshcol.obj \ $(SLO)$/unoprov.obj \ $(SLO)$/unomod.obj \ $(SLO)$/unonrule.obj \ @@ -69,10 +67,19 @@ SLOFILES = \ $(SLO)$/unomtabl.obj \ $(SLO)$/unodtabl.obj \ $(SLO)$/gluepts.obj \ - $(SLO)$/recoveryui.obj \ $(SLO)$/tableshape.obj \ $(SLO)$/shapepropertynotifier.obj +LIB2TARGET= $(SLB)$/$(TARGET).lib +LIB2OBJFILES= \ + $(SLO)$/UnoNamespaceMap.obj \ + $(SLO)$/unopool.obj \ + $(SLO)$/unoctabl.obj \ + $(SLO)$/unoshcol.obj \ + $(SLO)$/recoveryui.obj + +SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) + SRS1NAME=unodraw SRC1FILES = \ unodraw.src diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index fdac6b7a9c1a..7f7aedf860e9 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -215,9 +215,14 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createTextField( { uno::Reference< uno::XInterface > xRet; - const OUString aTextFieldPrexit( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.") ); + const OUString aTextFieldPrexit( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.textfield.") ); - if( ServiceSpecifier.compareTo( aTextFieldPrexit, aTextFieldPrexit.getLength() ) == 0 ) + // #i93308# up to OOo 3.2 we used this wrong namespace name with the capital T & F. This is + // fixed since OOo 3.2 but for compatibility we will still provide support for the wrong notation. + const OUString aTextFieldPrexit2( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.") ); + + if( (ServiceSpecifier.compareTo( aTextFieldPrexit, aTextFieldPrexit.getLength() ) == 0) || + (ServiceSpecifier.compareTo( aTextFieldPrexit2, aTextFieldPrexit2.getLength() ) == 0) ) { OUString aFieldType( ServiceSpecifier.copy( aTextFieldPrexit.getLength() ) ); diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 9b68e94239c5..d6d0913c4070 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -65,6 +65,7 @@ #include "shapeimpl.hxx" #include "svx/unoshprp.hxx" #include <svx/svdoashp.hxx> +#include "unopolyhelper.hxx" // #i29181# #include "svdviter.hxx" @@ -1833,7 +1834,7 @@ bool SvxGraphicObject::getPropertyValueImpl( const ::rtl::OUString& rName, const } else { - const GraphicObject& rGrafObj = static_cast< SdrGrafObj*>( mpObj.get() )->GetGraphicObject(); + const GraphicObject& rGrafObj = static_cast< SdrGrafObj*>( mpObj.get() )->GetGraphicObject(true); OUString aURL( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX)); aURL += OUString::createFromAscii( rGrafObj.GetUniqueID().GetBuffer() ); rValue <<= aURL; diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index dc24ad21ddca..f7826c546d60 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -760,7 +760,10 @@ Svx3DLatheObject::~Svx3DLatheObject() throw() { } -static bool PolyPolygonShape3D_to_B3dPolyPolygon( const Any& rValue, basegfx::B3DPolyPolygon& rResultPolygon ) +bool PolyPolygonShape3D_to_B3dPolyPolygon( + const Any& rValue, + basegfx::B3DPolyPolygon& rResultPolygon, + bool bCorrectPolygon) { drawing::PolyPolygonShape3D aSourcePolyPolygon; if( !(rValue >>= aSourcePolyPolygon) ) @@ -791,7 +794,14 @@ static bool PolyPolygonShape3D_to_B3dPolyPolygon( const Any& rValue, basegfx::B3 pInnerSequenceX++; pInnerSequenceY++; pInnerSequenceZ++; - basegfx::tools::checkClosed(aNewPolygon); + + // #i101520# correction is needed for imported polygons of old format, + // see callers + if(bCorrectPolygon) + { + basegfx::tools::checkClosed(aNewPolygon); + } + rResultPolygon.append(aNewPolygon); } return true; @@ -855,7 +865,9 @@ bool Svx3DLatheObject::setPropertyValueImpl( const ::rtl::OUString& rName, const { // Polygondefinition in das Objekt packen basegfx::B3DPolyPolygon aNewB3DPolyPolygon; - if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon ) ) + + // #i101520# Probably imported + if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, true ) ) { // #105127# SetPolyPoly3D sets the Svx3DVerticalSegmentsItem to the number // of points of the polygon. Thus, value gets lost. To avoid this, rescue @@ -973,7 +985,9 @@ bool Svx3DExtrudeObject::setPropertyValueImpl( const ::rtl::OUString& rName, con { // Polygondefinition in das Objekt packen basegfx::B3DPolyPolygon aNewB3DPolyPolygon; - if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon ) ) + + // #i101520# Probably imported + if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, true ) ) { // Polygon setzen const basegfx::B3DHomMatrix aIdentity; @@ -1082,7 +1096,9 @@ bool Svx3DPolygonObject::setPropertyValueImpl( const ::rtl::OUString& rName, con { // Polygondefinition in das Objekt packen basegfx::B3DPolyPolygon aNewB3DPolyPolygon; - if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon ) ) + + // #i101520# Direct API data (e.g. from chart) + if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, false ) ) { // Polygon setzen static_cast<E3dPolygonObj*>(mpObj.get())->SetPolyPolygon3D(aNewB3DPolyPolygon); @@ -1094,7 +1110,9 @@ bool Svx3DPolygonObject::setPropertyValueImpl( const ::rtl::OUString& rName, con { // Normalendefinition in das Objekt packen basegfx::B3DPolyPolygon aNewB3DPolyPolygon; - if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon ) ) + + // #i101520# Direct API data (e.g. from chart) + if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, false ) ) { // Polygon setzen static_cast<E3dPolygonObj*>(mpObj.get())->SetPolyNormals3D(aNewB3DPolyPolygon); @@ -1106,7 +1124,9 @@ bool Svx3DPolygonObject::setPropertyValueImpl( const ::rtl::OUString& rName, con { // Texturdefinition in das Objekt packen basegfx::B3DPolyPolygon aNewB3DPolyPolygon; - if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon ) ) + + // #i101520# Direct API data (e.g. from chart) + if( PolyPolygonShape3D_to_B3dPolyPolygon( rValue, aNewB3DPolyPolygon, false ) ) { // Polygon setzen const basegfx::B3DHomMatrix aIdentity; diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 08e83fc889fb..81439effcfc1 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -620,25 +620,29 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder() mpTextForwarder->flushCache(); OutlinerParaObject* pOutlinerParaObject = NULL; - bool bTextEditActive = false; SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject ); if( pTextObj && pTextObj->getActiveText() == mpText ) pOutlinerParaObject = pTextObj->GetEditOutlinerParaObject(); // Get the OutlinerParaObject if text edit is active + bool bOwnParaObj(false); if( pOutlinerParaObject ) - bTextEditActive = true; // text edit active + bOwnParaObj = true; // text edit active else pOutlinerParaObject = mpText->GetOutlinerParaObject(); - if( pOutlinerParaObject && ( bTextEditActive || !mpObject->IsEmptyPresObj() || mpObject->GetPage()->IsMasterPage() ) ) + if( pOutlinerParaObject && ( bOwnParaObj || !mpObject->IsEmptyPresObj() || mpObject->GetPage()->IsMasterPage() ) ) { mpOutliner->SetText( *pOutlinerParaObject ); // #91254# put text to object and set EmptyPresObj to FALSE - if( mpText && bTextEditActive && pOutlinerParaObject && mpObject->IsEmptyPresObj() && pTextObj->IsRealyEdited() ) + if( mpText && bOwnParaObj && pOutlinerParaObject && mpObject->IsEmptyPresObj() && pTextObj->IsRealyEdited() ) { mpObject->SetEmptyPresObj( FALSE ); static_cast< SdrTextObj* >( mpObject)->NbcSetOutlinerParaObjectForText( pOutlinerParaObject, mpText ); + + // #i103982# Here, due to mpObject->NbcSetOutlinerParaObjectForText, we LOSE ownership of the + // OPO, so do NOT delete it when leaving this method (!) + bOwnParaObj = false; } } else @@ -676,7 +680,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder() mbDataValid = TRUE; - if( bTextEditActive ) + if( bOwnParaObj ) delete pOutlinerParaObject; } diff --git a/svx/source/unoedit/makefile.mk b/svx/source/unoedit/makefile.mk index e808dbe02799..802ded5aa7c1 100644 --- a/svx/source/unoedit/makefile.mk +++ b/svx/source/unoedit/makefile.mk @@ -33,6 +33,7 @@ PRJ=..$/.. PRJNAME=svx TARGET=unoedit +LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- @@ -42,13 +43,10 @@ ENABLE_EXCEPTIONS=TRUE # --- Files -------------------------------------------------------- -SLOFILES = \ - $(SLO)$/UnoForbiddenCharsTable.obj \ +LIB1TARGET= $(SLB)$/$(TARGET)-core.lib +LIB1OBJFILES= \ $(SLO)$/unoedsrc.obj \ $(SLO)$/unoedhlp.obj \ - $(SLO)$/unopracc.obj \ - $(SLO)$/unoedprx.obj \ - $(SLO)$/unoviwed.obj \ $(SLO)$/unoviwou.obj \ $(SLO)$/unofored.obj \ $(SLO)$/unoforou.obj \ @@ -56,6 +54,15 @@ SLOFILES = \ $(SLO)$/unotext2.obj \ $(SLO)$/unofield.obj +LIB2TARGET= $(SLB)$/$(TARGET).lib +LIB2OBJFILES= \ + $(SLO)$/UnoForbiddenCharsTable.obj \ + $(SLO)$/unopracc.obj \ + $(SLO)$/unoedprx.obj \ + $(SLO)$/unoviwed.obj + +SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) + # --- Tagets ------------------------------------------------------- .INCLUDE : target.mk diff --git a/svx/source/unoedit/unoedprx.cxx b/svx/source/unoedit/unoedprx.cxx index 7c31f8b14ffc..e7bbcea519b8 100644 --- a/svx/source/unoedit/unoedprx.cxx +++ b/svx/source/unoedit/unoedprx.cxx @@ -1044,6 +1044,16 @@ USHORT SvxAccessibleTextAdapter::GetLineLen( USHORT nPara, USHORT nLine ) const return static_cast< USHORT >(aEndIndex.GetIndex()); } +void SvxAccessibleTextAdapter::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nParagraph, USHORT nLine ) const +{ + mrTextForwarder->GetLineBoundaries( rStart, rEnd, nParagraph, nLine ); +} + +USHORT SvxAccessibleTextAdapter::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +{ + return mrTextForwarder->GetLineNumberAtIndex( nPara, nIndex ); +} + sal_Bool SvxAccessibleTextAdapter::Delete( const ESelection& rSel ) { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); diff --git a/svx/source/unoedit/unofored.cxx b/svx/source/unoedit/unofored.cxx index 685e5973b39f..c06c37ae2070 100644 --- a/svx/source/unoedit/unofored.cxx +++ b/svx/source/unoedit/unofored.cxx @@ -471,6 +471,17 @@ USHORT SvxEditEngineForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const return rEditEngine.GetLineLen(nPara, nLine); } +void SvxEditEngineForwarder::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const +{ + rEditEngine.GetLineBoundaries(rStart, rEnd, nPara, nLine); +} + +USHORT SvxEditEngineForwarder::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +{ + return rEditEngine.GetLineNumberAtIndex(nPara, nIndex); +} + + sal_Bool SvxEditEngineForwarder::QuickFormatDoc( BOOL ) { rEditEngine.QuickFormatDoc(); diff --git a/svx/source/unoedit/unoforou.cxx b/svx/source/unoedit/unoforou.cxx index c46551d52d4f..9c6cb07440d7 100644 --- a/svx/source/unoedit/unoforou.cxx +++ b/svx/source/unoedit/unoforou.cxx @@ -430,6 +430,16 @@ USHORT SvxOutlinerForwarder::GetLineLen( USHORT nPara, USHORT nLine ) const return rOutliner.GetLineLen(nPara, nLine); } +void SvxOutlinerForwarder::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT nPara, USHORT nLine ) const +{ + return rOutliner.GetEditEngine().GetLineBoundaries( rStart, rEnd, nPara, nLine ); +} + +USHORT SvxOutlinerForwarder::GetLineNumberAtIndex( USHORT nPara, USHORT nIndex ) const +{ + return rOutliner.GetEditEngine().GetLineNumberAtIndex( nPara, nIndex ); +} + sal_Bool SvxOutlinerForwarder::QuickFormatDoc( BOOL ) { rOutliner.QuickFormatDoc(); diff --git a/svx/source/unoedit/unotext.cxx b/svx/source/unoedit/unotext.cxx index 4a550fb8537d..a46533657f1c 100644 --- a/svx/source/unoedit/unotext.cxx +++ b/svx/source/unoedit/unotext.cxx @@ -2647,6 +2647,16 @@ USHORT SvxDummyTextSource::GetLineLen( USHORT, USHORT ) const return 0; } +void SvxDummyTextSource::GetLineBoundaries( /*out*/USHORT &rStart, /*out*/USHORT &rEnd, USHORT /*nParagraph*/, USHORT /*nLine*/ ) const +{ + rStart = rEnd = 0; +} + +USHORT SvxDummyTextSource::GetLineNumberAtIndex( USHORT /*nPara*/, USHORT /*nIndex*/ ) const +{ + return 0; +} + sal_Bool SvxDummyTextSource::QuickFormatDoc( BOOL ) { return sal_False; diff --git a/svx/source/unoedit/unoviwou.cxx b/svx/source/unoedit/unoviwou.cxx index aff102a09900..3826a4d6a330 100644 --- a/svx/source/unoedit/unoviwou.cxx +++ b/svx/source/unoedit/unoviwou.cxx @@ -35,6 +35,7 @@ #include <svx/unoviwou.hxx> #include <svx/outliner.hxx> +#include <svx/editeng.hxx> #include <svx/svdotext.hxx> diff --git a/svx/source/unogallery/makefile.mk b/svx/source/unogallery/makefile.mk index a63b79bb6f67..a699208f4f01 100755 --- a/svx/source/unogallery/makefile.mk +++ b/svx/source/unogallery/makefile.mk @@ -38,14 +38,10 @@ ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- .INCLUDE : settings.mk +.INCLUDE : $(PRJ)$/util$/makefile.pmk # --- Files -------------------------------------------------------- -CXXFILES= \ - unogalthemeprovider.cxx \ - unogaltheme.cxx \ - unogalitem.cxx - SLOFILES= \ $(SLO)$/unogalthemeprovider.obj \ $(SLO)$/unogaltheme.obj \ diff --git a/svx/source/unogallery/unogalthemeprovider.cxx b/svx/source/unogallery/unogalthemeprovider.cxx index ebeeffe742b8..126f49fe0b50 100644 --- a/svx/source/unogallery/unogalthemeprovider.cxx +++ b/svx/source/unogallery/unogalthemeprovider.cxx @@ -92,7 +92,7 @@ GalleryThemeProvider::~GalleryThemeProvider() // ------------------------------------------------------------------------------ -::rtl::OUString GalleryThemeProvider::getImplementationName_Static() +SVX_DLLPUBLIC ::rtl::OUString GalleryThemeProvider::getImplementationName_Static() throw() { return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.gallery.GalleryThemeProvider" ) ); @@ -100,7 +100,7 @@ GalleryThemeProvider::~GalleryThemeProvider() // ------------------------------------------------------------------------------ -uno::Sequence< ::rtl::OUString > GalleryThemeProvider::getSupportedServiceNames_Static() +SVX_DLLPUBLIC uno::Sequence< ::rtl::OUString > GalleryThemeProvider::getSupportedServiceNames_Static() throw() { uno::Sequence< ::rtl::OUString > aSeq( 1 ); diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 4cc56d5ca427..7ab6a44fd3fb 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -670,17 +670,16 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt // ----------------------------------------------------------------------------- -void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos ) +void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos, rtl::OUString& rRequestedFileName ) { + rtl::OUString aURLString( rURLStr ); ::rtl::OUString aPictureStorageName, aPictureStreamName; - - if( ( maURLSet.find( rURLStr ) != maURLSet.end() ) ) + if( ( maURLSet.find( aURLString ) != maURLSet.end() ) ) { URLPairVector::iterator aIter( maGrfURLs.begin() ), aEnd( maGrfURLs.end() ); - while( aIter != aEnd ) { - if( rURLStr == (*aIter).first ) + if( aURLString == (*aIter).first ) { maGrfURLs[ nInsertPos ].second = (*aIter).second; aIter = aEnd; @@ -689,7 +688,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s aIter++; } } - else if( ImplGetStreamNames( rURLStr, aPictureStorageName, aPictureStreamName ) ) + else if( ImplGetStreamNames( aURLString, aPictureStorageName, aPictureStreamName ) ) { URLPair& rURLPair = maGrfURLs[ nInsertPos ]; @@ -718,22 +717,23 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s String aStreamName( aGraphicObjectId ); Graphic aGraphic( (Graphic&) aGrfObject.GetGraphic() ); const GfxLink aGfxLink( aGraphic.GetLink() ); + String aExtension; if( aGfxLink.GetDataSize() ) { switch( aGfxLink.GetType() ) { - case( GFX_LINK_TYPE_EPS_BUFFER ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) ); break; - case( GFX_LINK_TYPE_NATIVE_GIF ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) ); break; - case( GFX_LINK_TYPE_NATIVE_JPG ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".jpg" ) ); break; - case( GFX_LINK_TYPE_NATIVE_PNG ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ); break; - case( GFX_LINK_TYPE_NATIVE_TIF ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".tif" ) ); break; - case( GFX_LINK_TYPE_NATIVE_WMF ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".wmf" ) ); break; - case( GFX_LINK_TYPE_NATIVE_MET ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".met" ) ); break; - case( GFX_LINK_TYPE_NATIVE_PCT ): aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".pct" ) ); break; + case( GFX_LINK_TYPE_EPS_BUFFER ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) ); break; + case( GFX_LINK_TYPE_NATIVE_GIF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) ); break; + case( GFX_LINK_TYPE_NATIVE_JPG ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".jpg" ) ); break; + case( GFX_LINK_TYPE_NATIVE_PNG ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ); break; + case( GFX_LINK_TYPE_NATIVE_TIF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".tif" ) ); break; + case( GFX_LINK_TYPE_NATIVE_WMF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".wmf" ) ); break; + case( GFX_LINK_TYPE_NATIVE_MET ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".met" ) ); break; + case( GFX_LINK_TYPE_NATIVE_PCT ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".pct" ) ); break; default: - aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".grf" ) ); + aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".grf" ) ); break; } } @@ -742,30 +742,52 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s if( aGrfObject.GetType() == GRAPHIC_BITMAP ) { if( aGrfObject.IsAnimated() ) - aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) ); + aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".gif" ) ); else - aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ); + aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".png" ) ); } else if( aGrfObject.GetType() == GRAPHIC_GDIMETAFILE ) { // SJ: first check if this metafile is just a eps file, then we will store the eps instead of svm GDIMetaFile& rMtf( (GDIMetaFile&)aGraphic.GetGDIMetaFile() ); if ( ImplCheckForEPS( rMtf ) ) - aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) ); + aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".eps" ) ); else - aStreamName += String( RTL_CONSTASCII_USTRINGPARAM( ".svm" ) ); + aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".svm" ) ); } } + rtl::OUString aURLEntry; + const String sPictures( RTL_CONSTASCII_USTRINGPARAM( "Pictures/" ) ); + + if ( rRequestedFileName.getLength() ) + { + aURLEntry = sPictures; + aURLEntry += rRequestedFileName; + aURLEntry += aExtension; + + URLPairVector::iterator aIter( maGrfURLs.begin() ), aEnd( maGrfURLs.end() ); + while( aIter != aEnd ) + { + if( aURLEntry == (*aIter).second ) + break; + aIter++; + } + if ( aIter == aEnd ) + aStreamName = rRequestedFileName; + } + + aStreamName += aExtension; + if( mbDirect && aStreamName.Len() ) ImplWriteGraphic( aPictureStorageName, aStreamName, aGraphicObjectId ); - rURLPair.second = String( RTL_CONSTASCII_USTRINGPARAM( "Pictures/" ) ); + rURLPair.second = sPictures; rURLPair.second += aStreamName; } } - maURLSet.insert( rURLStr ); + maURLSet.insert( aURLString ); } } @@ -820,14 +842,45 @@ void SvXMLGraphicHelper::Destroy( SvXMLGraphicHelper* pSvXMLGraphicHelper ) // ----------------------------------------------------------------------------- // XGraphicObjectResolver -::rtl::OUString SAL_CALL SvXMLGraphicHelper::resolveGraphicObjectURL( const ::rtl::OUString& aURL ) +::rtl::OUString SAL_CALL SvXMLGraphicHelper::resolveGraphicObjectURL( const ::rtl::OUString& rURL ) throw(uno::RuntimeException) { ::osl::MutexGuard aGuard( maMutex ); const sal_Int32 nIndex = maGrfURLs.size(); + rtl::OUString aURL( rURL ); + rtl::OUString aUserData; + rtl::OUString aRequestedFileName; + + sal_Int32 nUser = rURL.indexOf( '?', 0 ); + if ( nUser >= 0 ) + { + aURL = rtl::OUString( rURL.copy( 0, nUser ) ); + nUser++; + aUserData = rURL.copy( nUser, rURL.getLength() - nUser ); + } + if ( aUserData.getLength() ) + { + sal_Int32 nIndex2 = 0; + do + { + rtl::OUString aToken = aUserData.getToken( 0, ';', nIndex2 ); + sal_Int32 n = aToken.indexOf( '=' ); + if ( ( n > 0 ) && ( ( n + 1 ) < aToken.getLength() ) ) + { + rtl::OUString aParam( aToken.copy( 0, n ) ); + rtl::OUString aValue( aToken.copy( n + 1, aToken.getLength() - ( n + 1 ) ) ); + + const rtl::OUString sRequestedName( RTL_CONSTASCII_USTRINGPARAM("requestedName") ); + if ( aParam.match( sRequestedName ) ) + aRequestedFileName = aValue; + } + } + while ( nIndex2 >= 0 ); + } + maGrfURLs.push_back( ::std::make_pair( aURL, ::rtl::OUString() ) ); - ImplInsertGraphicURL( aURL, nIndex ); + ImplInsertGraphicURL( aURL, nIndex, aRequestedFileName ); return maGrfURLs[ nIndex ].second; } diff --git a/svx/util/makefile.mk b/svx/util/makefile.mk index f212284fa401..898629299e65 100644 --- a/svx/util/makefile.mk +++ b/svx/util/makefile.mk @@ -52,11 +52,6 @@ RSCLOCINC+=-I$(PRJ)$/source$/svdraw LIB1TARGET= $(SLB)$/$(TARGET).lib LIB1FILES=\ - $(SLB)$/animation.lib \ - $(SLB)$/overlay.lib \ - $(SLB)$/attribute.lib \ - $(SLB)$/primitive2d.lib \ - $(SLB)$/primitive3d.lib \ $(SLB)$/svdraw.lib \ $(SLB)$/form.lib @@ -67,10 +62,6 @@ LIB1FILES+=$(SLB)$/ibrwimp.lib LIB2TARGET= $(SLB)$/$(TARGET)_2.lib LIB2FILES=\ $(SLB)$/items.lib \ - $(SLB)$/svxlink.lib \ - $(SLB)$/svxrtf.lib \ - $(SLB)$/editeng.lib \ - $(SLB)$/outliner.lib \ $(SLB)$/dialogs.lib \ $(SLB)$/mnuctrls.lib \ $(SLB)$/options.lib \ @@ -83,40 +74,112 @@ LIB3TARGET= $(SLB)$/$(TARGET)_3.lib LIB3FILES=\ $(SLB)$/unodraw.lib \ $(SLB)$/unogallery.lib\ - $(SLB)$/gal.lib \ $(SLB)$/accessibility.lib \ - $(SLB)$/customshapes.lib\ - $(SLB)$/toolbars.lib \ - $(SLB)$/properties.lib \ - $(SLB)$/contact.lib \ - $(SLB)$/event.lib + $(SLB)$/customshapes.lib LIB4TARGET= $(SLB)$/$(TARGET)_4.lib LIB4FILES=\ $(SLB)$/fmcomp.lib \ $(SLB)$/engine3d.lib \ - $(SLB)$/msfilter.lib \ - $(SLB)$/xout.lib \ - $(SLB)$/xml.lib \ $(SLB)$/table.lib +# Objects needed for the svxcore library. +LIB5TARGET= $(SLB)$/$(TARGET)_5.lib +LIB5FILES=\ + $(SLB)$/accessibility-core.lib \ + $(SLB)$/animation.lib \ + $(SLB)$/attribute.lib \ + $(SLB)$/contact.lib \ + $(SLB)$/customshapes-core.lib \ + $(SLB)$/dialogs-core.lib \ + $(SLB)$/editeng.lib \ + $(SLB)$/engine3d-core.lib \ + $(SLB)$/event.lib \ + $(SLB)$/fmcomp-core.lib \ + $(SLB)$/form-core.lib \ + $(SLB)$/gal.lib \ + $(SLB)$/items-core.lib \ + $(SLB)$/msfilter-core.lib \ + $(SLB)$/options-core.lib + +LIB6TARGET= $(SLB)$/$(TARGET)_6.lib +LIB6FILES=\ + $(SLB)$/outliner.lib \ + $(SLB)$/overlay.lib \ + $(SLB)$/primitive2d.lib \ + $(SLB)$/primitive3d.lib \ + $(SLB)$/properties.lib \ + $(SLB)$/svdraw-core.lib \ + $(SLB)$/svxlink.lib \ + $(SLB)$/svxrtf-core.lib \ + $(SLB)$/table-core.lib \ + $(SLB)$/tbxctrls-core.lib \ + $(SLB)$/toolbars.lib \ + $(SLB)$/unodraw-core.lib \ + $(SLB)$/unoedit-core.lib \ + $(SLB)$/xml.lib \ + $(SLB)$/xout.lib + +# Objects needed for the svxmsfilter library. +LIB7TARGET= $(SLB)$/$(TARGET)_7.lib +LIB7FILES=\ + $(SLB)$/msfilter-msfilter.lib \ + $(SLB)$/svdraw-msfilter.lib \ + $(SLB)$/svxrtf.lib + HELPIDFILES= ..$/inc$/helpid.hrc -# svx -SHL1TARGET= svx$(DLLPOSTFIX) -SHL1IMPLIB= i$(TARGET) +# svxcore +SHL1TARGET= svxcore$(DLLPOSTFIX) +SHL1IMPLIB= isvxcore SHL1USE_EXPORTS=name +SHL1LIBS= $(LIB5TARGET) $(LIB6TARGET) -SHL1LIBS= $(LIB1TARGET) $(LIB2TARGET) $(LIB3TARGET) $(LIB4TARGET) SHL1STDLIBS= \ - $(AVMEDIALIB) \ + $(AVMEDIALIB) \ + $(SFX2LIB) \ + $(XMLOFFLIB) \ + $(GOODIESLIB) \ + $(BASEGFXLIB) \ + $(DRAWINGLAYERLIB) \ + $(LNGLIB) \ + $(BASICLIB) \ + $(SVTOOLLIB) \ + $(TKLIB) \ + $(VCLLIB) \ + $(SVLLIB) \ + $(SOTLIB) \ + $(UNOTOOLSLIB) \ + $(TOOLSLIB) \ + $(I18NISOLANGLIB) \ + $(I18NPAPERLIB) \ + $(COMPHELPERLIB) \ + $(UCBHELPERLIB) \ + $(CPPUHELPERLIB) \ + $(CPPULIB) \ + $(VOSLIB) \ + $(SALLIB) \ + $(ICUUCLIB) + +SHL1DEF= $(MISC)$/$(SHL1TARGET).def +DEF1NAME= $(SHL1TARGET) +DEFLIB1NAME=$(TARGET)_5 + +# svx +SHL2TARGET= svx$(DLLPOSTFIX) +SHL2IMPLIB= i$(TARGET) +SHL2USE_EXPORTS=name +SHL2DEPN=$(SHL1TARGETN) + +SHL2LIBS= $(LIB1TARGET) $(LIB2TARGET) $(LIB3TARGET) $(LIB4TARGET) +SHL2STDLIBS= \ + $(SVXCORELIB) \ $(SFX2LIB) \ $(XMLOFFLIB) \ $(GOODIESLIB) \ $(BASEGFXLIB) \ $(DRAWINGLAYERLIB) \ $(BASICLIB) \ - $(LNGLIB) \ $(SVTOOLLIB) \ $(TKLIB) \ $(VCLLIB) \ @@ -125,7 +188,6 @@ SHL1STDLIBS= \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ $(I18NISOLANGLIB) \ - $(I18NPAPERLIB) \ $(XMLSCRIPTLIB) \ $(COMPHELPERLIB) \ $(UCBHELPERLIB) \ @@ -136,25 +198,26 @@ SHL1STDLIBS= \ $(ICUUCLIB) .IF "$(GUI)"=="WNT" -SHL1STDLIBS+=$(SHELLLIB) +SHL2STDLIBS+=$(SHELLLIB) .ENDIF # WNT -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -DEF1NAME= $(SHL1TARGET) -DEFLIB1NAME=$(TARGET) $(TARGET)_2 $(TARGET)_3 $(TARGET)_4 +SHL2DEF= $(MISC)$/$(SHL2TARGET).def +DEF2NAME= $(SHL2TARGET) +DEFLIB2NAME=$(TARGET) $(TARGET)_2 $(TARGET)_3 $(TARGET)_4 # cui -SHL2TARGET= cui$(DLLPOSTFIX) -SHL2VERSIONMAP= cui.map -SHL2IMPLIB=icui -SHL2DEPN=$(SHL1TARGETN) +SHL3TARGET= cui$(DLLPOSTFIX) +SHL3VERSIONMAP= cui.map +SHL3IMPLIB=icui +SHL3DEPN=$(SHL2TARGETN) -SHL2DEF= $(MISC)$/$(SHL2TARGET).def -DEF2NAME= $(SHL2TARGET) +SHL3DEF= $(MISC)$/$(SHL3TARGET).def +DEF3NAME= $(SHL3TARGET) -SHL2LIBS= $(SLB)$/cui.lib +SHL3LIBS= $(SLB)$/cui.lib -SHL2STDLIBS= \ +SHL3STDLIBS= \ + $(SVXCORELIB) \ $(SVXLIB) \ $(AVMEDIALIB) \ $(SFX2LIB) \ @@ -175,18 +238,50 @@ SHL2STDLIBS= \ $(CPPULIB) \ $(VOSLIB) \ $(SALLIB) \ - $(JVMFWKLIB) + $(JVMFWKLIB) \ + $(ICUUCLIB) .IF "$(debug)$(dbgutil)"!="" SHL2STDLIBS += $(CPPUHELPERLIB) .ENDIF # "$(debug)$(dbgutil)"!="" .IF "$(GUI)"=="WNT" -SHL2STDLIBS+= \ +SHL3STDLIBS+= \ $(SHLWAPILIB) \ $(ADVAPI32LIB) .ENDIF # WNT +# svxmsfilter library +SHL4TARGET= svxmsfilter$(DLLPOSTFIX) +SHL4IMPLIB= isvxmsfilter +SHL4USE_EXPORTS=name +SHL4DEPN=$(SHL1TARGETN) +SHL4LIBS= $(LIB7TARGET) + +SHL4STDLIBS= \ + $(SVXCORELIB) \ + $(SFX2LIB) \ + $(XMLOFFLIB) \ + $(GOODIESLIB) \ + $(BASEGFXLIB) \ + $(BASICLIB) \ + $(SVTOOLLIB) \ + $(TKLIB) \ + $(VCLLIB) \ + $(SVLLIB) \ + $(SOTLIB) \ + $(UNOTOOLSLIB) \ + $(TOOLSLIB) \ + $(XMLSCRIPTLIB) \ + $(COMPHELPERLIB) \ + $(CPPUHELPERLIB) \ + $(CPPULIB) \ + $(SALLIB) + +SHL4DEF= $(MISC)$/$(SHL4TARGET).def +DEF4NAME= $(SHL4TARGET) +DEFLIB4NAME=$(TARGET)_6 + # ------------------------------------------------------------------------------ # Resource files diff --git a/svx/util/makefile.pmk b/svx/util/makefile.pmk index 27f185e936bd..b2aae3329111 100644 --- a/svx/util/makefile.pmk +++ b/svx/util/makefile.pmk @@ -36,4 +36,12 @@ CDEFS += -DSVX_DLLIMPLEMENTATION CFLAGS+=-DENABLE_GTK .ENDIF +.IF "$(ENABLE_KDE)" != "" +CFLAGS+=-DENABLE_KDE +.ENDIF + +.IF "$(ENABLE_KDE4)" != "" +CFLAGS+=-DENABLE_KDE4 +.ENDIF + VISIBILITY_HIDDEN=TRUE |