summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/fmhelp.hrc165
-rw-r--r--svx/inc/galobj.hxx6
-rw-r--r--svx/inc/svx/fmmodel.hxx10
-rw-r--r--svx/inc/svx/msdffimp.hxx1
-rw-r--r--svx/inc/svx/msvbahelper.hxx58
-rw-r--r--svx/inc/svx/numitem.hxx30
-rw-r--r--svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx53
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx13
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx3
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx25
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx7
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx9
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx5
-rw-r--r--svx/inc/svx/selectioncontroller.hxx11
-rw-r--r--svx/inc/svx/svddrgmt.hxx20
-rw-r--r--svx/inc/svx/svdedxv.hxx17
-rw-r--r--svx/inc/svx/svdfppt.hxx2
-rw-r--r--svx/inc/svx/svdoashp.hxx2
-rw-r--r--svx/inc/svx/svxids.hrc4
-rw-r--r--svx/prj/build.lst2
-rw-r--r--svx/prj/d.lst1
-rw-r--r--svx/sdi/svx.sdi2
-rw-r--r--svx/source/cui/SpellDialog.cxx6
-rw-r--r--svx/source/cui/align.cxx2
-rw-r--r--svx/source/cui/border.cxx8
-rw-r--r--svx/source/cui/cfg.cxx11
-rw-r--r--svx/source/cui/cuicharmap.cxx5
-rw-r--r--svx/source/cui/labdlg.cxx2
-rw-r--r--svx/source/cui/macropg.cxx4
-rw-r--r--svx/source/cui/numpages.cxx41
-rw-r--r--svx/source/cui/optaccessibility.cxx2
-rw-r--r--svx/source/cui/optcolor.cxx2
-rw-r--r--svx/source/cui/optimprove2.cxx8
-rw-r--r--svx/source/cui/optsave.cxx2
-rw-r--r--svx/source/cui/readonlyimage.cxx2
-rw-r--r--svx/source/cui/tphatch.cxx4
-rw-r--r--svx/source/cui/tpline.cxx2
-rw-r--r--svx/source/cui/treeopt.cxx4
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx71
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx12
-rw-r--r--svx/source/dialog/_bmpmask.cxx2
-rw-r--r--svx/source/dialog/_contdlg.cxx2
-rw-r--r--svx/source/dialog/connctrl.cxx2
-rw-r--r--svx/source/dialog/dlgctrl.cxx6
-rw-r--r--svx/source/dialog/docrecovery.cxx4
-rw-r--r--svx/source/dialog/fontwork.cxx4
-rw-r--r--svx/source/dialog/frmsel.cxx2
-rw-r--r--svx/source/dialog/hyperdlg.cxx6
-rw-r--r--svx/source/dialog/hyprlink.cxx5
-rw-r--r--svx/source/dialog/imapdlg.cxx2
-rw-r--r--svx/source/dialog/langbox.cxx2
-rw-r--r--svx/source/dialog/measctrl.cxx4
-rw-r--r--svx/source/dialog/swframeexample.cxx2
-rw-r--r--svx/source/editeng/editdoc.cxx11
-rw-r--r--svx/source/engine3d/helperhittest3d.cxx183
-rw-r--r--svx/source/fmcomp/gridcell.cxx4
-rw-r--r--svx/source/fmcomp/gridctrl.cxx15
-rw-r--r--svx/source/form/datanavi.cxx6
-rw-r--r--svx/source/form/fmcontrollayout.cxx205
-rw-r--r--svx/source/form/fmmodel.cxx39
-rw-r--r--svx/source/form/fmobj.cxx86
-rw-r--r--svx/source/form/fmshimp.cxx4
-rw-r--r--svx/source/form/fmtextcontrolshell.cxx2
-rw-r--r--svx/source/form/formcontrolfactory.cxx107
-rw-r--r--svx/source/form/tbxform.cxx2
-rw-r--r--svx/source/gallery2/galbrws2.cxx2
-rw-r--r--svx/source/inc/fmcontrollayout.hxx16
-rw-r--r--svx/source/inc/fmobj.hxx8
-rw-r--r--svx/source/intro/intro_tmpl.hrc210
-rw-r--r--svx/source/items/numitem.cxx504
-rw-r--r--svx/source/msfilter/makefile.mk6
-rw-r--r--svx/source/msfilter/msdffimp.cxx95
-rw-r--r--svx/source/msfilter/msocximex.cxx2
-rw-r--r--svx/source/msfilter/msvbahelper.cxx384
-rw-r--r--svx/source/outliner/outliner.cxx27
-rw-r--r--svx/source/outliner/outlvw.cxx8
-rw-r--r--svx/source/sdr/contact/viewcontactofgraphic.cxx1
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx11
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrole2obj.cxx5
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrrectobj.cxx8
-rw-r--r--svx/source/sdr/contact/viewcontactofunocontrol.cxx40
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx256
-rw-r--r--svx/source/sdr/overlay/overlaymanager.cxx16
-rw-r--r--svx/source/sdr/overlay/overlaymanagerbuffered.cxx36
-rw-r--r--svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx1
-rw-r--r--svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx29
-rw-r--r--svx/source/sdr/primitive2d/sdrdecompositiontools.cxx6
-rw-r--r--svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx4
-rw-r--r--svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx29
-rw-r--r--svx/source/sdr/primitive2d/sdrole2primitive2d.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx7
-rw-r--r--svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx12
-rw-r--r--svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx12
-rw-r--r--svx/source/stbctrls/xmlsecctrl.cxx8
-rw-r--r--svx/source/stbctrls/zoomsliderctrl.cxx8
-rw-r--r--svx/source/svdraw/selectioncontroller.cxx11
-rw-r--r--svx/source/svdraw/svddrgmt.cxx50
-rw-r--r--svx/source/svdraw/svdedxv.cxx226
-rw-r--r--svx/source/svdraw/svdfppt.cxx23
-rw-r--r--svx/source/svdraw/svdhdl.cxx2
-rw-r--r--svx/source/svdraw/svdoashp.cxx6
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx55
-rw-r--r--svx/source/svdraw/svdpage.cxx8
-rw-r--r--svx/source/table/tablecontroller.cxx82
-rw-r--r--svx/source/table/tablecontroller.hxx4
-rw-r--r--svx/source/table/viewcontactoftableobj.cxx2
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx18
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx8
-rw-r--r--svx/source/tbxctrls/itemwin.cxx4
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx2
-rw-r--r--svx/source/tbxctrls/tbxcolorupdate.cxx6
-rw-r--r--svx/source/unodraw/unomod.cxx5
-rw-r--r--svx/source/unoedit/unofield.cxx30
-rw-r--r--svx/source/xml/xmltxtexp.cxx6
-rw-r--r--svx/util/hidother.src7
118 files changed, 2423 insertions, 1232 deletions
diff --git a/svx/inc/fmhelp.hrc b/svx/inc/fmhelp.hrc
index 0d00d17f39..b984e74c38 100644
--- a/svx/inc/fmhelp.hrc
+++ b/svx/inc/fmhelp.hrc
@@ -33,106 +33,75 @@
// include -----------------------------------------------------------
#include <svtools/solar.hrc>
-// in solar.hrc
-//#define HID_FORMS_START (HID_LIB_START+4000)
-//#define HID_FORMS_END (HID_LIB_START+4999)
-
// Help-Ids --------------------------------------------------------------
-// insgesamt 200
-#define HID_DLG_DBINFO (HID_FORMS_START + 0)
-#define HID_DLG_DBMSG (HID_FORMS_START + 1)
-
-#define HID_FM_OTHER_START (HID_FORMS_START + 300)
-#define HID_FORM_NAVIGATOR (HID_FM_OTHER_START + 0)
-#define HID_FORM_NAVIGATOR_WIN (HID_FM_OTHER_START + 1)
-#define HID_FIELD_SEL (HID_FM_OTHER_START + 2)
-#define HID_FIELD_SEL_WIN (HID_FM_OTHER_START + 3)
-#define HID_FILTER_NAVIGATOR (HID_FM_OTHER_START + 4)
-#define HID_FILTER_NAVIGATOR_WIN (HID_FM_OTHER_START + 5)
-
-#define HID_FORM_DLG_START (HID_FORMS_START + 400)
-// FREE
-// FREE
-// FREE
-#define HID_FM_PROPDLG_WINDOW (HID_FORM_DLG_START + 3)
-#define HID_FM_PROPDLG_CONTAINER (HID_FORM_DLG_START + 4)
-#define HID_FM_PROPDLG_TABCTR (HID_FORM_DLG_START + 5)
-#define HID_FM_PROPDLG_TAB_GENERAL (HID_FORM_DLG_START + 6)
-#define HID_FM_PROPDLG_TAB_DATA (HID_FORM_DLG_START + 7)
-#define HID_FM_PROPDLG_TAB_EVT (HID_FORM_DLG_START + 8)
-#define HID_FM_DLG_SEARCH (HID_FORM_DLG_START + 9)
-
-#define HID_SEARCH_TEXT (HID_FORM_DLG_START + 10)
-#define HID_SEARCH_ALLFIELDS (HID_FORM_DLG_START + 11)
-#define HID_SEARCH_SINGLEFIELD (HID_FORM_DLG_START + 12)
-#define HID_SEARCH_FIELDSELECTION (HID_FORM_DLG_START + 13)
-#define HID_SEARCH_POSITION (HID_FORM_DLG_START + 14)
-#define HID_SEARCH_FORMATTER (HID_FORM_DLG_START + 15)
-#define HID_SEARCH_CASE (HID_FORM_DLG_START + 16)
-#define HID_SEARCH_BACKWARD (HID_FORM_DLG_START + 17)
-#define HID_SEARCH_STARTOVER (HID_FORM_DLG_START + 18)
-#define HID_SEARCH_WILDCARD (HID_FORM_DLG_START + 19)
-#define HID_SEARCH_REGULAR (HID_FORM_DLG_START + 20)
-#define HID_SEARCH_APPROX (HID_FORM_DLG_START + 21)
-#define HID_SEARCH_APPROXSETTINGS (HID_FORM_DLG_START + 22)
-#define HID_SEARCH_BTN_SEARCH (HID_FORM_DLG_START + 23)
-#define HID_SEARCH_BTN_CLOSE (HID_FORM_DLG_START + 24)
-
-#define HID_TABORDER_CONTROLS (HID_FORM_DLG_START + 25)
-
-#define HID_CONTROLS_DATE_N_TIME (HID_FORM_DLG_START + 26)
-#define HID_FM_DLG_PARAM (HID_FORM_DLG_START + 27)
-
-#define HID_GRID_TRAVEL_FIRST (HID_FORM_DLG_START + 28)
-#define HID_GRID_TRAVEL_PREV (HID_FORM_DLG_START + 29)
-#define HID_GRID_TRAVEL_NEXT (HID_FORM_DLG_START + 30)
-#define HID_GRID_TRAVEL_LAST (HID_FORM_DLG_START + 31)
-#define HID_GRID_TRAVEL_NEW (HID_FORM_DLG_START + 32)
-#define HID_GRID_TRAVEL_ABSOLUTE (HID_FORM_DLG_START + 33)
-#define HID_GRID_NUMBEROFRECORDS (HID_FORM_DLG_START + 34)
-
-#define UID_SEARCH_RECORDSTATUS (HID_FORM_DLG_START + 35)
-
-#define UID_FORMPROPBROWSER_FRAME (HID_FORM_DLG_START + 37)
-#define UID_ABSOLUTE_RECORD_WINDOW (HID_FORM_DLG_START + 38)
-
-#define HID_DATA_NAVIGATOR_WIN (HID_FM_OTHER_START + 39)
-#define HID_XFORMS_ADDDATAITEM_DLG (HID_FM_OTHER_START + 40)
-#define HID_XFORMS_ADDCONDITION_DLG (HID_FM_OTHER_START + 41)
-#define HID_XFORMS_NAMESPACEITEM_DLG (HID_FM_OTHER_START + 42)
-#define HID_XFORMS_NAMESPACEITEM_LIST (HID_FM_OTHER_START + 43)
-#define HID_XFORMS_MANAGENAMESPACE_DLG (HID_FM_OTHER_START + 44)
-
-#define HID_TP_XFORMS_INSTANCE (HID_FM_OTHER_START + 45)
-#define HID_TP_XFORMS_SUBMISSION (HID_FM_OTHER_START + 46)
-#define HID_TP_XFORMS_BINDING (HID_FM_OTHER_START + 47)
-
-#define HID_MN_XFORMS_MODELS_ADD (HID_FM_OTHER_START + 48)
-#define HID_MN_XFORMS_MODELS_EDIT (HID_FM_OTHER_START + 49)
-#define HID_MN_XFORMS_MODELS_REMOVE (HID_FM_OTHER_START + 50)
-#define HID_MN_XFORMS_INSTANCES_ADD (HID_FM_OTHER_START + 51)
-#define HID_MN_XFORMS_INSTANCES_EDIT (HID_FM_OTHER_START + 52)
-#define HID_MN_XFORMS_INSTANCES_REMOVE (HID_FM_OTHER_START + 53)
-#define HID_MN_XFORMS_SHOW_DETAILS (HID_FM_OTHER_START + 54)
-#define HID_XFORMS_TOOLBOX (HID_FM_OTHER_START + 55)
-#define HID_XFORMS_TOOLBOX_ITEM_ADD (HID_FM_OTHER_START + 56)
-#define HID_XFORMS_TOOLBOX_ITEM_ADD_ELEMENT (HID_FM_OTHER_START + 57)
-#define HID_XFORMS_TOOLBOX_ITEM_ADD_ATTRIBUTE (HID_FM_OTHER_START + 58)
-#define HID_XFORMS_TOOLBOX_ITEM_EDIT (HID_FM_OTHER_START + 59)
-#define HID_XFORMS_TOOLBOX_ITEM_REMOVE (HID_FM_OTHER_START + 60)
-#define HID_XFORMS_ITEMS_LIST (HID_FM_OTHER_START + 61)
-#define HID_XFORMS_MODELS_LIST (HID_FM_OTHER_START + 62)
-#define HID_XFORMS_MODELS_MENUBTN (HID_FM_OTHER_START + 63)
-#define HID_XFORMS_INSTANCES_MENUBTN (HID_FM_OTHER_START + 64)
-#define HID_XFORMS_ADDSUBMISSION_DLG (HID_FM_OTHER_START + 65)
-#define HID_XFORMS_ADDMODEL_DLG (HID_FM_OTHER_START + 66)
-#define HID_XFORMS_ADDINSTANCE_DLG (HID_FM_OTHER_START + 67)
-#define HID_XFORMS_MID_INSERT_CONTROL (HID_FM_OTHER_START + 68)
-#define HID_XFORMS_TAB_CONTROL (HID_FM_OTHER_START + 69)
-
-// if you add a new define here, please adjust the overflow check
-// at the end of the file!!
+#define HID_DLG_DBMSG ( HID_FORMS_START + 1)
+#define HID_FORM_NAVIGATOR ( HID_FORMS_START + 2)
+#define HID_FORM_NAVIGATOR_WIN ( HID_FORMS_START + 3)
+#define HID_FIELD_SEL ( HID_FORMS_START + 4)
+#define HID_FIELD_SEL_WIN ( HID_FORMS_START + 5)
+#define HID_FILTER_NAVIGATOR ( HID_FORMS_START + 6)
+#define HID_FILTER_NAVIGATOR_WIN ( HID_FORMS_START + 7)
+#define HID_FM_DLG_SEARCH ( HID_FORMS_START + 8)
+#define HID_SEARCH_TEXT ( HID_FORMS_START + 9)
+#define HID_SEARCH_ALLFIELDS ( HID_FORMS_START + 10)
+#define HID_SEARCH_SINGLEFIELD ( HID_FORMS_START + 11)
+#define HID_SEARCH_FIELDSELECTION ( HID_FORMS_START + 12)
+#define HID_SEARCH_POSITION ( HID_FORMS_START + 13)
+#define HID_SEARCH_FORMATTER ( HID_FORMS_START + 14)
+#define HID_SEARCH_CASE ( HID_FORMS_START + 15)
+#define HID_SEARCH_BACKWARD ( HID_FORMS_START + 16)
+#define HID_SEARCH_STARTOVER ( HID_FORMS_START + 17)
+#define HID_SEARCH_WILDCARD ( HID_FORMS_START + 18)
+#define HID_SEARCH_REGULAR ( HID_FORMS_START + 19)
+#define HID_SEARCH_APPROX ( HID_FORMS_START + 20)
+#define HID_SEARCH_APPROXSETTINGS ( HID_FORMS_START + 21)
+#define HID_SEARCH_BTN_SEARCH ( HID_FORMS_START + 22)
+#define HID_SEARCH_BTN_CLOSE ( HID_FORMS_START + 23)
+#define HID_CONTROLS_DATE_N_TIME ( HID_FORMS_START + 24)
+#define HID_GRID_TRAVEL_FIRST ( HID_FORMS_START + 25)
+#define HID_GRID_TRAVEL_PREV ( HID_FORMS_START + 26)
+#define HID_GRID_TRAVEL_NEXT ( HID_FORMS_START + 27)
+#define HID_GRID_TRAVEL_LAST ( HID_FORMS_START + 28)
+#define HID_GRID_TRAVEL_NEW ( HID_FORMS_START + 29)
+#define HID_GRID_TRAVEL_ABSOLUTE ( HID_FORMS_START + 30)
+#define HID_GRID_NUMBEROFRECORDS ( HID_FORMS_START + 31)
+#define UID_SEARCH_RECORDSTATUS ( HID_FORMS_START + 32)
+#define UID_FORMPROPBROWSER_FRAME ( HID_FORMS_START + 33)
+#define UID_ABSOLUTE_RECORD_WINDOW ( HID_FORMS_START + 34)
+#define HID_DATA_NAVIGATOR_WIN ( HID_FORMS_START + 35)
+#define HID_XFORMS_ADDDATAITEM_DLG ( HID_FORMS_START + 36)
+#define HID_XFORMS_ADDCONDITION_DLG ( HID_FORMS_START + 37)
+#define HID_XFORMS_NAMESPACEITEM_DLG ( HID_FORMS_START + 38)
+#define HID_XFORMS_NAMESPACEITEM_LIST ( HID_FORMS_START + 39)
+#define HID_XFORMS_MANAGENAMESPACE_DLG ( HID_FORMS_START + 40)
+#define HID_TP_XFORMS_INSTANCE ( HID_FORMS_START + 41)
+#define HID_TP_XFORMS_SUBMISSION ( HID_FORMS_START + 42)
+#define HID_TP_XFORMS_BINDING ( HID_FORMS_START + 43)
+#define HID_MN_XFORMS_MODELS_ADD ( HID_FORMS_START + 44)
+#define HID_MN_XFORMS_MODELS_EDIT ( HID_FORMS_START + 45)
+#define HID_MN_XFORMS_MODELS_REMOVE ( HID_FORMS_START + 46)
+#define HID_MN_XFORMS_INSTANCES_ADD ( HID_FORMS_START + 47)
+#define HID_MN_XFORMS_INSTANCES_EDIT ( HID_FORMS_START + 48)
+#define HID_MN_XFORMS_INSTANCES_REMOVE ( HID_FORMS_START + 49)
+#define HID_MN_XFORMS_SHOW_DETAILS ( HID_FORMS_START + 50)
+#define HID_XFORMS_TOOLBOX ( HID_FORMS_START + 51)
+#define HID_XFORMS_TOOLBOX_ITEM_ADD ( HID_FORMS_START + 52)
+#define HID_XFORMS_TOOLBOX_ITEM_ADD_ELEMENT ( HID_FORMS_START + 53)
+#define HID_XFORMS_TOOLBOX_ITEM_ADD_ATTRIBUTE ( HID_FORMS_START + 54)
+#define HID_XFORMS_TOOLBOX_ITEM_EDIT ( HID_FORMS_START + 55)
+#define HID_XFORMS_TOOLBOX_ITEM_REMOVE ( HID_FORMS_START + 56)
+#define HID_XFORMS_ITEMS_LIST ( HID_FORMS_START + 57)
+#define HID_XFORMS_MODELS_LIST ( HID_FORMS_START + 58)
+#define HID_XFORMS_MODELS_MENUBTN ( HID_FORMS_START + 59)
+#define HID_XFORMS_INSTANCES_MENUBTN ( HID_FORMS_START + 60)
+#define HID_XFORMS_ADDSUBMISSION_DLG ( HID_FORMS_START + 61)
+#define HID_XFORMS_ADDMODEL_DLG ( HID_FORMS_START + 62)
+#define HID_XFORMS_ADDINSTANCE_DLG ( HID_FORMS_START + 63)
+#define HID_XFORMS_MID_INSERT_CONTROL ( HID_FORMS_START + 64)
+#define HID_XFORMS_TAB_CONTROL ( HID_FORMS_START + 65)
+ // if you add a new define here, please adjust the overflow check
+ // at the end of the file!!
// -----------------------------------------------------------------------
diff --git a/svx/inc/galobj.hxx b/svx/inc/galobj.hxx
index f01a9f0da8..d106f4b6ce 100644
--- a/svx/inc/galobj.hxx
+++ b/svx/inc/galobj.hxx
@@ -85,7 +85,7 @@ enum GalSoundType
// - SgaObject -
// -------------
-class SgaObject
+class SVX_DLLPUBLIC SgaObject
{
friend class GalleryTheme;
@@ -122,8 +122,8 @@ public:
BOOL IsValid() const { return bIsValid; }
BOOL IsThumbBitmap() const { return bIsThumbBmp; }
- SVX_DLLPUBLIC const String GetTitle() const;
- SVX_DLLPUBLIC void SetTitle( const String& rTitle );
+ const String GetTitle() const;
+ 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/svx/fmmodel.hxx b/svx/inc/svx/fmmodel.hxx
index 2a11234085..d92f925cdf 100644
--- a/svx/inc/svx/fmmodel.hxx
+++ b/svx/inc/svx/fmmodel.hxx
@@ -89,14 +89,16 @@ public:
/** check whether the OpenInDesignMode has been set explicitly or been loaded (<FALSE/>)
or if it still has the default value from construction (<TRUE/>)
*/
- sal_Bool OpenInDesignModeIsDefaulted( );
+ sal_Bool OpenInDesignModeIsDefaulted();
-//#if 0 // _SOLAR__PRIVATE
- void implSetOpenInDesignMode( sal_Bool _bOpenDesignMode, sal_Bool _bForce );
+ /** determines whether form controls should use the SdrModel's reference device for text rendering
+ */
+ sal_Bool ControlsUseRefDevice() const;
FmXUndoEnvironment& GetUndoEnv();
-//#endif
+private:
+ void implSetOpenInDesignMode( sal_Bool _bOpenDesignMode, sal_Bool _bForce );
};
#endif // _FM_FMMODEL_HXX
diff --git a/svx/inc/svx/msdffimp.hxx b/svx/inc/svx/msdffimp.hxx
index bc40b396ec..4c7c991546 100644
--- a/svx/inc/svx/msdffimp.hxx
+++ b/svx/inc/svx/msdffimp.hxx
@@ -481,6 +481,7 @@ public:
MSFilterTracer* mpTracer;
sal_Bool mbTracing;
+ Color MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const;
Color MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContextProperty = DFF_Prop_lineColor ) const;
virtual BOOL SeekToShape( SvStream& rSt, void* pClientData, UINT32 nId ) const;
FASTBOOL SeekToRec( SvStream& rSt, USHORT nRecId, ULONG nMaxFilePos, DffRecordHeader* pRecHd = NULL, ULONG nSkipCount = 0 ) const;
diff --git a/svx/inc/svx/msvbahelper.hxx b/svx/inc/svx/msvbahelper.hxx
new file mode 100644
index 0000000000..294f26e6fc
--- /dev/null
+++ b/svx/inc/svx/msvbahelper.hxx
@@ -0,0 +1,58 @@
+/*************************************************************************
+ *
+ * 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:
+ * $Revision:
+ *
+ * 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 _MSVBAHELPER_HXX
+#define _MSVBAHELPER_HXX
+
+#include <sfx2/objsh.hxx>
+#include "svx/svxdllapi.h"
+
+namespace ooo { namespace vba
+{
+ class SVX_DLLPUBLIC VBAMacroResolvedInfo
+ {
+ SfxObjectShell* mpDocContext;
+ bool mbFound;
+ String msResolvedMacro;
+ public:
+ VBAMacroResolvedInfo() : mpDocContext(NULL), mbFound( false ){}
+ void SetResolved( bool bRes ) { mbFound = bRes; }
+ bool IsResolved() { return mbFound; }
+ void SetMacroDocContext(SfxObjectShell* pShell ) { mpDocContext = pShell; }
+ SfxObjectShell* MacroDocContext() { return mpDocContext; }
+ String ResolvedMacro() { return msResolvedMacro; }
+ void SetResolvedMacro(const String& sMacro ) { msResolvedMacro = sMacro; }
+ };
+
+ SVX_DLLPUBLIC String makeMacroURL( const String& sMacroName );
+ SVX_DLLPUBLIC VBAMacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUString& sMod, bool bSearchGlobalTemplates = false );
+ SVX_DLLPUBLIC sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArgs, com::sun::star::uno::Any& aRet, const com::sun::star::uno::Any& aCaller );
+} }
+
+#endif
diff --git a/svx/inc/svx/numitem.hxx b/svx/inc/svx/numitem.hxx
index d3d8b57aa2..c7138df5f2 100644
--- a/svx/inc/svx/numitem.hxx
+++ b/svx/inc/svx/numitem.hxx
@@ -76,12 +76,6 @@ namespace com{namespace sun{ namespace star{
#define SVX_NO_NUM 200 // Markierung fuer keine Numerierung
#define SVX_NO_NUMLEVEL 0x20
-// --> OD 2008-01-10 #newlistlevelattrs# - no longer used
-//#define NUMITEM_VERSION_01 0x01
-//#define NUMITEM_VERSION_02 0x02
-//#define NUMITEM_VERSION_03 0x03
-// <--
-
#define LINK_TOKEN 0x80 //indicate linked bitmaps - for use in dialog only
class SVX_DLLPUBLIC SvxNumberType
{
@@ -191,14 +185,10 @@ public:
SvxNumPositionAndSpaceMode ePositionAndSpaceMode = LABEL_WIDTH_AND_POSITION );
// <--
SvxNumberFormat(const SvxNumberFormat& rFormat);
- // --> OD 2008-01-09 #newlistlevelattrs# - no longer used
-// SvxNumberFormat(SvStream &rStream);
- // <--
+ SvxNumberFormat(SvStream &rStream);
virtual ~SvxNumberFormat();
- // --> OD 2008-01-09 #newlistlevelattrs# - no longer used
-// SvStream& Store(SvStream &rStream, FontToSubsFontConverter pConverter);
- // <--
+ SvStream& Store(SvStream &rStream, FontToSubsFontConverter pConverter);
SvxNumberFormat& operator=( const SvxNumberFormat& );
BOOL operator==( const SvxNumberFormat& ) const;
@@ -304,9 +294,7 @@ public:
= SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
// <--
SvxNumRule(const SvxNumRule& rCopy);
- // --> OD 2008-01-09 #newlistlevelattrs# - no longer used
-// SvxNumRule(SvStream &rStream);
- // <--
+ SvxNumRule(SvStream &rStream);
virtual ~SvxNumRule();
int operator==( const SvxNumRule& ) const;
@@ -314,9 +302,7 @@ public:
SvxNumRule& operator=( const SvxNumRule& );
- // --> OD 2008-01-09 #newlistlevelattrs# - no longer used
-// SvStream& Store(SvStream &rStream);
- // <--
+ SvStream& Store(SvStream &rStream);
const SvxNumberFormat* Get(USHORT nLevel)const;
const SvxNumberFormat& GetLevel(USHORT nLevel)const;
@@ -354,11 +340,9 @@ public:
virtual ~SvxNumBulletItem();
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- // --> OD 2008-01-09 #newlistlevelattrs# - no longer used
-// virtual SfxPoolItem* Create(SvStream &, USHORT) const;
-// virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
-// virtual USHORT GetVersion( USHORT nFileVersion ) const;
- // <--
+ virtual SfxPoolItem* Create(SvStream &, USHORT) const;
+ USHORT GetVersion( USHORT nFileVersion ) const;
+ virtual SvStream& Store(SvStream &, USHORT nItemVersion ) const;
virtual int operator==( const SfxPoolItem& ) const;
SvxNumRule* GetNumRule() const {return pNumRule;}
diff --git a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
index b505756352..3216c857da 100644
--- a/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
+++ b/svx/inc/svx/sdr/contact/viewobjectcontactofunocontrol.hxx
@@ -65,6 +65,8 @@ namespace sdr { namespace contact {
::rtl::Reference< ViewObjectContactOfUnoControl_Impl > m_pImpl;
public:
+ ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
+
/// determines whether an XControl already exists, and is currently visible
bool isControlVisible() const;
@@ -98,49 +100,21 @@ namespace sdr { namespace contact {
virtual void ActionChanged();
protected:
- ViewObjectContactOfUnoControl( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
~ViewObjectContactOfUnoControl();
// support for Primitive2D
virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
+ // visibility check
+ virtual bool isPrimitiveVisible( const DisplayInfo& _rDisplayInfo ) const;
+
private:
- ViewObjectContactOfUnoControl(); // never implemented
+ ViewObjectContactOfUnoControl(); // never implemented
ViewObjectContactOfUnoControl( const ViewObjectContactOfUnoControl& ); // never implemented
ViewObjectContactOfUnoControl& operator=( const ViewObjectContactOfUnoControl& ); // never implemented
};
//====================================================================
- //= UnoControlDefaultContact
- //====================================================================
- class SVX_DLLPRIVATE UnoControlDefaultContact : public ViewObjectContactOfUnoControl
- {
- public:
- UnoControlDefaultContact( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
- ~UnoControlDefaultContact();
-
- private:
- UnoControlDefaultContact(); // never implemented
- UnoControlDefaultContact( const UnoControlDefaultContact& ); // never implemented
- UnoControlDefaultContact& operator=( const UnoControlDefaultContact& ); // never implemented
- };
-
- //====================================================================
- //= UnoControlWindowContact
- //====================================================================
- class SVX_DLLPRIVATE UnoControlWindowContact : public ViewObjectContactOfUnoControl
- {
- public:
- UnoControlWindowContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
- ~UnoControlWindowContact();
-
- private:
- UnoControlWindowContact(); // never implemented
- UnoControlWindowContact( const UnoControlWindowContact& ); // never implemented
- UnoControlWindowContact& operator=( const UnoControlWindowContact& ); // never implemented
- };
-
- //====================================================================
//= UnoControlPrintOrPreviewContact
//====================================================================
class SVX_DLLPRIVATE UnoControlPrintOrPreviewContact : public ViewObjectContactOfUnoControl
@@ -157,21 +131,6 @@ namespace sdr { namespace contact {
virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo ) const;
};
- //====================================================================
- //= UnoControlPDFExportContact
- //====================================================================
- class SVX_DLLPRIVATE UnoControlPDFExportContact : public ViewObjectContactOfUnoControl
- {
- public:
- UnoControlPDFExportContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact );
- ~UnoControlPDFExportContact();
-
- private:
- UnoControlPDFExportContact(); // never implemented
- UnoControlPDFExportContact( const UnoControlPDFExportContact& ); // never implemented
- UnoControlPDFExportContact& operator=( const UnoControlPDFExportContact& ); // never implemented
- };
-
//........................................................................
} } // namespace sdr::contact
//........................................................................
diff --git a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
index 09da0ee8ee..2193dd63af 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx
@@ -56,8 +56,13 @@ namespace drawinglayer
// defines if SdrTextWordWrapItem was set at SdrObjCustomShape which means
// that the text needs to be block formatted
unsigned mbWordWrap : 1;
- // #SJ# Allow text clipping against TextBox in special cases (used for SC)
- unsigned mbForceTextClipToTextRange : 1;
+
+ // #SJ# Allow text clipping against TextBox in special cases (used for SC)
+ unsigned mbForceTextClipToTextRange : 1;
+
+ // defines that the object contains/is a 3D AutoShape. Needed for
+ // making exceptions with shadow generation
+ unsigned mb3DShape : 1;
protected:
// local decomposition.
@@ -69,7 +74,8 @@ namespace drawinglayer
const Primitive2DSequence& rSubPrimitives,
const basegfx::B2DHomMatrix& rTextBox,
bool bWordWrap,
- bool bForceTextClipToTextRange);
+ bool bForceTextClipToTextRange,
+ bool b3DShape);
// data access
const attribute::SdrShadowTextAttribute& getSdrSTAttribute() const { return maSdrSTAttribute; }
@@ -77,6 +83,7 @@ namespace drawinglayer
const basegfx::B2DHomMatrix& getTextBox() const { return maTextBox; }
bool getWordWrap() const { return mbWordWrap; }
bool isForceTextClipToTextRange() const { return mbForceTextClipToTextRange; }
+ bool get3DShape() const { return mb3DShape; }
// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
diff --git a/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx b/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx
index d37adb214c..d3bf028869 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrdecompositiontools.hxx
@@ -75,7 +75,8 @@ namespace drawinglayer
const attribute::SdrTextAttribute& rText,
const attribute::SdrLineAttribute* pStroke,
bool bCellText,
- bool bWordWrap);
+ bool bWordWrap,
+ bool bClipOnBounds);
Primitive2DSequence createEmbeddedShadowPrimitive(
const Primitive2DSequence& rContent,
diff --git a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx
index 3e31be61ca..f228d6c1c7 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx
@@ -39,19 +39,19 @@
//////////////////////////////////////////////////////////////////////////////
// predefines
-namespace drawinglayer
-{
- namespace primitive2d
+namespace drawinglayer { namespace primitive2d {
+ enum MeasureTextPosition
{
- enum MeasureTextPosition
- {
- MEASURETEXTPOSITION_AUTOMATIC,
- MEASURETEXTPOSITION_NEGATIVE,
- MEASURETEXTPOSITION_CENTERED,
- MEASURETEXTPOSITION_POSITIVE
- };
- } // end of namespace primitive2d
-} // end of namespace drawinglayer
+ MEASURETEXTPOSITION_AUTOMATIC,
+ MEASURETEXTPOSITION_NEGATIVE,
+ MEASURETEXTPOSITION_CENTERED,
+ MEASURETEXTPOSITION_POSITIVE
+ };
+}}
+
+namespace drawinglayer { namespace attribute {
+ class SdrLineAttribute;
+}}
//////////////////////////////////////////////////////////////////////////////
@@ -80,6 +80,7 @@ namespace drawinglayer
// internal decomposition helper
Primitive2DReference impCreatePart(
+ const attribute::SdrLineAttribute& rLineAttribute,
const basegfx::B2DHomMatrix& rObjectMatrix,
const basegfx::B2DPoint& rStart,
const basegfx::B2DPoint& rEnd,
diff --git a/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx
index f54028d134..e29bfb674d 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx
@@ -53,6 +53,11 @@ namespace drawinglayer
SdrObjectWeakRef mpSdrOle2Obj;
basegfx::B2DHomMatrix maObjectTransform;
+ // #i104867# The GraphicVersion number to identify in operator== if
+ // the graphic has changed, but without fetching it (which may
+ // be expensive, e.g. triggering chart creation)
+ sal_uInt32 mnGraphicVersion;
+
// bitfield
unsigned mbHighContrast : 1;
@@ -64,6 +69,7 @@ namespace drawinglayer
SdrOleContentPrimitive2D(
const SdrOle2Obj& rSdrOle2Obj,
const basegfx::B2DHomMatrix& rObjectTransform,
+ sal_uInt32 nGraphicVersion,
bool bHighContrast);
// compare operator
@@ -74,6 +80,7 @@ namespace drawinglayer
// data access
const basegfx::B2DHomMatrix& getObjectTransform() const { return maObjectTransform; }
+ sal_uInt32 getGraphicVersion() const { return mnGraphicVersion; }
bool getHighContrast() const { return mbHighContrast; }
// provide unique ID
diff --git a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx
index c604b4e1e9..20dede7f44 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx
@@ -55,9 +55,8 @@ namespace drawinglayer
double mfCornerRadiusY; // [0.0..1.0] relative to 1/2 height
// bitfield
- // flag which decides if this is a text frame. If Yes, the HitArea
- // should be the filled geometry
- bool mbTextFrame : 1;
+ // flag which decides if the HitArea should be the filled geometry
+ bool mbForceFillForHitTest : 1;
protected:
// local decomposition.
@@ -69,7 +68,7 @@ namespace drawinglayer
const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute,
double fCornerRadiusX,
double fCornerRadiusY,
- bool bTextFrame);
+ bool bForceFillForHitTest);
// data access
const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
@@ -77,7 +76,7 @@ namespace drawinglayer
double getCornerRadiusX() const { return mfCornerRadiusX; }
double getCornerRadiusY() const { return mfCornerRadiusY; }
bool isCornerRadiusUsed() const { return (0.0 != mfCornerRadiusX || 0.0 != mfCornerRadiusY); }
- bool getTextFrame() const { return mbTextFrame; }
+ bool getForceFillForHitTest() const { return mbForceFillForHitTest; }
// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
diff --git a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx
index d5f841d85a..b9f27511e0 100644
--- a/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx
+++ b/svx/inc/svx/sdr/primitive2d/sdrtextprimitive2d.hxx
@@ -219,6 +219,7 @@ namespace drawinglayer
unsigned mbUnlimitedPage : 1; // force layout with no text break
unsigned mbCellText : 1; // this is a cell text as block text
unsigned mbWordWrap : 1; // for CustomShapes text layout
+ unsigned mbClipOnBounds : 1; // for CustomShapes text layout
protected:
// local decomposition.
@@ -234,7 +235,8 @@ namespace drawinglayer
bool bFixedCellHeight,
bool bUnlimitedPage,
bool bCellText,
- bool bWordWrap);
+ bool bWordWrap,
+ bool bClipOnBounds);
// get data
const basegfx::B2DHomMatrix& getTextRangeTransform() const { return maTextRangeTransform; }
@@ -244,6 +246,7 @@ namespace drawinglayer
bool getUnlimitedPage() const { return mbUnlimitedPage; }
bool getCellText() const { return mbCellText; }
bool getWordWrap() const { return mbWordWrap; }
+ bool getClipOnBounds() const { return mbClipOnBounds; }
// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
diff --git a/svx/inc/svx/selectioncontroller.hxx b/svx/inc/svx/selectioncontroller.hxx
index 4359cc6563..2965b00304 100644
--- a/svx/inc/svx/selectioncontroller.hxx
+++ b/svx/inc/svx/selectioncontroller.hxx
@@ -33,6 +33,8 @@
#include "svx/svxdllapi.h"
+#include <boost/shared_ptr.hpp>
+
#include <cppuhelper/weak.hxx>
class KeyEvent;
@@ -70,6 +72,15 @@ public:
virtual bool GetMarkedObjModel( SdrPage* pNewPage );
virtual bool PasteObjModel( const SdrModel& rModel );
+
+ /** returns a format paint brush set from the current selection */
+ virtual bool TakeFormatPaintBrush( boost::shared_ptr< SfxItemSet >& rFormatSet );
+
+ /** applies a format paint brush set from the current selection.
+ if bNoCharacterFormats is true, no character attributes are changed.
+ if bNoParagraphFormats is true, no paragraph attributes are changed.
+ */
+ virtual bool ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats );
};
}
diff --git a/svx/inc/svx/svddrgmt.hxx b/svx/inc/svx/svddrgmt.hxx
index f1890c3bc7..96fb97c7e6 100644
--- a/svx/inc/svx/svddrgmt.hxx
+++ b/svx/inc/svx/svddrgmt.hxx
@@ -107,6 +107,22 @@ public:
//////////////////////////////////////////////////////////////////////////////
+class SdrDragEntryPrimitive2DSequence : public SdrDragEntry
+{
+private:
+ drawinglayer::primitive2d::Primitive2DSequence maPrimitive2DSequence;
+
+public:
+ SdrDragEntryPrimitive2DSequence(
+ const drawinglayer::primitive2d::Primitive2DSequence& rSequence,
+ bool bAddToTransparent);
+ virtual ~SdrDragEntryPrimitive2DSequence();
+
+ virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
class SdrDragEntryPointGlueDrag : public SdrDragEntry
{
private:
@@ -138,6 +154,7 @@ protected:
void clearSdrDragEntries() { for(sal_uInt32 a(0); a < maSdrDragEntries.size(); a++) { delete maSdrDragEntries[a]; } maSdrDragEntries.clear(); }
void addSdrDragEntry(SdrDragEntry* pNew) { if(pNew) { maSdrDragEntries.push_back(pNew); }}
virtual void createSdrDragEntries();
+ virtual void createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool bModify);
// access for derivated classes to maOverlayObjectList
void clearOverlayObjectList() { maOverlayObjectList.clear(); }
@@ -236,6 +253,9 @@ private:
void ImpCheckSnap(const Point& rPt);
+protected:
+ virtual void createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool bModify);
+
public:
TYPEINFO();
SdrDragMove(SdrDragView& rNewView);
diff --git a/svx/inc/svx/svdedxv.hxx b/svx/inc/svx/svdedxv.hxx
index c6599092e2..35dda79124 100644
--- a/svx/inc/svx/svdedxv.hxx
+++ b/svx/inc/svx/svdedxv.hxx
@@ -41,6 +41,8 @@
// Vorausdeklarationen
//************************************************************
+#include <boost/shared_ptr.hpp>
+
class SdrOutliner;
class OutlinerView;
class EditStatus;
@@ -282,6 +284,21 @@ public:
rtl::Reference< sdr::SelectionController > getSelectionController() const { return mxSelectionController; }
+ /** returns true if the shape identified by its inventor and identifier supports format paint brush operation */
+ virtual bool SupportsFormatPaintbrush( UINT32 nObjectInventor, UINT16 nObjectIdentifier ) const;
+
+ /** returns a format paint brush set from the current selection */
+ virtual bool TakeFormatPaintBrush( boost::shared_ptr< SfxItemSet >& rFormatSet );
+
+ /** applies a format paint brush set from the current selection.
+ if bNoCharacterFormats is true, no character attributes are changed.
+ if bNoParagraphFormats is true, no paragraph attributes are changed.
+ */
+ virtual void ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats );
+
+ /** helper function for selections with multiple SdrText for one SdrTextObj (f.e. tables ) */
+ void ApplyFormatPaintBrushToText( SfxItemSet& rFormatSet, SdrTextObj& rTextObj, SdrText* pText, bool bNoCharacterFormats, bool bNoParagraphFormats );
+
protected:
virtual void OnBeginPasteOrDrop( PasteOrDropInfos* pInfos );
virtual void OnEndPasteOrDrop( PasteOrDropInfos* pInfos );
diff --git a/svx/inc/svx/svdfppt.hxx b/svx/inc/svx/svdfppt.hxx
index dba9f72cf6..048fb5dba8 100644
--- a/svx/inc/svx/svdfppt.hxx
+++ b/svx/inc/svx/svdfppt.hxx
@@ -610,7 +610,7 @@ public:
UINT32& nMappedFontId, Font& rFont, char nDefault ) const;
const PptDocumentAtom& GetDocumentAtom() const { return aDocAtom; }
virtual const PptSlideLayoutAtom* GetSlideLayoutAtom() const;
- SdrObject* CreateTable( SdrObject* pGroupObject, sal_uInt32* pTableArry, SvxMSDffSolverContainer* ) const;
+ SdrObject* CreateTable( SdrObject* pGroupObject, sal_uInt32* pTableArry, SvxMSDffSolverContainer* );
};
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx
index 1238cea024..6ce8f54039 100644
--- a/svx/inc/svx/svdoashp.hxx
+++ b/svx/inc/svx/svdoashp.hxx
@@ -179,6 +179,8 @@ public:
virtual UINT16 GetObjIdentifier() const;
virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const;
+ virtual void SetModel(SdrModel* pNewModel);
+
virtual void RecalcSnapRect();
virtual const Rectangle& GetSnapRect() const;
diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc
index eb35d48735..4d8f48af85 100644
--- a/svx/inc/svx/svxids.hrc
+++ b/svx/inc/svx/svxids.hrc
@@ -1351,7 +1351,6 @@
#define SID_ATTR_PARA_OUTLINE_LEVEL (SID_SVX_START+1092)
#define SID_OBJECT_MIRROR (SID_SVX_START+1093)
-#define SID_INSERT_POSTIT (SID_SVX_START+1093)
#define SID_DELETE_POSTIT (SID_SVX_START+1094)
#define SID_NEXT_POSTIT (SID_SVX_START+1095)
#define SID_PREVIOUS_POSTIT (SID_SVX_START+1096)
@@ -1359,9 +1358,10 @@
#define SID_SHOW_POSTIT (SID_SVX_START+1098)
#define SID_REPLYTO_POSTIT (SID_SVX_START+1099)
#define SID_DELETEALLBYAUTHOR_POSTIT (SID_SVX_START+1100)
+#define SID_INSERT_POSTIT (SID_SVX_START+1101)
// IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
-#define SID_SVX_FIRSTFREE SID_DELETEALLBYAUTHOR_POSTIT + 1
+#define SID_SVX_FIRSTFREE SID_INSERT_POSTIT + 1
// --------------------------------------------------------------------------
// Overflow check for slot IDs
diff --git a/svx/prj/build.lst b/svx/prj/build.lst
index 56980702fb..2f595a2de9 100644
--- a/svx/prj/build.lst
+++ b/svx/prj/build.lst
@@ -22,7 +22,7 @@ sx svx\source\svdraw nmake - all sx_draw sx_inc NULL
sx svx\source\sdr\attribute nmake - all sx_attribute sx_inc NULL
sx svx\source\sdr\primitive2d nmake - all sx_primitive2d sx_inc NULL
sx svx\source\sdr\primitive3d nmake - all sx_primitive3d sx_inc NULL
-sx svx\source\table nmake - all sx_table NULL
+sx svx\source\table nmake - all sx_table sx_inc NULL
sx svx\source\sdr\properties nmake - all sx_properties sx_inc NULL
sx svx\source\sdr\contact nmake - all sx_contact sx_inc NULL
sx svx\source\sdr\event nmake - all sx_event sx_inc NULL
diff --git a/svx/prj/d.lst b/svx/prj/d.lst
index 7edc2fbc9c..acbb689082 100644
--- a/svx/prj/d.lst
+++ b/svx/prj/d.lst
@@ -658,5 +658,6 @@ mkdir: %_DEST%\inc%_EXT%\svx\sdr\table
..\inc\svx\selectioncontroller.hxx %_DEST%\inc%_EXT%\svx\selectioncontroller.hxx
..\inc\svx\helperhittest3d.hxx %_DEST%\inc%_EXT%\svx\helperhittest3d.hxx
..\inc\svx\optimprove.hxx %_DEST%\inc%_EXT%\svx\optimprove.hxx
+..\inc\svx\msvbahelper.hxx %_DEST%\inc%_EXT%\svx\msvbahelper.hxx
..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.*
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 28f50ef89b..e3826708c1 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -5954,7 +5954,7 @@ SfxVoidItem InsertAnnotation SID_INSERT_POSTIT
]
//--------------------------------------------------------------------------
-SfxBoolItem ShowAnnotation SID_SHOW_POSTIT
+SfxBoolItem ShowAnnotations SID_SHOW_POSTIT
()
[
/* flags: */
diff --git a/svx/source/cui/SpellDialog.cxx b/svx/source/cui/SpellDialog.cxx
index bead9b97bf..65e3c90e14 100644
--- a/svx/source/cui/SpellDialog.cxx
+++ b/svx/source/cui/SpellDialog.cxx
@@ -914,7 +914,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
const SpellErrorDescription* pSpellErrorDescription = aSentenceED.GetAlternatives();
if( pSpellErrorDescription && pSpellErrorDescription->sServiceName.getLength() )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
::rtl::OUString sSuggestionImageUrl =
SvtLinguConfig().GetSpellAndGrammarDialogImage( pSpellErrorDescription->sServiceName, bHighContrast );
aVendorImageFI.SetImage( lcl_GetImageFromPngUrl( sSuggestionImageUrl ) );
@@ -924,7 +924,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
}
else
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
aVendorImageFI.SetImage( bHighContrast ? aVendorImageHC : aVendorImage );
}
@@ -935,7 +935,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
}
else
{
- //bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ //bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
sTitle = m_sTitleSpellingGrammar;
}
}
diff --git a/svx/source/cui/align.cxx b/svx/source/cui/align.cxx
index 77538a9a66..8e84817027 100644
--- a/svx/source/cui/align.cxx
+++ b/svx/source/cui/align.cxx
@@ -248,7 +248,7 @@ void AlignmentTabPage::InitVsRefEgde()
// remember selection - is deleted in call to ValueSet::Clear()
USHORT nSel = maVsRefEdge.GetSelectItemId();
- ResId aResId( GetBackground().GetColor().IsDark() ? IL_LOCK_BMPS_HC : IL_LOCK_BMPS, DIALOG_MGR() );
+ ResId aResId( GetSettings().GetStyleSettings().GetHighContrastMode() ? IL_LOCK_BMPS_HC : IL_LOCK_BMPS, DIALOG_MGR() );
ImageList aImageList( aResId );
Size aItemSize( aImageList.GetImage( IID_BOTTOMLOCK ).GetSizePixel() );
diff --git a/svx/source/cui/border.cxx b/svx/source/cui/border.cxx
index 1ab5a45b9e..5cda542e71 100644
--- a/svx/source/cui/border.cxx
+++ b/svx/source/cui/border.cxx
@@ -1033,8 +1033,8 @@ USHORT SvxBorderTabPage::GetPresetStringId( USHORT nValueSetIdx ) const
void SvxBorderTabPage::FillPresetVS()
{
// find correct image list
- bool bDark = aWndPresets.GetDisplayBackground().GetColor().IsDark();
- ImageList& rImgList = bDark ? aBorderImgLstH : aBorderImgLst;
+ bool bHC = aWndPresets.GetSettings().GetStyleSettings().GetHighContrastMode();
+ ImageList& rImgList = bHC ? aBorderImgLstH : aBorderImgLst;
Size aImgSize( rImgList.GetImage( IID_PRE_CELL_NONE ).GetSizePixel() );
// basic initialization of the ValueSet
@@ -1060,8 +1060,8 @@ void SvxBorderTabPage::FillPresetVS()
void SvxBorderTabPage::FillShadowVS()
{
// find correct image list
- bool bDark = aWndShadows.GetDisplayBackground().GetColor().IsDark();
- ImageList& rImgList = bDark ? aShadowImgLstH : aShadowImgLst;
+ bool bHC = aWndPresets.GetSettings().GetStyleSettings().GetHighContrastMode();
+ ImageList& rImgList = bHC ? aShadowImgLstH : aShadowImgLst;
Size aImgSize( rImgList.GetImage( IID_SHADOWNONE ).GetSizePixel() );
// basic initialization of the ValueSet
diff --git a/svx/source/cui/cfg.cxx b/svx/source/cui/cfg.cxx
index 2931be6c17..d172735208 100644
--- a/svx/source/cui/cfg.cxx
+++ b/svx/source/cui/cfg.cxx
@@ -403,7 +403,7 @@ void InitImageType()
Window* topwin = Application::GetActiveTopWindow();
if ( topwin != NULL &&
- topwin->GetDisplayBackground().GetColor().IsDark() )
+ topwin->GetSettings().GetStyleSettings().GetHighContrastMode() )
{
theImageType |= css::ui::ImageType::COLOR_HIGHCONTRAST;
}
@@ -5114,7 +5114,7 @@ SvxToolbarEntriesListBox::SvxToolbarEntriesListBox(
BuildCheckBoxButtonImages( m_pButtonData );
EnableCheckButton( m_pButtonData );
- m_bHiContrastMode = GetDisplayBackground().GetColor().IsDark();
+ m_bHiContrastMode = GetSettings().GetStyleSettings().GetHighContrastMode();
}
// --------------------------------------------------------
@@ -5189,11 +5189,8 @@ void SvxToolbarEntriesListBox::DataChanged( const DataChangedEvent& rDCEvt )
if (( rDCEvt.GetType() == DATACHANGED_SETTINGS ) &&
( rDCEvt.GetFlags() & SETTINGS_STYLE ))
{
- if ( m_bHiContrastMode != GetDisplayBackground().GetColor().IsDark() )
- {
- // We have to reset all images because we change to/from high contrast mode
- m_bHiContrastMode = GetDisplayBackground().GetColor().IsDark();
- }
+ // We have to reset all images because we change to/from high contrast mode
+ m_bHiContrastMode = GetSettings().GetStyleSettings().GetHighContrastMode();
BuildCheckBoxButtonImages( m_pButtonData );
Invalidate();
diff --git a/svx/source/cui/cuicharmap.cxx b/svx/source/cui/cuicharmap.cxx
index a66c7b3c10..d06d962c86 100644
--- a/svx/source/cui/cuicharmap.cxx
+++ b/svx/source/cui/cuicharmap.cxx
@@ -71,11 +71,12 @@ SvxCharacterMap::SvxCharacterMap( Window* pParent, BOOL bOne, const SfxItemSet*
if ( pItem )
bOne = pItem->GetValue();
+ mpCharMapData = new SvxCharMapData( this, bOne, &DIALOG_MGR() );
+
SFX_ITEMSET_ARG( pSet, pCharItem, SfxInt32Item, SID_ATTR_CHAR, FALSE );
if ( pCharItem )
- SetChar( pItem->GetValue() );
+ SetChar( pCharItem->GetValue() );
- mpCharMapData = new SvxCharMapData( this, bOne, &DIALOG_MGR() );
SFX_ITEMSET_ARG( pSet, pDisableItem, SfxBoolItem, FN_PARAM_2, FALSE );
if ( pDisableItem && pDisableItem->GetValue() )
diff --git a/svx/source/cui/labdlg.cxx b/svx/source/cui/labdlg.cxx
index bbcbe9c408..1c7cebefe9 100644
--- a/svx/source/cui/labdlg.cxx
+++ b/svx/source/cui/labdlg.cxx
@@ -574,7 +574,7 @@ void SvxCaptionTabPage::DataChanged( const DataChangedEvent& rDCEvt )
void SvxCaptionTabPage::FillValueSet()
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
Image** ppBitmaps = bHighContrast ? mpBmpCapTypesH : mpBmpCapTypes;
aCT_CAPTTYPE.SetItemImage(BMP_CAPTTYPE_1, *(ppBitmaps[0]) );
diff --git a/svx/source/cui/macropg.cxx b/svx/source/cui/macropg.cxx
index f705df676b..e5cd28b20f 100644
--- a/svx/source/cui/macropg.cxx
+++ b/svx/source/cui/macropg.cxx
@@ -494,9 +494,7 @@ void IconLBoxString::Paint( const Point& aPos, SvLBox& aDevice,
sal_Int32 nIndex = aURL.indexOf( aVndSunStarUNO );
bool bUNO = nIndex == 0;
- Wallpaper aBackground = aDevice.GetBackground();
- Color aColor = aBackground.GetColor();
- BOOL bHC = aColor.IsDark();
+ BOOL bHC = aDevice.GetSettings().GetStyleSettings().GetHighContrastMode();
const Image* pImg;
if( bHC )
pImg = bUNO ? m_pComponentImg_h : m_pMacroImg_h;
diff --git a/svx/source/cui/numpages.cxx b/svx/source/cui/numpages.cxx
index a9ba8c61cb..6069efd2cb 100644
--- a/svx/source/cui/numpages.cxx
+++ b/svx/source/cui/numpages.cxx
@@ -386,6 +386,12 @@ void SvxSingleNumPickTabPage::Reset( const SfxItemSet& rSet )
{
nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+
+ if( eState != SFX_ITEM_SET )
+ {
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ eState = SFX_ITEM_SET;
+ }
}
DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
delete pSaveNum;
@@ -577,6 +583,13 @@ void SvxBulletPickTabPage::Reset( const SfxItemSet& rSet )
{
nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+
+ if( eState != SFX_ITEM_SET )
+ {
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ eState = SFX_ITEM_SET;
+ }
+
}
DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
delete pSaveNum;
@@ -807,6 +820,13 @@ void SvxNumPickTabPage::Reset( const SfxItemSet& rSet )
{
nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+
+ if( eState != SFX_ITEM_SET )
+ {
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ eState = SFX_ITEM_SET;
+ }
+
}
DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
delete pSaveNum;
@@ -1112,6 +1132,13 @@ void SvxBitmapPickTabPage::Reset( const SfxItemSet& rSet )
{
nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+
+ if( eState != SFX_ITEM_SET )
+ {
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ eState = SFX_ITEM_SET;
+ }
+
}
DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
delete pSaveNum;
@@ -1544,6 +1571,13 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
{
nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+
+ if( eState != SFX_ITEM_SET )
+ {
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ eState = SFX_ITEM_SET;
+ }
+
}
DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
delete pSaveNum;
@@ -3441,6 +3475,13 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet )
{
nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
+
+ if( eState != SFX_ITEM_SET )
+ {
+ pItem = &static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+ eState = SFX_ITEM_SET;
+ }
+
}
DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
delete pSaveNum;
diff --git a/svx/source/cui/optaccessibility.cxx b/svx/source/cui/optaccessibility.cxx
index 960cd5e46c..d815959bbf 100644
--- a/svx/source/cui/optaccessibility.cxx
+++ b/svx/source/cui/optaccessibility.cxx
@@ -151,8 +151,8 @@ BOOL SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet& )
aMiscSettings.SetEnableATToolSupport( m_aAccessibilityTool.IsChecked() );
#endif
aAllSettings.SetMiscSettings(aMiscSettings);
- Application::SetSettings(aAllSettings);
Application::MergeSystemSettings( aAllSettings );
+ Application::SetSettings(aAllSettings);
return FALSE;
}
diff --git a/svx/source/cui/optcolor.cxx b/svx/source/cui/optcolor.cxx
index 887be321ab..669a4e7f59 100644
--- a/svx/source/cui/optcolor.cxx
+++ b/svx/source/cui/optcolor.cxx
@@ -762,9 +762,9 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe
Wallpaper aTransparentWall(TempColor);
sal_Int32 nWinWidth = GetSizePixel().Width();
sal_Int32 nFTHeight = aChapters[0]->GetSizePixel().Height();
- sal_Bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
Color aBackColor;
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ sal_Bool bHighContrast = rStyleSettings.GetHighContrastMode();
if ( bHighContrast )
aBackColor = rStyleSettings.GetShadowColor();
else
diff --git a/svx/source/cui/optimprove2.cxx b/svx/source/cui/optimprove2.cxx
index 28989080ca..b988c7b75b 100644
--- a/svx/source/cui/optimprove2.cxx
+++ b/svx/source/cui/optimprove2.cxx
@@ -149,7 +149,13 @@ IMPL_LINK( SvxImprovementOptionsPage, HandleShowData, PushButton*, EMPTYARG )
{
::rtl::OUString sLogFile( m_sLogPath );
sLogFile += C2S("/Current.csv");
- uno::Sequence< beans::PropertyValue > aArgs;
+ uno::Sequence< beans::PropertyValue > aArgs(3);
+ aArgs[0].Name = ::rtl::OUString::createFromAscii("FilterName");
+ aArgs[0].Value = uno::makeAny(::rtl::OUString::createFromAscii("Text - txt - csv (StarCalc)"));
+ aArgs[1].Name = ::rtl::OUString::createFromAscii("FilterOptions");
+ aArgs[1].Value = uno::makeAny(::rtl::OUString::createFromAscii("44,34,12,1,"));
+ aArgs[2].Name = ::rtl::OUString::createFromAscii("ReadOnly");
+ aArgs[2].Value = uno::makeAny(true);
uno::Reference< lang::XComponent > xDoc = ::comphelper::SynchronousDispatch::dispatch(
xDesktop, sLogFile, C2S("_default"), 0, aArgs );
diff --git a/svx/source/cui/optsave.cxx b/svx/source/cui/optsave.cxx
index 18385e584b..e076c66e1d 100644
--- a/svx/source/cui/optsave.cxx
+++ b/svx/source/cui/optsave.cxx
@@ -233,7 +233,7 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) :
pImpl ( new SvxSaveTabPage_Impl )
{
- sal_Bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
aODFWarningFI.SetImage(
Image( SVX_RES( bHighContrast ? IMG_ODF_WARNING_HC : IMG_ODF_WARNING ) ) );
diff --git a/svx/source/cui/readonlyimage.cxx b/svx/source/cui/readonlyimage.cxx
index 77e842cac7..dd273ce511 100644
--- a/svx/source/cui/readonlyimage.cxx
+++ b/svx/source/cui/readonlyimage.cxx
@@ -46,7 +46,7 @@
ReadOnlyImage::ReadOnlyImage(Window* pParent, const ResId rResId) :
FixedImage(pParent, rResId)
{
- sal_Bool bHighContrast = pParent->GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bHighContrast = pParent->GetSettings().GetStyleSettings().GetHighContrastMode();
SetImage( Image(SVX_RES(bHighContrast ? RID_SVXBMP_LOCK_HC : RID_SVXBMP_LOCK )));
}
diff --git a/svx/source/cui/tphatch.cxx b/svx/source/cui/tphatch.cxx
index 42f576836b..b17345aee9 100644
--- a/svx/source/cui/tphatch.cxx
+++ b/svx/source/cui/tphatch.cxx
@@ -164,7 +164,7 @@ SvxHatchTabPage::SvxHatchTabPage
aBtnLoad.SetClickHdl( LINK( this, SvxHatchTabPage, ClickLoadHdl_Impl ) );
aBtnSave.SetClickHdl( LINK( this, SvxHatchTabPage, ClickSaveHdl_Impl ) );
- aCtlPreview.SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ aCtlPreview.SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
}
// -----------------------------------------------------------------------
@@ -905,7 +905,7 @@ void SvxHatchTabPage::PointChanged( Window* pWindow, RECT_POINT eRcPt )
void SvxHatchTabPage::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
- aCtlPreview.SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ aCtlPreview.SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
SvxTabPage::DataChanged( rDCEvt );
}
diff --git a/svx/source/cui/tpline.cxx b/svx/source/cui/tpline.cxx
index 497d628fa3..36984b8f31 100644
--- a/svx/source/cui/tpline.cxx
+++ b/svx/source/cui/tpline.cxx
@@ -299,7 +299,7 @@ void SvxLineTabPage::Construct()
void SvxLineTabPage::FillListboxes()
{
-// aCtlPreview.SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+// aCtlPreview.SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
ResMgr& rMgr = DIALOG_MGR();
diff --git a/svx/source/cui/treeopt.cxx b/svx/source/cui/treeopt.cxx
index 52d47523ed..01049d3c10 100644
--- a/svx/source/cui/treeopt.cxx
+++ b/svx/source/cui/treeopt.cxx
@@ -1078,7 +1078,7 @@ void OfaTreeOptionsDialog::DataChanged( const DataChangedEvent& rDCEvt )
!aTreeLB.GetParent(pEntry))
{
OptionsGroupInfo* pInfo = static_cast<OptionsGroupInfo*>(pEntry->GetUserData());
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
ImageList* pImgLst = bHighContrast ? &aPageImagesHC : &aPageImages;
for ( sal_uInt16 i = 0; i < aHelpTextsArr.Count(); ++i )
{
@@ -1336,7 +1336,7 @@ IMPL_LINK( OfaTreeOptionsDialog, SelectHdl_Impl, Timer*, EMPTYARG )
OptionsGroupInfo* pTGInfo = (OptionsGroupInfo *)pEntry->GetUserData();
if ( pTGInfo->m_sPageURL.getLength() == 0 )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
ImageList* pImgLst = bHighContrast ? &aPageImagesHC : &aPageImages;
//hier den Hilfetext anzeigen
for ( sal_uInt16 i = 0; i < aHelpTextsArr.Count(); ++i )
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 16f48581bc..04cdd9e041 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -696,7 +696,16 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
ClearItem( SDRATTR_TEXTDIRECTION ); //SJ: vertical writing is not required, by removing this item no outliner is created
- // For primitive rendering, shadow handling is done completely based on the geometry, so i removed it here
+ // #i105323# For 2D AtoShapes, the shadow attirbute does not need to be applied to any
+ // of the constucted helper SdrObjects. This would lead to problems since the shadow
+ // of one helper object would fall on one helper object behind it (e.g. with the
+ // eyes of the smiley shape). This is not wanted; instead a single shadow 'behind'
+ // the AutoShape visualisation is wanted. This is done with primitive functionailty
+ // now in SdrCustomShapePrimitive2D::create2DDecomposition, but only for 2D objects
+ // (see there and in EnhancedCustomShape3d::Create3DObject to read more).
+ // This exception may be removed later when AutoShapes will create primitives directly.
+ // So, currently remove the ShadowAttribute from the ItemSet to not apply it to any
+ // 2D helper shape.
ClearItem(SDRATTR_SHADOW);
Point aP( pCustomShapeObj->GetSnapRect().Center() );
@@ -731,23 +740,23 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
/*const sal_Int32* pDefData =*/ ApplyShapeAttributes( rGeometryItem );
switch( eSpType )
{
- case mso_sptCan : nColorData = 0x20400000; break;
- case mso_sptCube : nColorData = 0x302e0000; break;
- case mso_sptActionButtonBlank : nColorData = 0x502ce400; break;
- case mso_sptActionButtonHome : nColorData = 0x702ce4ce; break;
- case mso_sptActionButtonHelp : nColorData = 0x602ce4c0; break;
- case mso_sptActionButtonInformation : nColorData = 0x702ce4c5; break;
- case mso_sptActionButtonBackPrevious : nColorData = 0x602ce4c0; break;
- case mso_sptActionButtonForwardNext : nColorData = 0x602ce4c0; break;
- case mso_sptActionButtonBeginning : nColorData = 0x602ce4c0; break;
- case mso_sptActionButtonEnd : nColorData = 0x602ce4c0; break;
- case mso_sptActionButtonReturn : nColorData = 0x602ce4c0; break;
- case mso_sptActionButtonDocument : nColorData = 0x702ce4ec; break;
- case mso_sptActionButtonSound : nColorData = 0x602ce4c0; break;
- case mso_sptActionButtonMovie : nColorData = 0x602ce4c0; break;
- case mso_sptBevel : nColorData = 0x502ce400; break;
- case mso_sptFoldedCorner : nColorData = 0x20e00000; break;
- case mso_sptSmileyFace : nColorData = 0x20e00000; break;
+ case mso_sptCan : nColorData = 0x20400000; break;
+ case mso_sptCube : nColorData = 0x302e0000; break;
+ case mso_sptActionButtonBlank : nColorData = 0x502ce400; break;
+ case mso_sptActionButtonHome : nColorData = 0x702ce4ce; break;
+ case mso_sptActionButtonHelp : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonInformation : nColorData = 0x702ce4c5; break;
+ case mso_sptActionButtonBackPrevious : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonForwardNext : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonBeginning : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonEnd : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonReturn : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonDocument : nColorData = 0x702ce4ec; break;
+ case mso_sptActionButtonSound : nColorData = 0x602ce4c0; break;
+ case mso_sptActionButtonMovie : nColorData = 0x602ce4c0; break;
+ case mso_sptBevel : nColorData = 0x502ce400; break;
+ case mso_sptFoldedCorner : nColorData = 0x20e00000; break;
+ case mso_sptSmileyFace : nColorData = 0x20e00000; break;
case mso_sptNil :
{
if( sShapeType.getLength() > 4 &&
@@ -1701,19 +1710,19 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
if(aNewB2DPolyPolygon.count())
{
- if( !bLineGeometryNeededOnly )
- {
- // hack aNewB2DPolyPolygon to fill logic rect - this is
- // needed to produce gradient fills that look like mso
- aNewB2DPolygon.clear();
- aNewB2DPolygon.append(basegfx::B2DPoint(0,0));
- aNewB2DPolyPolygon.append(aNewB2DPolygon);
-
- aNewB2DPolygon.clear();
- aNewB2DPolygon.append(basegfx::B2DPoint(aLogicRect.GetWidth(),
- aLogicRect.GetHeight()));
- aNewB2DPolyPolygon.append(aNewB2DPolygon);
- }
+ if( !bLineGeometryNeededOnly )
+ {
+ // hack aNewB2DPolyPolygon to fill logic rect - this is
+ // needed to produce gradient fills that look like mso
+ aNewB2DPolygon.clear();
+ aNewB2DPolygon.append(basegfx::B2DPoint(0,0));
+ aNewB2DPolyPolygon.append(aNewB2DPolygon);
+
+ aNewB2DPolygon.clear();
+ aNewB2DPolygon.append(basegfx::B2DPoint(aLogicRect.GetWidth(),
+ aLogicRect.GetHeight()));
+ aNewB2DPolyPolygon.append(aNewB2DPolygon);
+ }
// #i37011#
bool bForceCreateTwoObjects(false);
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index ed94bcf075..4fec059147 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -323,7 +323,17 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
Point aCenter( aSnapRect.Center() );
SfxItemSet aSet( pCustomShape->GetMergedItemSet() );
- aSet.ClearItem( SDRATTR_TEXTDIRECTION ); //SJ: vertical writing is not required, by removing this item no outliner is created
+
+ //SJ: vertical writing is not required, by removing this item no outliner is created
+ aSet.ClearItem( SDRATTR_TEXTDIRECTION );
+
+ // #i105323# For 3D AutoShapes, the shadow attribute has to be applied to each
+ // created visualisation helper model shape individually. The shadow itself
+ // will then be rendered from the 3D renderer correctly for the whole 3D scene
+ // (and thus behind all objects of which the visualisation may be built). So,
+ // dio NOT remove it from the ItemSet here.
+ // aSet.ClearItem(SDRATTR_SHADOW);
+
std::vector< E3dCompoundObject* > aPlaceholderObjectList;
double fExtrusionBackward, fExtrusionForward;
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 1b33ad47ac..581c12712c 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -1212,7 +1212,7 @@ void SvxBmpMask::DataChanged( const DataChangedEvent& rDCEvt )
void SvxBmpMask::ApplyStyle()
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
aTbxPipette.SetItemImage( TBI_PIPETTE, bHighContrast ? maImgPipetteH : maImgPipette );
}
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index a81eba3cb1..92c03de1d6 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -1133,7 +1133,7 @@ IMPL_LINK( SvxSuperContourDlg, WorkplaceClickHdl, ContourWindow*, pWnd )
void SvxSuperContourDlg::ApplyImageList()
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
ImageList& rImgLst = bHighContrast ? maImageListH : maImageList;
diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx
index 2005cfb043..ad96fab911 100644
--- a/svx/source/dialog/connctrl.cxx
+++ b/svx/source/dialog/connctrl.cxx
@@ -374,7 +374,7 @@ void SvxXConnectionPreview::MouseButtonDown( const MouseEvent& rMEvt )
void SvxXConnectionPreview::SetStyles()
{
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
- SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
SetBackground( Wallpaper( Color( rStyles.GetFieldColor() ) ) );
}
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 2d3b9d33b4..a0d401eb4f 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1202,7 +1202,7 @@ void HatchingLB::UserDraw( const UserDrawEvent& rUDEvt )
OutputDevice* pDevice = rUDEvt.GetDevice();
ULONG nOldDrawMode = pDevice->GetDrawMode();
- pDevice->SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ pDevice->SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
XHatch& rXHatch = mpList->GetHatch( rUDEvt.GetItemId() )->GetHatch();
MapMode aMode( MAP_100TH_MM );
@@ -1943,7 +1943,7 @@ SvxPreviewBase::SvxPreviewBase( Window* pParent, const ResId& rResId )
{
// Draw the control's border as a flat thin black line.
SetBorderStyle(WINDOW_BORDER_MONO);
- SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
SetMapMode(MAP_100TH_MM);
// init model
@@ -2006,7 +2006,7 @@ void SvxPreviewBase::StateChanged(StateChangedType nType)
void SvxPreviewBase::DataChanged(const DataChangedEvent& rDCEvt)
{
- SetDrawMode(GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR);
+ SetDrawMode(GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR);
if((DATACHANGED_SETTINGS == rDCEvt.GetType()) && (rDCEvt.GetFlags() & SETTINGS_STYLE))
{
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index cd828cfaa8..ea7ff7479a 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -917,9 +917,7 @@ void RecovDocListEntry::Paint(const Point& aPos ,
const String* pTxt = 0;
RecovDocList* pList = static_cast< RecovDocList* >(&aDevice);
- Wallpaper aBackground = aDevice.GetBackground();
- Color aColor = aBackground.GetColor();
- BOOL bHC = aColor.IsDark();
+ BOOL bHC = aDevice.GetSettings().GetStyleSettings().GetHighContrastMode();
TURLInfo* pInfo = (TURLInfo*)pEntry->GetUserData();
switch(pInfo->RecoveryState)
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx
index c361d97426..b967f3ed79 100644
--- a/svx/source/dialog/fontwork.cxx
+++ b/svx/source/dialog/fontwork.cxx
@@ -1228,9 +1228,7 @@ void SvxFontWorkDialog::DataChanged( const DataChangedEvent& rDCEvt )
---------------------------------------------------------------------------*/
void SvxFontWorkDialog::ApplyImageList()
{
- bool bHighContrast =
- (GetSettings().GetStyleSettings().GetHighContrastMode() != 0) &&
- (GetDisplayBackground().GetColor().IsDark() != 0);
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
ResMgr* _pMgr = &DIALOG_MGR();
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 88bbbb8ef2..1347062895 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -328,7 +328,7 @@ void FrameSelectorImpl::InitColors()
{
const StyleSettings& rSett = mrFrameSel.GetSettings().GetStyleSettings();
maBackCol = rSett.GetFieldColor();
- mbHCMode = maBackCol.IsDark();
+ mbHCMode = rSett.GetHighContrastMode();
maArrowCol = rSett.GetFieldTextColor();
maMarkCol.operator=( maBackCol ).Merge( maArrowCol, mbHCMode ? 0x80 : 0xC0 );
maHCLineCol = rSett.GetLabelTextColor();
diff --git a/svx/source/dialog/hyperdlg.cxx b/svx/source/dialog/hyperdlg.cxx
index 3bb5f0b6b1..efbe2e850b 100644
--- a/svx/source/dialog/hyperdlg.cxx
+++ b/svx/source/dialog/hyperdlg.cxx
@@ -78,9 +78,11 @@ SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( Window* _pParent, USHORT nId,
pWindow = mpDlg->GetWindow();
((MyStruct*)pImp)->bVisible = FALSE;
- if ( pInfo->aSize.Width() != 0 && pInfo->aSize.Height() != 0 )
+ Window* pTopWindow = 0;
+ if ( pInfo->aSize.Width() != 0 && pInfo->aSize.Height() != 0 &&
+ (0 != (pTopWindow = SFX_APP()->GetTopWindow())))
{
- Size aParentSize( SFX_APP()->GetTopWindow()->GetSizePixel() );
+ Size aParentSize( pTopWindow->GetSizePixel() );
Size aDlgSize ( GetSizePixel () );
if( aParentSize.Width() < pInfo->aPos.X() )
diff --git a/svx/source/dialog/hyprlink.cxx b/svx/source/dialog/hyprlink.cxx
index ee7c272fcc..c1be60ebe3 100644
--- a/svx/source/dialog/hyprlink.cxx
+++ b/svx/source/dialog/hyprlink.cxx
@@ -828,10 +828,7 @@ void SvxHyperlinkDlg::DataChanged( const DataChangedEvent& rDCEvt )
void SvxHyperlinkDlg::SetImages()
{
- bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode() != 0;
-
- if( bHighContrast )
- bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
SetItemImage( BTN_LINK, mpManager->GetImage( BTN_LINK, bHighContrast ) );
SetItemImage( BTN_INSERT_BOOKMARK, mpManager->GetImage( BTN_INSERT_BOOKMARK, bHighContrast ) );
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 9cf1e4cb46..23dbaa60ea 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -1042,7 +1042,7 @@ IMPL_LINK( SvxIMapDlg, MiscHdl, void*, EMPTYARG )
void SvxIMapDlg::ApplyImageList()
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
ImageList& rImgLst = bHighContrast ? maImageListH : maImageList;
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index b70f498c60..499f96d6a4 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -181,7 +181,7 @@ USHORT SvxLanguageBox::ImplInsertImgEntry( const String& rEntry, USHORT nPos, bo
USHORT nRet = 0;
if( !bChecked )
nRet = InsertEntry( rEntry, m_aNotCheckedImage, nPos );
- else if( GetSettings().GetStyleSettings().GetFaceColor().IsDark() )
+ else if( GetSettings().GetStyleSettings().GetHighContrastMode() )
nRet = InsertEntry( rEntry, m_aCheckedImageHC, nPos );
else
nRet = InsertEntry( rEntry, m_aCheckedImage, nPos );
diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx
index c7a4786a0f..3311375461 100644
--- a/svx/source/dialog/measctrl.cxx
+++ b/svx/source/dialog/measctrl.cxx
@@ -79,7 +79,7 @@ SvxXMeasurePreview::SvxXMeasurePreview
//pMeasureObj->SetItemSetAndBroadcast(rInAttrs);
pMeasureObj->SetMergedItemSetAndBroadcast(rInAttrs);
- SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
Invalidate();
}
@@ -196,7 +196,7 @@ void SvxXMeasurePreview::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
}
}
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index fc72b665ad..5bdfa05a3f 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -76,7 +76,7 @@ void SvxSwFrameExample::InitColors_Impl( void )
const StyleSettings& rSettings = GetSettings().GetStyleSettings();
m_aBgCol = Color( rSettings.GetWindowColor() ); // old: COL_WHITE
- BOOL bHC = m_aBgCol.IsDark();
+ BOOL bHC = rSettings.GetHighContrastMode();
m_aFrameColor = Color( COL_LIGHTGREEN );
m_aAlignColor = Color( COL_LIGHTRED );
diff --git a/svx/source/editeng/editdoc.cxx b/svx/source/editeng/editdoc.cxx
index 7160a4197a..d5f9ee16ee 100644
--- a/svx/source/editeng/editdoc.cxx
+++ b/svx/source/editeng/editdoc.cxx
@@ -1427,9 +1427,11 @@ XubString EditDoc::GetParaAsString( ContentNode* pNode, USHORT nStartPos, USHORT
else
pNextFeature = 0; // Feature interessiert unten nicht
-
DBG_ASSERT( nEnd >= nIndex, "Ende vorm Index?" );
- aStr += XubString( *pNode, nIndex, nEnd-nIndex );
+ //!! beware of sub string length of -1 which is also defined as STRING_LEN and
+ //!! thus would result in adding the whole sub string up to the end of the node !!
+ if (nEnd > nIndex)
+ aStr += XubString( *pNode, nIndex, nEnd - nIndex );
if ( pNextFeature )
{
@@ -1790,7 +1792,12 @@ BOOL EditDoc::RemoveAttribs( ContentNode* pNode, USHORT nStart, USHORT nEnd, Edi
}
if ( bChanged )
+ {
+ // char attributes need to be sorted by start again
+ pNode->GetCharAttribs().ResortAttribs();
+
SetModified( TRUE );
+ }
return bChanged;
}
diff --git a/svx/source/engine3d/helperhittest3d.cxx b/svx/source/engine3d/helperhittest3d.cxx
index 401111be85..270e725024 100644
--- a/svx/source/engine3d/helperhittest3d.cxx
+++ b/svx/source/engine3d/helperhittest3d.cxx
@@ -36,18 +36,10 @@
#include <svx/svdpage.hxx>
#include <svx/scene3d.hxx>
#include <svditer.hxx>
-#include <drawinglayer/processor3d/baseprocessor3d.hxx>
-#include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx>
-#include <drawinglayer/primitive3d/transformprimitive3d.hxx>
-#include <drawinglayer/primitive3d/polygonprimitive3d.hxx>
-#include <drawinglayer/primitive3d/polypolygonprimitive3d.hxx>
+#include <drawinglayer/processor3d/cutfindprocessor3d.hxx>
#include <svx/sdr/contact/viewcontactofe3d.hxx>
#include <svx/sdr/contact/viewcontactofe3dscene.hxx>
-#include <basegfx/polygon/b3dpolygontools.hxx>
-#include <basegfx/polygon/b3dpolypolygontools.hxx>
-#include <drawinglayer/primitive3d/hittestprimitive3d.hxx>
#include <com/sun/star/uno/Sequence.h>
-#include <drawinglayer/primitive3d/hatchtextureprimitive3d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -80,176 +72,13 @@ public:
//////////////////////////////////////////////////////////////////////////////
-namespace drawinglayer
-{
- namespace processor3d
- {
- class CutFindProcessor : public BaseProcessor3D
- {
- private:
- // the start and stop point for the cut vector
- basegfx::B3DPoint maFront;
- basegfx::B3DPoint maBack;
-
- // the found cut points
- ::std::vector< basegfx::B3DPoint > maResult;
-
- // #i102956# the transformation change from TransformPrimitive3D processings
- // needs to be remembered to be able to transform found cuts to the
- // basic coordinate system the processor starts with
- basegfx::B3DHomMatrix maCombinedTransform;
-
- // as tooling, the process() implementation takes over API handling and calls this
- // virtual render method when the primitive implementation is BasePrimitive3D-based.
- virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate);
-
- public:
- CutFindProcessor(const geometry::ViewInformation3D& rViewInformation,
- const basegfx::B3DPoint& rFront,
- const basegfx::B3DPoint& rBack)
- : BaseProcessor3D(rViewInformation),
- maFront(rFront),
- maBack(rBack),
- maResult(),
- maCombinedTransform()
- {}
-
- // data access
- const ::std::vector< basegfx::B3DPoint >& getCutPoints() const { return maResult; }
- };
-
- void CutFindProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate)
- {
- // it is a BasePrimitive3D implementation, use getPrimitiveID() call for switch
- switch(rCandidate.getPrimitiveID())
- {
- case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D :
- {
- // transform group.
- const primitive3d::TransformPrimitive3D& rPrimitive = static_cast< const primitive3d::TransformPrimitive3D& >(rCandidate);
-
- // remember old and transform front, back to object coordinates
- const basegfx::B3DPoint aLastFront(maFront);
- const basegfx::B3DPoint aLastBack(maBack);
- basegfx::B3DHomMatrix aInverseTrans(rPrimitive.getTransformation());
- aInverseTrans.invert();
- maFront *= aInverseTrans;
- maBack *= aInverseTrans;
-
- // remember current and create new transformation; add new object transform from right side
- const geometry::ViewInformation3D aLastViewInformation3D(getViewInformation3D());
- const geometry::ViewInformation3D aNewViewInformation3D(
- aLastViewInformation3D.getObjectTransformation() * rPrimitive.getTransformation(),
- aLastViewInformation3D.getOrientation(),
- aLastViewInformation3D.getProjection(),
- aLastViewInformation3D.getDeviceToView(),
- aLastViewInformation3D.getViewTime(),
- aLastViewInformation3D.getExtendedInformationSequence());
- updateViewInformation(aNewViewInformation3D);
-
- // #i102956# remember needed back-transform for found cuts (combine from right side)
- const basegfx::B3DHomMatrix aLastCombinedTransform(maCombinedTransform);
- maCombinedTransform = maCombinedTransform * rPrimitive.getTransformation();
-
- // let break down
- process(rPrimitive.getChildren());
-
- // restore transformations and front, back
- maCombinedTransform = aLastCombinedTransform;
- updateViewInformation(aLastViewInformation3D);
- maFront = aLastFront;
- maBack = aLastBack;
- break;
- }
- case PRIMITIVE3D_ID_POLYGONHAIRLINEPRIMITIVE3D :
- {
- // PolygonHairlinePrimitive3D, not used for hit test with planes, ignore. This
- // means that also thick line expansion will not be hit-tested as
- // PolyPolygonMaterialPrimitive3D
- break;
- }
- case PRIMITIVE3D_ID_HATCHTEXTUREPRIMITIVE3D :
- {
- // #i97321#
- // For HatchTexturePrimitive3D, do not use the decomposition since it will produce
- // clipped hatch lines in 3D. It can be used when the hatch also has a filling, but for
- // simplicity, just use the children which are the PolyPolygonMaterialPrimitive3D
- // which define the hatched areas anyways; for HitTest this is more than adequate
- const primitive3d::HatchTexturePrimitive3D& rPrimitive = static_cast< const primitive3d::HatchTexturePrimitive3D& >(rCandidate);
- process(rPrimitive.getChildren());
- break;
- }
- case PRIMITIVE3D_ID_HITTESTPRIMITIVE3D :
- {
- // HitTestPrimitive3D, force usage due to we are doing a hit test and this
- // primitive only gets generated on 3d objects without fill, exactly for this
- // purpose
- const primitive3d::HitTestPrimitive3D& rPrimitive = static_cast< const primitive3d::HitTestPrimitive3D& >(rCandidate);
- process(rPrimitive.getChildren());
- break;
- }
- case PRIMITIVE3D_ID_POLYPOLYGONMATERIALPRIMITIVE3D :
- {
- // PolyPolygonMaterialPrimitive3D
- const primitive3d::PolyPolygonMaterialPrimitive3D& rPrimitive = static_cast< const primitive3d::PolyPolygonMaterialPrimitive3D& >(rCandidate);
-
- if(!maFront.equal(maBack))
- {
- const basegfx::B3DPolyPolygon& rPolyPolygon = rPrimitive.getB3DPolyPolygon();
- const sal_uInt32 nPolyCount(rPolyPolygon.count());
-
- if(nPolyCount)
- {
- const basegfx::B3DPolygon aPolygon(rPolyPolygon.getB3DPolygon(0));
- const sal_uInt32 nPointCount(aPolygon.count());
-
- if(nPointCount > 2)
- {
- const basegfx::B3DVector aPlaneNormal(aPolygon.getNormal());
-
- if(!aPlaneNormal.equalZero())
- {
- const basegfx::B3DPoint aPointOnPlane(aPolygon.getB3DPoint(0));
- double fCut(0.0);
-
- if(basegfx::tools::getCutBetweenLineAndPlane(aPlaneNormal, aPointOnPlane, maFront, maBack, fCut))
- {
- const basegfx::B3DPoint aCutPoint(basegfx::interpolate(maFront, maBack, fCut));
-
- if(basegfx::tools::isInside(rPolyPolygon, aCutPoint, false))
- {
- // #i102956# add result. Do not forget to do this in the coordinate
- // system the processor get started with, so use the collected
- // combined transformation from processed TransformPrimitive3D's
- maResult.push_back(maCombinedTransform * aCutPoint);
- }
- }
- }
- }
- }
- }
-
- break;
- }
- default :
- {
- // process recursively
- process(rCandidate.get3DDecomposition(getViewInformation3D()));
- break;
- }
- }
- }
- } // end of namespace processor3d
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
void getAllHit3DObjectWithRelativePoint(
const basegfx::B3DPoint& rFront,
const basegfx::B3DPoint& rBack,
const E3dCompoundObject& rObject,
const drawinglayer::geometry::ViewInformation3D& rObjectViewInformation3D,
- ::std::vector< basegfx::B3DPoint >& o_rResult)
+ ::std::vector< basegfx::B3DPoint >& o_rResult,
+ bool bAnyHit)
{
o_rResult.clear();
@@ -271,7 +100,7 @@ void getAllHit3DObjectWithRelativePoint(
if(aObjectRange.overlaps(aFrontBackRange))
{
// bound volumes hit, geometric cut tests needed
- drawinglayer::processor3d::CutFindProcessor aCutFindProcessor(rObjectViewInformation3D, rFront, rBack);
+ drawinglayer::processor3d::CutFindProcessor aCutFindProcessor(rObjectViewInformation3D, rFront, rBack, bAnyHit);
aCutFindProcessor.process(aPrimitives);
o_rResult = aCutFindProcessor.getCutPoints();
}
@@ -388,7 +217,7 @@ SVX_DLLPUBLIC void getAllHit3DObjectsSortedFrontToBack(
{
// get all hit points with object
::std::vector< basegfx::B3DPoint > aHitsWithObject;
- getAllHit3DObjectWithRelativePoint(aFront, aBack, *pCandidate, aViewInfo3D, aHitsWithObject);
+ getAllHit3DObjectWithRelativePoint(aFront, aBack, *pCandidate, aViewInfo3D, aHitsWithObject, false);
for(sal_uInt32 a(0); a < aHitsWithObject.size(); a++)
{
@@ -452,7 +281,7 @@ bool checkHitSingle3DObject(
{
// get all hit points with object
::std::vector< basegfx::B3DPoint > aHitsWithObject;
- getAllHit3DObjectWithRelativePoint(aFront, aBack, rCandidate, aViewInfo3D, aHitsWithObject);
+ getAllHit3DObjectWithRelativePoint(aFront, aBack, rCandidate, aViewInfo3D, aHitsWithObject, true);
if(aHitsWithObject.size())
{
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index f79731a982..9d8bbdd0fc 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2080,7 +2080,7 @@ SpinField* DbCurrencyField::createField( Window* _pParent, WinBits _nFieldStyle,
//------------------------------------------------------------------------------
double DbCurrencyField::GetCurrency(const Reference< ::com::sun::star::sdb::XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter) const
{
- volatile double fValue = GetValue(_rxField, xFormatter);
+ double fValue = GetValue(_rxField, xFormatter);
if (m_nScale)
{
// OSL_TRACE("double = %.64f ",fValue);
@@ -2158,7 +2158,7 @@ sal_Bool DbCurrencyField::commitControl()
Any aVal;
if (aText.Len() != 0) // nicht null
{
- volatile double fValue = ((LongCurrencyField*)m_pWindow)->GetValue();
+ double fValue = ((LongCurrencyField*)m_pWindow)->GetValue();
if (m_nScale)
{
fValue /= ::rtl::math::pow10Exp(1.0, m_nScale);
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index e3ea3b2a3e..bbd3358d58 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -763,12 +763,18 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType )
Fraction aZoom = GetZoom();
// not all of these controls need to know the new zoom, but to be sure ...
- Font aFont( IsControlFont() ? GetControlFont() : GetPointFont());
+ Font aFont( GetSettings().GetStyleSettings().GetFieldFont() );
+ if ( IsControlFont() )
+ aFont.Merge( GetControlFont() );
+
for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i)
{
pWindows[i]->SetZoom(aZoom);
pWindows[i]->SetZoomedPointFont(aFont);
}
+
+ SetZoomedPointFont( aFont );
+
// rearrange the controls
m_nDefaultWidth = ArrangeControls();
}
@@ -1075,18 +1081,13 @@ void DbGridControl::ImplInitWindow( const InitWindowFacet _eInitWhat )
{
if ( m_bNavigationBar )
{
- m_aBar.SetZoom( GetZoom() );
-
Font aFont = m_aBar.GetSettings().GetStyleSettings().GetFieldFont();
if ( IsControlFont() )
- {
m_aBar.SetControlFont( GetControlFont() );
- aFont.Merge( GetControlFont() );
- }
else
m_aBar.SetControlFont();
- m_aBar.SetZoomedPointFont( aFont );
+ m_aBar.SetZoom( GetZoom() );
}
}
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index c5af260f72..c56b4b77f6 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -778,7 +778,7 @@ namespace svxform
SvLBoxEntry* XFormsPage::AddEntry( ItemNode* _pNewNode, bool _bIsElement )
{
SvLBoxEntry* pParent = m_aItemList.FirstSelected();
- const ImageList& rImageList = GetBackground().GetColor().IsDark()
+ const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode()
? m_pNaviWin->GetItemHCImageList()
: m_pNaviWin->GetItemImageList();
USHORT nImageID = ( _bIsElement ) ? IID_ELEMENT : IID_ATTRIBUTE;
@@ -988,7 +988,7 @@ namespace svxform
SvLBoxEntry* XFormsPage::AddEntry( const Reference< XPropertySet >& _rEntry )
{
SvLBoxEntry* pEntry = NULL;
- const ImageList& rImageList = GetBackground().GetColor().IsDark()
+ const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode()
? m_pNaviWin->GetItemHCImageList()
: m_pNaviWin->GetItemImageList();
Image aImage = rImageList.GetImage( IID_ELEMENT );
@@ -1244,7 +1244,7 @@ namespace svxform
m_xUIHelper = Reference< css::xforms::XFormsUIHelper1 >( _xModel, UNO_QUERY );
String sRet;
m_bHasModel = true;
- const ImageList& rImageList = GetBackground().GetColor().IsDark()
+ const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode()
? m_pNaviWin->GetItemHCImageList()
: m_pNaviWin->GetItemImageList();
diff --git a/svx/source/form/fmcontrollayout.cxx b/svx/source/form/fmcontrollayout.cxx
index e807f13fcd..081540aa1b 100644
--- a/svx/source/form/fmcontrollayout.cxx
+++ b/svx/source/form/fmcontrollayout.cxx
@@ -30,17 +30,28 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+
#include "fmcontrollayout.hxx"
-#ifndef _SVX_FMPROP_HRC
#include "fmprop.hrc"
-#endif
/** === begin UNO includes === **/
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/awt/VisualEffect.hpp>
+#include <com/sun/star/i18n/ScriptType.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/awt/FontDescriptor.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/container/XChild.hpp>
/** === end UNO includes === **/
-#include <tools/debug.hxx>
+
#include <comphelper/processfactory.hxx>
+#include <i18npool/mslangid.hxx>
+#include <svtools/syslocale.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <tools/debug.hxx>
+#include <tools/diagnose_ex.h>
+#include <vcl/outdev.hxx>
//........................................................................
namespace svxform
@@ -48,15 +59,171 @@ namespace svxform
//........................................................................
using namespace ::utl;
- using namespace ::com::sun::star::uno;
- using namespace ::com::sun::star::awt;
- using namespace ::com::sun::star::beans;
- using namespace ::com::sun::star::form;
+ /** === begin UNO using === **/
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::XInterface;
+ using ::com::sun::star::uno::UNO_QUERY;
+ using ::com::sun::star::uno::UNO_QUERY_THROW;
+ using ::com::sun::star::uno::UNO_SET_THROW;
+ using ::com::sun::star::uno::Exception;
+ using ::com::sun::star::uno::RuntimeException;
+ using ::com::sun::star::uno::Any;
+ using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::Type;
+ using ::com::sun::star::beans::XPropertySet;
+ using ::com::sun::star::beans::XPropertySetInfo;
+ using ::com::sun::star::lang::Locale;
+ using ::com::sun::star::awt::FontDescriptor;
+ using ::com::sun::star::style::XStyleFamiliesSupplier;
+ using ::com::sun::star::lang::XServiceInfo;
+ using ::com::sun::star::container::XNameAccess;
+ using ::com::sun::star::container::XChild;
+ /** === end UNO using === **/
+ namespace FormComponentType = ::com::sun::star::form::FormComponentType;
+ namespace VisualEffect = ::com::sun::star::awt::VisualEffect;
+ namespace ScriptType = ::com::sun::star::i18n::ScriptType;
+
+ //--------------------------------------------------------------------
+ namespace
+ {
+ //....................................................................
+ template< class INTERFACE_TYPE >
+ Reference< INTERFACE_TYPE > getTypedModelNode( const Reference< XInterface >& _rxModelNode )
+ {
+ Reference< INTERFACE_TYPE > xTypedNode( _rxModelNode, UNO_QUERY );
+ if ( xTypedNode.is() )
+ return xTypedNode;
+ else
+ {
+ Reference< XChild > xChild( _rxModelNode, UNO_QUERY );
+ if ( xChild.is() )
+ return getTypedModelNode< INTERFACE_TYPE >( xChild->getParent() );
+ else
+ return NULL;
+ }
+ }
+
+ //....................................................................
+ static bool lcl_getDocumentDefaultStyleAndFamily( const Reference< XInterface >& _rxDocument, ::rtl::OUString& _rFamilyName, ::rtl::OUString& _rStyleName ) SAL_THROW(( Exception ))
+ {
+ bool bSuccess = true;
+ Reference< XServiceInfo > xDocumentSI( _rxDocument, UNO_QUERY );
+ if ( xDocumentSI.is() )
+ {
+ if ( xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) ) )
+ || xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.WebDocument" ) ) )
+ )
+ {
+ _rFamilyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParagraphStyles" ) );
+ _rStyleName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
+ }
+ else if ( xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) ) ) )
+ {
+ _rFamilyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CellStyles" ) );
+ _rStyleName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Default" ) );
+ }
+ else if ( xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) )
+ || xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) )
+ )
+ {
+ _rFamilyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "graphics" ) );
+ _rStyleName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "standard" ) );
+ }
+ else
+ bSuccess = false;
+ }
+ return bSuccess;
+ }
+
+ //....................................................................
+ static void lcl_initializeControlFont( const Reference< XPropertySet >& _rxModel )
+ {
+ try
+ {
+ Reference< XPropertySet > xStyle( ControlLayouter::getDefaultDocumentTextStyle( _rxModel ), UNO_SET_THROW );
+ Reference< XPropertySetInfo > xStylePSI( xStyle->getPropertySetInfo(), UNO_SET_THROW );
+
+ // determine the script type associated with the system locale
+ const LocaleDataWrapper& rSysLocaleData = SvtSysLocale().GetLocaleData();
+ const sal_Int16 eSysLocaleScriptType = MsLangId::getScriptType( MsLangId::convertLocaleToLanguage( rSysLocaleData.getLocale() ) );
+
+ // depending on this script type, use the right property from the document's style which controls the
+ // default locale for document content
+ const sal_Char* pCharLocalePropertyName = "CharLocale";
+ switch ( eSysLocaleScriptType )
+ {
+ case ScriptType::LATIN:
+ // already defaulted above
+ break;
+ case ScriptType::ASIAN:
+ pCharLocalePropertyName = "CharLocaleAsian";
+ break;
+ case ScriptType::COMPLEX:
+ pCharLocalePropertyName = "CharLocaleComplex";
+ break;
+ default:
+ OSL_ENSURE( false, "lcl_initializeControlFont: unexpected script type for system locale!" );
+ break;
+ }
+
+ ::rtl::OUString sCharLocalePropertyName = ::rtl::OUString::createFromAscii( pCharLocalePropertyName );
+ Locale aDocumentCharLocale;
+ if ( xStylePSI->hasPropertyByName( sCharLocalePropertyName ) )
+ {
+ OSL_VERIFY( xStyle->getPropertyValue( sCharLocalePropertyName ) >>= aDocumentCharLocale );
+ }
+ // fall back to CharLocale property at the style
+ if ( !aDocumentCharLocale.Language.getLength() )
+ {
+ sCharLocalePropertyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CharLocale" ) );
+ if ( xStylePSI->hasPropertyByName( sCharLocalePropertyName ) )
+ {
+ OSL_VERIFY( xStyle->getPropertyValue( sCharLocalePropertyName ) >>= aDocumentCharLocale );
+ }
+ }
+ // fall back to the system locale
+ if ( !aDocumentCharLocale.Language.getLength() )
+ {
+ aDocumentCharLocale = rSysLocaleData.getLocale();
+ }
+
+ // retrieve a default font for this locale, and set it at the control
+ Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS, MsLangId::convertLocaleToLanguage( aDocumentCharLocale ), DEFAULTFONT_FLAGS_ONLYONE );
+ FontDescriptor aFontDesc = VCLUnoHelper::CreateFontDescriptor( aFont );
+ _rxModel->setPropertyValue(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FontDescriptor" ) ),
+ makeAny( aFontDesc )
+ );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
+ }
//====================================================================
//= ControlLayouter
//====================================================================
//--------------------------------------------------------------------
+ Reference< XPropertySet > ControlLayouter::getDefaultDocumentTextStyle( const Reference< XPropertySet >& _rxModel )
+ {
+ // the style family collection
+ Reference< XStyleFamiliesSupplier > xSuppStyleFamilies( getTypedModelNode< XStyleFamiliesSupplier >( _rxModel.get() ), UNO_SET_THROW );
+ Reference< XNameAccess > xStyleFamilies( xSuppStyleFamilies->getStyleFamilies(), UNO_SET_THROW );
+
+ // the names of the family, and the style - depends on the document type we live in
+ ::rtl::OUString sFamilyName, sStyleName;
+ if ( !lcl_getDocumentDefaultStyleAndFamily( xSuppStyleFamilies.get(), sFamilyName, sStyleName ) )
+ throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "unknown document type!" ) ), NULL );
+
+ // the concrete style
+ Reference< XNameAccess > xStyleFamily( xStyleFamilies->getByName( sFamilyName ), UNO_QUERY_THROW );
+ return Reference< XPropertySet >( xStyleFamily->getByName( sStyleName ), UNO_QUERY_THROW );
+ }
+
+ //--------------------------------------------------------------------
void ControlLayouter::initializeControlLayout( const Reference< XPropertySet >& _rxControlModel, DocumentType _eDocType )
{
DBG_ASSERT( _rxControlModel.is(), "ControlLayouter::initializeControlLayout: invalid model!" );
@@ -65,10 +232,7 @@ namespace svxform
try
{
- Reference< XPropertySetInfo > xPSI( _rxControlModel->getPropertySetInfo() );
- if ( !xPSI.is() )
- // can't do anything
- return;
+ Reference< XPropertySetInfo > xPSI( _rxControlModel->getPropertySetInfo(), UNO_SET_THROW );
// the control type
sal_Int16 nClassId = FormComponentType::CONTROL;
@@ -114,6 +278,13 @@ namespace svxform
if ( xPSI->hasPropertyByName( FM_PROP_VISUALEFFECT ) )
_rxControlModel->setPropertyValue( FM_PROP_VISUALEFFECT, makeAny( nVisualEffect ) );
}
+
+ // the font (only if we use the document's ref devices for rendering control text, otherwise, the
+ // default font of VCL controls is assumed to be fine)
+ if ( useDocumentReferenceDevice( _eDocType )
+ && xPSI->hasPropertyByName( FM_PROP_FONT )
+ )
+ lcl_initializeControlFont( _rxControlModel );
}
catch( const Exception& )
{
@@ -141,6 +312,18 @@ namespace svxform
return bDynamicBorderColor;
}
+ //--------------------------------------------------------------------
+ bool ControlLayouter::useDocumentReferenceDevice( DocumentType _eDocType )
+ {
+ if ( _eDocType == eUnknownDocumentType )
+ return false;
+ OConfigurationNode aConfig = getLayoutSettings( _eDocType );
+ Any aUseRefDevice = aConfig.getNodeValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UseDocumentTextMetrics" ) ) );
+ bool bUseRefDevice = false;
+ OSL_VERIFY( aUseRefDevice >>= bUseRefDevice );
+ return bUseRefDevice;
+ }
+
//........................................................................
} // namespace svxform
//........................................................................
diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx
index 73a1471b26..56ea8a2014 100644
--- a/svx/source/form/fmmodel.cxx
+++ b/svx/source/form/fmmodel.cxx
@@ -30,30 +30,27 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+
+#include "fmundo.hxx"
+#include "fmdocumentclassification.hxx"
+#include "fmcontrollayout.hxx"
+
+#include <svx/fmmodel.hxx>
+#include <svx/fmpage.hxx>
+#include <svx/svdobj.hxx>
#include <tools/debug.hxx>
#ifndef SVX_LIGHT
-#ifndef _SFX_OBJSH_HXX //autogen
#include <sfx2/objsh.hxx>
-#endif
#else
class SfxObjectShell;
#endif
-#ifndef _FM_FMMODEL_HXX
-#include <svx/fmmodel.hxx>
-#endif
-
-#ifndef _FM_PAGE_HXX
-#include <svx/fmpage.hxx>
-#endif
-#include "fmundo.hxx"
-#ifndef _SVX_SVDOBJ_HXX
-#include <svx/svdobj.hxx>
-#endif
+#include <boost/optional.hpp>
using ::com::sun::star::uno::Reference;
using ::com::sun::star::container::XNameContainer;
+using namespace svxform;
TYPEINIT1(FmFormModel, SdrModel);
@@ -62,11 +59,14 @@ struct FmFormModelImplData
FmXUndoEnvironment* pUndoEnv;
sal_Bool bOpenInDesignIsDefaulted;
sal_Bool bMovingPage;
+ ::boost::optional< sal_Bool >
+ aControlsUseRefDevice;
FmFormModelImplData()
:pUndoEnv( NULL )
,bOpenInDesignIsDefaulted( sal_True )
,bMovingPage( sal_False )
+ ,aControlsUseRefDevice()
{
}
};
@@ -314,6 +314,19 @@ sal_Bool FmFormModel::OpenInDesignModeIsDefaulted( )
#endif
//------------------------------------------------------------------------
+sal_Bool FmFormModel::ControlsUseRefDevice() const
+{
+ if ( !m_pImpl->aControlsUseRefDevice )
+ {
+ DocumentType eDocType = eUnknownDocumentType;
+ if ( m_pObjShell )
+ eDocType = DocumentClassification::classifyHostDocument( m_pObjShell->GetModel() );
+ m_pImpl->aControlsUseRefDevice.reset( ControlLayouter::useDocumentReferenceDevice( eDocType ) );
+ }
+ return *m_pImpl->aControlsUseRefDevice;
+}
+
+//------------------------------------------------------------------------
void FmFormModel::SetAutoControlFocus( sal_Bool _bAutoControlFocus )
{
#ifndef SVX_LIGHT
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index 5a32ea8314..558f23b2a8 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -81,6 +81,10 @@ FmFormObj::FmFormObj(const ::rtl::OUString& rModelName,sal_Int32 _nType)
,m_pLastKnownRefDevice ( NULL )
{
DBG_CTOR(FmFormObj, NULL);
+
+ // normally, this is done in SetUnoControlModel, but if the call happened in the base class ctor,
+ // then our incarnation of it was not called (since we were not constructed at this time).
+ impl_checkRefDevice_nothrow( true );
}
//------------------------------------------------------------------
@@ -124,6 +128,45 @@ void FmFormObj::ClearObjEnv()
}
//------------------------------------------------------------------
+void FmFormObj::impl_checkRefDevice_nothrow( bool _force )
+{
+ const FmFormModel* pFormModel = PTR_CAST( FmFormModel, GetModel() );
+ if ( !pFormModel || !pFormModel->ControlsUseRefDevice() )
+ return;
+
+ OutputDevice* pCurrentRefDevice = pFormModel ? pFormModel->GetRefDevice() : NULL;
+ if ( ( m_pLastKnownRefDevice == pCurrentRefDevice ) && !_force )
+ return;
+
+ Reference< XControlModel > xControlModel( GetUnoControlModel() );
+ if ( !xControlModel.is() )
+ return;
+
+ m_pLastKnownRefDevice = pCurrentRefDevice;
+ if ( m_pLastKnownRefDevice == NULL )
+ return;
+
+ try
+ {
+ Reference< XPropertySet > xModelProps( GetUnoControlModel(), UNO_QUERY_THROW );
+ Reference< XPropertySetInfo > xPropertyInfo( xModelProps->getPropertySetInfo(), UNO_SET_THROW );
+
+ static const ::rtl::OUString sRefDevicePropName( RTL_CONSTASCII_USTRINGPARAM( "ReferenceDevice" ) );
+ if ( xPropertyInfo->hasPropertyByName( sRefDevicePropName ) )
+ {
+ VCLXDevice* pUnoRefDevice = new VCLXDevice;
+ pUnoRefDevice->SetOutputDevice( m_pLastKnownRefDevice );
+ Reference< XDevice > xRefDevice( pUnoRefDevice );
+ xModelProps->setPropertyValue( sRefDevicePropName, makeAny( xRefDevice ) );
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+//------------------------------------------------------------------
void FmFormObj::impl_isolateControlModel_nothrow()
{
try
@@ -360,38 +403,10 @@ SdrObject* FmFormObj::Clone() const
}
//------------------------------------------------------------------
-void FmFormObj::ReformatText()
+void FmFormObj::NbcReformatText()
{
- const FmFormModel* pFormModel = PTR_CAST( FmFormModel, GetModel() );
- OutputDevice* pCurrentRefDevice = pFormModel ? pFormModel->GetRefDevice() : NULL;
-
- if ( m_pLastKnownRefDevice != pCurrentRefDevice )
- {
- m_pLastKnownRefDevice = pCurrentRefDevice;
-
- try
- {
- Reference< XPropertySet > xModelProps( GetUnoControlModel(), UNO_QUERY );
- Reference< XPropertySetInfo > xPropertyInfo;
- if ( xModelProps.is() )
- xPropertyInfo = xModelProps->getPropertySetInfo();
-
- const ::rtl::OUString sRefDevicePropName( RTL_CONSTASCII_USTRINGPARAM( "ReferenceDevice" ) );
- if ( xPropertyInfo.is() && xPropertyInfo->hasPropertyByName( sRefDevicePropName ) )
- {
- VCLXDevice* pUnoRefDevice = new VCLXDevice;
- pUnoRefDevice->SetOutputDevice( m_pLastKnownRefDevice );
- Reference< XDevice > xRefDevice( pUnoRefDevice );
- xModelProps->setPropertyValue( sRefDevicePropName, makeAny( xRefDevice ) );
- }
- }
- catch( const Exception& )
- {
- OSL_ENSURE( sal_False, "FmFormObj::ReformatText: caught an exception!" );
- }
- }
-
- SdrUnoObj::ReformatText();
+ impl_checkRefDevice_nothrow( false );
+ SdrUnoObj::NbcReformatText();
}
//------------------------------------------------------------------
@@ -564,6 +579,13 @@ Reference< XInterface > FmFormObj::ensureModelEnv(const Reference< XInterface >
}
//------------------------------------------------------------------
+void FmFormObj::SetModel( SdrModel* _pNewModel )
+{
+ SdrUnoObj::SetModel( _pNewModel );
+ impl_checkRefDevice_nothrow();
+}
+
+//------------------------------------------------------------------
FmFormObj* FmFormObj::GetFormObject( SdrObject* _pSdrObject )
{
FmFormObj* pFormObject = dynamic_cast< FmFormObj* >( _pSdrObject );
@@ -595,6 +617,8 @@ void FmFormObj::SetUnoControlModel( const Reference< com::sun::star::awt::XContr
SdrUnoObj::SetUnoControlModel( _rxModel );
// TODO: call something like formObjectInserted at the form page, to tell it the new model
+
+ impl_checkRefDevice_nothrow( true );
}
//------------------------------------------------------------------
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 645787b518..801e3f613f 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -987,7 +987,7 @@ PopupMenu* FmXFormShell::GetConversionMenu()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::GetConversionMenu" );
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark();
+ BOOL bIsHiContrastMode = rSettings.GetHighContrastMode();
PopupMenu* pNewMenu = new PopupMenu(SVX_RES( RID_FMSHELL_CONVERSIONMENU ));
@@ -2001,7 +2001,7 @@ bool FmXFormShell::setCurrentSelection( const InterfaceBag& _rSelection )
m_aCurrentSelection = _rSelection;
- // determine the form which all the selected objécts belong to, if any
+ // determine the form which all the selected obj�cts belong to, if any
Reference< XForm > xNewCurrentForm;
for ( InterfaceBag::const_iterator loop = m_aCurrentSelection.begin();
loop != m_aCurrentSelection.end();
diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx
index 7555b3d30d..0c7a416c4b 100644
--- a/svx/source/form/fmtextcontrolshell.cxx
+++ b/svx/source/form/fmtextcontrolshell.cxx
@@ -101,6 +101,7 @@ namespace svx
//====================================================================
static SfxSlotId pTextControlSlots[] =
{
+ SID_CLIPBOARD_FORMAT_ITEMS,
SID_CUT,
SID_COPY,
SID_PASTE,
@@ -140,7 +141,6 @@ namespace svx
// SID_TEXTDIRECTION_TOP_TO_BOTTOM,
SID_ATTR_CHAR_SCALEWIDTH, /* 911 */
SID_ATTR_CHAR_RELIEF,
- SID_CLIPBOARD_FORMAT_ITEMS, /* 922 */
SID_ATTR_PARA_LEFT_TO_RIGHT, /* 950 */
SID_ATTR_PARA_RIGHT_TO_LEFT,
0
diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx
index 4e28c62a83..d3dba436b4 100644
--- a/svx/source/form/formcontrolfactory.cxx
+++ b/svx/source/form/formcontrolfactory.cxx
@@ -44,8 +44,6 @@
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/awt/ScrollBarOrientation.hpp>
#include <com/sun/star/form/XGridColumnFactory.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/style/VerticalAlignment.hpp>
#include <com/sun/star/awt/LineEndFormat.hpp>
#include <com/sun/star/awt/ImageScaleMode.hpp>
@@ -53,6 +51,7 @@
#include <com/sun/star/util/XNumberFormatTypes.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/awt/FontDescriptor.hpp>
/** === end UNO includes === **/
#include <comphelper/componentcontext.hxx>
@@ -88,15 +87,16 @@ namespace svxform
using ::com::sun::star::beans::PropertyValue;
using ::com::sun::star::container::XChild;
using ::com::sun::star::form::XGridColumnFactory;
- using ::com::sun::star::lang::XServiceInfo;
- using ::com::sun::star::style::XStyleFamiliesSupplier;
- using ::com::sun::star::container::XNameAccess;
using ::com::sun::star::style::VerticalAlignment_MIDDLE;
using ::com::sun::star::beans::Property;
using ::com::sun::star::uno::TypeClass_DOUBLE;
using ::com::sun::star::uno::TypeClass_LONG;
using ::com::sun::star::util::XNumberFormats;
using ::com::sun::star::util::XNumberFormatTypes;
+ using ::com::sun::star::awt::FontDescriptor;
+ using ::com::sun::star::lang::Locale;
+ using ::com::sun::star::lang::XServiceInfo;
+ using ::com::sun::star::container::XNameAccess;
/** === end UNO using === **/
namespace FormComponentType = ::com::sun::star::form::FormComponentType;
namespace ScrollBarOrientation = ::com::sun::star::awt::ScrollBarOrientation;
@@ -236,65 +236,6 @@ namespace svxform
}
return aInfo;
}
- /*
- ATTENTION!
- Broken for solaris? It seems that the old used template argument TYPE was already
- defined as a macro ... which expand to ... "TYPE "!?
- All platforms are OK - excepting Solaris. There the line "template< class TYPE >"
- was expanded to "template < class TYPE " where the closing ">" was missing.
- */
- #ifdef MYTYPE
- #error "Who defines the macro MYTYPE, which is used as template argument here?"
- #endif
-
- //....................................................................
- template< class MYTYPE >
- Reference< MYTYPE > getTypedModelNode( const Reference< XInterface >& _rxModelNode )
- {
- Reference< MYTYPE > xTypedNode( _rxModelNode, UNO_QUERY );
- if ( xTypedNode.is() )
- return xTypedNode;
- else
- {
- Reference< XChild > xChild( _rxModelNode, UNO_QUERY );
- if ( xChild.is() )
- return getTypedModelNode< MYTYPE >( xChild->getParent() );
- else
- return NULL;
- }
- }
-
- //....................................................................
- static bool lcl_getDocumentDefaultStyleAndFamily( const Reference< XInterface >& _rxDocument, ::rtl::OUString& _rFamilyName, ::rtl::OUString& _rStyleName ) SAL_THROW(( Exception ))
- {
- bool bSuccess = true;
- Reference< XServiceInfo > xDocumentSI( _rxDocument, UNO_QUERY );
- if ( xDocumentSI.is() )
- {
- if ( xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.TextDocument" ) ) )
- || xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.WebDocument" ) ) )
- )
- {
- _rFamilyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParagraphStyles" ) );
- _rStyleName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) );
- }
- else if ( xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sheet.SpreadsheetDocument" ) ) ) )
- {
- _rFamilyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CellStyles" ) );
- _rStyleName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Default" ) );
- }
- else if ( xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) )
- || xDocumentSI->supportsService( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) )
- )
- {
- _rFamilyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "graphics" ) );
- _rStyleName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "standard" ) );
- }
- else
- bSuccess = false;
- }
- return bSuccess;
- }
//....................................................................
static const sal_Char* aCharacterAndParagraphProperties[] =
@@ -430,41 +371,13 @@ namespace svxform
//....................................................................
static void lcl_initializeCharacterAttributes( const Reference< XPropertySet >& _rxModel )
{
- // need to initialize the attributes from the "Default" style of the document we live in
-
try
{
- // the style family collection
- Reference< XStyleFamiliesSupplier > xSuppStyleFamilies = getTypedModelNode< XStyleFamiliesSupplier >( _rxModel.get() );
- Reference< XNameAccess > xStyleFamilies;
- if ( xSuppStyleFamilies.is() )
- xStyleFamilies = xSuppStyleFamilies->getStyleFamilies();
- OSL_ENSURE( xStyleFamilies.is(), "lcl_initializeCharacterAttributes: could not obtain the style families!" );
- if ( !xStyleFamilies.is() )
- return;
-
- // the names of the family, and the style - depends on the document type we live in
- ::rtl::OUString sFamilyName, sStyleName;
- bool bKnownDocumentType = lcl_getDocumentDefaultStyleAndFamily( xSuppStyleFamilies.get(), sFamilyName, sStyleName );
- OSL_ENSURE( bKnownDocumentType, "lcl_initializeCharacterAttributes: Huh? What document type is this?" );
- if ( !bKnownDocumentType )
- return;
-
- // the concrete style
- Reference< XNameAccess > xStyleFamily( xStyleFamilies->getByName( sFamilyName ), UNO_QUERY );
- Reference< XPropertySet > xStyle;
- if ( xStyleFamily.is() )
- xStyleFamily->getByName( sStyleName ) >>= xStyle;
- OSL_ENSURE( xStyle.is(), "lcl_initializeCharacterAttributes: could not retrieve the style!" );
- if ( !xStyle.is() )
- return;
-
- // transfer all properties which are described by the com.sun.star.style.
- Reference< XPropertySetInfo > xSourcePropInfo( xStyle->getPropertySetInfo() );
- Reference< XPropertySetInfo > xDestPropInfo( _rxModel->getPropertySetInfo() );
- OSL_ENSURE( xSourcePropInfo.is() && xDestPropInfo.is(), "lcl_initializeCharacterAttributes: no property set info!" );
- if ( !xSourcePropInfo.is() || !xDestPropInfo.is() )
- return;
+ Reference< XPropertySet > xStyle( ControlLayouter::getDefaultDocumentTextStyle( _rxModel ), UNO_SET_THROW );
+
+ // transfer all properties which are described by the style
+ Reference< XPropertySetInfo > xSourcePropInfo( xStyle->getPropertySetInfo(), UNO_SET_THROW );
+ Reference< XPropertySetInfo > xDestPropInfo( _rxModel->getPropertySetInfo(), UNO_SET_THROW );
::rtl::OUString sPropertyName;
const sal_Char** pCharacterProperty = aCharacterAndParagraphProperties;
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index c5a5eb2391..5025337118 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -219,7 +219,7 @@ void SvxFmTbxCtlConfig::StateChanged(USHORT nSID, SfxItemState eState, const Sfx
Image aImage = GetImage( m_xFrame,
aSlotURL,
hasBigImages(),
- GetToolBox().GetDisplayBackground().GetColor().IsDark() );
+ GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode() );
GetToolBox().SetItemImage( GetId(), aImage );
nLastSlot = nSlot;
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index ca5df8ff16..2c2d4d6900 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -1228,7 +1228,7 @@ IMPL_LINK( GalleryBrowser2, SelectTbxHdl, ToolBox*, pBox )
IMPL_LINK( GalleryBrowser2, MiscHdl, void*, EMPTYARG )
{
- const sal_Bool bHC = GALLERY_DLG_COLOR.IsDark();
+ const sal_Bool bHC = maViewBox.GetSettings().GetStyleSettings().GetHighContrastMode();
maViewBox.SetOutStyle( maMiscOptions.GetToolboxStyle() );
diff --git a/svx/source/inc/fmcontrollayout.hxx b/svx/source/inc/fmcontrollayout.hxx
index 0424046c66..d7bdf85c4e 100644
--- a/svx/source/inc/fmcontrollayout.hxx
+++ b/svx/source/inc/fmcontrollayout.hxx
@@ -62,6 +62,22 @@ namespace svxform
*/
static bool useDynamicBorderColor( DocumentType _eDocType );
+ /** determines whether for the given document type, form controls should use the document's reference device
+ for text rendering
+ */
+ static bool useDocumentReferenceDevice( DocumentType _eDocType );
+
+ /** gets the "default" style in a document which can be used if some default text format is needed
+
+ It depends on the type document type which concrete kind of style is returned, but it is expected to support
+ the css.style.CharacterProperties service.
+
+ @param _rxModel
+ a form component.
+ */
+ static ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
+ getDefaultDocumentTextStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
+
private:
ControlLayouter(); // never implemented
diff --git a/svx/source/inc/fmobj.hxx b/svx/source/inc/fmobj.hxx
index 3dd15fc1cd..ee765b45fd 100644
--- a/svx/source/inc/fmobj.hxx
+++ b/svx/source/inc/fmobj.hxx
@@ -86,12 +86,14 @@ public:
virtual sal_uInt32 GetObjInventor() const;
virtual sal_uInt16 GetObjIdentifier() const;
- virtual void ReformatText();
+ virtual void NbcReformatText();
virtual SdrObject* Clone() const;
// #116235# virtual SdrObject* Clone(SdrPage* pPage, SdrModel* pModel) const;
virtual void operator= (const SdrObject& rObj);
+ virtual void SetModel(SdrModel* pNewModel);
+
virtual void clonedFrom(const FmFormObj* _pSource);
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> ensureModelEnv(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _rSourceContainer, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer> _rTopLevelDestContainer);
@@ -124,6 +126,10 @@ private:
its parent.
*/
void impl_isolateControlModel_nothrow();
+
+ /** forwards the reference device of our SdrModel to the control model
+ */
+ void impl_checkRefDevice_nothrow( bool _force = false );
};
diff --git a/svx/source/intro/intro_tmpl.hrc b/svx/source/intro/intro_tmpl.hrc
index ad3a628213..f724cd476e 100644
--- a/svx/source/intro/intro_tmpl.hrc
+++ b/svx/source/intro/intro_tmpl.hrc
@@ -59,6 +59,7 @@ ItemList = \
< "Jost Ammon" ; > ; \
< "Paolo Amodio" ; > ; \
< "Abdullah Anar" ; > ; \
+ < "Gene Anaya" ; > ; \
< "Christian Andersen" ; > ; \
< "Frank J. Andersen" ; > ; \
< "Jan Moller Andersen" ; > ; \
@@ -94,7 +95,9 @@ ItemList = \
< "David Bartlett" ; > ; \
< "Sascha Ballach" ; > ; \
< "Stefan Baltzer" ; > ; \
+ < "Jayant Balraj Madavi" ; > ; \
< "Claudio Bandaloukas" ; > ; \
+ < "Omar Bar-or" ; > ; \
< "Hrega Basu" ; > ; \
< "Mathias Bauer" ; > ; \
< "Martin Baulig" ; > ; \
@@ -119,6 +122,7 @@ ItemList = \
< "Zaheda Bhorat" ; > ; \
< "Andreas Bille" ; > ; \
< "Oliver Bietzer" ; > ; \
+ < "Eric Bischoff" ; > ; \
< "Marissa Bishop" ; > ; \
< "Torkil Bladt" ; > ; \
< "Martin Blapp" ; > ; \
@@ -134,6 +138,7 @@ ItemList = \
< "Csaba Borbola" ; > ; \
< "Gregor Bornemann" ; > ; \
< "Thorsten Bosbach" ; > ; \
+ < "Eric Bosdonnat" ; > ; \
< "Daniel Boss" ; > ; \
< "David Boswell" ; > ; \
< "Freddy Boswell" ; > ; \
@@ -179,6 +184,8 @@ ItemList = \
< "Kimmy Chen" ; > ; \
< "Robert Chen" ; > ; \
< "Yu Aaron Cheng" ; > ; \
+ < "Jian Hong Cheng" ; > ; \
+ < "Xiuzhi Cheng" ; > ; \
< "Allan B. Christensen" ; > ; \
< "Steen Christensen" ; > ; \
< "Marco Ciampa" ; > ; \
@@ -190,6 +197,7 @@ ItemList = \
< "Vicky Chan" ; > ; \
< "Michael J. Cole" ; > ; \
< "Urska Colner" ; > ; \
+ < "Alexandro Colorado" ; > ; \
< "Compaq Computer Corperation" ; > ; \
< "Karen Conatser" ; > ; \
< "Confucian Pro. Technology" ; > ; \
@@ -197,11 +205,13 @@ ItemList = \
< "Lee Corbin" ; > ; \
< "Dietmar Cordes" ; > ; \
< "Berend Cornelius" ; > ; \
+ < "Clayton Cornell" ; > ; \
< "Jesus Corrius" ; > ; \
< "Martin Coxall" ; > ; \
< "Joszef Csongradi" ; > ; \
< "Alessandro Cumin" ; > ; \
< "Johannes Czerwinski" ; > ; \
+ < "Michael Cziebalski" ; > ; \
< "Valentina Dagiene" ; > ; \
< "Richard Daley" ; > ; \
< "Viktoras Dagys" ; > ; \
@@ -218,9 +228,11 @@ ItemList = \
< "Francois Dechelle" ; > ; \
< "Andrea Decorte" ; > ; \
< "Martijn Dekkers" ; > ; \
+ < "Andrew Dent" ; > ; \
< "Westley Alan Dent" ; > ; \
< "Luiz Augusto Von Dentz" ; > ; \
< "Helge Delfs" ; > ; \
+ < "Naren Devaiah" ; > ; \
< "Frederic Juan Diaz" ; > ; \
< "Scott Dietrich" ; > ; \
< "Frederik Dietz" ; > ; \
@@ -230,8 +242,10 @@ ItemList = \
< "Vitor Domingos" ; > ; \
< "Jean-Francois Donikian" ; > ; \
< "Simford Dong" ; > ; \
+ < "Nitri Dongre" ; > ; \
< "Thomas Doru" ; > ; \
< "Willem van Dorp" ; > ; \
+ < "Radek Doulik" ; > ; \
< "Davide Dozza" ; > ; \
< "Derek Dreger" ; > ; \
< "Carsten Driesner" ; > ; \
@@ -249,9 +263,11 @@ ItemList = \
< "Rene Engelhard" ; > ; \
< "Mina Erickson" ; > ; \
< "Peter Eriksen" ; > ; \
+ < "Per Eriksson" ; > ; \
< "Alberto Escudero-Pascual" ; > ; \
< "Fabalabs Software GmbH" ; > ; \
< "Charles Anthony Fannan" ; > ; \
+ < "Jean-Baptiste Faure" ; > ; \
< "Ralf-Michael Fehr" ; > ; \
< "Vladimir Fedak" ; > ; \
< "Zoltan Fekete" ; > ; \
@@ -261,6 +277,7 @@ ItemList = \
< "Claudio Ferreira" ; > ; \
< "Raquel Fares Ferreira" ; > ; \
< "Marco Fiemozzi" ; > ; \
+ < "Claudio F Filho" ; > ; \
< "Pierre de Filippis" ; > ; \
< "Jan Firich" ; > ; \
< "Andre Fischer" ; > ; \
@@ -271,6 +288,7 @@ ItemList = \
< "Kenneth Foskey" ; > ; \
< "Duncan Foster" ; > ; \
< "Tim Foster" ; > ; \
+ < "David Franser" ; > ; \
< "Peter Frandsen" ; > ; \
< "Gary Frederick" ; > ; \
< "Nils Fuhrmann" ; > ; \
@@ -280,8 +298,11 @@ ItemList = \
< "Tom Garland" ; > ; \
< "Wolfram Garten" ; > ; \
< "Martin Gallwey" ; > ; \
+ < "Pierre-Andre Galmes" ; > ; \
< "Roberto Galoppini" ; > ; \
< "Tony Galmiche" ; > ; \
+ < "Sunil Gandhi" ; > ; \
+ < "Zemin Gao" ; > ; \
< "Sophie Gautier" ; > ; \
< "Kathy Gavin" ; > ; \
< "Alexander Gelfenbain" ; > ; \
@@ -327,6 +348,7 @@ ItemList = \
< "Chris Halls" ; > ; \
< "Arne Christian Harseth" ; > ; \
< "Syamsul Anuar Abdul Hamid" ; > ; \
+ < "Bo Han" ; > ; \
< "Ove Hanebring" ; > ; \
< "Jens K. Hansen" ; > ; \
< "Martin Willemoes Hansen" ; > ; \
@@ -423,6 +445,9 @@ ItemList = \
< "Byrial Ole Jensen" ; > ; \
< "Ricky Hugh Jensen" ; > ; \
< "Tatjiana Jevsikova" ; > ; \
+ < "Berry Jia" ; > ; \
+ < "Mingfei Jia" ; > ; \
+ < "Chuang Jiang" ; > ; \
< "Jiao Jianhua" ; > ; \
< "Gary Johnston" ; > ; \
< "Dewi Jones" ; > ; \
@@ -430,6 +455,7 @@ ItemList = \
< "Anders Colding Jorgesen" ; > ; \
< "Peter Junge" ; > ; \
< "Christian Junker" ; > ; \
+ < "Pascal Junck" ; > ; \
< "Henrik Just" ; > ; \
< "Christian Kaas" ; > ; \
< "Yukata Kachi" ; > ; \
@@ -438,16 +464,19 @@ ItemList = \
< "masahisa kamataki" ; > ; \
< "Tim Kampa" ; > ; \
< "Petr Kania" ; > ; \
- < "Tim Kampa" ; > ; \
< "Mick Kappenburg" ; > ; \
< "Etsushi Kato" ; > ; \
< "Yosuke Kato" ; > ; \
+ < "Hirano Kazunari" ; > ; \
+ < "Mihaela Kedikova" ; > ; \
< "Juergen Keil" ; > ; \
< "Lina Kemmel" ; > ; \
< "Darren Kenny" ; > ; \
+ < "Dhanajay Keskar" ; > ; \
< "Ilja Ketris" ; > ; \
< "Philipp Kewisch Ketris" ; > ; \
< "Ossama Khayat" ; > ; \
+ < "Volodymyr Khrystynych" ; > ; \
< "Ilja Ketris" ; > ; \
< "Hermann Kienlein" ; > ; \
< "Artem Khvat" ; > ; \
@@ -462,6 +491,7 @@ ItemList = \
< "Thomas Klarhoefer" ; > ; \
< "Sven Klawitter" ; > ; \
< "Branislav Klocok" ; > ; \
+ < "Matthias Klose" ; > ; \
< "Halfdan Holger Knudsen" ; > ; \
< "Rune Tendal Kock" ; > ; \
< "Magdy Samuel Abdel Koddous" ; > ; \
@@ -473,6 +503,7 @@ ItemList = \
< "Uros Kositer" ; > ; \
< "Peter Kosmalla" ; > ; \
< "Nobuhiro Koura" ; > ; \
+ < "Lazlo Kovacs" ; > ; \
< "Martin Kretzchmar" ; > ; \
< "Ramesh Krishnamagaru" ; > ; \
< "Jayamohan Krishnasamy" ; > ; \
@@ -498,6 +529,7 @@ ItemList = \
< "Dr. Swapnil Vishnu Lale" ; > ; \
< "Antti Lampinen/Kongo Group" ; > ; \
< "Massimo Lanfranconi" ; > ; \
+ < "Marcus Lange" ; > ; \
< "Peter Lange" ; > ; \
< "Thomas Lange" ; > ; \
< "Lars Langhans" ; > ; \
@@ -518,21 +550,36 @@ ItemList = \
< "Yoann Le Bars" ; > ; \
< "Armin Le Grand" ; > ; \
< "Brigitte Le Grand" ; > ; \
+ < "Jakob Lechner" ; > ; \
+ < "Michael Leibowitz" ; > ; \
< "Serge Le Louarne" ; > ; \
< "Dong Lee" ; > ; \
< "Kenneth Lee" ; > ; \
< "Gregory Leffler" ; > ; \
< "Hercule Li" ; > ; \
+ < "Hui Li" ; > ; \
+ < "Jian Li" ; > ; \
< "Tommy C. Li" ; > ; \
< "Wind Li" ; > ; \
+ < "Xing Li" ; > ; \
+ < "Ping Liao" ; > ; \
< "Xin Liao" ; > ; \
+ < "Weike Liang" ; > ; \
< "Rony Liemmukda" ; > ; \
+ < "Tor Lillqvist" ; > ; \
< "Patranun Limudomporn" ; > ; \
< "Archie Lin" ; > ; \
< "Fong Lin" ; > ; \
< "Martha J. Lindeman" ; > ; \
< "Joachim Lingner" ; > ; \
< "Christian Lippka" ; > ; \
+ < "Chen Liu" ; > ; \
+ < "Jianli Liu" ; > ; \
+ < "Mindy Liu" ; > ; \
+ < "Tao Liu" ; > ; \
+ < "YiSong Liu" ; > ; \
+ < "Yu Liu" ; > ; \
+ < "Yuhua Liu" ; > ; \
< "ALT Linux Russia" ; > ; \
< "Jonathan S. Lister" ; > ; \
< "Vedran Ljubovic" ; > ; \
@@ -544,6 +591,7 @@ ItemList = \
< "Anthony Long" ; > ; \
< "Roberto Loprieno" ; > ; \
< "Riccardo Losselli" ; > ; \
+ < "Jackson Low" ; > ; \
< "Patrick Luby" ; > ; \
< "Christoph Lukasiak" ; > ; \
< "Robert Ludvik" ; > ; \
@@ -551,17 +599,23 @@ ItemList = \
< "Edgardo Lugaresi" ; > ; \
< "Gavin Lu" ; > ; \
< "Morton Lund" ; > ; \
+ < "Jingrong Luo" ; > ; \
< "Zaoliang Luo" ; > ; \
< "Ian Lynch" ; > ; \
+ < "Jun Ma" ; > ; \
< "Thomas J.L. MacDermott" ; > ; \
< "Marcio A. Macendo" ; > ; \
< "George Machitidze" ; > ; \
< "Diane Mackay" ; > ; \
+ < "Prasad Madhav" ; > ; \
< "Jorgen Madsen" ; > ; \
< "Ove Madsen" ; > ; \
< "Martin Maher" ; > ; \
+ < "Babak Mahbod" ; > ; \
+ < "Nakata Maho " ; > ; \
< "Wad Mahsckoff" ; > ; \
< "Milena Majorosova" ; > ; \
+ < "Yonggang Mao" ; > ; \
< "Libor Maly" ; > ; \
< "Mandrake Soft S.A." ; > ; \
< "Libor Maly" ; > ; \
@@ -600,15 +654,18 @@ ItemList = \
< "Aaron R. Meck" ; > ; \
< "Nirav Mehta" ; > ; \
< "Michael Meeks" ; > ; \
+ < "Frederico Mena-Quintero" ; > ; \
< "James Meng" ; > ; \
< "Frank Meies" ; > ; \
< "Antonius Tjipke Meinen" ; > ; \
+ < "Ismael Merzaq" ; > ; \
< "Andreas Meyer" ; > ; \
< "Markus Meyer" ; > ; \
< "Rolf Meyer" ; > ; \
< "Djapparova Meruert" ; > ; \
< "Ismael Merzaq" ; > ; \
< "Michael Mi" ; > ; \
+ < "Bjoern Michaelsen" ; > ; \
< "Boris Michelsz" ; > ; \
< "Bjoern Milcke" ; > ; \
< "Marcin Milkowski" ; > ; \
@@ -616,6 +673,7 @@ ItemList = \
< "Aleksander Mikhailov-Erlich" ; > ; \
< "Paul A. Miller" ; > ; \
< "Arkadiusz Miskiewicz" ; > ; \
+ < "Petr Mladek" ; > ; \
< "Erica Modena" ; > ; \
< "Filip Molcan" ; > ; \
< "Tadeusz Mollun" ; > ; \
@@ -639,6 +697,7 @@ ItemList = \
< "National Centre for Software Technology, India" ; > ; \
< "Takamichi Nara" ; > ; \
< "Peter Naulls" ; > ; \
+ < "Jan Navratil" ; > ; \
< "Niklas Nebel" ; > ; \
< "Ales Nehyba" ; > ; \
< "Christoph Neumann" ; > ; \
@@ -650,11 +709,13 @@ ItemList = \
< "Jan Normann Nielsen" ; > ; \
< "Ko-haw Nieh" ; > ; \
< "Peter Van Nieuwenhoven" ; > ; \
+ < "Jan Nieuwenhuizen" ; > ; \
< "Dhiraj Nilange" ; > ; \
< "Sofia Nilsson" ; > ; \
< "Kazutoshi Nimura" ; > ; \
< "Jes Drost Nissen" ; > ; \
< "Sofia Nilsson" ; > ; \
+ < "Christoph Noack" ; > ; \
< "Bertram Nolte" ; > ; \
< "Niels Nordmann" ; > ; \
< "Michael Novati" ; > ; \
@@ -683,6 +744,7 @@ ItemList = \
< "Subiaco Paola" ; > ; \
< "Kannada Ganaka Parishat" ; > ; \
< "Anna Parovel" ; > ; \
+ < "Pierre Pasteau" ; > ; \
< "Shripad Patki" ; > ; \
< "Andreas Pauley" ; > ; \
< "Viktorija Paulikaite" ; > ; \
@@ -719,13 +781,16 @@ ItemList = \
< "Nicola Previati" ; > ; \
< "Rhoslyn Prys" ; > ; \
< "Jaroslaw Jan Pyszny" ; > ; \
+ < "Jonathan Pryor" ; > ; \
< "Zhang Qingbin" ; > ; \
+ < "Canghua Qu" ; > ; \
< "Volker Quetschke" ; > ; \
< "Tino Rachui" ; > ; \
< "Radostin Radnev" ; > ; \
< "Pramod Raghavendra" ; > ; \
< "Adam Rambousek" ; > ; \
< "Jacqueline Rahemipour" ; > ; \
+ < "Goran Rakic" ; > ; \
< "Adam Rambousek" ; > ; \
< "Kay Ramme" ; > ; \
< "Klaus Ramstock" ; > ; \
@@ -748,6 +813,7 @@ ItemList = \
< "Kjell Arne Rekaa" ; > ; \
< "Frco. Javier Rial" ; > ; \
< "Nicholas Richards" ; > ; \
+ < "Georg Richter" ; > ; \
< "Jozef Riha" ; > ; \
< "Michael Lee Rilee" ; > ; \
< "Modestas Rimkus" ; > ; \
@@ -822,6 +888,7 @@ ItemList = \
< "Syed Ahmad Shazali" ; > ; \
< "Darragh Sherwin" ; > ; \
< "Gia Shervashidze" ; > ; \
+ < "Wei Guo Shi" ; > ; \
< "Norikatsu Shigemura" ; > ; \
< "Bernhard Siaud" ; > ; \
< "Joerg Sievers" ; > ; \
@@ -830,11 +897,13 @@ ItemList = \
< "Keld Jorn Simonsen" ; > ; \
< "Michael Sicotte" ; > ; \
< "Clytie Ann Siddall" ; > ; \
+ < "Raul Siddahartha" ; > ; \
< "SIL International (Freddy Boswell)" ; > ; \
< "Mukund Sivaraman" ; > ; \
< "Manoranjan Kr. Singh" ; > ; \
< "G. Roderick Singleton" ; > ; \
< "Joerg Skottke" ; > ; \
+ < "Sarah Smith" ; > ; \
< "Timothy P. Smith" ; > ; \
< "Colm Smyth" ; > ; \
< "Javier Sola" ; > ; \
@@ -860,9 +929,11 @@ ItemList = \
< "Erik William Strack" ; > ; \
< "Daniel Strome" ; > ; \
< "Fridrich Strba" ; > ; \
+ < "Keith Stribley" ; > ; \
< "Ulf Stroehler" ; > ; \
< "Daniel Strome" ; > ; \
< "Louis Suarez-Potts" ; > ; \
+ < "Muthu Subramanian" ; > ; \
< "Matthias Suess" ; > ; \
< "Tae Hoon Suk of Intellikorea Ca., Ltd." ; > ; \
< "Arthit Suriyawongkul" ; > ; \
@@ -880,7 +951,9 @@ ItemList = \
< "Christina Taliaferro" ; > ; \
< "Makoto Takizawa" ; > ; \
< "Masaki Tamakoshi" ; > ; \
+ < "Quanfa Tang" ; > ; \
< "Alberto Di Taranto" ; > ; \
+ < "David Tardon" ; > ; \
< "Uday K. Tashildar" ; > ; \
< "Stefan Taxhet" ; > ; \
< "William Terry" ; > ; \
@@ -896,6 +969,7 @@ ItemList = \
< "James M. Thompson" ; > ; \
< "Holger Thon" ; > ; \
< "Alexander Thurgood" ; > ; \
+ < "Caio Tiago Oliveira" ; > ; \
< "Lukas Tinkl" ; > ; \
< "Gerhard Tonn" ; > ; \
< "Istvan Torda" ; > ; \
@@ -944,6 +1018,7 @@ ItemList = \
< "William Wan" ; > ; \
< "Funda Wang" ; > ; \
< "Polly Wang" ; > ; \
+ < "Xu Ming Wang" ; > ; \
< "Yi Wang" ; > ; \
< "Sangay Wangchuk" ; > ; \
< "Matthew Wardrop" ; > ; \
@@ -954,6 +1029,7 @@ ItemList = \
< "Martin Webermann" ; > ; \
< "Donata Wegener" ; > ; \
< "Law Yee Wei" ; > ; \
+ < "Zhao Wei" ; > ; \
< "Michel Weimerskirch" ; > ; \
< "Prof. Dr. Eduard Werner" ; > ; \
< "Michael Wever" ; > ; \
@@ -974,19 +1050,25 @@ ItemList = \
< "Eugene T.S. Wong" ; > ; \
< "Pui Lam Wong" ; > ; \
< "Minna Wu" ; > ; \
+ < "Yan Wu" ; > ; \
< "Stephan Wunderlich" ; > ; \
< "Simos Xenitellis" ; > ; \
< "Shun Min Serena Xiao" ; > ; \
< "Nat Friedman for Ximian" ; > ; \
+ < "Antonio Xu" ; > ; \
+ < "Dehua Xu" ; > ; \
< "Gary Yang" ; > ; \
< "Yukiharu Yabuki" ; > ; \
< "Kliment Pavlov Yanev" ; > ; \
< "Taniguchi Yasuaki" ; > ; \
< "Oleg Yegorov" ; > ; \
+ < "Steve Yin" ; > ; \
< "Kunihiko Yokota" ; > ; \
< "Kim Il Yong" ; > ; \
< "Kohei Yoshida" ; > ; \
< "Deltasoft Yu" ; > ; \
+ < "Guoqiang Yu" ; > ; \
+ < "Xiaoyang Yu" ; > ; \
< "Gary Yuen" ; > ; \
< "Christian Zagrodnick" ; > ; \
< "George Zahopulos" ; > ; \
@@ -996,7 +1078,10 @@ ItemList = \
< "Fuxin Zhang" ; > ; \
< "Joy Zhang" ; > ; \
< "Lei Phill Zhang" ; > ; \
+ < "Xiaofei Zhang" ; > ; \
+ < "Jianwei Zhao" ; > ; \
< "May Zhang" ; > ; \
+ < "Jeremy Zheng" ; > ; \
< "Thorsten Ziehm" ; > ; \
< "Stefan Ziel" ; > ; \
< "Jan Zitniak" ; > ; \
@@ -1015,7 +1100,7 @@ ItemList = \
< "" ; > ; \
< "FUNCTIONAL STAFF" ; 8 ; > ; \
< "" ; > ; \
- < "Sabine Schroeder" ; > ; \
+ < "Sabine Huetsch" ; > ; \
< "" ; > ; \
< "OpenOffice.org COORDINATION" ; 8 ; > ; \
< "" ; > ; \
@@ -1026,13 +1111,14 @@ ItemList = \
< "Matthias Huetsch" ; > ; \
< "Kay Ramme" ; > ; \
< "" ; > ; \
- < "SUN SIGMA BLACK BELT" ; 8 ; > ; \
- < "" ; > ; \
- < "Stefan Zimmermann" ; > ; \
- < "" ; > ; \
< "PROGRAM MANAGEMENT" ; 8 ; > ; \
< "" ; > ; \
+ < "Joost Andrae" ; > ; \
+ < "Martin Damboldt" ; > ; \
+ < "Martin Hollmichel" ; > ; \
< "Andre Kuemmel" ; > ; \
+ < "Marcus Lange" ; > ; \
+ < "Uwe Luebbers" ; > ; \
< "" ; > ; \
< "" ; > ; \
< "%PRODUCTNAME DEVELOPMENT" ; 8 ; > ; \
@@ -1047,7 +1133,6 @@ ItemList = \
< "ODF" ; 8 ; > ; \
< "" ; > ; \
< "Svante Schubert" ; > ; \
- < "Lars Behrmann" ; > ; \
< "" ; > ; \
< "DESIGN" ; 8 ; > ; \
< "" ; > ; \
@@ -1068,10 +1153,9 @@ ItemList = \
< "Thomas Lange" ; > ; \
< "Andreas Martens" ; > ; \
< "Frank Meies" ; > ; \
+ < "Bjoern Michaelsen" ; > ; \
< "Andreas Schluens" ; > ; \
< "Oliver Specht" ; > ; \
- < "Gunnar Timm" ; > ; \
- < "Daniel Vogelheim" ; > ; \
< "Oliver-Rainer Wittmann" ; > ; \
< "Michael Stahl" ; > ; \
< "Mikhail Voitenko" ; > ; \
@@ -1081,8 +1165,6 @@ ItemList = \
< "Kai Ahrens" ; > ; \
< "" ; > ; \
< "Volker Ahrendt" ; > ; \
- < "Thorsten Behrens" ; > ; \
- < "Michael Buettner" ; > ; \
< "Herbert Duerr" ; > ; \
< "Andre Fischer" ; > ; \
< "Ilko Hoepping" ; > ; \
@@ -1100,9 +1182,9 @@ ItemList = \
< "Kai Sommerfeld" ; > ; \
< "" ; > ; \
< "Stephan Bergmann" ; > ; \
- < "Oliver Braun" ; > ; \
< "Andreas Bregas" ; > ; \
< "Steffen Grund" ; > ; \
+ < "Mihaela Kedikova" ; > ; \
< "Tobias Krause" ; > ; \
< "Joachim Lingner" ; > ; \
< "Christoph Neumann" ; > ; \
@@ -1112,7 +1194,7 @@ ItemList = \
< "Dirk Voelzke" ; > ; \
< "" ; > ; \
< "" ; > ; \
- < "%PRODUCTNAME PIM & CALC" ; 8 ; > ; \
+ < "%PRODUCTNAME CALC" ; 8 ; > ; \
< "" ; > ; \
< "Stephan Schaefer" ; > ; \
< "" ; > ; \
@@ -1120,32 +1202,15 @@ ItemList = \
< "Daniel Boelzle" ; > ; \
< "Berend Cornelius" ; > ; \
< "Ingrid Halama" ; > ; \
- < "Philipp Kewisch" ; > ; \
< "Bjoern Milcke" ; > ; \
< "Niklas Nebel" ; > ; \
- < "Frank Neumann" ; > ; \
< "Eike Rathke" ; > ; \
< "Daniel Rentz" ; > ; \
< "" ; > ; \
< "" ; > ; \
- < "%PRODUCTNAME CONFIGURATION MANAGER" ; 8 ; > ; \
- < "" ; > ; \
- < "Dirk Grobler" ; > ; \
- < "" ; > ; \
- < "Joerg Barfurth" ; > ; \
- < "Rodrigo Fernandez-Vizarra Bonet" ; > ; \
- < "Katell Galard" ; > ; \
- < "Geoff Higgins" ; > ; \
- < "Stephen Lewis" ; > ; \
- < "Cyrille Moureaux" ; > ; \
- < "Thomas Pfohe" ; > ; \
- < "Klaus Ruehl" ; > ; \
- < "" ; > ; \
- < "" ; > ; \
< "USER EXPERIENCE" ; 8 ; > ; \
< "" ; > ; \
- < "Lutz Hoeger" ; > ; \
- < "" ; > ; \
+ < "Andreas Bartel" ; > ; \
< "Bettina Haberer" ; > ; \
< "Christian Jansen" ; > ; \
< "Frank Loehmann" ; > ; \
@@ -1156,28 +1221,22 @@ ItemList = \
< "" ; > ; \
< "Nils Fuhrmann" ; > ; \
< "" ; > ; \
- < "PROGRAM MANAGEMENT" ; 8 ; > ; \
< "" ; > ; \
- < "Joost Andrae" ; > ; \
- < "Martin Damboldt" ; > ; \
- < "Martin Hollmichel" ; > ; \
- < "" ; > ; \
- < "RELEASE ENGINEERING & DEVELOPMENT TOOLS" ; 8 ; > ; \
- < "" ; > ; \
- < "Joerg Jahnke" ; > ; \
+ < "RELEASE ENGINEERING " ; 8 ; > ; \
< "" ; > ; \
- < "RELEASE ENGINEERING" ; 8 ; > ; \
+ < "Ruediger Timm" ; > ; \
< "" ; > ; \
< "Oliver Bolte" ; > ; \
< "Vladimir Glazounov" ; > ; \
< "Ivo Hinkelmann" ; > ; \
< "Hans-Joachim Lankenau" ; > ; \
< "Jens-Heiner Rechtien" ; > ; \
- < "Ruediger Timm" ; > ; \
< "Kurt Zenker" ; > ; \
< "" ; > ; \
< "DEVELOPMENT TOOLS" ; 8 ; > ; \
< "" ; > ; \
+ < "Joerg Jahnke" ; > ; \
+ < "" ; > ; \
< "Bernd Eilers" ; > ; \
< "Gregor Hartmann" ; > ; \
< "Frank Mau" ; > ; \
@@ -1213,12 +1272,10 @@ ItemList = \
< "Marc Neumann" ; > ; \
< "Wolfram Garten" ; > ; \
< "Christian Guenther" ; > ; \
- < "Fredrik Haegg" ; > ; \
< "" ; > ; \
< "QA %PRODUCTNAME INFRASTRUCTURE" ; 8 ; > ; \
< "" ; > ; \
< "Olaf Felka" ; > ; \
- < "Uwe Luebbers" ; > ; \
< "Thorsten Martens" ; > ; \
< "Joerg W. Skottke" ; > ; \
< "Andreas Treumann" ; > ; \
@@ -1238,83 +1295,30 @@ ItemList = \
< "Martina Waller" ; > ; \
< "" ; > ; \
< "" ; > ; \
- < "GLOBALIZATION" ; 8 ; > ; \
- < "" ; > ; \
- < "Management" ; 8 ; > ; \
- < "" ; > ; \
- < "Tom Garland" ; > ; \
- < "Michelle Hills" ; > ; \
- < "Shinobu Matsuzuka" ; > ; \
- < "" ; > ; \
- < "PROGRAM MANAGEMENT" ; 8 ; > ; \
+ < "GLOBALIZATION PROGRAM MANAGEMENT" ; 8 ; > ; \
< "" ; > ; \
< "Rafaella Braconi" ; > ; \
< "" ; > ; \
- < "Engineering and Testing" ; 8 ; > ; \
- < "" ; > ; \
- < "Ales Cernosek" ; > ; \
- < "Petr Dudacek" ; > ; \
- < "Karl Hong" ; > ; \
- < "Naoyuki Ishimura" ; > ; \
- < "Aijin Kim" ; > ; \
- < "Ian McDonnell" ; > ; \
- < "Kazuhiro Hatake Takabatake " ; > ; \
- < "Lei Phill Zhang" ; > ; \
- < "May Zhang" ; > ; \
- < "" ; > ; \
- < "Translation Management" ; 8 ; > ; \
- < "" ; > ; \
- < "Monica Badia" ; > ; \
- < "Sofia Nilsson" ; > ; \
- < "Kaoru Oguru" ; > ; \
- < "Joy Zhang" ; > ; \
- < "" ; > ; \
- < "Documentation & Tools" ; 8 ; > ; \
- < "" ; > ; \
- < "Yu Aaron Cheng" ; > ; \
- < "Sven Klawitter" ; > ; \
- < "Hiroko Matano" ; > ; \
- < "Boris Steiner" ; > ; \
- < "Michal Touzin" ; > ; \
- < "" ; > ; \
- < "" ; > ; \
< "MARKETING & OPERATIONS" ; 8 ; > ; \
< "" ; > ; \
- < "PRODUCT & PROGRAM MANAGMENT" ; 8 ; > ; \
+ < "PRODUCT MANAGMENT" ; 8 ; > ; \
< "" ; > ; \
< "Goetz Wohlberg" ; > ; \
+ < "Lutz Hoeger" ; > ; \
< "" ; > ; \
< "MARKETING" ; 8 ; > ; \
< "" ; > ; \
- < "Alexei Koudriachov" ; > ; \
- < "Ashish Mukharji" ; > ; \
- < "Manish Punjabi" ; > ; \
- < "Erwin Tenhumberg" ; > ; \
+ < "Rosana Ardila Biela" ; > ; \
+ < "Kay Koll" ; > ; \
< "Iyer Venkatesan" ; > ; \
- < "Jennifer Winger" ; > ; \
< "" ; > ; \
< "OPERATIONS" ; 8 ; > ; \
< "" ; > ; \
- < "Scott Citta" ; > ; \
- < "Jane Cooley" ; > ; \
- < "Lisa Medlin" ; > ; \
< "Parker Proffitt" ; > ; \
< "" ; > ; \
- < "TECHNICAL TRAINING, MARKET &" ; 8 ; > ; \
- < "BUSINESS DEVELOPMENT" ; 8 ; > ; \
- < "" ; > ; \
- < "Matthew Baier" ; > ; \
- < "Herve Bernard" ; > ; \
- < "Kay Koll" ; > ; \
- < "Ted Tudor" ; > ; \
- < "Jane Worden" ; > ; \
- < "Sophia Zheng " ; > ; \
- < "" ; > ; \
- < "ADDITIONAL FUNCTIONS" ; 8 ; > ; \
+ < "SUN SIGMA BLACK BELT" ; 8 ; > ; \
< "" ; > ; \
- < "Bill Lane" ; > ; \
- < "Douglas Lenser" ; > ; \
- < "Frank Psotka" ; > ; \
+ < "Stefan Zimmermann" ; > ; \
< "" ; > ; \
};\
diff --git a/svx/source/items/numitem.cxx b/svx/source/items/numitem.cxx
index 32a493b5bd..a77a49c5ed 100644
--- a/svx/source/items/numitem.cxx
+++ b/svx/source/items/numitem.cxx
@@ -62,6 +62,11 @@
#define DEF_WRITER_LSPACE 500 //Standardeinrueckung
#define DEF_DRAW_LSPACE 800 //Standardeinrueckung
+#define NUMITEM_VERSION_01 0x01
+#define NUMITEM_VERSION_02 0x02
+#define NUMITEM_VERSION_03 0x03
+#define NUMITEM_VERSION_04 0x04
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
@@ -224,157 +229,184 @@ SvxNumberFormat::~SvxNumberFormat()
/* -----------------08.12.98 11:14-------------------
*
* --------------------------------------------------*/
-//SvxNumberFormat::SvxNumberFormat(SvStream &rStream)
-//{
-// USHORT nVersion;
-// rStream >> nVersion;
-
-// USHORT nUSHORT;
-// rStream >> nUSHORT;
-// SetNumberingType((sal_Int16)nUSHORT);
-// rStream >> nUSHORT;
-// eNumAdjust = (SvxAdjust)nUSHORT;
-// rStream >> nUSHORT;
-// nInclUpperLevels = (BYTE)nUSHORT;
-// rStream >> nUSHORT;
-// nStart = nUSHORT;
-// rStream >> nUSHORT;
-// cBullet = nUSHORT;
-
-// short nShort;
-// rStream >> nShort;
-// nFirstLineOffset = nShort;
-// rStream >> nShort;
-// nAbsLSpace = nShort;
-// rStream >> nShort;
-// nLSpace = nShort;
-
-// rStream >> nShort;
-// nCharTextDistance = nShort;
-// rtl_TextEncoding eEnc = gsl_getSystemTextEncoding();
-// rStream.ReadByteString(sPrefix, eEnc);
-// rStream.ReadByteString(sSuffix, eEnc);
-// rStream.ReadByteString(sCharStyleName, eEnc);
-// rStream >> nUSHORT;
-// if(nUSHORT)
-// {
-// SvxBrushItem aHelper(0);
-// pGraphicBrush = (SvxBrushItem*) aHelper.Create( rStream, BRUSH_GRAPHIC_VERSION );
-// }
-// else
-// pGraphicBrush = 0;
-
-// rStream >> nUSHORT;
-// eVertOrient = (sal_Int16)nUSHORT;
-
-// rStream >> nUSHORT;
-// if(nUSHORT)
-// {
-// pBulletFont = new Font;
-// rStream >> *pBulletFont;
-// if(!pBulletFont->GetCharSet())
-// pBulletFont->SetCharSet(rStream.GetStreamCharSet());
-// }
-// else
-// pBulletFont = 0;
-// rStream >> aGraphicSize;
-
-// rStream >> nBulletColor;
-// rStream >> nUSHORT;
-// nBulletRelSize = nUSHORT;
-// rStream >> nUSHORT;
-// SetShowSymbol((BOOL)nUSHORT);
-
-// if( nVersion < NUMITEM_VERSION_03 )
-// cBullet = ByteString::ConvertToUnicode( (sal_Char)cBullet,
-// (pBulletFont&&pBulletFont->GetCharSet()) ? pBulletFont->GetCharSet()
-// : RTL_TEXTENCODING_SYMBOL );
-// if(pBulletFont)
-// {
-// BOOL bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50;
-// if(bConvertBulletFont)
-// {
-
-// FontToSubsFontConverter pConverter =
-// CreateFontToSubsFontConverter(pBulletFont->GetName(),
-// FONTTOSUBSFONT_IMPORT|FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS);
-// if(pConverter)
-// {
-// cBullet = ConvertFontToSubsFontChar(pConverter, cBullet);
-// String sFontName = GetFontToSubsFontName(pConverter);
-// pBulletFont->SetName(sFontName);
-// DestroyFontToSubsFontConverter(pConverter);
-// }
-// }
-// }
-//}
+SvxNumberFormat::SvxNumberFormat(SvStream &rStream)
+: mePositionAndSpaceMode( LABEL_WIDTH_AND_POSITION ),
+ meLabelFollowedBy( LISTTAB ),
+ mnListtabPos( 0 ),
+ mnFirstLineIndent( 0 ),
+ mnIndentAt( 0 )
+{
+
+ USHORT nVersion;
+ rStream >> nVersion;
+
+ USHORT nUSHORT;
+ rStream >> nUSHORT;
+ SetNumberingType((sal_Int16)nUSHORT);
+ rStream >> nUSHORT;
+ eNumAdjust = (SvxAdjust)nUSHORT;
+ rStream >> nUSHORT;
+ nInclUpperLevels = (BYTE)nUSHORT;
+ rStream >> nUSHORT;
+ nStart = nUSHORT;
+ rStream >> nUSHORT;
+ cBullet = nUSHORT;
+
+ short nShort;
+ rStream >> nShort;
+ nFirstLineOffset = nShort;
+ rStream >> nShort;
+ nAbsLSpace = nShort;
+ rStream >> nShort;
+ nLSpace = nShort;
+
+ rStream >> nShort;
+ nCharTextDistance = nShort;
+ rtl_TextEncoding eEnc = gsl_getSystemTextEncoding();
+ rStream.ReadByteString(sPrefix, eEnc);
+ rStream.ReadByteString(sSuffix, eEnc);
+ rStream.ReadByteString(sCharStyleName, eEnc);
+ rStream >> nUSHORT;
+ if(nUSHORT)
+ {
+ SvxBrushItem aHelper(0);
+ pGraphicBrush = (SvxBrushItem*) aHelper.Create( rStream, BRUSH_GRAPHIC_VERSION );
+ }
+ else
+ pGraphicBrush = 0;
+
+ rStream >> nUSHORT;
+ eVertOrient = (sal_Int16)nUSHORT;
+
+ rStream >> nUSHORT;
+ if(nUSHORT)
+ {
+ pBulletFont = new Font;
+ rStream >> *pBulletFont;
+ if(!pBulletFont->GetCharSet())
+ pBulletFont->SetCharSet(rStream.GetStreamCharSet());
+ }
+ else
+ pBulletFont = 0;
+ rStream >> aGraphicSize;
+
+ rStream >> nBulletColor;
+ rStream >> nUSHORT;
+ nBulletRelSize = nUSHORT;
+ rStream >> nUSHORT;
+ SetShowSymbol((BOOL)nUSHORT);
+
+ if( nVersion < NUMITEM_VERSION_03 )
+ cBullet = ByteString::ConvertToUnicode( (sal_Char)cBullet,
+ (pBulletFont&&pBulletFont->GetCharSet()) ? pBulletFont->GetCharSet()
+ : RTL_TEXTENCODING_SYMBOL );
+ if(pBulletFont)
+ {
+ BOOL bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50;
+ if(bConvertBulletFont)
+ {
+
+ FontToSubsFontConverter pConverter =
+ CreateFontToSubsFontConverter(pBulletFont->GetName(),
+ FONTTOSUBSFONT_IMPORT|FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS);
+ if(pConverter)
+ {
+ cBullet = ConvertFontToSubsFontChar(pConverter, cBullet);
+ String sFontName = GetFontToSubsFontName(pConverter);
+ pBulletFont->SetName(sFontName);
+ DestroyFontToSubsFontConverter(pConverter);
+ }
+ }
+ }
+
+ if( NUMITEM_VERSION_04 <= nVersion )
+ {
+ rStream >> nUSHORT;
+ mePositionAndSpaceMode = (SvxNumPositionAndSpaceMode) nUSHORT;
+ rStream >> nUSHORT;
+ meLabelFollowedBy = ( SvxNumLabelFollowedBy ) nUSHORT;
+ long nLong;
+ rStream >> nLong;
+ mnListtabPos = nLong;
+ rStream >> nLong;
+ mnFirstLineIndent = nLong;
+ rStream >> nLong;
+ mnIndentAt = nLong;
+ }
+}
/* -----------------08.12.98 11:14-------------------
*
* --------------------------------------------------*/
-// --> OD 2008-01-09 #newlistlevelattrs# - no longer used
-//SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pConverter)
-//{
-// if(pConverter && pBulletFont)
-// {
-// cBullet = ConvertFontToSubsFontChar(pConverter, cBullet);
-// String sFontName = GetFontToSubsFontName(pConverter);
-// pBulletFont->SetName(sFontName);
-// }
-
-// rStream << (USHORT)NUMITEM_VERSION_03;
-
-// rStream << (USHORT)GetNumberingType();
-// rStream << (USHORT)eNumAdjust;
-// rStream << (USHORT)nInclUpperLevels;
-// rStream << nStart;
-// rStream << (USHORT)cBullet;
-
-// rStream << nFirstLineOffset;
-// rStream << nAbsLSpace;
-// rStream << nLSpace;
-
-// rStream << nCharTextDistance;
-// rtl_TextEncoding eEnc = gsl_getSystemTextEncoding();
-// rStream.WriteByteString(sPrefix, eEnc);
-// rStream.WriteByteString(sSuffix, eEnc);
-// rStream.WriteByteString(sCharStyleName, eEnc);
-// if(pGraphicBrush)
-// {
-// rStream << (USHORT)1;
-
-// // #75113# in SD or SI force bullet itself to be stored,
-// // for that purpose throw away link when link and graphic
-// // are present, so Brush save is forced
-// if(pGraphicBrush->GetGraphicLink() && pGraphicBrush->GetGraphic())
-// {
-// String aEmpty;
-// pGraphicBrush->SetGraphicLink(aEmpty);
-// }
-
-// pGraphicBrush->Store(rStream, BRUSH_GRAPHIC_VERSION);
-// }
-// else
-// rStream << (USHORT)0;
-
-// rStream << (USHORT)eVertOrient;
-// if(pBulletFont)
-// {
-// rStream << (USHORT)1;
-// rStream << *pBulletFont;
-// }
-// else
-// rStream << (USHORT)0;
-// rStream << aGraphicSize;
-
-// Color nTempColor = nBulletColor;
-// if(COL_AUTO == nBulletColor.GetColor())
-// nTempColor = COL_BLACK;
-// rStream << nTempColor;
-// rStream << nBulletRelSize;
-// rStream << (USHORT)IsShowSymbol();
-// return rStream;
-//}
-// <--
+SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pConverter)
+{
+ if(pConverter && pBulletFont)
+ {
+ cBullet = ConvertFontToSubsFontChar(pConverter, cBullet);
+ String sFontName = GetFontToSubsFontName(pConverter);
+ pBulletFont->SetName(sFontName);
+ }
+
+ rStream << (USHORT)NUMITEM_VERSION_04;
+
+ rStream << (USHORT)GetNumberingType();
+ rStream << (USHORT)eNumAdjust;
+ rStream << (USHORT)nInclUpperLevels;
+ rStream << nStart;
+ rStream << (USHORT)cBullet;
+
+ rStream << nFirstLineOffset;
+ rStream << nAbsLSpace;
+ rStream << nLSpace;
+
+ rStream << nCharTextDistance;
+ rtl_TextEncoding eEnc = gsl_getSystemTextEncoding();
+ rStream.WriteByteString(sPrefix, eEnc);
+ rStream.WriteByteString(sSuffix, eEnc);
+ rStream.WriteByteString(sCharStyleName, eEnc);
+ if(pGraphicBrush)
+ {
+ rStream << (USHORT)1;
+
+ // #75113# in SD or SI force bullet itself to be stored,
+ // for that purpose throw away link when link and graphic
+ // are present, so Brush save is forced
+ if(pGraphicBrush->GetGraphicLink() && pGraphicBrush->GetGraphic())
+ {
+ String aEmpty;
+ pGraphicBrush->SetGraphicLink(aEmpty);
+ }
+
+ pGraphicBrush->Store(rStream, BRUSH_GRAPHIC_VERSION);
+ }
+ else
+ rStream << (USHORT)0;
+
+ rStream << (USHORT)eVertOrient;
+ if(pBulletFont)
+ {
+ rStream << (USHORT)1;
+ rStream << *pBulletFont;
+ }
+ else
+ rStream << (USHORT)0;
+ rStream << aGraphicSize;
+
+ Color nTempColor = nBulletColor;
+ if(COL_AUTO == nBulletColor.GetColor())
+ nTempColor = COL_BLACK;
+ rStream << nTempColor;
+ rStream << nBulletRelSize;
+ rStream << (USHORT)IsShowSymbol();
+
+ rStream << ( USHORT ) mePositionAndSpaceMode;
+ rStream << ( USHORT ) meLabelFollowedBy;
+ rStream << ( long ) mnListtabPos;
+ rStream << ( long ) mnFirstLineIndent;
+ rStream << ( long ) mnIndentAt;
+
+ return rStream;
+}
+
/* -----------------------------23.02.01 11:10--------------------------------
---------------------------------------------------------------------------*/
@@ -839,80 +871,79 @@ SvxNumRule::SvxNumRule(const SvxNumRule& rCopy)
/* -----------------08.12.98 11:07-------------------
*
* --------------------------------------------------*/
-//SvxNumRule::SvxNumRule(SvStream &rStream)
-//{
-// ++nRefCount;
-// LanguageType eLang = Application::GetSettings().GetLanguage();
-// aLocale = SvxCreateLocale(eLang);
-// USHORT nVersion;
-// USHORT nTemp;
-// rStream >> nVersion;
-// rStream >> nLevelCount;
-// rStream >> nTemp;
-// nFeatureFlags = nTemp;
-// rStream >> nTemp;
-// bContinuousNumbering = (BOOL)nTemp;
-// rStream >> nTemp;
-// eNumberingType = (SvxNumRuleType)nTemp;
-// memset( aFmts, 0, sizeof( aFmts ));
-
-// for(USHORT i = 0; i < SVX_MAX_NUM; i++)
-// {
-// USHORT nSet;
-// rStream >> nSet;
-// if(nSet)
-// aFmts[i] = new SvxNumberFormat(rStream);
-// else
-// aFmts[i] = 0;
-// aFmtsSet[i] = aFmts[i] ? TRUE : FALSE;
-// }
-// if(NUMITEM_VERSION_02 <= nVersion)
-// {
-// USHORT nShort;
-// rStream >> nShort;
-// nFeatureFlags = nShort;
-// }
-//}
+SvxNumRule::SvxNumRule(SvStream &rStream)
+{
+ ++nRefCount;
+ LanguageType eLang = Application::GetSettings().GetLanguage();
+ aLocale = SvxCreateLocale(eLang);
+ USHORT nVersion;
+ USHORT nTemp;
+ rStream >> nVersion;
+ rStream >> nLevelCount;
+ rStream >> nTemp;
+ nFeatureFlags = nTemp;
+ rStream >> nTemp;
+ bContinuousNumbering = (BOOL)nTemp;
+ rStream >> nTemp;
+ eNumberingType = (SvxNumRuleType)nTemp;
+ memset( aFmts, 0, sizeof( aFmts ));
+
+ for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+ {
+ USHORT nSet;
+ rStream >> nSet;
+ if(nSet)
+ aFmts[i] = new SvxNumberFormat(rStream);
+ else
+ aFmts[i] = 0;
+ aFmtsSet[i] = aFmts[i] ? TRUE : FALSE;
+ }
+ if(NUMITEM_VERSION_02 <= nVersion)
+ {
+ USHORT nShort;
+ rStream >> nShort;
+ nFeatureFlags = nShort;
+ }
+}
/* -----------------08.12.98 11:07-------------------
*
* --------------------------------------------------*/
-// --> OD 2008-01-09 #newlistlevelattrs# - no longer used
-//SvStream& SvxNumRule::Store(SvStream &rStream)
-//{
-// rStream<<(USHORT)NUMITEM_VERSION_03;
-// rStream<<nLevelCount;
-// //first save of nFeatureFlags for old versions
-// rStream<<(USHORT)nFeatureFlags;
-// rStream<<(USHORT)bContinuousNumbering;
-// rStream<<(USHORT)eNumberingType;
-
-// FontToSubsFontConverter pConverter = 0;
-// BOOL bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50;
-// for(USHORT i = 0; i < SVX_MAX_NUM; i++)
-// {
-// if(aFmts[i])
-// {
-// rStream << USHORT(1);
-// if(bConvertBulletFont && aFmts[i]->GetBulletFont())
-// {
-// if(!pConverter)
-// pConverter =
-// CreateFontToSubsFontConverter(aFmts[i]->GetBulletFont()->GetName(),
-// FONTTOSUBSFONT_EXPORT|FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS);
-// }
-// aFmts[i]->Store(rStream, pConverter);
-// }
-// else
-// rStream << USHORT(0);
-// }
-// //second save of nFeatureFlags for new versions
-// rStream<<(USHORT)nFeatureFlags;
-// if(pConverter)
-// DestroyFontToSubsFontConverter(pConverter);
-
-// return rStream;
-//}
+SvStream& SvxNumRule::Store(SvStream &rStream)
+{
+ rStream<<(USHORT)NUMITEM_VERSION_03;
+ rStream<<nLevelCount;
+ //first save of nFeatureFlags for old versions
+ rStream<<(USHORT)nFeatureFlags;
+ rStream<<(USHORT)bContinuousNumbering;
+ rStream<<(USHORT)eNumberingType;
+
+ FontToSubsFontConverter pConverter = 0;
+ BOOL bConvertBulletFont = rStream.GetVersion() <= SOFFICE_FILEFORMAT_50;
+ for(USHORT i = 0; i < SVX_MAX_NUM; i++)
+ {
+ if(aFmts[i])
+ {
+ rStream << USHORT(1);
+ if(bConvertBulletFont && aFmts[i]->GetBulletFont())
+ {
+ if(!pConverter)
+ pConverter =
+ CreateFontToSubsFontConverter(aFmts[i]->GetBulletFont()->GetName(),
+ FONTTOSUBSFONT_EXPORT|FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS);
+ }
+ aFmts[i]->Store(rStream, pConverter);
+ }
+ else
+ rStream << USHORT(0);
+ }
+ //second save of nFeatureFlags for new versions
+ rStream<<(USHORT)nFeatureFlags;
+ if(pConverter)
+ DestroyFontToSubsFontConverter(pConverter);
+
+ return rStream;
+}
/* -----------------27.10.98 10:41-------------------
*
@@ -1179,32 +1210,23 @@ SfxPoolItem* SvxNumBulletItem::Clone( SfxItemPool * ) const
/* -----------------08.12.98 10:43-------------------
*
* --------------------------------------------------*/
-// --> OD 2008-01-09 #newlistlevelattrs# - no longer used
-//SfxPoolItem* SvxNumBulletItem::Create(SvStream &rStream, USHORT) const
-//{
-// SvxNumRule aRule(rStream);
-// return new SvxNumBulletItem(aRule, Which() );
-//}
-// <--
-/* -----------------08.12.98 10:43-------------------
- *
- * --------------------------------------------------*/
-// --> OD 2008-01-09 #newlistlevelattrs# - no longer used
-//SvStream& SvxNumBulletItem::Store(SvStream &rStream, USHORT /*nItemVersion*/ )const
-//{
-// pNumRule->Store(rStream);
-// return rStream;
-//}
-// <--
+SfxPoolItem* SvxNumBulletItem::Create(SvStream &rStream, USHORT) const
+{
+ SvxNumRule aRule(rStream);
+ return new SvxNumBulletItem(aRule, Which() );
+}
+USHORT SvxNumBulletItem::GetVersion( USHORT /*nFileVersion*/ ) const
+{
+ return NUMITEM_VERSION_03;
+}
/* -----------------08.12.98 10:43-------------------
*
* --------------------------------------------------*/
-// --> OD 2008-01-10 #newlistlevelattrs# - no longer used
-//USHORT SvxNumBulletItem::GetVersion( USHORT /*nFileVersion*/ ) const
-//{
-// return NUMITEM_VERSION_03;
-//}
-// <--
+SvStream& SvxNumBulletItem::Store(SvStream &rStream, USHORT /*nItemVersion*/ )const
+{
+ pNumRule->Store(rStream);
+ return rStream;
+}
/* -----------------08.12.98 10:43-------------------
*
diff --git a/svx/source/msfilter/makefile.mk b/svx/source/msfilter/makefile.mk
index adbe8b1048..53eab95a5b 100644
--- a/svx/source/msfilter/makefile.mk
+++ b/svx/source/msfilter/makefile.mk
@@ -54,7 +54,8 @@ LIB1OBJFILES= \
$(SLO)$/svxmsbas.obj \
$(SLO)$/msocximex.obj \
$(SLO)$/mscodec.obj \
- $(SLO)$/msfiltertracer.obj
+ $(SLO)$/msfiltertracer.obj \
+ $(SLO)$/msvbahelper.obj\
LIB2TARGET= $(SLB)$/$(TARGET)-core.lib
LIB2OBJFILES= \
@@ -70,7 +71,8 @@ EXCEPTIONSFILES= \
$(SLO)$/msocximex.obj \
$(SLO)$/msoleexp.obj \
$(SLO)$/svxmsbas.obj \
- $(SLO)$/msfiltertracer.obj
+ $(SLO)$/msfiltertracer.obj \
+ $(SLO)$/msvbahelper.obj\
.INCLUDE : target.mk
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index 30251b6b3a..ffea507995 100644
--- a/svx/source/msfilter/msdffimp.cxx
+++ b/svx/source/msfilter/msdffimp.cxx
@@ -317,7 +317,7 @@ BOOL Impl_OlePres::Read( SvStream & rStm )
{
BYTE * p = new BYTE[ nSize ];
rStm.Read( p, nSize );
- delete p;
+ delete [] p;
return FALSE;
}
return TRUE;
@@ -3234,6 +3234,8 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const
{
// MapUnit eMap( rManager.GetModel()->GetScaleUnit() );
+ sal_Bool bHasShadow = sal_False;
+
for ( void* pDummy = ((DffPropertyReader*)this)->First(); pDummy; pDummy = ((DffPropertyReader*)this)->Next() )
{
UINT32 nRecType = GetCurKey();
@@ -3305,8 +3307,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const
break;
case DFF_Prop_fshadowObscured :
{
- sal_Bool bHasShadow = ( nContent & 2 ) != 0;
- rSet.Put( SdrShadowItem( bHasShadow ) );
+ bHasShadow = ( nContent & 2 ) != 0;
if ( bHasShadow )
{
if ( !IsProperty( DFF_Prop_shadowOffsetX ) )
@@ -3319,6 +3320,44 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, const
}
}
+ if ( bHasShadow )
+ {
+ // #160376# sj: activating shadow only if fill and or linestyle is used
+ // this is required because of the latest drawing layer core changes.
+ // Issue i104085 is related to this.
+ UINT32 nLineFlags(GetPropertyValue( DFF_Prop_fNoLineDrawDash ));
+ if(!IsHardAttribute( DFF_Prop_fLine ) && !IsCustomShapeStrokedByDefault( rObjData.eShapeType ))
+ nLineFlags &= ~0x08;
+ UINT32 nFillFlags(GetPropertyValue( DFF_Prop_fNoFillHitTest ));
+ if(!IsHardAttribute( DFF_Prop_fFilled ) && !IsCustomShapeFilledByDefault( rObjData.eShapeType ))
+ nFillFlags &= ~0x10;
+ if ( nFillFlags & 0x10 )
+ {
+ MSO_FillType eMSO_FillType = (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid );
+ switch( eMSO_FillType )
+ {
+ case mso_fillSolid :
+ case mso_fillPattern :
+ case mso_fillTexture :
+ case mso_fillPicture :
+ case mso_fillShade :
+ case mso_fillShadeCenter :
+ case mso_fillShadeShape :
+ case mso_fillShadeScale :
+ case mso_fillShadeTitle :
+ break;
+ // case mso_fillBackground :
+ default:
+ nFillFlags &=~0x10; // no fillstyle used
+ break;
+ }
+ }
+ if ( ( ( nLineFlags & 0x08 ) == 0 ) && ( ( nFillFlags & 0x10 ) == 0 ) ) // if there is no fillstyle and linestyle
+ bHasShadow = sal_False; // we are turning shadow off.
+
+ if ( bHasShadow )
+ rSet.Put( SdrShadowItem( bHasShadow ) );
+ }
ApplyLineAttributes( rSet, rObjData.eShapeType ); // #i28269#
ApplyFillAttributes( rIn, rSet, rObjData );
if ( rObjData.eShapeType != mso_sptNil )
@@ -3770,14 +3809,37 @@ FASTBOOL SvxMSDffManager::GetColorFromPalette( USHORT /* nNum */, Color& rColor
return TRUE;
}
+// sj: the documentation is not complete, especially in ppt the normal rgb for text
+// color is written as 0xfeRRGGBB, this can't be explained by the documentation, nearly
+// every bit in the upper code is set -> so there seems to be a special handling for
+// ppt text colors, i decided not to fix this in MSO_CLR_ToColor because of possible
+// side effects, instead MSO_TEXT_CLR_ToColor is called for PPT text colors, to map
+// the color code to something that behaves like the other standard color codes used by
+// fill and line color
+Color SvxMSDffManager::MSO_TEXT_CLR_ToColor( sal_uInt32 nColorCode ) const
+{
+ // Fuer Textfarben: Header ist 0xfeRRGGBB
+ if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 )
+ nColorCode &= 0x00ffffff;
+ else
+ {
+ // for colorscheme colors the color index are the lower three bits of the upper byte
+ if ( ( nColorCode & 0xf8000000 ) == 0 ) // this must be a colorscheme index
+ {
+ nColorCode >>= 24;
+ nColorCode |= 0x8000000;
+ }
+ }
+ return MSO_CLR_ToColor( nColorCode );
+}
Color SvxMSDffManager::MSO_CLR_ToColor( sal_uInt32 nColorCode, sal_uInt16 nContentProperty ) const
{
Color aColor( mnDefaultColor );
// Fuer Textfarben: Header ist 0xfeRRGGBB
- if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 )
- nColorCode &= 0x00ffffff;
+ if ( ( nColorCode & 0xfe000000 ) == 0xfe000000 ) // sj: it needs to be checked if 0xfe is used in
+ nColorCode &= 0x00ffffff; // other cases than ppt text -> if not this code can be removed
sal_uInt8 nUpper = (sal_uInt8)( nColorCode >> 24 );
@@ -4954,16 +5016,16 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
ApplyAttributes( rSt, aSet, aObjData );
pRet->SetMergedItemSet(aSet);
}
- else if ( aObjData.eShapeType == mso_sptLine )
- {
- basegfx::B2DPolygon aPoly;
- aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top()));
- aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom()));
- pRet = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly));
- pRet->SetModel( pSdrModel );
- ApplyAttributes( rSt, aSet, aObjData );
- pRet->SetMergedItemSet(aSet);
- }
+ else if ( aObjData.eShapeType == mso_sptLine )
+ {
+ basegfx::B2DPolygon aPoly;
+ aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top()));
+ aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom()));
+ pRet = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly));
+ pRet->SetModel( pSdrModel );
+ ApplyAttributes( rSt, aSet, aObjData );
+ pRet->SetMergedItemSet(aSet);
+ }
else
{
if ( GetCustomShapeContent( aObjData.eShapeType ) || IsProperty( DFF_Prop_pVertices ) )
@@ -7037,6 +7099,8 @@ BOOL SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
aZCodec.Decompress( rBLIPStream, *pOut );
aZCodec.EndCompression();
pOut->Seek( STREAM_SEEK_TO_BEGIN );
+ pOut->SetResizeOffset( 0 ); // sj: #i102257# setting ResizeOffset of 0 prevents from seeking
+ // behind the stream end (allocating too much memory)
pGrStream = pOut;
}
@@ -8122,6 +8186,7 @@ void SvxMSDffManager::removeShapeId( SdrObject* pShape )
maShapeIdContainer.erase( aIter );
break;
}
+ aIter++;
}
}
diff --git a/svx/source/msfilter/msocximex.cxx b/svx/source/msfilter/msocximex.cxx
index 493e097857..5abf32ce3d 100644
--- a/svx/source/msfilter/msocximex.cxx
+++ b/svx/source/msfilter/msocximex.cxx
@@ -5299,7 +5299,7 @@ sal_Bool OCX_Image::Read(SotStorageStream *pS)
bool result = storePictureInFileSystem( sImageUrl, pImage, nImageLen );
OUString pictName = sImageUrl.copy( sImageUrl.lastIndexOf('/') + 1 );
result = storePictureInDoc( pDocSh, pictName, pImage, nImageLen );
- delete pImage;
+ delete [] pImage;
}
return sal_True;
}
diff --git a/svx/source/msfilter/msvbahelper.cxx b/svx/source/msfilter/msvbahelper.cxx
new file mode 100644
index 0000000000..2f9c330d91
--- /dev/null
+++ b/svx/source/msfilter/msvbahelper.cxx
@@ -0,0 +1,384 @@
+/*************************************************************************
+ *
+ * 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:
+ * $Revision:
+ *
+ * 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/msvbahelper.hxx>
+#include <basic/sbx.hxx>
+#include <basic/sbstar.hxx>
+#include <basic/basmgr.hxx>
+#include <basic/sbmod.hxx>
+#include <basic/sbmeth.hxx>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
+#include <com/sun/star/document/XDocumentProperties.hpp>
+#include <com/sun/star/document/XDocumentInfoSupplier.hpp>
+#include <tools/urlobj.hxx>
+#include <osl/file.hxx>
+
+using namespace ::com::sun::star;
+
+const static rtl::OUString sUrlPart0 = rtl::OUString::createFromAscii( "vnd.sun.star.script:");
+const static rtl::OUString sUrlPart1 = rtl::OUString::createFromAscii( "?language=Basic&location=document");
+
+namespace ooo { namespace vba {
+
+String makeMacroURL( const String& sMacroName )
+{
+ return sUrlPart0.concat( sMacroName ).concat( sUrlPart1 ) ;
+}
+
+SfxObjectShell* findShellForUrl( const rtl::OUString& sMacroURLOrPath )
+{
+ SfxObjectShell* pFoundShell=NULL;
+ SfxObjectShell* pShell = SfxObjectShell::GetFirst();
+ INetURLObject aObj;
+ aObj.SetURL( sMacroURLOrPath );
+ bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ rtl::OUString aURL;
+ if ( bIsURL )
+ aURL = sMacroURLOrPath;
+ else
+ {
+ osl::FileBase::getFileURLFromSystemPath( sMacroURLOrPath, aURL );
+ aObj.SetURL( aURL );
+ }
+ OSL_TRACE("Trying to find shell for url %s", rtl::OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ).getStr() );
+ while ( pShell )
+ {
+
+ uno::Reference< frame::XModel > xModel = pShell->GetModel();
+ // are we searching for a template? if so we have to cater for the
+ // fact that in openoffice a document opened from a template is always
+ // a new document :/
+ if ( xModel.is() )
+ {
+ OSL_TRACE("shell 0x%x has model with url %s and we look for %s", pShell
+ , rtl::OUStringToOString( xModel->getURL(), RTL_TEXTENCODING_UTF8 ).getStr()
+ , rtl::OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ).getStr()
+ );
+ if ( sMacroURLOrPath.endsWithIgnoreAsciiCaseAsciiL( ".dot", 4 ) )
+ {
+ uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( xModel, uno::UNO_QUERY );
+ if( xDocInfoSupp.is() )
+ {
+ uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW );
+ rtl::OUString sCurrName = xDocProps->getTemplateName();
+ if( sMacroURLOrPath.lastIndexOf( sCurrName ) >= 0 )
+ {
+ pFoundShell = pShell;
+ break;
+ }
+ }
+ }
+ else
+ {
+ if ( aURL.equals( xModel->getURL() ) )
+ {
+ pFoundShell = pShell;
+ break;
+ }
+ }
+ }
+ pShell = SfxObjectShell::GetNext( *pShell );
+ }
+ return pFoundShell;
+}
+
+// sMod can be empty ( but we really need the library to search in )
+// if sMod is empty and a macro is found then sMod is updated
+bool hasMacro( SfxObjectShell* pShell, const String& sLibrary, String& sMod, const String& sMacro )
+{
+ bool bFound = false;
+ if ( sLibrary.Len() && sMacro.Len() )
+ {
+ OSL_TRACE("** Searching for %s.%s in library %s"
+ ,rtl::OUStringToOString( sMod, RTL_TEXTENCODING_UTF8 ).getStr()
+ ,rtl::OUStringToOString( sMacro, RTL_TEXTENCODING_UTF8 ).getStr()
+ ,rtl::OUStringToOString( sLibrary, RTL_TEXTENCODING_UTF8 ).getStr() );
+ BasicManager* pBasicMgr = pShell-> GetBasicManager();
+ if ( pBasicMgr )
+ {
+ StarBASIC* pBasic = pBasicMgr->GetLib( sLibrary );
+ if ( !pBasic )
+ {
+ USHORT nId = pBasicMgr->GetLibId( sLibrary );
+ pBasicMgr->LoadLib( nId );
+ pBasic = pBasicMgr->GetLib( sLibrary );
+ }
+ if ( pBasic )
+ {
+ if ( sMod.Len() ) // we wish to find the macro is a specific module
+ {
+ SbModule* pModule = pBasic->FindModule( sMod );
+ if ( pModule )
+ {
+ SbxArray* pMethods = pModule->GetMethods();
+ if ( pMethods )
+ {
+ SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Find( sMacro, SbxCLASS_METHOD ) );
+ if ( pMethod )
+ bFound = true;
+ }
+ }
+ }
+ else if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pBasic->Find( sMacro, SbxCLASS_METHOD ) ) )
+ {
+ if( SbModule* pModule = pMethod->GetModule() )
+ {
+ sMod = pModule->GetName();
+ bFound = true;
+ }
+ }
+ }
+ }
+ }
+ return bFound;
+}
+void parseMacro( const rtl::OUString& sMacro, String& sContainer, String& sModule, String& sProcedure )
+{
+ sal_Int32 nMacroDot = sMacro.lastIndexOf( '.' );
+
+ if ( nMacroDot != -1 )
+ {
+ sProcedure = sMacro.copy( nMacroDot + 1 );
+
+ sal_Int32 nContainerDot = sMacro.lastIndexOf( '.', nMacroDot - 1 );
+ if ( nContainerDot != -1 )
+ {
+ sModule = sMacro.copy( nContainerDot + 1, nMacroDot - nContainerDot - 1 );
+ sContainer = sMacro.copy( 0, nContainerDot );
+ }
+ else
+ sModule = sMacro.copy( 0, nMacroDot );
+ }
+ else
+ sProcedure = sMacro;
+}
+
+VBAMacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUString& MacroName, bool bSearchGlobalTemplates )
+{
+ VBAMacroResolvedInfo aRes;
+ if ( !pShell )
+ return aRes;
+ aRes.SetMacroDocContext( pShell );
+ // parse the macro name
+ sal_Int32 nDocSepIndex = MacroName.indexOfAsciiL( "!", 1 );
+ String sMacroUrl = MacroName;
+
+ String sContainer;
+ String sModule;
+ String sProcedure;
+
+ if( nDocSepIndex > 0 )
+ {
+ // macro specified by document name
+ // find document shell for document name and call ourselves
+ // recursively
+
+ // assume for now that the document name is *this* document
+ String sDocUrlOrPath = MacroName.copy( 0, nDocSepIndex );
+ sMacroUrl = MacroName.copy( nDocSepIndex + 1 );
+ OSL_TRACE("doc search, current shell is 0x%x", pShell );
+ SfxObjectShell* pFoundShell = findShellForUrl( sDocUrlOrPath );
+ OSL_TRACE("doc search, after find, found shell is 0x%x", pFoundShell );
+ aRes = resolveVBAMacro( pFoundShell, sMacroUrl );
+ }
+ else
+ {
+ // macro is contained in 'this' document ( or code imported from a template
+ // where that template is a global template or perhaps the template this
+ // document is created from )
+
+ // macro format = Container.Module.Procedure
+ parseMacro( MacroName, sContainer, sModule, sProcedure );
+ uno::Reference< lang::XMultiServiceFactory> xSF( pShell->GetModel(), uno::UNO_QUERY);
+ uno::Reference< container::XNameContainer > xPrjNameCache;
+ if ( xSF.is() )
+ xPrjNameCache.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAProjectNameProvider" ) ) ), uno::UNO_QUERY );
+
+ std::vector< rtl::OUString > sSearchList;
+
+ if ( sContainer.Len() > 0 )
+ {
+ // get the Project associated with the Container
+ if ( xPrjNameCache.is() )
+ {
+ if ( xPrjNameCache->hasByName( sContainer ) )
+ {
+ rtl::OUString sProject;
+ xPrjNameCache->getByName( sContainer ) >>= sProject;
+ sContainer = sProject;
+ }
+ }
+ sSearchList.push_back( sContainer ); // First Lib to search
+ }
+ else
+ {
+ // Ok, if we have no Container specified then we need to search them in order, this document, template this document created from, global templates,
+ // get the name of Project/Library for 'this' document
+ rtl::OUString sThisProject;
+ BasicManager* pBasicMgr = pShell-> GetBasicManager();
+ if ( pBasicMgr )
+ {
+ if ( pBasicMgr->GetName().Len() )
+ sThisProject = pBasicMgr->GetName();
+ else // cater for the case where VBA is not enabled
+ sThisProject = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Standard") );
+ }
+ sSearchList.push_back( sThisProject ); // First Lib to search
+ if ( xPrjNameCache.is() )
+ {
+ // is this document created from a template?
+ uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( pShell->GetModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW );
+
+ rtl::OUString sCreatedFrom = xDocProps->getTemplateURL();
+ if ( sCreatedFrom.getLength() )
+ {
+ INetURLObject aObj;
+ aObj.SetURL( sCreatedFrom );
+ bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID;
+ rtl::OUString aURL;
+ if ( bIsURL )
+ aURL = sCreatedFrom;
+ else
+ {
+ osl::FileBase::getFileURLFromSystemPath( sCreatedFrom, aURL );
+ aObj.SetURL( aURL );
+ }
+ sCreatedFrom = aObj.GetLastName();
+ }
+
+ sal_Int32 nIndex = sCreatedFrom.lastIndexOf( '.' );
+ if ( nIndex != -1 )
+ sCreatedFrom = sCreatedFrom.copy( 0, nIndex );
+
+ rtl::OUString sPrj;
+ if ( sCreatedFrom.getLength() && xPrjNameCache->hasByName( sCreatedFrom ) )
+ {
+ xPrjNameCache->getByName( sCreatedFrom ) >>= sPrj;
+ // Make sure we don't double up with this project
+ if ( !sPrj.equals( sThisProject ) )
+ sSearchList.push_back( sPrj );
+ }
+
+ // get list of global template Names
+ uno::Sequence< rtl::OUString > sTemplateNames = xPrjNameCache->getElementNames();
+ sal_Int32 nLen = sTemplateNames.getLength();
+ for ( sal_Int32 index = 0; ( bSearchGlobalTemplates && index < nLen ); ++index )
+ {
+
+ if ( !sCreatedFrom.equals( sTemplateNames[ index ] ) )
+ {
+ if ( xPrjNameCache->hasByName( sTemplateNames[ index ] ) )
+ {
+ xPrjNameCache->getByName( sTemplateNames[ index ] ) >>= sPrj;
+ // Make sure we don't double up with this project
+ if ( !sPrj.equals( sThisProject ) )
+ sSearchList.push_back( sPrj );
+ }
+ }
+
+ }
+ }
+ }
+ std::vector< rtl::OUString >::iterator it_end = sSearchList.end();
+ for ( std::vector< rtl::OUString >::iterator it = sSearchList.begin(); it != it_end; ++it )
+ {
+ bool bRes = hasMacro( pShell, *it, sModule, sProcedure );
+ if ( bRes )
+ {
+ aRes.SetResolved( true );
+ aRes.SetMacroDocContext( pShell );
+ sContainer = *it;
+ break;
+ }
+ }
+ }
+ aRes.SetResolvedMacro( sProcedure.Insert( '.', 0 ).Insert( sModule, 0).Insert( '.', 0 ).Insert( sContainer, 0 ) );
+
+ return aRes;
+}
+
+// Treat the args as possible inouts ( convertion at bottom of method )
+sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, uno::Sequence< uno::Any >& aArgs, uno::Any& /*aRet*/, const uno::Any& aCaller )
+{
+ sal_Bool bRes = sal_False;
+ if ( !pShell )
+ return bRes;
+ rtl::OUString sUrl = makeMacroURL( sMacroName );
+
+ uno::Sequence< sal_Int16 > aOutArgsIndex;
+ uno::Sequence< uno::Any > aOutArgs;
+
+ try
+ {
+ uno::Reference< script::provider::XScriptProvider > xScriptProvider;
+ uno::Reference< script::provider::XScriptProviderSupplier > xSPS( pShell->GetModel(), uno::UNO_QUERY_THROW );
+
+ xScriptProvider.set( xSPS->getScriptProvider(), uno::UNO_QUERY_THROW );
+
+ uno::Reference< script::provider::XScript > xScript( xScriptProvider->getScript( sUrl ), uno::UNO_QUERY_THROW );
+
+ if ( aCaller.hasValue() )
+ {
+ uno::Reference< beans::XPropertySet > xProps( xScript, uno::UNO_QUERY );
+ if ( xProps.is() )
+ {
+ uno::Sequence< uno::Any > aCallerHack(1);
+ aCallerHack[ 0 ] = aCaller;
+ xProps->setPropertyValue( rtl::OUString::createFromAscii( "Caller" ), uno::makeAny( aCallerHack ) );
+ }
+ }
+
+
+ xScript->invoke( aArgs, aOutArgsIndex, aOutArgs );
+
+ sal_Int32 nLen = aOutArgs.getLength();
+ // convert any out params to seem like they were inouts
+ if ( nLen )
+ {
+ for ( sal_Int32 index=0; index < nLen; ++index )
+ {
+ sal_Int32 nOutIndex = aOutArgsIndex[ index ];
+ aArgs[ nOutIndex ] = aOutArgs[ index ];
+ }
+ }
+
+ bRes = sal_True;
+ }
+ catch ( uno::Exception& e )
+ {
+ bRes = sal_False;
+ }
+ return bRes;
+}
+} } // vba // ooo
diff --git a/svx/source/outliner/outliner.cxx b/svx/source/outliner/outliner.cxx
index f290864808..193a5f26eb 100644
--- a/svx/source/outliner/outliner.cxx
+++ b/svx/source/outliner/outliner.cxx
@@ -1867,6 +1867,20 @@ IMPL_LINK( Outliner, EndMovingParagraphsHdl, MoveParagraphsInfo*, pInfos )
return 0;
}
+static bool isSameNumbering( const SvxNumberFormat& rN1, const SvxNumberFormat& rN2 )
+{
+ if( rN1.GetNumberingType() != rN2.GetNumberingType() )
+ return false;
+
+ if( rN1.GetNumStr(1) != rN2.GetNumStr(1) )
+ return false;
+
+ if( (rN1.GetPrefix() != rN2.GetPrefix()) || (rN1.GetSuffix() != rN2.GetSuffix()) )
+ return false;
+
+ return true;
+}
+
sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pParaFmt )
{
sal_uInt16 nNumber = pParaFmt->GetStart() - 1;
@@ -1879,8 +1893,8 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar
pPara = pParaList->GetParagraph( nPara );
const sal_Int16 nDepth = pPara->GetDepth();
- // ignore paragraphs that are below our paragraph
- if( nDepth > nParaDepth )
+ // ignore paragraphs that are below our paragraph or have no numbering
+ if( (nDepth > nParaDepth) || (nDepth == -1) )
continue;
// stop on paragraphs that are above our paragraph
@@ -1888,8 +1902,13 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar
break;
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
- if( pFmt == 0 || (*pFmt != *pParaFmt) )
- break; // change in number format, stop here
+
+ if( pFmt == 0 )
+ continue; // ignore paragraphs without bullets
+
+ // check if numbering is the same
+ if( !isSameNumbering( *pFmt, *pParaFmt ) )
+ break;
const SfxBoolItem& rBulletState = (const SfxBoolItem&) pEditEngine->GetParaAttrib( nPara, EE_PARA_BULLETSTATE );
diff --git a/svx/source/outliner/outlvw.cxx b/svx/source/outliner/outlvw.cxx
index 71387e4789..2fdc0074c4 100644
--- a/svx/source/outliner/outlvw.cxx
+++ b/svx/source/outliner/outlvw.cxx
@@ -1010,6 +1010,14 @@ void OutlinerView::PasteSpecial()
pOwner->bPasting = TRUE;
pEditView->PasteSpecial();
+ if ( pOwner->ImplGetOutlinerMode() == OUTLINERMODE_OUTLINEOBJECT )
+ {
+ const USHORT nParaCount = pOwner->pEditEngine->GetParagraphCount();
+
+ for( USHORT nPara = 0; nPara < nParaCount; nPara++ )
+ pOwner->ImplSetLevelDependendStyleSheet( nPara );
+ }
+
pEditView->SetEditEngineUpdateMode( TRUE );
pOwner->UndoActionEnd( OLUNDO_INSERT );
pEditView->ShowCursor( TRUE, TRUE );
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index 5781e7bbeb..80e6129618 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -310,6 +310,7 @@ namespace sdr
false,
false,
false,
+ false,
false);
// decompose immediately with neutral ViewInformation. This will
diff --git a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
index ef7df1ae32..28ab8cbff6 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobjcustomshape.cxx
@@ -39,6 +39,7 @@
#include <svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
+#include <svx/obj3d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -134,6 +135,7 @@ namespace sdr
// create Primitive2DSequence from sub-geometry
const SdrObject* pSdrObjRepresentation = GetCustomShapeObj().GetSdrObjectFromCustomShape();
+ bool b3DShape(false);
if(pSdrObjRepresentation)
{
@@ -142,6 +144,12 @@ namespace sdr
while(aIterator.IsMore())
{
SdrObject& rCandidate = *aIterator.Next();
+
+ if(!b3DShape && dynamic_cast< E3dObject* >(&rCandidate))
+ {
+ b3DShape = true;
+ }
+
const drawinglayer::primitive2d::Primitive2DSequence xNew(rCandidate.GetViewContact().getViewIndependentPrimitive2DSequence());
drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(xGroup, xNew);
}
@@ -220,7 +228,8 @@ namespace sdr
xGroup,
aTextBoxMatrix,
bWordWrap,
- false)); // #SJ# New parameter to force to clipped BlockText for SC
+ false, // #SJ# New parameter to force to clipped BlockText for SC
+ b3DShape));
xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
index 454b68cbfb..3facc1c031 100644
--- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
@@ -113,6 +113,11 @@ namespace sdr
new drawinglayer::primitive2d::SdrOleContentPrimitive2D(
GetOle2Obj(),
aObjectMatrix,
+
+ // #i104867# add GraphicVersion number to be able to check for
+ // content change in the primitive later
+ GetOle2Obj().getEmbeddedObjectRef().getGraphicVersion(),
+
bHighContrast));
// create primitive. Use Ole2 primitive here. Prepare attribute settings, will be used soon anyways.
diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
index 9c7810ea46..f9113d7b64 100644
--- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx
@@ -39,6 +39,7 @@
#include <svx/sdr/primitive2d/sdrrectangleprimitive2d.hxx>
#include <svtools/itemset.hxx>
#include <svx/sdr/primitive2d/sdrprimitivetools.hxx>
+#include <svx/svdmodel.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -104,6 +105,10 @@ namespace sdr
double fCornerRadiusY;
drawinglayer::primitive2d::calculateRelativeCornerRadius(nCornerRadius, aObjectRange, fCornerRadiusX, fCornerRadiusY);
+ // #i105856# use knowledge about pickthrough from the model
+ const bool bPickThroughTransparentTextFrames(
+ GetRectObj().GetModel() && GetRectObj().GetModel()->IsPickThroughTransparentTextFrames());
+
// create primitive
const drawinglayer::primitive2d::Primitive2DReference xReference(
new drawinglayer::primitive2d::SdrRectanglePrimitive2D(
@@ -111,7 +116,8 @@ namespace sdr
*pAttribute,
fCornerRadiusX,
fCornerRadiusY,
- GetRectObj().IsTextFrame()));
+ // #i105856# use fill for HitTest when TextFrame and not PickThrough
+ GetRectObj().IsTextFrame() && !bPickThroughTransparentTextFrames));
xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
index 5c23e3e1fe..1de8ffd792 100644
--- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
@@ -121,36 +121,18 @@ namespace sdr { namespace contact {
//--------------------------------------------------------------------
ViewObjectContact& ViewContactOfUnoControl::CreateObjectSpecificViewObjectContact( ObjectContact& _rObjectContact )
{
+ // print or print preview requires special handling
+ const OutputDevice* pDevice = _rObjectContact.TryToGetOutputDevice();
+ bool bPrintOrPreview = ( pDevice != NULL ) && ( pDevice->GetOutDevType() == OUTDEV_PRINTER );
+
ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &_rObjectContact );
- if ( pPageViewContact )
- {
- // special classes for special devices:
- // - PDF export
- ::vcl::PDFExtOutDevData* pPDFExport = PTR_CAST( ::vcl::PDFExtOutDevData, pPageViewContact->GetPageWindow().GetPaintWindow().GetOutputDevice().GetExtOutDevData() );
- if ( pPDFExport != NULL )
- return *new UnoControlPDFExportContact( *pPageViewContact, *this );
-
- // - print preview
- if ( pPageViewContact->GetPageWindow().GetPageView().GetView().IsPrintPreview() )
- return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this );
-
- OutDevType eDeviceType = pPageViewContact->GetPageWindow().GetPaintWindow().GetOutputDevice().GetOutDevType();
- // - printing
- if ( eDeviceType == OUTDEV_PRINTER )
- return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this );
-
- // - any other virtual device
- if ( eDeviceType == OUTDEV_VIRDEV )
- return *new UnoControlDefaultContact( *pPageViewContact, *this );
-
- // - normal windows have special, design-mode dependent handling
- if ( eDeviceType == OUTDEV_WINDOW )
- return *new UnoControlWindowContact( *pPageViewContact, *this );
- }
+ bPrintOrPreview |= ( pPageViewContact != NULL ) && pPageViewContact->GetPageWindow().GetPageView().GetView().IsPrintPreview();
+
+ if ( bPrintOrPreview )
+ return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this );
- // if we're not working for a ObjectContactOfPageView, then we can't use a ViewObjectContactOfUnoControl, or any
- // of its derivees. Fall back to a "normal" SdrObj's contact object.
- return *new ViewObjectContactOfSdrObj( _rObjectContact, *this );
+ // all others are nowadays served by the same implementation
+ return *new ViewObjectContactOfUnoControl( _rObjectContact, *this );
}
//--------------------------------------------------------------------
@@ -173,7 +155,7 @@ namespace sdr { namespace contact {
aTransform.set(0, 2, aRange.getMinX());
aTransform.set(1, 2, aRange.getMinY());
- // create control primitive WITHOUT evtl. existing XControl; this would be done in
+ // create control primitive WITHOUT possibly existing XControl; this would be done in
// the VOC in createPrimitive2DSequence()
const drawinglayer::primitive2d::Primitive2DReference xRetval(new drawinglayer::primitive2d::ControlPrimitive2D(
aTransform, xControlModel));
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 90295f7ce6..f4075576ae 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -75,6 +75,52 @@
#include <boost/shared_ptr.hpp>
#include <boost/bind.hpp>
+/*
+
+Form controls (more precise: UNO Controls) in the drawing layer are ... prone to breakage, since they have some
+specialities which the drawing layer currently doesn't capture too well. In particular, having a living VCL
+window as child of the document window, and coupling this Window to a drawing layer object, makes things
+difficult sometimes.
+
+Below is a list of issues which existed in the past. Whenever you change code here, you're encouraged to
+verify those issues are still fixed. (Whenever you have some additional time, you're encouraged to write
+an automatic test for one or more of those issues for which this is possible :)
+
+http://www.openoffice.org/issues/show_bug.cgi?id=105992
+zooming documents containg (alive) form controls improperly positions the controls
+
+http://www.openoffice.org/issues/show_bug.cgi?id=104362
+crash when copy a control
+
+http://www.openoffice.org/issues/show_bug.cgi?id=104544
+Gridcontrol duplicated after design view on/off
+
+http://www.openoffice.org/issues/show_bug.cgi?id=102089
+print preview shows control elements with property printable=false
+
+http://www.openoffice.org/issues/show_bug.cgi?id=102090
+problem with setVisible on TextControl
+
+http://www.openoffice.org/issues/show_bug.cgi?id=103138
+loop when insert a control in draw
+
+http://www.openoffice.org/issues/show_bug.cgi?id=101398
+initially-displaying a document with many controls is very slow
+
+http://www.openoffice.org/issues/show_bug.cgi?id=72429
+repaint error in form wizard in bugdoc database
+
+http://www.openoffice.org/issues/show_bug.cgi?id=72694
+form control artifacts when scrolling a text fast
+
+
+issues in the old (Sun-internal) bug tracking system:
+
+#110592#
+form controls being in redlining or in hidden section are visible in alive-mode
+
+*/
+
//........................................................................
namespace sdr { namespace contact {
//........................................................................
@@ -402,7 +448,7 @@ namespace sdr { namespace contact {
//= InvisibleControlViewAccess
//====================================================================
/** is a ->IPageViewAccess implementation which can be used to create an invisble control for
- an arbitrary device
+ an arbitrary window
*/
class InvisibleControlViewAccess : public IPageViewAccess
{
@@ -446,6 +492,47 @@ namespace sdr { namespace contact {
}
//====================================================================
+ //= DummyPageViewAccess
+ //====================================================================
+ /** is a ->IPageViewAccess implementation which can be used to create a control for an arbitrary
+ non-Window device
+
+ The implementation will report the "PageView" as being in design mode, all layers to be visible,
+ and will not return any ControlContainer, so all control container related features (notifications etc)
+ are not available.
+ */
+ class DummyPageViewAccess : public IPageViewAccess
+ {
+ public:
+ DummyPageViewAccess()
+ {
+ }
+
+ virtual bool isDesignMode() const;
+ virtual Reference< XControlContainer >
+ getControlContainer( const OutputDevice& _rDevice ) const;
+ virtual bool isLayerVisible( SdrLayerID _nLayerID ) const;
+ };
+
+ //--------------------------------------------------------------------
+ bool DummyPageViewAccess::isDesignMode() const
+ {
+ return true;
+ }
+
+ //--------------------------------------------------------------------
+ Reference< XControlContainer > DummyPageViewAccess::getControlContainer( const OutputDevice& /*_rDevice*/ ) const
+ {
+ return NULL;
+ }
+
+ //--------------------------------------------------------------------
+ bool DummyPageViewAccess::isLayerVisible( SdrLayerID /*_nLayerID*/ ) const
+ {
+ return true;
+ }
+
+ //====================================================================
//= ViewObjectContactOfUnoControl_Impl
//====================================================================
typedef ::cppu::WeakImplHelper4 < XWindowListener
@@ -763,8 +850,9 @@ namespace sdr { namespace contact {
This method cares for this, by retrieving the very original OutputDevice.
*/
- static const OutputDevice& imp_getPageViewDevice_nothrow( const ObjectContactOfPageView& _rObjectContact );
- const OutputDevice& imp_getPageViewDevice_nothrow() const;
+ static const OutputDevice& impl_getPageViewOutputDevice_nothrow( const ObjectContactOfPageView& _rObjectContact );
+
+ const OutputDevice& impl_getOutputDevice_throw() const;
private:
ViewObjectContactOfUnoControl_Impl(); // never implemented
@@ -799,11 +887,6 @@ namespace sdr { namespace contact {
protected:
virtual ::drawinglayer::primitive2d::Primitive2DSequence
- get2DDecomposition(
- const ::drawinglayer::geometry::ViewInformation2D& rViewInformation
- ) const;
-
- virtual ::drawinglayer::primitive2d::Primitive2DSequence
createLocalDecomposition(
const ::drawinglayer::geometry::ViewInformation2D& rViewInformation
) const;
@@ -829,6 +912,13 @@ namespace sdr { namespace contact {
static void getTransformation( const ViewContactOfUnoControl& _rVOC, ::basegfx::B2DHomMatrix& _out_Transformation );
private:
+ void impl_positionAndZoomControl( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const
+ {
+ if ( !_rViewInformation.getViewport().isEmpty() )
+ m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() );
+ }
+
+ private:
::rtl::Reference< ViewObjectContactOfUnoControl_Impl > m_pVOCImpl;
/** The geometry is part of the identity of an primitive, so we cannot calculate it on demand
(since the data the calculation is based on might have changed then), but need to calc
@@ -854,9 +944,15 @@ namespace sdr { namespace contact {
DBG_CTOR( ViewObjectContactOfUnoControl_Impl, NULL );
DBG_ASSERT( m_pAntiImpl, "ViewObjectContactOfUnoControl_Impl::ViewObjectContactOfUnoControl_Impl: invalid AntiImpl!" );
- const OutputDevice& rPageViewDevice( imp_getPageViewDevice_nothrow() );
+ const OutputDevice& rPageViewDevice( impl_getOutputDevice_throw() );
m_aZoomLevelNormalization = rPageViewDevice.GetInverseViewTransformation();
+ #if OSL_DEBUG_LEVEL > 1
+ ::basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ m_aZoomLevelNormalization.decompose( aScale, aTranslate, fRotate, fShearX );
+ #endif
+
::basegfx::B2DHomMatrix aScaleNormalization;
MapMode aCurrentDeviceMapMode( rPageViewDevice.GetMapMode() );
aScaleNormalization.set( 0, 0, (double)aCurrentDeviceMapMode.GetScaleX() );
@@ -953,27 +1049,40 @@ namespace sdr { namespace contact {
return false;
ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &m_pAntiImpl->GetObjectContact() );
- DBG_ASSERT( pPageViewContact, "ViewObjectContactOfUnoControl_Impl::ensureControl: cannot create a control if I don't have a PageView!" );
- if ( !pPageViewContact )
- return false;
+ if ( pPageViewContact )
+ {
+ SdrPageViewAccess aPVAccess( pPageViewContact->GetPageWindow().GetPageView() );
+ return impl_ensureControl_nothrow(
+ aPVAccess,
+ impl_getPageViewOutputDevice_nothrow( *pPageViewContact )
+ );
+ }
- SdrPageViewAccess aPVAccess( pPageViewContact->GetPageWindow().GetPageView() );
+ DummyPageViewAccess aNoPageView;
return impl_ensureControl_nothrow(
- aPVAccess,
- imp_getPageViewDevice_nothrow( *pPageViewContact )
+ aNoPageView,
+ impl_getOutputDevice_throw()
);
}
//--------------------------------------------------------------------
- const OutputDevice& ViewObjectContactOfUnoControl_Impl::imp_getPageViewDevice_nothrow() const
+ const OutputDevice& ViewObjectContactOfUnoControl_Impl::impl_getOutputDevice_throw() const
{
ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &m_pAntiImpl->GetObjectContact() );
- ENSURE_OR_THROW( pPageViewContact, "need a ObjectContactOfPageView." );
- return imp_getPageViewDevice_nothrow( *pPageViewContact );
+ if ( pPageViewContact )
+ {
+ // do not use ObjectContact::TryToGetOutputDevice here, it would not care for the PageWindow's
+ // OriginalPaintWindow
+ return impl_getPageViewOutputDevice_nothrow( *pPageViewContact );
+ }
+
+ const OutputDevice* pDevice = m_pAntiImpl->GetObjectContact().TryToGetOutputDevice();
+ ENSURE_OR_THROW( pDevice, "no output device -> no control" );
+ return *pDevice;
}
//--------------------------------------------------------------------
- const OutputDevice& ViewObjectContactOfUnoControl_Impl::imp_getPageViewDevice_nothrow( const ObjectContactOfPageView& _rObjectContact )
+ const OutputDevice& ViewObjectContactOfUnoControl_Impl::impl_getPageViewOutputDevice_nothrow( const ObjectContactOfPageView& _rObjectContact )
{
// if the PageWindow has a patched PaintWindow, use the original PaintWindow
// this ensures that our control is _not_ re-created just because somebody
@@ -988,10 +1097,10 @@ namespace sdr { namespace contact {
namespace
{
- static void lcl_resetFlag( bool& rbFlag )
- {
- rbFlag = false;
- }
+ static void lcl_resetFlag( bool& rbFlag )
+ {
+ rbFlag = false;
+ }
}
//--------------------------------------------------------------------
@@ -1014,8 +1123,8 @@ namespace sdr { namespace contact {
}
m_bCreatingControl = true;
- ::comphelper::ScopeGuard aGuard( ::boost::bind( lcl_resetFlag, ::boost::ref( m_bCreatingControl ) ) );
-
+ ::comphelper::ScopeGuard aGuard( ::boost::bind( lcl_resetFlag, ::boost::ref( m_bCreatingControl ) ) );
+
if ( m_aControl.is() )
{
if ( m_pOutputDeviceForWindow == &_rDevice )
@@ -1520,20 +1629,17 @@ namespace sdr { namespace contact {
}
//--------------------------------------------------------------------
- ::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::get2DDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const
- {
- if ( m_pVOCImpl->hasControl() )
- m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() );
- return BasePrimitive2D::get2DDecomposition( _rViewInformation );
- }
-
- //--------------------------------------------------------------------
::drawinglayer::primitive2d::Primitive2DSequence LazyControlCreationPrimitive2D::createLocalDecomposition( const ::drawinglayer::geometry::ViewInformation2D& _rViewInformation ) const
{
+ #if OSL_DEBUG_LEVEL > 1
+ ::basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ _rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX );
+ #endif
// force control here to make it a VCL ChildWindow. Will be fetched
// and used below by getExistentControl()
m_pVOCImpl->ensureControl();
- m_pVOCImpl->positionAndZoomControl( _rViewInformation.getObjectToViewTransformation() );
+ impl_positionAndZoomControl( _rViewInformation );
// get needed data
const ViewContactOfUnoControl& rViewContactOfUnoControl( m_pVOCImpl->getViewContact() );
@@ -1659,13 +1765,40 @@ namespace sdr { namespace contact {
// our control already died.
// TODO: Is it worth re-creating the control? Finally, this is a pathological situation, it means some instance
// disposed the control though it doesn't own it. So, /me thinks we should not bother here.
- return drawinglayer::primitive2d::Primitive2DSequence();
-
+ return drawinglayer::primitive2d::Primitive2DSequence();
+
+ // ignore existing controls which are in alive mode and manually switched to "invisible"
+ // #102090# / 2009-06-05 / frank.schoenheit@sun.com
+ const ControlHolder& rControl( m_pImpl->getExistentControl() );
+ if ( rControl.is() && !rControl.isDesignMode() && !rControl.isVisible() )
+ return drawinglayer::primitive2d::Primitive2DSequence();
+
::drawinglayer::primitive2d::Primitive2DReference xPrimitive( new LazyControlCreationPrimitive2D( m_pImpl ) );
return ::drawinglayer::primitive2d::Primitive2DSequence( &xPrimitive, 1 );
}
//--------------------------------------------------------------------
+ bool ViewObjectContactOfUnoControl::isPrimitiveVisible( const DisplayInfo& _rDisplayInfo ) const
+ {
+ VOCGuard aGuard( *m_pImpl );
+
+ if ( m_pImpl->hasControl() )
+ {
+ const ::drawinglayer::geometry::ViewInformation2D& rViewInformation( GetObjectContact().getViewInformation2D() );
+ #if OSL_DEBUG_LEVEL > 1
+ ::basegfx::B2DVector aScale, aTranslate;
+ double fRotate, fShearX;
+ rViewInformation.getObjectToViewTransformation().decompose( aScale, aTranslate, fRotate, fShearX );
+ #endif
+
+ if ( !rViewInformation.getViewport().isEmpty() )
+ m_pImpl->positionAndZoomControl( rViewInformation.getObjectToViewTransformation() );
+ }
+
+ return ViewObjectContactOfSdrObj::isPrimitiveVisible( _rDisplayInfo );
+ }
+
+ //--------------------------------------------------------------------
void ViewObjectContactOfUnoControl::propertyChange()
{
// graphical invalidate at all views
@@ -1704,40 +1837,6 @@ namespace sdr { namespace contact {
}
//====================================================================
- //= UnoControlDefaultContact
- //====================================================================
- DBG_NAME( UnoControlDefaultContact )
- //--------------------------------------------------------------------
- UnoControlDefaultContact::UnoControlDefaultContact( ObjectContact& _rObjectContact, ViewContactOfUnoControl& _rViewContact )
- :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact )
- {
- DBG_CTOR( UnoControlDefaultContact, NULL );
- }
-
- //--------------------------------------------------------------------
- UnoControlDefaultContact::~UnoControlDefaultContact()
- {
- DBG_DTOR( UnoControlDefaultContact, NULL );
- }
-
- //====================================================================
- //= UnoControlWindowContact
- //====================================================================
- DBG_NAME( UnoControlWindowContact )
- //--------------------------------------------------------------------
- UnoControlWindowContact::UnoControlWindowContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact )
- :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact )
- {
- DBG_CTOR( UnoControlWindowContact, NULL );
- }
-
- //--------------------------------------------------------------------
- UnoControlWindowContact::~UnoControlWindowContact()
- {
- DBG_DTOR( UnoControlWindowContact, NULL );
- }
-
- //====================================================================
//= UnoControlPrintOrPreviewContact
//====================================================================
DBG_NAME( UnoControlPrintOrPreviewContact )
@@ -1762,23 +1861,6 @@ namespace sdr { namespace contact {
return ViewObjectContactOfUnoControl::createPrimitive2DSequence( rDisplayInfo );
}
- //====================================================================
- //= UnoControlPDFExportContact
- //====================================================================
- DBG_NAME( UnoControlPDFExportContact )
- //--------------------------------------------------------------------
- UnoControlPDFExportContact::UnoControlPDFExportContact( ObjectContactOfPageView& _rObjectContact, ViewContactOfUnoControl& _rViewContact )
- :ViewObjectContactOfUnoControl( _rObjectContact, _rViewContact )
- {
- DBG_CTOR( UnoControlPDFExportContact, NULL );
- }
-
- //--------------------------------------------------------------------
- UnoControlPDFExportContact::~UnoControlPDFExportContact()
- {
- DBG_DTOR( UnoControlPDFExportContact, NULL );
- }
-
//........................................................................
} } // namespace sdr::contact
//........................................................................
diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx
index f77b533a0e..64ac530e55 100644
--- a/svx/source/sdr/overlay/overlaymanager.cxx
+++ b/svx/source/sdr/overlay/overlaymanager.cxx
@@ -44,6 +44,10 @@
//////////////////////////////////////////////////////////////////////////////
+using namespace com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
namespace sdr
{
namespace overlay
@@ -140,6 +144,18 @@ namespace sdr
maViewInformation2D(0),
mfDiscreteOne(0.0)
{
+ // set Property 'ReducedDisplayQuality' to true to allow simpler interaction
+ // visualisations
+ static bool bUseReducedDisplayQualityForDrag(true);
+
+ if(bUseReducedDisplayQualityForDrag)
+ {
+ uno::Sequence< beans::PropertyValue > xProperties(1);
+ xProperties[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedDisplayQuality"));
+ xProperties[0].Value <<= true;
+ maViewInformation2D = drawinglayer::geometry::ViewInformation2D(xProperties);
+ }
+
if(pOldOverlayManager)
{
// take over OverlayObjects from given OverlayManager. Copy
diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
index 91393a4047..c016d8e557 100644
--- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -370,6 +370,42 @@ namespace sdr
OverlayManager::ImpDrawMembers(aBufferRememberedRangeLogic, getOutputDevice());
}
+ // VCL hack for transparent child windows
+ // Problem is e.g. a radiobuttion form control in life mode. The used window
+ // is a transparence vcl childwindow. This flag only allows the parent window to
+ // paint into the child windows area, but there is no mechanism which takes
+ // care for a repaint of the child window. A transparent child window is NOT
+ // a window which always keeps it's content consistent over the parent, but it's
+ // more like just a paint flag for the parent.
+ // To get the update, the windows in question are updated manulally here.
+ if(bTargetIsWindow)
+ {
+ Window& rWindow = static_cast< Window& >(rmOutputDevice);
+
+ if(rWindow.IsChildTransparentModeEnabled() && rWindow.GetChildCount())
+ {
+ const Rectangle aRegionRectanglePixel(
+ maBufferRememberedRangePixel.getMinX(), maBufferRememberedRangePixel.getMinY(),
+ maBufferRememberedRangePixel.getMaxX(), maBufferRememberedRangePixel.getMaxY());
+
+ for(sal_uInt16 a(0); a < rWindow.GetChildCount(); a++)
+ {
+ Window* pCandidate = rWindow.GetChild(a);
+
+ if(pCandidate && pCandidate->IsPaintTransparent())
+ {
+ const Rectangle aCandidatePosSizePixel(pCandidate->GetPosPixel(), pCandidate->GetSizePixel());
+
+ if(aCandidatePosSizePixel.IsOver(aRegionRectanglePixel))
+ {
+ pCandidate->Invalidate(INVALIDATE_NOTRANSPARENT|INVALIDATE_CHILDREN);
+ pCandidate->Update();
+ }
+ }
+ }
+ }
+ }
+
// #i80730# restore visibility of VCL cursor
if(bCursorWasEnabled)
{
diff --git a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
index bde6bb4cd6..233aed8ed2 100644
--- a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx
@@ -123,6 +123,7 @@ namespace drawinglayer
*getSdrLFSTAttribute().getText(),
getSdrLFSTAttribute().getLine(),
false,
+ false,
false));
}
diff --git a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
index 58745f87ad..a00820289c 100644
--- a/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrconnectorprimitive2d.cxx
@@ -72,7 +72,7 @@ namespace drawinglayer
// add text
if(getSdrLSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(getUnitPolygon()), aEmptyMatrix, *getSdrLSTAttribute().getText(), getSdrLSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(getUnitPolygon()), aEmptyMatrix, *getSdrLSTAttribute().getText(), getSdrLSTAttribute().getLine(), false, false, false));
}
// add shadow
diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
index 2a433ecadd..93e8b3a6e7 100644
--- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
@@ -60,14 +60,28 @@ namespace drawinglayer
getTextBox(),
*getSdrSTAttribute().getText(),
0,
- isForceTextClipToTextRange(), // #SJ# use CellText mode; text upper-left
- getWordWrap()));
+ false,
+ getWordWrap(),
+ isForceTextClipToTextRange()));
}
// add shadow
if(aRetval.hasElements() && getSdrSTAttribute().getShadow())
{
- aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow());
+ // #i105323# add generic shadow only for 2D shapes. For
+ // 3D shapes shadow will be set at the individual created
+ // visualisation objects and be visualized by the 3d renderer
+ // as a single shadow.
+ //
+ // The shadow for AutoShapes could be handled uniformely by not setting any
+ // shadow items at the helper model objects and only adding shadow here for
+ // 2D and 3D (and it works, too), but this would lead to two 3D scenes for
+ // the 3D object; one for the shadow aond one for the content. The one for the
+ // shadow will be correct (using ColorModifierStack), but expensive.
+ if(!get3DShape())
+ {
+ aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow());
+ }
}
return aRetval;
@@ -78,13 +92,15 @@ namespace drawinglayer
const Primitive2DSequence& rSubPrimitives,
const basegfx::B2DHomMatrix& rTextBox,
bool bWordWrap,
- bool bForceTextClipToTextRange)
+ bool bForceTextClipToTextRange,
+ bool b3DShape)
: BasePrimitive2D(),
maSdrSTAttribute(rSdrSTAttribute),
maSubPrimitives(rSubPrimitives),
maTextBox(rTextBox),
mbWordWrap(bWordWrap),
- mbForceTextClipToTextRange(bForceTextClipToTextRange)
+ mbForceTextClipToTextRange(bForceTextClipToTextRange),
+ mb3DShape(b3DShape)
{
}
@@ -98,7 +114,8 @@ namespace drawinglayer
&& getSubPrimitives() == rCompare.getSubPrimitives()
&& getTextBox() == rCompare.getTextBox()
&& getWordWrap() == rCompare.getWordWrap()
- && isForceTextClipToTextRange() == rCompare.isForceTextClipToTextRange());
+ && isForceTextClipToTextRange() == rCompare.isForceTextClipToTextRange()
+ && get3DShape() == rCompare.get3DShape());
}
return false;
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index e6f5a7733c..6204eba4fa 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -173,7 +173,8 @@ namespace drawinglayer
const attribute::SdrTextAttribute& rText,
const attribute::SdrLineAttribute* pStroke,
bool bCellText,
- bool bWordWrap)
+ bool bWordWrap,
+ bool bClipOnBounds)
{
basegfx::B2DHomMatrix aAnchorTransform(rObjectTransform);
SdrTextPrimitive2D* pNew = 0;
@@ -297,7 +298,8 @@ namespace drawinglayer
rText.isFixedCellHeight(),
rText.isScroll(),
bCellText,
- bWordWrap);
+ bWordWrap,
+ bClipOnBounds);
}
}
diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
index c30b036bf5..dee271c97f 100644
--- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
@@ -94,7 +94,7 @@ namespace drawinglayer
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
@@ -191,7 +191,7 @@ namespace drawinglayer
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(::basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
index e4183f3e69..d57540cce7 100644
--- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
@@ -104,7 +104,7 @@ namespace drawinglayer
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
index 1db2b4a6c1..ce9f40037c 100644
--- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
@@ -52,27 +52,29 @@ namespace drawinglayer
namespace primitive2d
{
Primitive2DReference SdrMeasurePrimitive2D::impCreatePart(
+ const attribute::SdrLineAttribute& rLineAttribute,
const basegfx::B2DHomMatrix& rObjectMatrix,
const basegfx::B2DPoint& rStart,
const basegfx::B2DPoint& rEnd,
bool bLeftActive,
bool bRightActive) const
{
+ const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd();
basegfx::B2DPolygon aPolygon;
+
aPolygon.append(rStart);
aPolygon.append(rEnd);
- if(!getSdrLSTAttribute().getLineStartEnd() || (!bLeftActive && !bRightActive))
+ if(!pLineStartEnd || (!bLeftActive && !bRightActive))
{
- return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), 0L);
+ return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, 0);
}
if(bLeftActive && bRightActive)
{
- return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), getSdrLSTAttribute().getLineStartEnd());
+ return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, pLineStartEnd);
}
- const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd();
const basegfx::B2DPolyPolygon aEmpty;
const attribute::SdrLineStartEndAttribute aLineStartEnd(
bLeftActive ? pLineStartEnd->getStartPolyPolygon() : aEmpty, bRightActive ? pLineStartEnd->getEndPolyPolygon() : aEmpty,
@@ -80,7 +82,7 @@ namespace drawinglayer
bLeftActive ? pLineStartEnd->isStartActive() : false, bRightActive ? pLineStartEnd->isEndActive() : false,
bLeftActive ? pLineStartEnd->isStartCentered() : false, bRightActive? pLineStartEnd->isEndCentered() : false);
- return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), &aLineStartEnd);
+ return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, &aLineStartEnd);
}
Primitive2DSequence SdrMeasurePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const
@@ -134,6 +136,7 @@ namespace drawinglayer
pTextAttribute->isScroll(),
false,
false,
+ false,
false);
aTextRange = pBlockText->getB2DRange(aViewInformation);
}
@@ -277,12 +280,12 @@ namespace drawinglayer
const basegfx::B2DPoint aMainLeftLeft(aMainLeft.getX() - fLenLeft, aMainLeft.getY());
const basegfx::B2DPoint aMainRightRight(aMainRight.getX() + fLenRight, aMainRight.getY());
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeftLeft, aMainLeft, false, true));
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainRight, aMainRightRight, true, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeftLeft, aMainLeft, false, true));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainRight, aMainRightRight, true, false));
if(!bMainLineSplitted || MEASURETEXTPOSITION_CENTERED != eHorizontal)
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainRight, false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(* pLineAttribute, aObjectMatrix, aMainLeft, aMainRight, false, false));
}
}
else
@@ -293,12 +296,12 @@ namespace drawinglayer
const basegfx::B2DPoint aMainInnerLeft(aMainLeft.getX() + fHalfLength, aMainLeft.getY());
const basegfx::B2DPoint aMainInnerRight(aMainRight.getX() - fHalfLength, aMainRight.getY());
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainInnerLeft, true, false));
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainInnerRight, aMainRight, false, true));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeft, aMainInnerLeft, true, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainInnerRight, aMainRight, false, true));
}
else
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainRight, true, true));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeft, aMainRight, true, true));
}
}
@@ -311,13 +314,13 @@ namespace drawinglayer
const basegfx::B2DPoint aLeftUp(0.0, fTopEdge);
const basegfx::B2DPoint aLeftDown(0.0, fBottomLeft);
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aLeftDown, aLeftUp, false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aLeftDown, aLeftUp, false, false));
// right help line
const basegfx::B2DPoint aRightUp(fDistance, fTopEdge);
const basegfx::B2DPoint aRightDown(fDistance, fBottomRight);
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aRightDown, aRightUp, false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aRightDown, aRightUp, false, false));
// text horizontal position
if(MEASURETEXTPOSITION_NEGATIVE == eHorizontal)
diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
index a7d647d2c5..1f4d48ea0a 100644
--- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
@@ -110,7 +110,7 @@ namespace drawinglayer
// always supported by the old paints, too
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
index 9c5616ebff..164e122e67 100644
--- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
@@ -157,10 +157,12 @@ namespace drawinglayer
SdrOleContentPrimitive2D::SdrOleContentPrimitive2D(
const SdrOle2Obj& rSdrOle2Obj,
const basegfx::B2DHomMatrix& rObjectTransform,
+ sal_uInt32 nGraphicVersion,
bool bHighContrast)
: BasePrimitive2D(),
mpSdrOle2Obj(const_cast< SdrOle2Obj* >(&rSdrOle2Obj)),
maObjectTransform(rObjectTransform),
+ mnGraphicVersion(nGraphicVersion),
mbHighContrast(bHighContrast)
{
}
@@ -176,6 +178,11 @@ namespace drawinglayer
return ((bBothNot || bBothAndEqual)
&& getObjectTransform() == rCompare.getObjectTransform()
+
+ // #i104867# to find out if the Graphic content of the
+ // OLE has changed, use GraphicVersion number
+ && getGraphicVersion() == rCompare.getGraphicVersion()
+
&& getHighContrast() == rCompare.getHighContrast());
}
diff --git a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
index f09e9c14b8..128a450ee2 100644
--- a/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrpathprimitive2d.cxx
@@ -89,7 +89,7 @@ namespace drawinglayer
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(getUnitPolyPolygon(), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(getUnitPolyPolygon(), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
diff --git a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
index e4b9d3f4ec..6449859318 100644
--- a/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
@@ -68,7 +68,7 @@ namespace drawinglayer
*getSdrLFSTAttribute().getFill(),
getSdrLFSTAttribute().getFillFloatTransGradient()));
}
- else if(getTextFrame())
+ else if(getForceFillForHitTest())
{
// if no fill and it's a text frame, create a fill for HitTest and
// BoundRect fallback
@@ -89,7 +89,7 @@ namespace drawinglayer
getTransform(),
*getSdrLFSTAttribute().getLine()));
}
- else if(!getTextFrame())
+ else if(!getForceFillForHitTest())
{
// if initially no line is defined and it's not a text frame, create
// a line for HitTest and BoundRect
@@ -110,7 +110,7 @@ namespace drawinglayer
// add text
if(getSdrLFSTAttribute().getText())
{
- appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false));
+ appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive(basegfx::B2DPolyPolygon(aUnitOutline), getTransform(), *getSdrLFSTAttribute().getText(), getSdrLFSTAttribute().getLine(), false, false, false));
}
// add shadow
@@ -127,13 +127,13 @@ namespace drawinglayer
const attribute::SdrLineFillShadowTextAttribute& rSdrLFSTAttribute,
double fCornerRadiusX,
double fCornerRadiusY,
- bool bTextFrame)
+ bool bForceFillForHitTest)
: BasePrimitive2D(),
maTransform(rTransform),
maSdrLFSTAttribute(rSdrLFSTAttribute),
mfCornerRadiusX(fCornerRadiusX),
mfCornerRadiusY(fCornerRadiusY),
- mbTextFrame(bTextFrame)
+ mbForceFillForHitTest(bForceFillForHitTest)
{
}
@@ -147,7 +147,7 @@ namespace drawinglayer
&& getCornerRadiusY() == rCompare.getCornerRadiusY()
&& getTransform() == rCompare.getTransform()
&& getSdrLFSTAttribute() == rCompare.getSdrLFSTAttribute()
- && getTextFrame() == rCompare.getTextFrame());
+ && getForceFillForHitTest() == rCompare.getForceFillForHitTest());
}
return false;
diff --git a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
index b6c506538d..bd8547c8b8 100644
--- a/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrtextprimitive2d.cxx
@@ -382,7 +382,8 @@ namespace drawinglayer
bool bFixedCellHeight,
bool bUnlimitedPage,
bool bCellText,
- bool bWordWrap)
+ bool bWordWrap,
+ bool bClipOnBounds)
: SdrTextPrimitive2D(pSdrText, rOutlinerParaObject),
maTextRangeTransform(rTextRangeTransform),
maSdrTextHorzAdjust(aSdrTextHorzAdjust),
@@ -390,7 +391,8 @@ namespace drawinglayer
mbFixedCellHeight(bFixedCellHeight),
mbUnlimitedPage(bUnlimitedPage),
mbCellText(bCellText),
- mbWordWrap(bWordWrap)
+ mbWordWrap(bWordWrap),
+ mbClipOnBounds(bClipOnBounds)
{
}
@@ -406,7 +408,8 @@ namespace drawinglayer
&& isFixedCellHeight() == rCompare.isFixedCellHeight()
&& getUnlimitedPage() == rCompare.getUnlimitedPage()
&& getCellText() == rCompare.getCellText()
- && getWordWrap() == rCompare.getWordWrap());
+ && getWordWrap() == rCompare.getWordWrap()
+ && getClipOnBounds() == rCompare.getClipOnBounds());
}
return false;
@@ -423,7 +426,8 @@ namespace drawinglayer
isFixedCellHeight(),
getUnlimitedPage(),
getCellText(),
- getWordWrap());
+ getWordWrap(),
+ getClipOnBounds());
}
// provide unique ID
diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx
index 554366c9f1..32c930f123 100644
--- a/svx/source/stbctrls/xmlsecctrl.cxx
+++ b/svx/source/stbctrls/xmlsecctrl.cxx
@@ -97,12 +97,12 @@ XmlSecStatusBarControl::XmlSecStatusBarControl( USHORT _nSlotId, USHORT _nId, S
{
mpImpl->mnState = (UINT16)SIGNATURESTATE_UNKNOWN;
- sal_Bool bIsDark = GetStatusBar().GetBackground().GetColor().IsDark();
- mpImpl->maImage = Image( SVX_RES( bIsDark ? RID_SVXBMP_SIGNET_H : RID_SVXBMP_SIGNET ) );
+ sal_Bool bHC = GetStatusBar().GetSettings().GetStyleSettings().GetHighContrastMode();
+ mpImpl->maImage = Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_H : RID_SVXBMP_SIGNET ) );
mpImpl->maImageBroken =
- Image( SVX_RES( bIsDark ? RID_SVXBMP_SIGNET_BROKEN_H : RID_SVXBMP_SIGNET_BROKEN ) );
+ Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_BROKEN_H : RID_SVXBMP_SIGNET_BROKEN ) );
mpImpl->maImageNotValidated =
- Image( SVX_RES( bIsDark ? RID_SVXBMP_SIGNET_NOTVALIDATED_H : RID_SVXBMP_SIGNET_NOTVALIDATED ) );
+ Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_NOTVALIDATED_H : RID_SVXBMP_SIGNET_NOTVALIDATED ) );
}
XmlSecStatusBarControl::~XmlSecStatusBarControl()
diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx
index a452521ed2..9807144d78 100644
--- a/svx/source/stbctrls/zoomsliderctrl.cxx
+++ b/svx/source/stbctrls/zoomsliderctrl.cxx
@@ -188,10 +188,10 @@ SvxZoomSliderControl::SvxZoomSliderControl( USHORT _nSlotId, USHORT _nId, Statu
SfxStatusBarControl( _nSlotId, _nId, _rStb ),
mpImpl( new SvxZoomSliderControl_Impl )
{
- const sal_Bool bIsDark = GetStatusBar().GetBackground().GetColor().IsDark();
- mpImpl->maSliderButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) );
- mpImpl->maIncreaseButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) );
- mpImpl->maDecreaseButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) );
+ const sal_Bool bHC = GetStatusBar().GetSettings().GetStyleSettings().GetHighContrastMode();
+ mpImpl->maSliderButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) );
+ mpImpl->maIncreaseButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) );
+ mpImpl->maDecreaseButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) );
}
// -----------------------------------------------------------------------
diff --git a/svx/source/svdraw/selectioncontroller.cxx b/svx/source/svdraw/selectioncontroller.cxx
index fc3e991f65..7e0014f1e0 100644
--- a/svx/source/svdraw/selectioncontroller.cxx
+++ b/svx/source/svdraw/selectioncontroller.cxx
@@ -31,6 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+#include <tools/debug.hxx>
#include <svx/selectioncontroller.hxx>
namespace sdr
@@ -103,4 +104,14 @@ bool SelectionController::PasteObjModel( const SdrModel& /*rModel*/ )
return false;
}
+bool SelectionController::TakeFormatPaintBrush( boost::shared_ptr< SfxItemSet >& /*rFormatSet*/ )
+{
+ return false;
+}
+
+bool SelectionController::ApplyFormatPaintBrush( SfxItemSet& /*rFormatSet*/, bool /*bNoCharacterFormats*/, bool /*bNoParagraphFormats*/ )
+{
+ return false;
+}
+
}
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 93d9b9c907..47f7324b8a 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -206,6 +206,32 @@ drawinglayer::primitive2d::Primitive2DSequence SdrDragEntrySdrObject::createPrim
////////////////////////////////////////////////////////////////////////////////////////////////////
+SdrDragEntryPrimitive2DSequence::SdrDragEntryPrimitive2DSequence(
+ const drawinglayer::primitive2d::Primitive2DSequence& rSequence,
+ bool bAddToTransparent)
+: SdrDragEntry(),
+ maPrimitive2DSequence(rSequence)
+{
+ // add parts to transparent overlay stuff eventually
+ setAddToTransparent(bAddToTransparent);
+}
+
+SdrDragEntryPrimitive2DSequence::~SdrDragEntryPrimitive2DSequence()
+{
+}
+
+drawinglayer::primitive2d::Primitive2DSequence SdrDragEntryPrimitive2DSequence::createPrimitive2DSequenceInCurrentState(SdrDragMethod& rDragMethod)
+{
+ drawinglayer::primitive2d::Primitive2DReference aTransformPrimitive2D(
+ new drawinglayer::primitive2d::TransformPrimitive2D(
+ rDragMethod.getCurrentTransformation(),
+ maPrimitive2DSequence));
+
+ return drawinglayer::primitive2d::Primitive2DSequence(&aTransformPrimitive2D, 1);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
SdrDragEntryPointGlueDrag::SdrDragEntryPointGlueDrag(const std::vector< basegfx::B2DPoint >& rPositions, bool bIsPointDrag)
: maPositions(rPositions),
mbIsPointDrag(bIsPointDrag)
@@ -318,6 +344,13 @@ void SdrDragMethod::createSdrDragEntries()
}
}
+void SdrDragMethod::createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool bModify)
+{
+ // add full obejct drag; Clone() at the object has to work
+ // for this
+ addSdrDragEntry(new SdrDragEntrySdrObject(rOriginal, rObjectContact, bModify));
+}
+
void SdrDragMethod::createSdrDragEntries_SolidDrag()
{
const sal_uInt32 nMarkAnz(getSdrDragView().GetMarkedObjectCount());
@@ -359,7 +392,7 @@ void SdrDragMethod::createSdrDragEntries_SolidDrag()
{
// add full obejct drag; Clone() at the object has to work
// for this
- addSdrDragEntry(new SdrDragEntrySdrObject(*pCandidate, rOC, true));
+ createSdrDragEntryForSdrObject(*pCandidate, rOC, true);
}
if(bAddWireframe)
@@ -1358,6 +1391,21 @@ Pointer SdrDragObjOwn::GetSdrDragPointer() const
TYPEINIT1(SdrDragMove,SdrDragMethod);
+void SdrDragMove::createSdrDragEntryForSdrObject(const SdrObject& rOriginal, sdr::contact::ObjectContact& rObjectContact, bool /*bModify*/)
+{
+ // for SdrDragMove, use current Primitive2DSequence of SdrObject visualisation
+ // in given ObjectContact directly
+ sdr::contact::ViewContact& rVC = rOriginal.GetViewContact();
+ sdr::contact::ViewObjectContact& rVOC = rVC.GetViewObjectContact(rObjectContact);
+ sdr::contact::DisplayInfo aDisplayInfo;
+
+ // Do not use the last ViewPort set at the OC from the last ProcessDisplay(),
+ // here we want the complete primitive sequence without visibility clippings
+ rObjectContact.resetViewPort();
+
+ addSdrDragEntry(new SdrDragEntryPrimitive2DSequence(rVOC.getPrimitive2DSequenceHierarchy(aDisplayInfo), true));
+}
+
void SdrDragMove::applyCurrentTransformationToSdrObject(SdrObject& rTarget)
{
rTarget.Move(Size(DragStat().GetDX(), DragStat().GetDY()));
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index adca082371..2336af2f5f 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -30,6 +30,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
+
+#include <com/sun/star/i18n/WordType.hpp>
+
#include <svtools/accessibilityoptions.hxx>
#include <svx/svdedxv.hxx>
@@ -46,6 +49,7 @@
#include <vcl/cursor.hxx>
#include <svx/unotext.hxx>
+#include <svx/editeng.hxx>
#include <svx/editobj.hxx>
#include <svx/outlobj.hxx>
#include <svx/scripttypeitem.hxx>
@@ -60,7 +64,6 @@
#include "svx/svdetc.hxx" // fuer GetDraftFillColor
#include "svx/svdotable.hxx"
#include <svx/selectioncontroller.hxx>
-
#ifdef DBG_UTIL
#include <svdibrow.hxx>
#endif
@@ -69,6 +72,7 @@
#include <svx/svddrgv.hxx> // fuer SetSolidDragging()
#include "svdstr.hrc" // Namen aus der Resource
#include "svdglob.hxx" // StringCache
+#include "globl3d.hxx"
#include <svx/outliner.hxx>
#include <svx/adjitem.hxx>
@@ -1923,3 +1927,223 @@ void SdrObjEditView::OnEndPasteOrDrop( PasteOrDropInfos* )
// applications can derive from these virtual methods to do something before a drop or paste operation
}
+bool SdrObjEditView::SupportsFormatPaintbrush( UINT32 nObjectInventor, UINT16 nObjectIdentifier ) const
+{
+ if( nObjectInventor != SdrInventor && nObjectInventor != E3dInventor )
+ return false;
+ switch(nObjectIdentifier)
+ {
+ case OBJ_NONE:
+ case OBJ_GRUP:
+ return false;
+ case OBJ_LINE:
+ case OBJ_RECT:
+ case OBJ_CIRC:
+ case OBJ_SECT:
+ case OBJ_CARC:
+ case OBJ_CCUT:
+ case OBJ_POLY:
+ case OBJ_PLIN:
+ case OBJ_PATHLINE:
+ case OBJ_PATHFILL:
+ case OBJ_FREELINE:
+ case OBJ_FREEFILL:
+ case OBJ_SPLNLINE:
+ case OBJ_SPLNFILL:
+ case OBJ_TEXT:
+ case OBJ_TEXTEXT:
+ case OBJ_TITLETEXT:
+ case OBJ_OUTLINETEXT:
+ case OBJ_GRAF:
+ case OBJ_OLE2:
+ case OBJ_TABLE:
+ return true;
+ case OBJ_EDGE:
+ case OBJ_CAPTION:
+ return false;
+ case OBJ_PATHPOLY:
+ case OBJ_PATHPLIN:
+ return true;
+ case OBJ_PAGE:
+ case OBJ_MEASURE:
+ case OBJ_DUMMY:
+ case OBJ_FRAME:
+ case OBJ_UNO:
+ return false;
+ case OBJ_CUSTOMSHAPE:
+ return true;
+ default:
+ return false;
+ }
+}
+
+static const USHORT* GetFormatRangeImpl( bool bTextOnly )
+{
+ static const USHORT gRanges[] = {
+ SDRATTR_SHADOW_FIRST, SDRATTR_SHADOW_LAST,
+ SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST,
+ SDRATTR_TABLE_FIRST, SDRATTR_TABLE_LAST,
+ XATTR_LINE_FIRST, XATTR_LINE_LAST,
+ XATTR_FILL_FIRST, XATTRSET_FILL,
+ EE_PARA_START, EE_PARA_END,
+ EE_CHAR_START, EE_CHAR_END,
+ 0,0
+ };
+ return &gRanges[ bTextOnly ? 10 : 0];
+}
+
+bool SdrObjEditView::TakeFormatPaintBrush( boost::shared_ptr< SfxItemSet >& rFormatSet )
+{
+ if( mxSelectionController.is() && mxSelectionController->TakeFormatPaintBrush(rFormatSet) )
+ return true;
+
+ const SdrMarkList& rMarkList = GetMarkedObjectList();
+ if( rMarkList.GetMarkCount() >= 1 )
+ {
+ OutlinerView* pOLV = GetTextEditOutlinerView();
+
+ rFormatSet.reset( new SfxItemSet( GetModel()->GetItemPool(), GetFormatRangeImpl( pOLV != NULL ) ) );
+ if( pOLV )
+ {
+ rFormatSet->Put( pOLV->GetAttribs() );
+ }
+ else
+ {
+ const BOOL bOnlyHardAttr = FALSE;
+ rFormatSet->Put( GetAttrFromMarked(bOnlyHardAttr) );
+ }
+ return true;
+ }
+
+ return false;
+}
+
+static SfxItemSet CreatePaintSet( const USHORT *pRanges, SfxItemPool& rPool, const SfxItemSet& rSourceSet, const SfxItemSet& rTargetSet, bool bNoCharacterFormats, bool bNoParagraphFormats )
+{
+ SfxItemSet aPaintSet( rPool, pRanges );
+
+ while( *pRanges )
+ {
+ USHORT nWhich = *pRanges++;
+ const USHORT nLastWhich = *pRanges++;
+
+ if( bNoCharacterFormats && (nWhich == EE_CHAR_START) )
+ continue;
+
+ if( bNoParagraphFormats && (nWhich == EE_PARA_START ) )
+ continue;
+
+ for( ; nWhich < nLastWhich; nWhich++ )
+ {
+ const SfxPoolItem* pSourceItem = rSourceSet.GetItem( nWhich );
+ const SfxPoolItem* pTargetItem = rTargetSet.GetItem( nWhich );
+
+ if( (pSourceItem && !pTargetItem) || (pSourceItem && pTargetItem && !((*pSourceItem) == (*pTargetItem)) ) )
+ {
+ aPaintSet.Put( *pSourceItem );
+ }
+ }
+ }
+ return aPaintSet;
+}
+
+void SdrObjEditView::ApplyFormatPaintBrushToText( SfxItemSet& rFormatSet, SdrTextObj& rTextObj, SdrText* pText, bool bNoCharacterFormats, bool bNoParagraphFormats )
+{
+ OutlinerParaObject* pParaObj = pText ? pText->GetOutlinerParaObject() : 0;
+ if(pParaObj)
+ {
+ SdrOutliner& rOutliner = rTextObj.ImpGetDrawOutliner();
+ rOutliner.SetText(*pParaObj);
+
+ sal_uInt32 nParaCount(rOutliner.GetParagraphCount());
+
+ if(nParaCount)
+ {
+ for(sal_uInt16 nPara = 0; nPara < nParaCount; nPara++)
+ {
+ if( !bNoCharacterFormats )
+ rOutliner.QuickRemoveCharAttribs( nPara, /* remove all */0 );
+
+ SfxItemSet aSet(rOutliner.GetParaAttribs(nPara));
+ aSet.Put(CreatePaintSet( GetFormatRangeImpl(true), *aSet.GetPool(), rFormatSet, aSet, bNoCharacterFormats, bNoParagraphFormats ) );
+ rOutliner.SetParaAttribs(nPara, aSet);
+ }
+
+ OutlinerParaObject* pTemp = rOutliner.CreateParaObject(0, (sal_uInt16)nParaCount);
+ rOutliner.Clear();
+
+ rTextObj.NbcSetOutlinerParaObjectForText(pTemp,pText);
+ }
+ }
+}
+
+void SdrObjEditView::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats )
+{
+ if( !mxSelectionController.is() || !mxSelectionController->ApplyFormatPaintBrush( rFormatSet, bNoCharacterFormats, bNoParagraphFormats ) )
+ {
+ const SdrMarkList& rMarkList = GetMarkedObjectList();
+ SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ OutlinerView* pOLV = GetTextEditOutlinerView();
+
+ const SfxItemSet& rShapeSet = pObj->GetMergedItemSet();
+
+ if( !pOLV )
+ {
+ // if not in text edit mode (aka the user selected text or clicked on a word)
+ // apply formating attributes to selected shape
+ // All formating items (see ranges above) that are unequal in selected shape and
+ // the format paintbrush are hard set on the selected shape.
+
+ const USHORT* pRanges = rFormatSet.GetRanges();
+ bool bTextOnly = true;
+
+ while( *pRanges )
+ {
+ if( (*pRanges != EE_PARA_START) && (*pRanges != EE_CHAR_START) )
+ {
+ bTextOnly = false;
+ break;
+ }
+ pRanges += 2;
+ }
+
+ if( !bTextOnly )
+ {
+ SfxItemSet aPaintSet( CreatePaintSet( GetFormatRangeImpl(false), *rShapeSet.GetPool(), rFormatSet, rShapeSet, bNoCharacterFormats, bNoParagraphFormats ) );
+ const BOOL bReplaceAll = FALSE;
+ SetAttrToMarked(aPaintSet, bReplaceAll);
+ }
+
+ // now apply character and paragraph formating to text, if the shape has any
+ SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>(pObj);
+ if( pTextObj )
+ {
+ sal_Int32 nText = pTextObj->getTextCount();
+
+ while( --nText >= 0 )
+ {
+ SdrText* pText = pTextObj->getText( nText );
+ ApplyFormatPaintBrushToText( rFormatSet, *pTextObj, pText, bNoCharacterFormats, bNoParagraphFormats );
+ }
+ }
+ }
+ else
+ {
+ ::Outliner* pOutliner = pOLV->GetOutliner();
+ if( pOutliner )
+ {
+ const EditEngine& rEditEngine = pOutliner->GetEditEngine();
+
+ ESelection aSel( pOLV->GetSelection() );
+ if( !aSel.HasRange() )
+ pOLV->SetSelection( rEditEngine.GetWord( aSel, com::sun::star::i18n::WordType::DICTIONARY_WORD ) );
+
+ const BOOL bRemoveParaAttribs = !bNoParagraphFormats;
+ pOLV->RemoveAttribsKeepLanguages( bRemoveParaAttribs );
+ SfxItemSet aSet( pOLV->GetAttribs() );
+ SfxItemSet aPaintSet( CreatePaintSet(GetFormatRangeImpl(true), *aSet.GetPool(), rFormatSet, aSet, bNoCharacterFormats, bNoParagraphFormats ) );
+ pOLV->SetAttribs( aPaintSet );
+ }
+ }
+ }
+}
diff --git a/svx/source/svdraw/svdfppt.cxx b/svx/source/svdraw/svdfppt.cxx
index 89488eb7f0..0ecf714548 100644
--- a/svx/source/svdraw/svdfppt.cxx
+++ b/svx/source/svdraw/svdfppt.cxx
@@ -3972,7 +3972,7 @@ void PPTNumberFormatCreator::ImplGetNumberFormat( SdrPowerPointImport& rManager,
aFont.SetFamily( pAtom->eFamily );
aFont.SetPitch( pAtom->ePitch );
}
- Color aCol( rManager.MSO_CLR_ToColor( nBulletColor ) );
+ Color aCol( rManager.MSO_TEXT_CLR_ToColor( nBulletColor ) );
aFont.SetColor( aCol );
sal_uInt16 nBuChar = (sal_uInt16)nBulletChar;
@@ -5886,14 +5886,14 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, U
{
if ( GetAttrib( PPT_CharAttr_FontColor, nVal, nDestinationInstance ) ) // Textfarbe (4Byte-Arg)
{
- Color aCol( rManager.MSO_CLR_ToColor( nVal ) );
+ Color aCol( rManager.MSO_TEXT_CLR_ToColor( nVal ) );
rSet.Put( SvxColorItem( aCol, EE_CHAR_COLOR ) );
if ( nDestinationInstance == 0xffffffff )
mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ].mnFontColorInStyleSheet = aCol;
}
else if ( nVal & 0x0f000000 ) // this is not a hard attribute, but maybe the page has a different colerscheme,
{ // so that in this case we must use a hard color attribute
- Color aCol( rManager.MSO_CLR_ToColor( nVal ) );
+ Color aCol( rManager.MSO_TEXT_CLR_ToColor( nVal ) );
Color& aColorInSheet = mrStyleSheet.mpCharSheet[ mnInstance ]->maCharLevel[ mnDepth ].mnFontColorInStyleSheet;
if ( aColorInSheet != aCol )
rSet.Put( SvxColorItem( aCol, EE_CHAR_COLOR ) );
@@ -6315,7 +6315,7 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
nColor = rParaLevel.mnBulletColor;
else
nColor = rCharLevel.mnFontColor;
- aNumberFormat2.SetBulletColor( rManager.MSO_CLR_ToColor( nColor ) );
+ aNumberFormat2.SetBulletColor( rManager.MSO_TEXT_CLR_ToColor( nColor ) );
pRule->SetLevel( i, aNumberFormat2 );
}
}
@@ -7611,8 +7611,8 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
{
Color aLineColor( ((XLineColorItem&)pLine->GetMergedItem( XATTR_LINECOLOR )).GetColorValue() );
aBorderLine.Color = aLineColor.GetColor();
- aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() );
- aBorderLine.InnerLineWidth = 0;
+ aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4 );
+ aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( ((const XLineWidthItem&)(pLine->GetMergedItem(XATTR_LINEWIDTH))).GetValue() / 4 );
aBorderLine.LineDistance = 0;
}
break;
@@ -7662,7 +7662,7 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
}
}
-SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTableArry, SvxMSDffSolverContainer* pSolverContainer ) const
+SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTableArry, SvxMSDffSolverContainer* pSolverContainer )
{
SdrObject* pRet = pGroup;
sal_uInt32 nRows = pTableArry[ 1 ];
@@ -7786,6 +7786,15 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
pTable->uno_unlock();
pTable->SetSnapRect( pGroup->GetSnapRect() );
pRet = pTable;
+
+ //Remove Objects from shape map
+ SdrObjListIter aIter( *pGroup, IM_DEEPWITHGROUPS );
+ while( aIter.IsMore() )
+ {
+ SdrObject* pPartObj = aIter.Next();
+ removeShapeId( pPartObj );
+ }
+
SdrObject::Free( pGroup );
}
catch( Exception& )
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 7c415cefb0..f5df1658b3 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -2004,7 +2004,7 @@ void SdrHdlList::TravelFocusHdl(sal_Bool bForward)
}
// #105678# free mem again
- delete pHdlAndIndex;
+ delete [] pHdlAndIndex;
}
}
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index f8220ad472..44a29c619b 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1673,6 +1673,12 @@ void SdrObjCustomShape::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
}
}
+void SdrObjCustomShape::SetModel(SdrModel* pNewModel)
+{
+ SdrTextObj::SetModel(pNewModel);
+ mXRenderedCustomShape.clear();
+}
+
UINT16 SdrObjCustomShape::GetObjIdentifier() const
{
return UINT16(OBJ_CUSTOMSHAPE);
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 5768def141..8cc1ede0ec 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -804,14 +804,27 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
{
// cell text is formated neither like a text object nor like a object
// text, so use a special setup here
- rOutliner.SetMinAutoPaperSize(aNullSize);
rOutliner.SetMaxAutoPaperSize(aAnchorTextSize);
+
+ // #i106214# To work with an unchangeable PaperSize (CellSize in
+ // this case) Set(Min|Max)AutoPaperSize and SetPaperSize have to be used.
+ // #i106214# This was not completely correct; to still measure the real
+ // text height to allow vertical adjust (and vice versa for VerticalWritintg)
+ // only one aspect has to be set, but the other one to zero
+ if(bVerticalWritintg)
+ {
+ // measure the horizontal text size
+ rOutliner.SetMinAutoPaperSize(Size(0, aAnchorTextSize.Height()));
+ }
+ else
+ {
+ // measure the vertical text size
+ rOutliner.SetMinAutoPaperSize(Size(aAnchorTextSize.Width(), 0));
+ }
+
rOutliner.SetPaperSize(aAnchorTextSize);
- rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
- rOutliner.SetUpdateMode(TRUE);
+ rOutliner.SetUpdateMode(true);
rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject());
- rOutliner.SetUpdateMode(TRUE);
- rOutliner.SetControlWord(nOriginalControlWord);
}
else
{
@@ -819,6 +832,16 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
const bool bHorizontalIsBlock(SDRTEXTHORZADJUST_BLOCK == eHAdj && !bVerticalWritintg);
const bool bVerticalIsBlock(SDRTEXTVERTADJUST_BLOCK == eVAdj && bVerticalWritintg);
+ // set minimal paper size hor/ver if needed
+ if(bHorizontalIsBlock)
+ {
+ rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
+ }
+ else if(bVerticalIsBlock)
+ {
+ rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight));
+ }
+
if((rSdrBlockTextPrimitive.getWordWrap() || IsTextFrame()) && !rSdrBlockTextPrimitive.getUnlimitedPage())
{
// #i103454# maximal paper size hor/ver needs to be limited to text
@@ -843,22 +866,13 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
rOutliner.SetMaxAutoPaperSize(aMaxAutoPaperSize);
}
- // set minimal paper size hor/ver if needed
- if(bHorizontalIsBlock)
- {
- rOutliner.SetMinAutoPaperSize(Size(nAnchorTextWidth, 0));
- }
- else if(bVerticalIsBlock)
- {
- rOutliner.SetMinAutoPaperSize(Size(0, nAnchorTextHeight));
- }
-
rOutliner.SetPaperSize(aNullSize);
rOutliner.SetUpdateMode(true);
rOutliner.SetText(rSdrBlockTextPrimitive.getOutlinerParaObject());
- rOutliner.SetControlWord(nOriginalControlWord);
}
+ rOutliner.SetControlWord(nOriginalControlWord);
+
// now get back the layouted text size from outliner
const Size aOutlinerTextSiz(rOutliner.GetPaperSize());
const basegfx::B2DVector aOutlinerScale(aOutlinerTextSiz.Width(), aOutlinerTextSiz.Height());
@@ -931,7 +945,8 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
// as the master shape we are working on. For vertical, use the top-right
// corner
const double fStartInX(bVerticalWritintg ? aAdjustTranslate.getX() + aOutlinerScale.getX() : aAdjustTranslate.getX());
- aNewTransformA.translate(fStartInX, aAdjustTranslate.getY());
+ const basegfx::B2DTuple aAdjOffset(fStartInX, aAdjustTranslate.getY());
+ aNewTransformA.translate(aAdjOffset.getX(), aAdjOffset.getY());
// mirroring. We are now in aAnchorTextRange sizes. When mirroring in X and Y,
// move the null point which was top left to bottom right.
@@ -948,10 +963,10 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
// #SJ# create ClipRange (if needed)
basegfx::B2DRange aClipRange;
- if(bIsCell)
+ if(rSdrBlockTextPrimitive.getClipOnBounds())
{
- aClipRange.expand(basegfx::B2DTuple(0.0, 0.0));
- aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height()));
+ aClipRange.expand(-aAdjOffset);
+ aClipRange.expand(basegfx::B2DTuple(aAnchorTextSize.Width(), aAnchorTextSize.Height()) - aAdjOffset);
}
// now break up text primitives.
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 8f4d8cd94c..dfbba7b02a 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -671,7 +671,13 @@ const Rectangle& SdrObjList::GetAllObjSnapRect() const
const Rectangle& SdrObjList::GetAllObjBoundRect() const
{
- if (bRectsDirty) {
+ // #i106183# for deep group hierarchies like in chart2, the invalidates
+ // through the hierarchy are not correct; use a 2nd hint for the needed
+ // recalculation. Future versions will have no bool flag at all, but
+ // just aOutRect in empty state to representate an invalid state, thus
+ // it's a step in the right direction.
+ if (bRectsDirty || aOutRect.IsEmpty())
+ {
((SdrObjList*)this)->RecalcRects();
((SdrObjList*)this)->bRectsDirty=FALSE;
}
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index 4d6eb39511..d81d768830 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -2514,6 +2514,88 @@ bool SvxTableController::PasteObject( SdrTableObj* pPasteTableObj )
return true;
}
+bool SvxTableController::TakeFormatPaintBrush( boost::shared_ptr< SfxItemSet >& /*rFormatSet*/ )
+{
+ // SdrView::TakeFormatPaintBrush() is enough
+ return false;
+}
+
+bool SvxTableController::ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats )
+{
+ if( mbCellSelectionMode )
+ {
+ SdrTextObj* pTableObj = dynamic_cast<SdrTextObj*>( mxTableObj.get() );
+ if( !pTableObj )
+ return false;
+
+ const bool bUndo = mpModel && mpModel->IsUndoEnabled();
+
+ if( bUndo )
+ mpModel->BegUndo( ImpGetResStr(STR_TABLE_NUMFORMAT) );
+
+ CellPos aStart, aEnd;
+ getSelectedCells( aStart, aEnd );
+
+ SfxItemSet aAttr(*rFormatSet.GetPool(), rFormatSet.GetRanges());
+ aAttr.Put(rFormatSet, TRUE);
+
+ const bool bFrame = (rFormatSet.GetItemState( SDRATTR_TABLE_BORDER ) == SFX_ITEM_SET) || (rFormatSet.GetItemState( SDRATTR_TABLE_BORDER_INNER ) == SFX_ITEM_SET);
+
+ if( bFrame )
+ {
+ aAttr.ClearItem( SDRATTR_TABLE_BORDER );
+ aAttr.ClearItem( SDRATTR_TABLE_BORDER_INNER );
+ }
+
+ const USHORT* pRanges = rFormatSet.GetRanges();
+ bool bTextOnly = true;
+
+ while( *pRanges )
+ {
+ if( (*pRanges != EE_PARA_START) && (*pRanges != EE_CHAR_START) )
+ {
+ bTextOnly = true;
+ break;
+ }
+ pRanges += 2;
+ }
+
+ const bool bReplaceAll = false;
+ for( sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow; nRow++ )
+ {
+ for( sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++ )
+ {
+ CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) );
+ if( xCell.is() )
+ {
+ if( bUndo )
+ xCell->AddUndo();
+ if( !bTextOnly )
+ xCell->SetMergedItemSetAndBroadcast(aAttr, bReplaceAll);
+
+ SdrText* pText = static_cast< SdrText* >( xCell.get() );
+ mpView->ApplyFormatPaintBrushToText( rFormatSet, *pTableObj, pText, bNoCharacterFormats, bNoParagraphFormats );
+ }
+ }
+ }
+
+ if( bFrame )
+ {
+ ApplyBorderAttr( rFormatSet );
+ }
+
+ UpdateTableShape();
+
+ if( bUndo )
+ mpModel->EndUndo();
+
+ return true;
+
+ }
+ return false;
+}
+
+
// --------------------------------------------------------------------
IMPL_LINK( SvxTableController, UpdateHdl, void *, EMPTYARG )
diff --git a/svx/source/table/tablecontroller.hxx b/svx/source/table/tablecontroller.hxx
index b4eecf0902..24d9a27ff4 100644
--- a/svx/source/table/tablecontroller.hxx
+++ b/svx/source/table/tablecontroller.hxx
@@ -57,6 +57,7 @@ public:
SVX_DLLPRIVATE SvxTableController( SdrObjEditView* pView, const SdrObject* pObj );
SVX_DLLPRIVATE virtual ~SvxTableController();
+ // from sdr::SelectionController
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);
@@ -72,6 +73,9 @@ public:
SVX_DLLPRIVATE virtual bool GetStyleSheet( SfxStyleSheet* &rpStyleSheet ) const;
SVX_DLLPRIVATE virtual bool SetStyleSheet( SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr );
+ SVX_DLLPRIVATE virtual bool TakeFormatPaintBrush( boost::shared_ptr< SfxItemSet >& rFormatSet );
+ SVX_DLLPRIVATE virtual bool ApplyFormatPaintBrush( SfxItemSet& rFormatSet, bool bNoCharacterFormats, bool bNoParagraphFormats );
+
// slots
SVX_DLLPRIVATE void onInsert( sal_uInt16 nSId, const SfxItemSet* pArgs = 0 );
SVX_DLLPRIVATE void onDelete( sal_uInt16 nSId );
diff --git a/svx/source/table/viewcontactoftableobj.cxx b/svx/source/table/viewcontactoftableobj.cxx
index ffc23078b1..03ffdc3acf 100644
--- a/svx/source/table/viewcontactoftableobj.cxx
+++ b/svx/source/table/viewcontactoftableobj.cxx
@@ -123,7 +123,7 @@ namespace drawinglayer
getTransform(),
*getSdrFTAttribute().getText(),
0,
- true, false));
+ true, false, false));
}
}
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index 01f68240f9..c3bc05a560 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -137,7 +137,7 @@ void ExtrusionDirectionWindow::implInit()
mpDirectionSet->SetColCount( 3 );
mpDirectionSet->EnableFullItemMode( FALSE );
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ )
{
@@ -174,7 +174,7 @@ void ExtrusionDirectionWindow::DataChanged( const DataChangedEvent& rDCEvt )
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
USHORT i;
for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ )
@@ -514,7 +514,7 @@ void ExtrusionDepthWindow::implInit()
mpMenu->SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) );
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
String aEmpty;
mpMenu->appendEntry( 0, aEmpty, bHighContrast ? maImgDepth0h : maImgDepth0 );
@@ -635,7 +635,7 @@ void ExtrusionDepthWindow::DataChanged( const DataChangedEvent& rDCEvt )
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
mpMenu->setEntryImage( 0, bHighContrast ? maImgDepth0h : maImgDepth0 );
mpMenu->setEntryImage( 1, bHighContrast ? maImgDepth1h : maImgDepth1 );
@@ -882,7 +882,7 @@ void ExtrusionLightingWindow::implInit()
mpLightingSet->SetColCount( 3 );
mpLightingSet->EnableFullItemMode( FALSE );
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
for( i = FROM_TOP_LEFT; i <= FROM_BOTTOM_RIGHT; i++ )
{
@@ -949,7 +949,7 @@ void ExtrusionLightingWindow::implSetDirection( int nDirection, bool bEnabled )
mnDirection = nDirection;
mbDirectionEnabled = bEnabled;
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
if( !bEnabled )
nDirection = FROM_FRONT;
@@ -1022,7 +1022,7 @@ void ExtrusionLightingWindow::DataChanged( const DataChangedEvent& rDCEvt )
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
implSetDirection( mnDirection, mbDirectionEnabled );
mpMenu->setEntryImage( 0, bHighContrast ? maImgBrighth : maImgBright );
@@ -1231,7 +1231,7 @@ void ExtrusionSurfaceWindow::implInit()
{
SetHelpId( HID_POPUP_EXTRUSION_SURFACE );
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
// mpSurfaceForewarder = new SfxStatusForwarder( SID_EXTRUSION_SURFACE, *this );
@@ -1316,7 +1316,7 @@ void ExtrusionSurfaceWindow::DataChanged( const DataChangedEvent& rDCEvt )
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
mpMenu->appendEntry( 0, String( SVX_RES( STR_WIREFRAME ) ), bHighContrast ? maImgSurface1h : maImgSurface1 );
mpMenu->appendEntry( 1, String( SVX_RES( STR_MATTE ) ), bHighContrast ? maImgSurface2h : maImgSurface2 );
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index 7cb779974b..4e5e3e396b 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -397,7 +397,7 @@ void FontWorkAlignmentWindow::implInit()
{
SetHelpId( HID_POPUP_FONTWORK_ALIGN );
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
mpMenu->SetHelpId( HID_POPUP_FONTWORK_ALIGN );
@@ -477,7 +477,7 @@ void FontWorkAlignmentWindow::DataChanged( const DataChangedEvent& rDCEvt )
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
mpMenu->appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 );
mpMenu->appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 );
@@ -637,7 +637,7 @@ void FontWorkCharacterSpacingWindow::implInit()
{
SetHelpId( HID_POPUP_FONTWORK_CHARSPACE );
-// bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+// bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN );
mpMenu->SetHelpId( HID_POPUP_FONTWORK_CHARSPACE );
@@ -754,7 +754,7 @@ void FontWorkCharacterSpacingWindow::DataChanged( const DataChangedEvent& rDCEvt
if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
{
-// bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+// bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
mpMenu->appendEntry( 0, String( SVX_RES( STR_CHARS_SPACING_VERY_TIGHT ) ), MIB_CHECKABLE );
mpMenu->appendEntry( 1, String( SVX_RES( STR_CHARS_SPACING_TIGHT ) ), MIB_CHECKABLE );
diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx
index d8921d4fe5..66bd3e6b7b 100644
--- a/svx/source/tbxctrls/itemwin.cxx
+++ b/svx/source/tbxctrls/itemwin.cxx
@@ -74,7 +74,7 @@ using namespace ::com::sun::star::beans;
SvxLineBox::SvxLineBox( Window* pParent, const Reference< XFrame >& rFrame, WinBits nBits ) :
LineLB( pParent, nBits ),
- meBmpMode ( GetDisplayBackground().GetColor().IsDark() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL ),
+ meBmpMode ( GetSettings().GetStyleSettings().GetHighContrastMode() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL ),
nCurPos ( 0 ),
aLogicalSize(40,140),
bRelease ( TRUE ),
@@ -268,7 +268,7 @@ void SvxLineBox::DataChanged( const DataChangedEvent& rDCEvt )
if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
(rDCEvt.GetFlags() & SETTINGS_STYLE) )
{
- BmpColorMode eMode = GetDisplayBackground().GetColor().IsDark() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL;
+ BmpColorMode eMode = GetSettings().GetStyleSettings().GetHighContrastMode() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL;
if( eMode != meBmpMode )
{
meBmpMode = eMode;
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 94494aa3aa..bca857ea25 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -282,7 +282,7 @@ public:
inline BOOL SvxFrameWindow_Impl::IsHighContrast( void ) const
{
- return GetDisplayBackground().GetColor().IsDark();
+ return GetSettings().GetStyleSettings().GetHighContrastMode();
}
//========================================================================
diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx
index d19acf5a9f..13469d3d91 100644
--- a/svx/source/tbxctrls/tbxcolorupdate.cxx
+++ b/svx/source/tbxctrls/tbxcolorupdate.cxx
@@ -63,7 +63,7 @@ namespace svx
if (mnSlotId == SID_BACKGROUND_COLOR)
mnDrawMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW;
DBG_ASSERT( ptrTbx, "ToolBox not found :-(" );
- mbWasHiContrastMode = ptrTbx ? ( ptrTbx->GetBackground().GetColor().IsDark() ) : FALSE;
+ mbWasHiContrastMode = ptrTbx ? ( ptrTbx->GetSettings().GetStyleSettings().GetHighContrastMode() ) : FALSE;
Update(mnSlotId == SID_ATTR_CHAR_COLOR2 ? COL_BLACK : COL_GRAY);
}
@@ -79,7 +79,7 @@ namespace svx
{
Image aImage( mpTbx->GetItemImage( mnBtnId ) );
const bool bSizeChanged = ( maBmpSize != aImage.GetSizePixel() );
- const bool bDisplayModeChanged = ( mbWasHiContrastMode != mpTbx->GetBackground().GetColor().IsDark() );
+ const bool bDisplayModeChanged = ( mbWasHiContrastMode != mpTbx->GetSettings().GetStyleSettings().GetHighContrastMode() );
Color aColor( rColor );
// !!! #109290# Workaround for SetFillColor with COL_AUTO
@@ -107,7 +107,7 @@ namespace svx
else
pMskAcc = NULL;
- mbWasHiContrastMode = mpTbx->GetBackground().GetColor().IsDark();
+ mbWasHiContrastMode = mpTbx->GetSettings().GetStyleSettings().GetHighContrastMode();
if( mnDrawMode == TBX_UPDATER_MODE_CHAR_COLOR_NEW && ( COL_TRANSPARENT != aColor.GetColor() ) )
pBmpAcc->SetLineColor( aColor );
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index 9b3a4ec7df..b514debc7b 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -252,7 +252,10 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createTextField(
{
nId = ID_EXT_FILEFIELD;
}
- else if( aFieldType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) )
+ else if (aFieldType.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("docinfo.Title") ) ||
+ aFieldType.equalsAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("DocInfo.Title") ) )
{
nId = ID_FILEFIELD;
}
diff --git a/svx/source/unoedit/unofield.cxx b/svx/source/unoedit/unofield.cxx
index e5c93af072..f058a44ba8 100644
--- a/svx/source/unoedit/unofield.cxx
+++ b/svx/source/unoedit/unofield.cxx
@@ -1062,7 +1062,7 @@ OUString SAL_CALL SvxUnoTextField::getImplementationName() throw(uno::RuntimeExc
return OUString(RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextField"));
}
-static const sal_Char* pServiceNames[] =
+static const sal_Char* pOldServiceNames[] =
{
"com.sun.star.text.TextField.DateTime",
"com.sun.star.text.TextField.URL",
@@ -1081,14 +1081,34 @@ static const sal_Char* pServiceNames[] =
"com.sun.star.presentation.TextField.DateTime"
};
+static const sal_Char* pNewServiceNames[] =
+{
+ "com.sun.star.text.textfield.DateTime",
+ "com.sun.star.text.textfield.URL",
+ "com.sun.star.text.textfield.PageNumber",
+ "com.sun.star.text.textfield.PageCount",
+ "com.sun.star.text.textfield.DateTime",
+ "com.sun.star.text.textfield.docinfo.Title", // SvxFileField is used for title
+ "com.sun.star.text.textfield.SheetName",
+ "com.sun.star.text.textfield.DateTime",
+ "com.sun.star.text.textfield.FileName",
+ "com.sun.star.text.textfield.Author",
+ "com.sun.star.text.textfield.Measure",
+ "com.sun.star.text.textfield.DateTime",
+ "com.sun.star.presentation.textfield.Header",
+ "com.sun.star.presentation.textfield.Footer",
+ "com.sun.star.presentation.textfield.DateTime"
+};
+
uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames()
throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aSeq( 3 );
+ uno::Sequence< OUString > aSeq( 4 );
OUString* pServices = aSeq.getArray();
- pServices[0] = OUString::createFromAscii( pServiceNames[mnServiceId] );
- pServices[1] = OUString::createFromAscii( "com.sun.star.text.TextContent" ),
- pServices[2] = OUString::createFromAscii( "com.sun.star.text.TextField" );
+ pServices[0] = OUString::createFromAscii( pNewServiceNames[mnServiceId] );
+ pServices[1] = OUString::createFromAscii( pOldServiceNames[mnServiceId] );
+ pServices[2] = OUString::createFromAscii( "com.sun.star.text.TextContent" ),
+ pServices[3] = OUString::createFromAscii( "com.sun.star.text.TextField" );
return aSeq;
}
diff --git a/svx/source/xml/xmltxtexp.cxx b/svx/source/xml/xmltxtexp.cxx
index f8b01a727c..63a681ed41 100644
--- a/svx/source/xml/xmltxtexp.cxx
+++ b/svx/source/xml/xmltxtexp.cxx
@@ -247,7 +247,11 @@ uno::Reference< uno::XInterface > SAL_CALL SvxSimpleUnoModel::createInstance( co
return uno::Reference< uno::XInterface >(
SvxCreateNumRule( (SdrModel*)NULL ), uno::UNO_QUERY );
}
- if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextField.DateTime") ) )
+ if ( (0 == aServiceSpecifier.reverseCompareToAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.textfield.DateTime")))
+ || (0 == aServiceSpecifier.reverseCompareToAsciiL(
+ RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextField.DateTime")))
+ )
{
return (::cppu::OWeakObject * )new SvxUnoTextField( ID_EXT_DATEFIELD );
}
diff --git a/svx/util/hidother.src b/svx/util/hidother.src
index 5bce7c359e..b4a5b7674a 100644
--- a/svx/util/hidother.src
+++ b/svx/util/hidother.src
@@ -71,11 +71,6 @@ hidspecial HID_FIELD_SEL_WIN { HelpID =HID_FIELD_SEL_WIN ;};
hidspecial HID_FILTER_NAVIGATOR { HelpID =HID_FILTER_NAVIGATOR ;};
hidspecial HID_FILTER_NAVIGATOR_WIN { HelpID =HID_FILTER_NAVIGATOR_WIN ;};
-hidspecial HID_FM_PROPDLG_TABCTR { HelpID =HID_FM_PROPDLG_TABCTR ;};
-hidspecial HID_FM_PROPDLG_TAB_GENERAL { HelpID =HID_FM_PROPDLG_TAB_GENERAL;};
-hidspecial HID_FM_PROPDLG_TAB_DATA { HelpID =HID_FM_PROPDLG_TAB_DATA ;};
-hidspecial HID_FM_PROPDLG_TAB_EVT { HelpID =HID_FM_PROPDLG_TAB_EVT ;};
-
hidspecial HID_VALUESET_SINGLENUM { HelpID = HID_VALUESET_SINGLENUM ;};
hidspecial HID_VALUESET_BULLET { HelpID = HID_VALUESET_BULLET ;};
hidspecial HID_VALUESET_NUM { HelpID = HID_VALUESET_NUM ;};
@@ -88,8 +83,6 @@ hidspecial HID_TPPAGE_FULLSIZE { HelpId = HID_TPPAGE_FULLSIZE ;};
hidspecial HID_OPTINET2_CTL_COOKIES { HelpId = HID_OPTINET2_CTL_COOKIES ;};
hidspecial HID_OPTPATH_CTL_PATH { HelpId = HID_OPTPATH_CTL_PATH ;};
-hidspecial HID_TABORDER_CONTROLS { HelpId = HID_TABORDER_CONTROLS ;};
-
hidspecial HID_POPUP_LINEEND { HelpId = HID_POPUP_LINEEND ;};
hidspecial HID_POPUP_LINEEND_CTRL { HelpId = HID_POPUP_LINEEND_CTRL ;};