summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/prj/build.lst2
-rw-r--r--desktop/source/app/app.cxx9
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx2
-rw-r--r--desktop/source/deployment/gui/license_dialog.cxx2
-rw-r--r--drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx7
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx20
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx86
-rw-r--r--drawinglayer/prj/d.lst2
-rw-r--r--drawinglayer/source/geometry/viewinformation2d.cxx42
-rw-r--r--drawinglayer/source/primitive2d/sceneprimitive2d.cxx148
-rw-r--r--drawinglayer/source/processor2d/contourextractor2d.cxx9
-rw-r--r--drawinglayer/source/processor2d/hittestprocessor2d.cxx160
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx44
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx6
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx92
-rw-r--r--drawinglayer/source/processor3d/cutfindprocessor3d.cxx199
-rw-r--r--drawinglayer/source/processor3d/makefile.mk1
-rw-r--r--fpicker/source/office/iodlg.cxx4
-rw-r--r--fpicker/source/office/iodlgimp.cxx4
-rw-r--r--fpicker/source/unx/gnome/SalGtkPicker.cxx13
-rw-r--r--fpicker/source/unx/kde4/KDE4FPEntry.cxx6
-rw-r--r--fpicker/source/unx/kde4/KDE4FilePicker.cxx114
-rw-r--r--framework/source/services/backingwindow.cxx7
-rw-r--r--framework/source/services/backingwindow.hxx1
-rw-r--r--officecfg/registry/data/org/openoffice/Inet.xcu5
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Common.xcu8
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Writer.xcu27
-rw-r--r--officecfg/registry/data/org/openoffice/Office/makefile.mk2
-rw-r--r--officecfg/registry/data/org/openoffice/VCL.xcu231
-rw-r--r--officecfg/registry/data/org/openoffice/makefile.mk1
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs41
-rwxr-xr-xreadlicense_oo/util/makefile.pmk3
-rw-r--r--sfx2/inc/sfx2/filedlghelper.hxx4
-rw-r--r--sfx2/inc/sfx2/passwd.hxx4
-rw-r--r--sfx2/source/appl/newhelp.cxx6
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx14
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx4
-rw-r--r--sfx2/source/dialog/passwd.cxx28
-rw-r--r--sfx2/source/dialog/templdlg.cxx4
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx68
-rw-r--r--sfx2/source/doc/docvor.cxx6
-rw-r--r--sfx2/source/menu/mnuitem.cxx4
-rw-r--r--sfx2/source/menu/virtmenu.cxx6
-rw-r--r--sfx2/source/toolbox/imgmgr.cxx4
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx6
-rw-r--r--shell/source/backends/kdebe/makefile.mk4
-rw-r--r--svx/inc/svx/fmmodel.hxx10
-rw-r--r--svx/inc/svx/sdr/primitive2d/sdrcustomshapeprimitive2d.hxx13
-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/svddrgmt.hxx20
-rw-r--r--svx/inc/svx/svdfppt.hxx2
-rw-r--r--svx/inc/svx/svdoashp.hxx2
-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/labdlg.cxx2
-rw-r--r--svx/source/cui/macropg.cxx4
-rw-r--r--svx/source/cui/numpages.cxx92
-rw-r--r--svx/source/cui/optaccessibility.cxx2
-rw-r--r--svx/source/cui/optcolor.cxx2
-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/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/engine3d/helperhittest3d.cxx183
-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/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/msfilter/msdffimp.cxx25
-rw-r--r--svx/source/msfilter/msocximex.cxx2
-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/overlay/overlaymanager.cxx16
-rw-r--r--svx/source/sdr/overlay/overlaymanagerbuffered.cxx3
-rw-r--r--svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx24
-rw-r--r--svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx28
-rw-r--r--svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx7
-rw-r--r--svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx10
-rw-r--r--svx/source/stbctrls/xmlsecctrl.cxx8
-rw-r--r--svx/source/stbctrls/zoomsliderctrl.cxx8
-rw-r--r--svx/source/svdraw/svddrgmt.cxx50
-rw-r--r--svx/source/svdraw/svdfppt.cxx11
-rw-r--r--svx/source/svdraw/svdhdl.cxx2
-rw-r--r--svx/source/svdraw/svdoashp.cxx6
-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--ucb/source/ucp/odma/odma_content.cxx2
-rw-r--r--ucb/source/ucp/odma/odma_datasupplier.cxx8
-rw-r--r--ucb/source/ucp/odma/odma_provider.cxx22
-rw-r--r--xmlhelp/source/com/sun/star/help/makefile.mk7
-rw-r--r--xmloff/source/script/XMLEventExport.cxx5
123 files changed, 1923 insertions, 858 deletions
diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst
index ce2ed07f57..3f51d13cec 100644
--- a/desktop/prj/build.lst
+++ b/desktop/prj/build.lst
@@ -21,7 +21,7 @@ dt desktop\os2\source\applauncher nmake - p dt_applauncher dt_inc NULL
dt desktop\unx\source\officeloader nmake - u dt_officeloader_unx dt_inc NULL
dt desktop\source\pagein nmake - u dt_pagein dt_inc NULL
dt desktop\source\pkgchk\unopkg nmake - all dt_unopkg dt_dp_misc dt_app dt_inc dt_guiloader.w NULL
-dt desktop\source\deployment nmake - all dt_deployment dt_dp_manager dt_dp_registry dt_dp_registry_package dt_dp_registry_executable dt_dp_registry_help dt_dp_registry_script dt_dp_registry_sfwk dt_dp_registry_component dt_dp_registry_configuration dt_dp_migration dt_dp_unopkg dt_inc NULL
+dt desktop\source\deployment nmake - all dt_deployment dt_dp_manager dt_dp_registry dt_dp_registry_package dt_dp_registry_executable dt_dp_registry_help dt_dp_registry_script dt_dp_registry_sfwk dt_dp_registry_component dt_dp_registry_configuration dt_dp_migration dt_dp_unopkg dt_inc dt_dp_misc NULL
dt desktop\source\deployment\misc nmake - all dt_dp_misc dt_inc NULL
dt desktop\source\deployment\unopkg nmake - all dt_dp_unopkg dt_inc NULL
dt desktop\source\deployment\migration nmake - all dt_dp_migration dt_inc NULL
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index a8ebfee188..7f937bbd79 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1738,8 +1738,15 @@ sal_Bool Desktop::InitializeQuickstartMode( Reference< XMultiServiceFactory >& r
aSeq[0] <<= bQuickstart;
// Try to instanciate quickstart service. This service is not mandatory, so
- // do nothing if service is not available.
+ // do nothing if service is not available
+
+ // #i105753# the following if was invented for performance
+ // unfortunately this broke the QUARTZ behavior which is to always run
+ // in quickstart mode since Mac applications do not usually quit
+ // when the last document closes
+ #ifndef QUARTZ
if ( bQuickstart )
+ #endif
{
Reference < XComponent > xQuickstart( rSMgr->createInstanceWithArguments(
DEFINE_CONST_UNICODE( "com.sun.star.office.Quickstart" ), aSeq ),
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index f4473c2c6f..36f08dbf5b 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -1141,7 +1141,7 @@ void ExtensionBox_Impl::checkEntries()
//------------------------------------------------------------------------------
bool ExtensionBox_Impl::isHCMode()
{
- return (bool)GetDisplayBackground().GetColor().IsDark();
+ return (bool)GetSettings().GetStyleSettings().GetHighContrastMode();
}
//------------------------------------------------------------------------------
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index d0e2c44be2..e2dab99af7 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -215,7 +215,7 @@ LicenseDialogImpl::LicenseDialogImpl(
{
- if (GetBackground().GetColor().IsDark())
+ if (GetSettings().GetStyleSettings().GetHighContrastMode())
{
// high contrast mode needs other images
m_fiArrow1.SetImage(Image(DpGuiResId(IMG_LICENCE_ARROW_HC)));
diff --git a/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx b/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx
index 3fc837e97c..46cee65b8a 100644
--- a/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx
+++ b/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx
@@ -149,6 +149,13 @@ namespace drawinglayer
/// On-demand prepared Viewport in discrete units for convenience
const basegfx::B2DRange& getDiscreteViewport() const;
+ /** support reduced DisplayQuality, PropertyName is 'ReducedDisplayQuality'. This
+ is used e.g. to allow to lower display quality for OverlayPrimitives and
+ may lead to simpler decompositions in the local create2DDecomposition
+ implementations of the primitives
+ */
+ bool getReducedDisplayQuality() const;
+
/** Get the uno::Sequence< beans::PropertyValue > which contains all ViewInformation
Use this call if You need to extract all contained ViewInformation. The ones
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
index 6fc731db03..1383cc418f 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
@@ -41,6 +41,7 @@
#include <drawinglayer/attribute/sdrattribute3d.hxx>
#include <drawinglayer/geometry/viewinformation3d.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <vcl/bitmapex.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -70,9 +71,13 @@ namespace drawinglayer
double mfOldDiscreteSizeY;
basegfx::B2DRange maOldUnitVisiblePart;
+ // the last created BitmapEx, e.g. for fast HitTest. This does not really need
+ // memory since BitmapEx is internally RefCounted
+ BitmapEx maOldRenderedBitmap;
+
// private helpers
bool impGetShadow3D(const geometry::ViewInformation2D& rViewInformation) const;
- void calculateDsicreteSizes(
+ void calculateDiscreteSizes(
const geometry::ViewInformation2D& rViewInformation,
basegfx::B2DRange& rDiscreteRange,
basegfx::B2DRange& rVisibleDiscreteRange,
@@ -87,7 +92,18 @@ namespace drawinglayer
// Geometry extractor. Shadow will be added as in createLocalDecomposition, but
// the 3D content is not converted to a bitmap visualisation but to projected 2D gemetry. This
// helper is useful e.g. for Contour extraction or HitTests.
- Primitive2DSequence getGeometry2D(const geometry::ViewInformation2D& rViewInformation) const;
+ Primitive2DSequence getGeometry2D() const;
+ Primitive2DSequence getShadow2D(const geometry::ViewInformation2D& rViewInformation) const;
+
+ // Fast HitTest which uses the last buffered BitmapEx from the last
+ // rendered area if available. The return value describes if the check
+ // could be done with the current information, so do NOT use o_rResult
+ // when it returns false. o_rResult will be changed on return true and
+ // then contains a definitive answer if content of this scene is hit or
+ // not. On return false, it is normally necessary to use the geometric
+ // HitTest (see CutFindProcessor usages). The given HitPoint
+ // has to be in logic coordinates in scene's ObjectCoordinateSystem.
+ bool tryToCheckLastVisualisationDirectHit(const basegfx::B2DPoint& rLogicHitPoint, bool& o_rResult) const;
// constructor/destructor
ScenePrimitive2D(
diff --git a/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx
index 4a0f1b9c29..46dd1765da 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx
@@ -43,6 +43,7 @@
namespace basegfx { class B2DPolygon; }
namespace basegfx { class B2DPolyPolygon; }
+namespace drawinglayer { namespace primitive2d { class ScenePrimitive2D; }}
//////////////////////////////////////////////////////////////////////////////
@@ -80,6 +81,7 @@ namespace drawinglayer
bool checkFillHitWithTolerance(
const basegfx::B2DPolyPolygon& rPolyPolygon,
double fDiscreteHitTolerance);
+ void check3DHit(const primitive2d::ScenePrimitive2D& rCandidate);
public:
HitTestProcessor2D(
diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
index f337cde7f0..d1746902f3 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
@@ -97,7 +97,7 @@ namespace drawinglayer
basegfx::B2DPolyPolygon maClipPolyPolygon;
// the target MetaFile
- GDIMetaFile& mrMetaFile;
+ GDIMetaFile* mpMetaFile;
// do not allow embedding SvtGraphicFills into each other,
// use a counter to prevent that
diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
index fcf8766dbf..75d2fe39a3 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
@@ -51,6 +51,7 @@ namespace drawinglayer { namespace primitive2d {
class BitmapPrimitive2D;
class FillBitmapPrimitive2D;
class PolyPolygonGradientPrimitive2D;
+ class PolyPolygonBitmapPrimitive2D;
class PolyPolygonColorPrimitive2D;
class MetafilePrimitive2D;
class MaskPrimitive2D;
@@ -100,6 +101,7 @@ namespace drawinglayer
void RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
void RenderFillBitmapPrimitive2D(const primitive2d::FillBitmapPrimitive2D& rFillBitmapCandidate);
void RenderPolyPolygonGradientPrimitive2D(const primitive2d::PolyPolygonGradientPrimitive2D& rPolygonCandidate);
+ void RenderPolyPolygonBitmapPrimitive2D(const primitive2d::PolyPolygonBitmapPrimitive2D& rPolygonCandidate);
void RenderPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate);
void RenderMetafilePrimitive2D(const primitive2d::MetafilePrimitive2D& rPolygonCandidate);
void RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate);
diff --git a/drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx
new file mode 100644
index 0000000000..de99d94f48
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx
@@ -0,0 +1,86 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: zbufferprocessor3d.hxx,v $
+ *
+ * $Revision: 1.4 $
+ *
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:18 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX
+#define INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX
+
+#include <drawinglayer/processor3d/defaultprocessor3d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace processor3d
+ {
+ class CutFindProcessor : public BaseProcessor3D
+ {
+ private:
+ // the start and stop point for the cut vector
+ basegfx::B3DPoint maFront;
+ basegfx::B3DPoint maBack;
+
+ // the found cut points
+ ::std::vector< basegfx::B3DPoint > maResult;
+
+ // #i102956# the transformation change from TransformPrimitive3D processings
+ // needs to be remembered to be able to transform found cuts to the
+ // basic coordinate system the processor starts with
+ basegfx::B3DHomMatrix maCombinedTransform;
+
+ // bitfield
+ bool mbAnyHit : 1;
+
+ // as tooling, the process() implementation takes over API handling and calls this
+ // virtual render method when the primitive implementation is BasePrimitive3D-based.
+ virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate);
+
+ public:
+ CutFindProcessor(const geometry::ViewInformation3D& rViewInformation,
+ const basegfx::B3DPoint& rFront,
+ const basegfx::B3DPoint& rBack,
+ bool bAnyHit);
+
+ // data access
+ const ::std::vector< basegfx::B3DPoint >& getCutPoints() const { return maResult; }
+ bool getAnyHit() const { return mbAnyHit; }
+ };
+ } // end of namespace processor3d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_PROCESSOR3D_CUTFINDPROCESSOR3D_HXX
+
+// eof
diff --git a/drawinglayer/prj/d.lst b/drawinglayer/prj/d.lst
index 0068b32c24..1ba3c2e7b6 100644
--- a/drawinglayer/prj/d.lst
+++ b/drawinglayer/prj/d.lst
@@ -90,6 +90,8 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\processor2d
mkdir: %_DEST%\inc%_EXT%\drawinglayer\processor3d
..\inc\drawinglayer\processor3d\baseprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\baseprocessor3d.hxx
+..\inc\drawinglayer\processor3d\cutfindprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\cutfindprocessor3d.hxx
+..\inc\drawinglayer\processor3d\defaultprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\defaultprocessor3d.hxx
..\inc\drawinglayer\processor3d\zbufferprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\zbufferprocessor3d.hxx
..\inc\drawinglayer\processor3d\tbufferprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor3d\tbufferprocessor3d.hxx
diff --git a/drawinglayer/source/geometry/viewinformation2d.cxx b/drawinglayer/source/geometry/viewinformation2d.cxx
index e697540772..d7029fc067 100644
--- a/drawinglayer/source/geometry/viewinformation2d.cxx
+++ b/drawinglayer/source/geometry/viewinformation2d.cxx
@@ -81,12 +81,18 @@ namespace drawinglayer
basegfx::B2DRange maDiscreteViewport;
// the DrawPage which is target of visualisation. This is needed e.g. for
- // the view-dependent decomposition of PageNumber TextFields
+ // the view-dependent decomposition of PageNumber TextFields.
+ // This parameter is buffered here, but mainly resides in mxExtendedInformation,
+ // so it will be interpreted, but held there. It will also not be added
+ // to mxExtendedInformation in impFillViewInformationFromContent (it's there already)
uno::Reference< drawing::XDrawPage > mxVisualizedPage;
// the point in time
double mfViewTime;
+ // bitfield
+ bool mbReducedDisplayQuality : 1;
+
// the complete PropertyValue representation (if already created)
uno::Sequence< beans::PropertyValue > mxViewInformation;
@@ -125,6 +131,12 @@ namespace drawinglayer
return s_sNameProperty;
}
+ const ::rtl::OUString& getNamePropertyReducedDisplayQuality()
+ {
+ static ::rtl::OUString s_sNameProperty(RTL_CONSTASCII_USTRINGPARAM("ReducedDisplayQuality"));
+ return s_sNameProperty;
+ }
+
void impInterpretPropertyValues(const uno::Sequence< beans::PropertyValue >& rViewParameters)
{
if(rViewParameters.hasElements())
@@ -138,8 +150,18 @@ namespace drawinglayer
for(sal_Int32 a(0); a < nCount; a++)
{
const beans::PropertyValue& rProp = rViewParameters[a];
-
- if(rProp.Name == getNamePropertyObjectTransformation())
+
+ if(rProp.Name == getNamePropertyReducedDisplayQuality())
+ {
+ // extra information; add to filtered information
+ mxExtendedInformation[nExtendedInsert++] = rProp;
+
+ // for performance reasons, also cache content locally
+ sal_Bool bSalBool = sal_True;
+ rProp.Value >>= bSalBool;
+ mbReducedDisplayQuality = bSalBool;
+ }
+ else if(rProp.Name == getNamePropertyObjectTransformation())
{
com::sun::star::geometry::AffineMatrix2D aAffineMatrix2D;
rProp.Value >>= aAffineMatrix2D;
@@ -185,6 +207,7 @@ namespace drawinglayer
const bool bViewportUsed(!maViewport.isEmpty());
const bool bTimeUsed(0.0 < mfViewTime);
const bool bVisualizedPageUsed(mxVisualizedPage.is());
+ const bool bReducedDisplayQualityUsed(true == mbReducedDisplayQuality);
const bool bExtraInformation(mxExtendedInformation.hasElements());
sal_uInt32 nIndex(0);
const sal_uInt32 nCount(
@@ -193,6 +216,7 @@ namespace drawinglayer
(bViewportUsed ? 1 : 0) +
(bTimeUsed ? 1 : 0) +
(bVisualizedPageUsed ? 1 : 0) +
+ (bReducedDisplayQualityUsed ? 1 : 0) +
(bExtraInformation ? mxExtendedInformation.getLength() : 0));
mxViewInformation.realloc(nCount);
@@ -265,6 +289,7 @@ namespace drawinglayer
maDiscreteViewport(),
mxVisualizedPage(rxDrawPage),
mfViewTime(fViewTime),
+ mbReducedDisplayQuality(false),
mxViewInformation(),
mxExtendedInformation()
{
@@ -281,6 +306,7 @@ namespace drawinglayer
maDiscreteViewport(),
mxVisualizedPage(),
mfViewTime(),
+ mbReducedDisplayQuality(false),
mxViewInformation(rViewParameters),
mxExtendedInformation()
{
@@ -355,6 +381,11 @@ namespace drawinglayer
return mxVisualizedPage;
}
+ bool getReducedDisplayQuality() const
+ {
+ return mbReducedDisplayQuality;
+ }
+
const uno::Sequence< beans::PropertyValue >& getViewInformationSequence() const
{
if(!mxViewInformation.hasElements())
@@ -501,6 +532,11 @@ namespace drawinglayer
return mpViewInformation2D->getDiscreteViewport();
}
+ bool ViewInformation2D::getReducedDisplayQuality() const
+ {
+ return mpViewInformation2D->getReducedDisplayQuality();
+ }
+
const uno::Sequence< beans::PropertyValue >& ViewInformation2D::getViewInformationSequence() const
{
return mpViewInformation2D->getViewInformationSequence();
diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
index a50ab8ed05..acf3307bbf 100644
--- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
@@ -100,7 +100,7 @@ namespace drawinglayer
return maShadowPrimitives.hasElements();
}
- void ScenePrimitive2D::calculateDsicreteSizes(
+ void ScenePrimitive2D::calculateDiscreteSizes(
const geometry::ViewInformation2D& rViewInformation,
basegfx::B2DRange& rDiscreteRange,
basegfx::B2DRange& rVisibleDiscreteRange,
@@ -110,23 +110,12 @@ namespace drawinglayer
rDiscreteRange = basegfx::B2DRange(0.0, 0.0, 1.0, 1.0);
rDiscreteRange.transform(rViewInformation.getObjectToViewTransformation() * getObjectTransformation());
- // force to discrete expanded bounds (it grows, so expanding works perfectly well)
- rDiscreteRange.expand(basegfx::B2DTuple(floor(rDiscreteRange.getMinX()), floor(rDiscreteRange.getMinY())));
- rDiscreteRange.expand(basegfx::B2DTuple(ceil(rDiscreteRange.getMaxX()), ceil(rDiscreteRange.getMaxY())));
-
// clip it against discrete Viewport (if set)
rVisibleDiscreteRange = rDiscreteRange;
if(!rViewInformation.getViewport().isEmpty())
{
rVisibleDiscreteRange.intersect(rViewInformation.getDiscreteViewport());
-
- if(!rVisibleDiscreteRange.isEmpty())
- {
- // force to discrete expanded bounds, too
- rVisibleDiscreteRange.expand(basegfx::B2DTuple(floor(rVisibleDiscreteRange.getMinX()), floor(rVisibleDiscreteRange.getMinY())));
- rVisibleDiscreteRange.expand(basegfx::B2DTuple(ceil(rVisibleDiscreteRange.getMaxX()), ceil(rVisibleDiscreteRange.getMaxY())));
- }
}
if(rVisibleDiscreteRange.isEmpty())
@@ -177,11 +166,11 @@ namespace drawinglayer
}
}
- // get the involved ranges (see helper method calculateDsicreteSizes for details)
+ // get the involved ranges (see helper method calculateDiscreteSizes for details)
basegfx::B2DRange aDiscreteRange;
basegfx::B2DRange aVisibleDiscreteRange;
basegfx::B2DRange aUnitVisibleRange;
- calculateDsicreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange);
+ calculateDiscreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange);
if(!aVisibleDiscreteRange.isEmpty())
{
@@ -200,6 +189,31 @@ namespace drawinglayer
fViewSizeY *= fReduceFactor;
}
+ if(rViewInformation.getReducedDisplayQuality())
+ {
+ // when reducing the visualisation is allowed (e.g. an OverlayObject
+ // only needed for dragging), reduce resolution extra
+ // to speed up dragging interactions
+ const double fArea(fViewSizeX * fViewSizeY);
+ double fReducedVisualisationFactor(1.0 / (sqrt(fArea) * (1.0 / 170.0)));
+
+ if(fReducedVisualisationFactor > 1.0)
+ {
+ fReducedVisualisationFactor = 1.0;
+ }
+ else if(fReducedVisualisationFactor < 0.20)
+ {
+ fReducedVisualisationFactor = 0.20;
+ }
+
+ if(fReducedVisualisationFactor != 1.0)
+ {
+ fReduceFactor *= fReducedVisualisationFactor;
+ fViewSizeX *= fReducedVisualisationFactor;
+ fViewSizeY *= fReducedVisualisationFactor;
+ }
+ }
+
// calculate logic render size in world coordinates for usage in renderer
basegfx::B2DVector aLogicRenderSize(
aDiscreteRange.getWidth() * fReduceFactor,
@@ -207,9 +221,8 @@ namespace drawinglayer
aLogicRenderSize *= rViewInformation.getInverseObjectToViewTransformation();
// determine the oversample value
- static bool bDoOversample(false);
static sal_uInt16 nDefaultOversampleValue(3);
- const sal_uInt16 nOversampleValue((bDoOversample || aDrawinglayerOpt.IsAntiAliasing()) ? nDefaultOversampleValue : 0);
+ const sal_uInt16 nOversampleValue(aDrawinglayerOpt.IsAntiAliasing() ? nDefaultOversampleValue : 0);
// use default 3D primitive processor to create BitmapEx for aUnitVisiblePart and process
processor3d::ZBufferProcessor3D aZBufferProcessor3D(
@@ -224,18 +237,16 @@ namespace drawinglayer
aZBufferProcessor3D.processNonTransparent(getChildren3D());
aZBufferProcessor3D.processTransparent(getChildren3D());
- const BitmapEx aNewBitmap(aZBufferProcessor3D.getBitmapEx());
- const Size aBitmapSizePixel(aNewBitmap.GetSizePixel());
+ const_cast< ScenePrimitive2D* >(this)->maOldRenderedBitmap = aZBufferProcessor3D.getBitmapEx();
+ const Size aBitmapSizePixel(maOldRenderedBitmap.GetSizePixel());
if(aBitmapSizePixel.getWidth() && aBitmapSizePixel.getHeight())
{
// create transform for the created bitmap in discrete coordinates first.
- // #i97772# Do not forget to apply evtl. render size reduction to scaling
basegfx::B2DHomMatrix aNew2DTransform;
- const double fSizeReductionFactor(1.0 / fReduceFactor);
- aNew2DTransform.set(0, 0, (double)(aBitmapSizePixel.getWidth() - 1) * fSizeReductionFactor);
- aNew2DTransform.set(1, 1, (double)(aBitmapSizePixel.getHeight() - 1) * fSizeReductionFactor);
+ aNew2DTransform.set(0, 0, aVisibleDiscreteRange.getWidth());
+ aNew2DTransform.set(1, 1, aVisibleDiscreteRange.getHeight());
aNew2DTransform.set(0, 2, aVisibleDiscreteRange.getMinX());
aNew2DTransform.set(1, 2, aVisibleDiscreteRange.getMinY());
@@ -243,7 +254,7 @@ namespace drawinglayer
aNew2DTransform *= rViewInformation.getInverseObjectToViewTransformation();
// create bitmap primitive and add
- const Primitive2DReference xRef(new BitmapPrimitive2D(aNewBitmap, aNew2DTransform));
+ const Primitive2DReference xRef(new BitmapPrimitive2D(maOldRenderedBitmap, aNew2DTransform));
appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, xRef);
// test: Allow to add an outline in the debugger when tests are needed
@@ -262,17 +273,10 @@ namespace drawinglayer
return aRetval;
}
- Primitive2DSequence ScenePrimitive2D::getGeometry2D(const geometry::ViewInformation2D& rViewInformation) const
+ Primitive2DSequence ScenePrimitive2D::getGeometry2D() const
{
Primitive2DSequence aRetval;
- // create 2D shadows from contained 3D primitives
- if(impGetShadow3D(rViewInformation))
- {
- // add extracted 2d shadows (before 3d scene creations itself)
- aRetval = maShadowPrimitives;
- }
-
// create 2D projected geometry from 3D geometry
if(getChildren3D().hasElements())
{
@@ -284,14 +288,68 @@ namespace drawinglayer
// process local primitives
aGeometryProcessor.process(getChildren3D());
- // fetch result and append
- Primitive2DSequence a2DExtractedPrimitives(aGeometryProcessor.getPrimitive2DSequence());
- appendPrimitive2DSequenceToPrimitive2DSequence(aRetval, a2DExtractedPrimitives);
+ // fetch result
+ aRetval = aGeometryProcessor.getPrimitive2DSequence();
}
return aRetval;
}
+ Primitive2DSequence ScenePrimitive2D::getShadow2D(const geometry::ViewInformation2D& rViewInformation) const
+ {
+ Primitive2DSequence aRetval;
+
+ // create 2D shadows from contained 3D primitives
+ if(impGetShadow3D(rViewInformation))
+ {
+ // add extracted 2d shadows (before 3d scene creations itself)
+ aRetval = maShadowPrimitives;
+ }
+
+ return aRetval;
+ }
+
+ bool ScenePrimitive2D::tryToCheckLastVisualisationDirectHit(const basegfx::B2DPoint& rLogicHitPoint, bool& o_rResult) const
+ {
+ if(!maOldRenderedBitmap.IsEmpty() && !maOldUnitVisiblePart.isEmpty())
+ {
+ basegfx::B2DHomMatrix aInverseSceneTransform(getObjectTransformation());
+ aInverseSceneTransform.invert();
+ const basegfx::B2DPoint aRelativePoint(aInverseSceneTransform * rLogicHitPoint);
+
+ if(maOldUnitVisiblePart.isInside(aRelativePoint))
+ {
+ // calculate coordinates relative to visualized part
+ double fDivisorX(maOldUnitVisiblePart.getWidth());
+ double fDivisorY(maOldUnitVisiblePart.getHeight());
+
+ if(basegfx::fTools::equalZero(fDivisorX))
+ {
+ fDivisorX = 1.0;
+ }
+
+ if(basegfx::fTools::equalZero(fDivisorY))
+ {
+ fDivisorY = 1.0;
+ }
+
+ const double fRelativeX((aRelativePoint.getX() - maOldUnitVisiblePart.getMinX()) / fDivisorX);
+ const double fRelativeY((aRelativePoint.getY() - maOldUnitVisiblePart.getMinY()) / fDivisorY);
+
+ // combine with real BitmapSizePixel to get bitmap coordinates
+ const Size aBitmapSizePixel(maOldRenderedBitmap.GetSizePixel());
+ const sal_Int32 nX(basegfx::fround(fRelativeX * aBitmapSizePixel.Width()));
+ const sal_Int32 nY(basegfx::fround(fRelativeY * aBitmapSizePixel.Height()));
+
+ // try to get a statement about transparency in that pixel
+ o_rResult = (0xff != maOldRenderedBitmap.GetTransparency(nX, nY));
+ return true;
+ }
+ }
+
+ return false;
+ }
+
ScenePrimitive2D::ScenePrimitive2D(
const primitive3d::Primitive3DSequence& rxChildren3D,
const attribute::SdrSceneAttribute& rSdrSceneAttribute,
@@ -308,7 +366,8 @@ namespace drawinglayer
mbShadow3DChecked(false),
mfOldDiscreteSizeX(0.0),
mfOldDiscreteSizeY(0.0),
- maOldUnitVisiblePart()
+ maOldUnitVisiblePart(),
+ maOldRenderedBitmap()
{
}
@@ -359,7 +418,7 @@ namespace drawinglayer
{
::osl::MutexGuard aGuard( m_aMutex );
- // get the involved ranges (see helper method calculateDsicreteSizes for details)
+ // get the involved ranges (see helper method calculateDiscreteSizes for details)
basegfx::B2DRange aDiscreteRange;
basegfx::B2DRange aUnitVisibleRange;
bool bNeedNewDecomposition(false);
@@ -368,21 +427,22 @@ namespace drawinglayer
if(getLocalDecomposition().hasElements())
{
basegfx::B2DRange aVisibleDiscreteRange;
- calculateDsicreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange);
+ calculateDiscreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange);
bDiscreteSizesAreCalculated = true;
- // display has changed and cannot be reused when resolution did change
- if(!basegfx::fTools::equal(aDiscreteRange.getWidth(), mfOldDiscreteSizeX) ||
- !basegfx::fTools::equal(aDiscreteRange.getHeight(), mfOldDiscreteSizeY))
+ // needs to be painted when the new part is not part of the last
+ // decomposition
+ if(!maOldUnitVisiblePart.isInside(aUnitVisibleRange))
{
bNeedNewDecomposition = true;
}
+ // display has changed and cannot be reused when resolution got bigger. It
+ // can be reused when resolution got smaller, though.
if(!bNeedNewDecomposition)
{
- // needs to be painted when the new part is not part of the last
- // decomposition
- if(!maOldUnitVisiblePart.isInside(aUnitVisibleRange))
+ if(basegfx::fTools::more(aDiscreteRange.getWidth(), mfOldDiscreteSizeX) ||
+ basegfx::fTools::more(aDiscreteRange.getHeight(), mfOldDiscreteSizeY))
{
bNeedNewDecomposition = true;
}
@@ -400,7 +460,7 @@ namespace drawinglayer
if(!bDiscreteSizesAreCalculated)
{
basegfx::B2DRange aVisibleDiscreteRange;
- calculateDsicreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange);
+ calculateDiscreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange);
}
// remember last used NewDiscreteSize and NewUnitVisiblePart
diff --git a/drawinglayer/source/processor2d/contourextractor2d.cxx b/drawinglayer/source/processor2d/contourextractor2d.cxx
index 096585d0a4..dc2cedad31 100644
--- a/drawinglayer/source/processor2d/contourextractor2d.cxx
+++ b/drawinglayer/source/processor2d/contourextractor2d.cxx
@@ -162,7 +162,8 @@ namespace drawinglayer
{
// 2D Scene primitive containing 3D stuff; extract 2D contour in world coordinates
const primitive2d::ScenePrimitive2D& rScenePrimitive2DCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate));
- const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D(getViewInformation2D()));
+ const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D());
+ const primitive2d::Primitive2DSequence xExtracted2DSceneShadow(rScenePrimitive2DCandidate.getShadow2D(getViewInformation2D()));
// proccess content
if(xExtracted2DSceneGeometry.hasElements())
@@ -170,6 +171,12 @@ namespace drawinglayer
process(xExtracted2DSceneGeometry);
}
+ // proccess content
+ if(xExtracted2DSceneShadow.hasElements())
+ {
+ process(xExtracted2DSceneShadow);
+ }
+
break;
}
case PRIMITIVE2D_ID_WRONGSPELLPRIMITIVE2D :
diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
index cc71ea19ab..16d69646cb 100644
--- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx
@@ -48,6 +48,8 @@
#include <drawinglayer/primitive2d/sceneprimitive2d.hxx>
#include <drawinglayer/primitive2d/hittestprimitive2d.hxx>
#include <drawinglayer/primitive2d/pointarrayprimitive2d.hxx>
+#include <basegfx/matrix/b3dhommatrix.hxx>
+#include <drawinglayer/processor3d/cutfindprocessor3d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -164,6 +166,121 @@ namespace drawinglayer
return bRetval;
}
+ void HitTestProcessor2D::check3DHit(const primitive2d::ScenePrimitive2D& rCandidate)
+ {
+ // calculate relative point in unified 2D scene
+ const basegfx::B2DPoint aLogicHitPosition(getViewInformation2D().getInverseObjectToViewTransformation() * getDiscreteHitPosition());
+
+ // use bitmap check in ScenePrimitive2D
+ bool bTryFastResult(false);
+
+ if(rCandidate.tryToCheckLastVisualisationDirectHit(aLogicHitPosition, bTryFastResult))
+ {
+ mbHit = bTryFastResult;
+ }
+ else
+ {
+ basegfx::B2DHomMatrix aInverseSceneTransform(rCandidate.getObjectTransformation());
+ aInverseSceneTransform.invert();
+ const basegfx::B2DPoint aRelativePoint(aInverseSceneTransform * aLogicHitPosition);
+
+ // check if test point is inside scene's unified area at all
+ if(aRelativePoint.getX() >= 0.0 && aRelativePoint.getX() <= 1.0
+ && aRelativePoint.getY() >= 0.0 && aRelativePoint.getY() <= 1.0)
+ {
+ // get 3D view information
+ const geometry::ViewInformation3D& rObjectViewInformation3D = rCandidate.getViewInformation3D();
+
+ // create HitPoint Front and Back, transform to object coordinates
+ basegfx::B3DHomMatrix aViewToObject(rObjectViewInformation3D.getObjectToView());
+ aViewToObject.invert();
+ const basegfx::B3DPoint aFront(aViewToObject * basegfx::B3DPoint(aRelativePoint.getX(), aRelativePoint.getY(), 0.0));
+ const basegfx::B3DPoint aBack(aViewToObject * basegfx::B3DPoint(aRelativePoint.getX(), aRelativePoint.getY(), 1.0));
+
+ if(!aFront.equal(aBack))
+ {
+ const primitive3d::Primitive3DSequence& rPrimitives = rCandidate.getChildren3D();
+
+ if(rPrimitives.hasElements())
+ {
+ // make BoundVolume empty and overlapping test for speedup
+ const basegfx::B3DRange aObjectRange(
+ drawinglayer::primitive3d::getB3DRangeFromPrimitive3DSequence(
+ rPrimitives, rObjectViewInformation3D));
+
+ if(!aObjectRange.isEmpty())
+ {
+ const basegfx::B3DRange aFrontBackRange(aFront, aBack);
+
+ if(aObjectRange.overlaps(aFrontBackRange))
+ {
+ // bound volumes hit, geometric cut tests needed
+ drawinglayer::processor3d::CutFindProcessor aCutFindProcessor(
+ rObjectViewInformation3D,
+ aFront,
+ aBack,
+ true);
+ aCutFindProcessor.process(rPrimitives);
+
+ mbHit = (0 != aCutFindProcessor.getCutPoints().size());
+ }
+ }
+ }
+ }
+ }
+
+ // This is needed to check hit with 3D shadows, too. HitTest is without shadow
+ // to keep compatible with previous versions. Keeping here as reference
+ //
+ // if(!getHit())
+ // {
+ // // if scene has shadow, check hit with shadow, too
+ // const primitive2d::Primitive2DSequence xExtracted2DSceneShadow(rCandidate.getShadow2D(getViewInformation2D()));
+ //
+ // if(xExtracted2DSceneShadow.hasElements())
+ // {
+ // // proccess extracted 2D content
+ // process(xExtracted2DSceneShadow);
+ // }
+ // }
+
+ if(!getHit())
+ {
+ // empty 3D scene; Check for border hit
+ basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0)));
+ aOutline.transform(rCandidate.getObjectTransformation());
+
+ mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance());
+ }
+
+ // This is what the previous version did. Keeping it here for reference
+ //
+ // // 2D Scene primitive containing 3D stuff; extract 2D contour in world coordinates
+ // // This may be refined later to an own 3D HitTest renderer which processes the 3D
+ // // geometry directly
+ // const primitive2d::ScenePrimitive2D& rScenePrimitive2DCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate));
+ // const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D());
+ // const primitive2d::Primitive2DSequence xExtracted2DSceneShadow(rScenePrimitive2DCandidate.getShadow2D(getViewInformation2D()));
+ //
+ // if(xExtracted2DSceneGeometry.hasElements() || xExtracted2DSceneShadow.hasElements())
+ // {
+ // // proccess extracted 2D content
+ // process(xExtracted2DSceneGeometry);
+ // process(xExtracted2DSceneShadow);
+ // }
+ // else
+ // {
+ // // empty 3D scene; Check for border hit
+ // const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
+ // if(!aRange.isEmpty())
+ // {
+ // const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange));
+ // mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance());
+ // }
+ // }
+ }
+ }
+
void HitTestProcessor2D::processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate)
{
if(getHit())
@@ -334,25 +451,8 @@ namespace drawinglayer
{
if(!getHitTextOnly())
{
- // 2D Scene primitive containing 3D stuff; extract 2D contour in world coordinates
- // This may be refined later to an own 3D HitTest renderer which processes the 3D
- // geometry directly
- const primitive2d::ScenePrimitive2D& rScenePrimitive2DCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate));
- const primitive2d::Primitive2DSequence xExtracted2DSceneGeometry(rScenePrimitive2DCandidate.getGeometry2D(getViewInformation2D()));
-
- if(xExtracted2DSceneGeometry.hasElements())
- {
- // proccess extracted 2D content
- process(xExtracted2DSceneGeometry);
- }
- else
- {
- // empty 3D scene; Check for border hit
- const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
- basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange));
-
- mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance());
- }
+ const primitive2d::ScenePrimitive2D& rSceneCandidate(static_cast< const primitive2d::ScenePrimitive2D& >(rCandidate));
+ check3DHit(rSceneCandidate);
}
break;
@@ -365,14 +465,23 @@ namespace drawinglayer
// ignorable primitives
break;
}
+ case PRIMITIVE2D_ID_SHADOWPRIMITIVE2D :
+ {
+ // Ignore shadows; we do not want to have shadows hittable.
+ // Remove this one to make shadows hittable on demand.
+ break;
+ }
case PRIMITIVE2D_ID_TEXTSIMPLEPORTIONPRIMITIVE2D :
case PRIMITIVE2D_ID_TEXTDECORATEDPORTIONPRIMITIVE2D :
{
// for text use the BoundRect of the primitive itself
const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
- basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange));
- mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance());
+ if(!aRange.isEmpty())
+ {
+ const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange));
+ mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance());
+ }
break;
}
@@ -392,9 +501,12 @@ namespace drawinglayer
// - For Bitamps, the mask and/or alpha information may be used
// - For MetaFiles, the MetaFile content may be used
const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D()));
- basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange));
-
- mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance());
+
+ if(!aRange.isEmpty())
+ {
+ const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange));
+ mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance());
+ }
}
break;
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 82db20f2b3..4ebd3aaab4 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -113,6 +113,7 @@ namespace drawinglayer
{
// Prepare VDev, MetaFile and connections
OutputDevice* pLastOutputDevice = mpOutputDevice;
+ GDIMetaFile* pLastMetafile = mpMetaFile;
basegfx::B2DRange aPrimitiveRange(primitive2d::getB2DRangeFromPrimitive2DSequence(rContent, getViewInformation2D()));
// transform primitive range with current transformation (e.g shadow offset)
@@ -125,6 +126,7 @@ namespace drawinglayer
MapMode aNewMapMode(pLastOutputDevice->GetMapMode());
mpOutputDevice = &aContentVDev;
+ mpMetaFile = &o_rContentMetafile;
aContentVDev.EnableOutput(false);
aContentVDev.SetMapMode(pLastOutputDevice->GetMapMode());
o_rContentMetafile.Record(&aContentVDev);
@@ -145,6 +147,7 @@ namespace drawinglayer
o_rContentMetafile.SetPrefMapMode(aNewMapMode);
o_rContentMetafile.SetPrefSize(aPrimitiveRectangle.GetSize());
mpOutputDevice = pLastOutputDevice;
+ mpMetaFile = pLastMetafile;
return aPrimitiveRectangle;
}
@@ -219,7 +222,7 @@ namespace drawinglayer
SvMemoryStream aMemStm;
aMemStm << *pSvtGraphicFill;
- mrMetaFile.AddAction(new MetaCommentAction("XPATHFILL_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END)));
+ mpMetaFile->AddAction(new MetaCommentAction("XPATHFILL_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END)));
mnSvtGraphicFillCount++;
}
}
@@ -229,7 +232,7 @@ namespace drawinglayer
if(pSvtGraphicFill && mnSvtGraphicFillCount)
{
mnSvtGraphicFillCount--;
- mrMetaFile.AddAction(new MetaCommentAction("XPATHFILL_SEQ_END"));
+ mpMetaFile->AddAction(new MetaCommentAction("XPATHFILL_SEQ_END"));
delete pSvtGraphicFill;
}
}
@@ -372,7 +375,7 @@ namespace drawinglayer
SvMemoryStream aMemStm;
aMemStm << *pSvtGraphicStroke;
- mrMetaFile.AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END)));
+ mpMetaFile->AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_BEGIN", 0, static_cast< const BYTE* >(aMemStm.GetData()), aMemStm.Seek(STREAM_SEEK_TO_END)));
mnSvtGraphicStrokeCount++;
}
}
@@ -382,7 +385,7 @@ namespace drawinglayer
if(pSvtGraphicStroke && mnSvtGraphicStrokeCount)
{
mnSvtGraphicStrokeCount--;
- mrMetaFile.AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_END"));
+ mpMetaFile->AddAction(new MetaCommentAction("XPATHSTROKE_SEQ_END"));
delete pSvtGraphicStroke;
}
}
@@ -392,7 +395,7 @@ namespace drawinglayer
VclMetafileProcessor2D::VclMetafileProcessor2D(const geometry::ViewInformation2D& rViewInformation, OutputDevice& rOutDev)
: VclProcessor2D(rViewInformation, rOutDev),
- mrMetaFile(*rOutDev.GetConnectMetaFile()),
+ mpMetaFile(rOutDev.GetConnectMetaFile()),
mnSvtGraphicFillCount(0),
mnSvtGraphicStrokeCount(0),
mfCurrentUnifiedTransparence(0.0),
@@ -816,19 +819,19 @@ namespace drawinglayer
{
default : // case drawinglayer::primitive2d::FIELD_TYPE_COMMON :
{
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringCommon));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon));
break;
}
case drawinglayer::primitive2d::FIELD_TYPE_PAGE :
{
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringPage));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringPage));
break;
}
case drawinglayer::primitive2d::FIELD_TYPE_URL :
{
const rtl::OUString& rURL = rFieldPrimitive.getString();
const String aOldString(rURL);
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const BYTE* >(aOldString.GetBuffer()), 2 * aOldString.Len()));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const BYTE* >(aOldString.GetBuffer()), 2 * aOldString.Len()));
break;
}
}
@@ -838,7 +841,7 @@ namespace drawinglayer
process(rContent);
// for the end comment the type is not relevant yet, they are all the same. Just add.
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringEnd));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringEnd));
if(mpPDFExtOutDevData && drawinglayer::primitive2d::FIELD_TYPE_URL == rFieldPrimitive.getType())
{
@@ -863,7 +866,7 @@ namespace drawinglayer
// process recursively and add MetaFile comment
process(rLinePrimitive.get2DDecomposition(getViewInformation2D()));
- mrMetaFile.AddAction(new MetaCommentAction(aCommentString));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentString));
break;
}
@@ -876,7 +879,7 @@ namespace drawinglayer
// process recursively and add MetaFile comment
process(rBulletPrimitive.get2DDecomposition(getViewInformation2D()));
- mrMetaFile.AddAction(new MetaCommentAction(aCommentString));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentString));
break;
}
@@ -893,7 +896,7 @@ namespace drawinglayer
// process recursively and add MetaFile comment
process(rParagraphPrimitive.get2DDecomposition(getViewInformation2D()));
- mrMetaFile.AddAction(new MetaCommentAction(aCommentString));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentString));
if(mpPDFExtOutDevData)
{
@@ -910,9 +913,9 @@ namespace drawinglayer
static const ByteString aCommentStringB("XTEXT_PAINTSHAPE_END");
// add MetaFile comment, process recursively and add MetaFile comment
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringA));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringA));
process(rBlockPrimitive.get2DDecomposition(getViewInformation2D()));
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringB));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringB));
break;
}
@@ -965,17 +968,17 @@ namespace drawinglayer
// create the entries for the respective break positions
if(i == nNextCellBreak)
{
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringA, i - nTextPosition));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringA, i - nTextPosition));
nNextCellBreak = mxBreakIterator->nextCharacters(rTxt, i, rLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
}
if(i == nNextWordBoundary.endPos)
{
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringB, i - nTextPosition));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringB, i - nTextPosition));
nNextWordBoundary = mxBreakIterator->getWordBoundary(rTxt, i + 1, rLocale, ::com::sun::star::i18n::WordType::ANY_WORD, sal_True);
}
if(i == nNextSentenceBreak)
{
- mrMetaFile.AddAction(new MetaCommentAction(aCommentStringC, i - nTextPosition));
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringC, i - nTextPosition));
nNextSentenceBreak = mxBreakIterator->endOfSentence(rTxt, i + 1, rLocale);
}
}
@@ -1057,7 +1060,7 @@ namespace drawinglayer
{
const Polygon aToolsPolygon(aCandidate);
- mrMetaFile.AddAction(new MetaPolyLineAction(aToolsPolygon, aLineInfo));
+ mpMetaFile->AddAction(new MetaPolyLineAction(aToolsPolygon, aLineInfo));
}
}
@@ -1500,7 +1503,10 @@ namespace drawinglayer
// svae old mfCurrentUnifiedTransparence and set new one
// so that contained SvtGraphicStroke may use the current one
const double fLastCurrentUnifiedTransparence(mfCurrentUnifiedTransparence);
- mfCurrentUnifiedTransparence = rUniAlphaCandidate.getAlpha();
+ // #i105377# paint the content metafile opaque as the transparency gets
+ // split of into the gradient below
+ // mfCurrentUnifiedTransparence = rUniAlphaCandidate.getAlpha();
+ mfCurrentUnifiedTransparence = 0;
// various content, create content-metafile
GDIMetaFile aContentMetafile;
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 705670c402..df0e6cbd27 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -218,6 +218,12 @@ namespace drawinglayer
}
break;
}
+ case PRIMITIVE2D_ID_POLYPOLYGONBITMAPPRIMITIVE2D :
+ {
+ // direct draw of bitmap
+ RenderPolyPolygonBitmapPrimitive2D(static_cast< const primitive2d::PolyPolygonBitmapPrimitive2D& >(rCandidate));
+ break;
+ }
case PRIMITIVE2D_ID_POLYPOLYGONCOLORPRIMITIVE2D :
{
// direct draw of PolyPolygon with color
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 4f803e9366..05a73e1e5e 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -565,6 +565,98 @@ namespace drawinglayer
}
}
+ // direct draw of bitmap
+ void VclProcessor2D::RenderPolyPolygonBitmapPrimitive2D(const primitive2d::PolyPolygonBitmapPrimitive2D& rPolygonCandidate)
+ {
+ bool bDone(false);
+ const basegfx::B2DPolyPolygon& rPolyPolygon = rPolygonCandidate.getB2DPolyPolygon();
+
+ if(rPolyPolygon.count())
+ {
+ const attribute::FillBitmapAttribute& rFillBitmapAttribute = rPolygonCandidate.getFillBitmap();
+ const Bitmap& rBitmap = rFillBitmapAttribute.getBitmap();
+
+ if(rBitmap.IsEmpty())
+ {
+ // empty bitmap, done
+ bDone = true;
+ }
+ else
+ {
+ // try to catch cases where the bitmap will be color-modified to a single
+ // color (e.g. shadow). This would NOT be optimizable with an alpha channel
+ // at the Bitmap which we do not have here. When this should change, this
+ // optimization has to be reworked accordingly.
+ const sal_uInt32 nBColorModifierStackCount(maBColorModifierStack.count());
+
+ if(nBColorModifierStackCount)
+ {
+ const basegfx::BColorModifier& rTopmostModifier = maBColorModifierStack.getBColorModifier(nBColorModifierStackCount - 1);
+
+ if(basegfx::BCOLORMODIFYMODE_REPLACE == rTopmostModifier.getMode())
+ {
+ // the bitmap fill is in unified color, so we can replace it with
+ // a single polygon fill. The form of the fill depends on tiling
+ if(rFillBitmapAttribute.getTiling())
+ {
+ // with tiling, fill the whole PolyPolygon with the modifier color
+ basegfx::B2DPolyPolygon aLocalPolyPolygon(rPolyPolygon);
+
+ aLocalPolyPolygon.transform(maCurrentTransformation);
+ mpOutputDevice->SetLineColor();
+ mpOutputDevice->SetFillColor(Color(rTopmostModifier.getBColor()));
+ mpOutputDevice->DrawPolyPolygon(aLocalPolyPolygon);
+ }
+ else
+ {
+ // without tiling, only the area common to the bitmap tile and the
+ // PolyPolygon is filled. Create the bitmap tile area in object
+ // coordinates. For this, the object transformation needs to be created
+ // from the already scaled PolyPolygon. The tile area in object
+ // coordinates wil always be non-rotated, so it's not necessary to
+ // work with a polygon here
+ basegfx::B2DRange aTileRange(rFillBitmapAttribute.getTopLeft(),
+ rFillBitmapAttribute.getTopLeft() + rFillBitmapAttribute.getSize());
+ const basegfx::B2DRange aPolyPolygonRange(rPolyPolygon.getB2DRange());
+ basegfx::B2DHomMatrix aNewObjectTransform;
+
+ aNewObjectTransform.set(0, 0, aPolyPolygonRange.getWidth());
+ aNewObjectTransform.set(1, 1, aPolyPolygonRange.getHeight());
+ aNewObjectTransform.set(0, 2, aPolyPolygonRange.getMinX());
+ aNewObjectTransform.set(1, 2, aPolyPolygonRange.getMinY());
+ aTileRange.transform(aNewObjectTransform);
+
+ // now clip the object polyPolygon against the tile range
+ // to get the common area (OR)
+ basegfx::B2DPolyPolygon aTarget = basegfx::tools::clipPolyPolygonOnRange(rPolyPolygon, aTileRange, true, false);
+
+ if(aTarget.count())
+ {
+ aTarget.transform(maCurrentTransformation);
+ mpOutputDevice->SetLineColor();
+ mpOutputDevice->SetFillColor(Color(rTopmostModifier.getBColor()));
+ mpOutputDevice->DrawPolyPolygon(aTarget);
+ }
+ }
+
+ bDone = true;
+ }
+ }
+ }
+ }
+ else
+ {
+ // empty polyPolygon, done
+ bDone = true;
+ }
+
+ if(!bDone)
+ {
+ // use default decomposition
+ process(rPolygonCandidate.get2DDecomposition(getViewInformation2D()));
+ }
+ }
+
// direct draw of PolyPolygon with color
void VclProcessor2D::RenderPolyPolygonColorPrimitive2D(const primitive2d::PolyPolygonColorPrimitive2D& rPolygonCandidate)
{
diff --git a/drawinglayer/source/processor3d/cutfindprocessor3d.cxx b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx
new file mode 100644
index 0000000000..5705ba74ca
--- /dev/null
+++ b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx
@@ -0,0 +1,199 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: zbufferprocessor3d.cxx,v $
+ *
+ * $Revision: 1.5 $
+ *
+ * last change: $Author: aw $ $Date: 2008-06-24 15:31:09 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_drawinglayer.hxx"
+
+#include <drawinglayer/processor3d/cutfindprocessor3d.hxx>
+#include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx>
+#include <drawinglayer/primitive3d/transformprimitive3d.hxx>
+#include <drawinglayer/primitive3d/hatchtextureprimitive3d.hxx>
+#include <drawinglayer/primitive3d/hittestprimitive3d.hxx>
+#include <drawinglayer/primitive3d/polypolygonprimitive3d.hxx>
+#include <basegfx/polygon/b3dpolygon.hxx>
+#include <basegfx/polygon/b3dpolygontools.hxx>
+#include <basegfx/polygon/b3dpolypolygontools.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace processor3d
+ {
+ CutFindProcessor::CutFindProcessor(const geometry::ViewInformation3D& rViewInformation,
+ const basegfx::B3DPoint& rFront,
+ const basegfx::B3DPoint& rBack,
+ bool bAnyHit)
+ : BaseProcessor3D(rViewInformation),
+ maFront(rFront),
+ maBack(rBack),
+ maResult(),
+ maCombinedTransform(),
+ mbAnyHit(bAnyHit)
+ {
+ }
+
+ void CutFindProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate)
+ {
+ if(getAnyHit() && maResult.size())
+ {
+ // stop processing as soon as a hit was recognized
+ return;
+ }
+
+ // it is a BasePrimitive3D implementation, use getPrimitiveID() call for switch
+ switch(rCandidate.getPrimitiveID())
+ {
+ case PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D :
+ {
+ // transform group.
+ const primitive3d::TransformPrimitive3D& rPrimitive = static_cast< const primitive3d::TransformPrimitive3D& >(rCandidate);
+
+ // remember old and transform front, back to object coordinates
+ const basegfx::B3DPoint aLastFront(maFront);
+ const basegfx::B3DPoint aLastBack(maBack);
+ basegfx::B3DHomMatrix aInverseTrans(rPrimitive.getTransformation());
+ aInverseTrans.invert();
+ maFront *= aInverseTrans;
+ maBack *= aInverseTrans;
+
+ // remember current and create new transformation; add new object transform from right side
+ const geometry::ViewInformation3D aLastViewInformation3D(getViewInformation3D());
+ const geometry::ViewInformation3D aNewViewInformation3D(
+ aLastViewInformation3D.getObjectTransformation() * rPrimitive.getTransformation(),
+ aLastViewInformation3D.getOrientation(),
+ aLastViewInformation3D.getProjection(),
+ aLastViewInformation3D.getDeviceToView(),
+ aLastViewInformation3D.getViewTime(),
+ aLastViewInformation3D.getExtendedInformationSequence());
+ updateViewInformation(aNewViewInformation3D);
+
+ // #i102956# remember needed back-transform for found cuts (combine from right side)
+ const basegfx::B3DHomMatrix aLastCombinedTransform(maCombinedTransform);
+ maCombinedTransform = maCombinedTransform * rPrimitive.getTransformation();
+
+ // let break down
+ process(rPrimitive.getChildren());
+
+ // restore transformations and front, back
+ maCombinedTransform = aLastCombinedTransform;
+ updateViewInformation(aLastViewInformation3D);
+ maFront = aLastFront;
+ maBack = aLastBack;
+ break;
+ }
+ case PRIMITIVE3D_ID_POLYGONHAIRLINEPRIMITIVE3D :
+ {
+ // PolygonHairlinePrimitive3D, not used for hit test with planes, ignore. This
+ // means that also thick line expansion will not be hit-tested as
+ // PolyPolygonMaterialPrimitive3D
+ break;
+ }
+ case PRIMITIVE3D_ID_HATCHTEXTUREPRIMITIVE3D :
+ {
+ // #i97321#
+ // For HatchTexturePrimitive3D, do not use the decomposition since it will produce
+ // clipped hatch lines in 3D. It can be used when the hatch also has a filling, but for
+ // simplicity, just use the children which are the PolyPolygonMaterialPrimitive3D
+ // which define the hatched areas anyways; for HitTest this is more than adequate
+ const primitive3d::HatchTexturePrimitive3D& rPrimitive = static_cast< const primitive3d::HatchTexturePrimitive3D& >(rCandidate);
+ process(rPrimitive.getChildren());
+ break;
+ }
+ case PRIMITIVE3D_ID_HITTESTPRIMITIVE3D :
+ {
+ // HitTestPrimitive3D, force usage due to we are doing a hit test and this
+ // primitive only gets generated on 3d objects without fill, exactly for this
+ // purpose
+ const primitive3d::HitTestPrimitive3D& rPrimitive = static_cast< const primitive3d::HitTestPrimitive3D& >(rCandidate);
+ process(rPrimitive.getChildren());
+ break;
+ }
+ case PRIMITIVE3D_ID_POLYPOLYGONMATERIALPRIMITIVE3D :
+ {
+ // PolyPolygonMaterialPrimitive3D
+ const primitive3d::PolyPolygonMaterialPrimitive3D& rPrimitive = static_cast< const primitive3d::PolyPolygonMaterialPrimitive3D& >(rCandidate);
+
+ if(!maFront.equal(maBack))
+ {
+ const basegfx::B3DPolyPolygon& rPolyPolygon = rPrimitive.getB3DPolyPolygon();
+ const sal_uInt32 nPolyCount(rPolyPolygon.count());
+
+ if(nPolyCount)
+ {
+ const basegfx::B3DPolygon aPolygon(rPolyPolygon.getB3DPolygon(0));
+ const sal_uInt32 nPointCount(aPolygon.count());
+
+ if(nPointCount > 2)
+ {
+ const basegfx::B3DVector aPlaneNormal(aPolygon.getNormal());
+
+ if(!aPlaneNormal.equalZero())
+ {
+ const basegfx::B3DPoint aPointOnPlane(aPolygon.getB3DPoint(0));
+ double fCut(0.0);
+
+ if(basegfx::tools::getCutBetweenLineAndPlane(aPlaneNormal, aPointOnPlane, maFront, maBack, fCut))
+ {
+ const basegfx::B3DPoint aCutPoint(basegfx::interpolate(maFront, maBack, fCut));
+
+ if(basegfx::tools::isInside(rPolyPolygon, aCutPoint, false))
+ {
+ // #i102956# add result. Do not forget to do this in the coordinate
+ // system the processor get started with, so use the collected
+ // combined transformation from processed TransformPrimitive3D's
+ maResult.push_back(maCombinedTransform * aCutPoint);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ break;
+ }
+ default :
+ {
+ // process recursively
+ process(rCandidate.get3DDecomposition(getViewInformation3D()));
+ break;
+ }
+ }
+ }
+ } // end of namespace processor3d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/drawinglayer/source/processor3d/makefile.mk b/drawinglayer/source/processor3d/makefile.mk
index 8ca0097c43..2ae2ae52f2 100644
--- a/drawinglayer/source/processor3d/makefile.mk
+++ b/drawinglayer/source/processor3d/makefile.mk
@@ -46,6 +46,7 @@ ENABLE_EXCEPTIONS=TRUE
SLOFILES= \
$(SLO)$/baseprocessor3d.obj \
+ $(SLO)$/cutfindprocessor3d.obj \
$(SLO)$/defaultprocessor3d.obj \
$(SLO)$/shadow3dextractor.obj \
$(SLO)$/geometry2dextractor.obj \
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 00e714106e..d4c88c9371 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -560,7 +560,7 @@ void SvtFileDialog::Init_Impl
WinBits nStyle
)
{
- sal_Bool bIsHighContrast = GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bIsHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
m_aImages = ImageList( SvtResId( bIsHighContrast ? RID_FILEPICKER_IMAGES_HC : RID_FILEPICKER_IMAGES ) );
_pImp->_nStyle = nStyle;
@@ -2683,7 +2683,7 @@ void SvtFileDialog::implUpdateImages( )
{
// determine high contrast mode
{
- sal_Bool bIsHighContrast = GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bIsHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
m_aImages = ImageList( SvtResId( bIsHighContrast ? RID_FILEPICKER_IMAGES_HC : RID_FILEPICKER_IMAGES ) );
}
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index f3b768ac53..6a9ace467c 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -231,7 +231,7 @@ void SvtUpButton_Impl::FillURLMenu( PopupMenu* _pMenu )
::svtools::VolumeInfo aVolInfo( sal_True /* volume */, sal_False /* remote */,
sal_False /* removable */, sal_False /* floppy */,
sal_False /* compact disk */ );
- sal_Bool bIsHighContrast = pBox->GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bIsHighContrast = pBox->GetSettings().GetStyleSettings().GetHighContrastMode();
Image aVolumeImage( SvFileInformationManager::GetFolderImage( aVolInfo, bIsHighContrast ) );
while ( nCount >= 1 )
@@ -319,7 +319,7 @@ void SvtTravelButton_Impl::FillURLMenu( PopupMenu* _pMenu )
_pMenu->Clear();
- sal_Bool bIsHighContrast = GetDialogParent()->GetView()->GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bIsHighContrast = GetDialogParent()->GetView()->GetSettings().GetStyleSettings().GetHighContrastMode();
USHORT nItemId = 1;
String sDisplayName;
diff --git a/fpicker/source/unx/gnome/SalGtkPicker.cxx b/fpicker/source/unx/gnome/SalGtkPicker.cxx
index 0d9289d89a..3a9b3a3a5d 100644
--- a/fpicker/source/unx/gnome/SalGtkPicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkPicker.cxx
@@ -73,6 +73,8 @@ rtl::OUString SalGtkPicker::uritounicode(const gchar* pIn)
INetURLObject aURL(sURL);
if (INET_PROT_FILE == aURL.GetProtocol())
{
+ // all the URLs are handled by office in UTF-8
+ // so the Gnome FP related URLs should be converted accordingly
gchar *pEncodedFileName = g_filename_from_uri(pIn, NULL, NULL);
if ( pEncodedFileName )
{
@@ -94,12 +96,19 @@ rtl::OUString SalGtkPicker::uritounicode(const gchar* pIn)
rtl::OString SalGtkPicker::unicodetouri(const rtl::OUString &rURL)
{
+ // all the URLs are handled by office in UTF-8 ( and encoded with "%xx" codes based on UTF-8 )
+ // so the Gnome FP related URLs should be converted accordingly
OString sURL = OUStringToOString(rURL, RTL_TEXTENCODING_UTF8);
INetURLObject aURL(rURL);
if (INET_PROT_FILE == aURL.GetProtocol())
{
- rtl::OUString sOUURL = aURL.getExternalURL(INetURLObject::DECODE_WITH_CHARSET, osl_getThreadTextEncoding());
- sURL = OUStringToOString( sOUURL, osl_getThreadTextEncoding());
+ OUString aNewURL = Reference<uri::XExternalUriReferenceTranslator>(Reference<XMultiServiceFactory>(comphelper::getProcessServiceFactory(), UNO_QUERY_THROW)->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.ExternalUriReferenceTranslator"))), UNO_QUERY_THROW)->translateToExternal( rURL );
+
+ if( aNewURL.getLength() )
+ {
+ // At this point the URL should contain ascii characters only actually
+ sURL = OUStringToOString( aNewURL, osl_getThreadTextEncoding() );
+ }
}
return sURL;
}
diff --git a/fpicker/source/unx/kde4/KDE4FPEntry.cxx b/fpicker/source/unx/kde4/KDE4FPEntry.cxx
index f6c7b0e691..5fa358df2d 100644
--- a/fpicker/source/unx/kde4/KDE4FPEntry.cxx
+++ b/fpicker/source/unx/kde4/KDE4FPEntry.cxx
@@ -84,12 +84,12 @@ static Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiS
// the three uno functions that will be exported
extern "C"
{
- void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv )
+ void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
- sal_Bool SAL_CALL component_writeInfo( void* pServiceManager, void* pRegistryKey )
+ sal_Bool SAL_CALL component_writeInfo( void*, void* pRegistryKey )
{
sal_Bool bRetVal = sal_True;
@@ -110,7 +110,7 @@ extern "C"
return bRetVal;
}
- void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* pRegistryKey )
+ void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* )
{
void* pRet = 0;
diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index 70742bc955..1d4402d74a 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -111,6 +111,8 @@ using namespace ::com::sun::star::uno;
// helper functions
//////////////////////////////////////////////////////////////////////////
+#include <QDebug>
+
namespace
{
// controling event notifications
@@ -157,14 +159,15 @@ KDE4FilePicker::KDE4FilePicker( const uno::Reference<lang::XMultiServiceFactory>
_resMgr( CREATEVERSIONRESMGR( fps_office ) )
{
_extraControls = new QWidget();
-
_layout = new QGridLayout(_extraControls);
- _dialog = new KFileDialog(KUrl(""), QString(""), 0, _extraControls);
+ _dialog = new KFileDialog(KUrl("~"), QString(""), 0, _extraControls);
_dialog->setMode(KFile::File | KFile::LocalOnly);
//default mode
_dialog->setOperationMode(KFileDialog::Opening);
+
+ _dialog->setStyleSheet("color: black;");
}
KDE4FilePicker::~KDE4FilePicker()
@@ -207,21 +210,12 @@ sal_Int16 SAL_CALL KDE4FilePicker::execute()
}
}
+ _dialog->clearFilter();
_dialog->setFilter(_filter);
- _dialog->exec();
-
- //nasty hack to get a local qt event loop going to process the dialog
- //otherwise the dialog returns immediately
- while (_dialog->isVisible())
- {
- kapp->processEvents(QEventLoop::WaitForMoreEvents);
- }
//block and wait for user input
- if (_dialog->result() == KFileDialog::Accepted)
- {
+ if (_dialog->exec() == KFileDialog::Accepted)
return ExecutableDialogResults::OK;
- }
return ExecutableDialogResults::CANCEL;
}
@@ -230,13 +224,9 @@ void SAL_CALL KDE4FilePicker::setMultiSelectionMode( sal_Bool multiSelect )
throw( uno::RuntimeException )
{
if (multiSelect)
- {
_dialog->setMode(KFile::Files | KFile::LocalOnly);
- }
else
- {
_dialog->setMode(KFile::File | KFile::LocalOnly);
- }
}
void SAL_CALL KDE4FilePicker::setDefaultName( const ::rtl::OUString &name )
@@ -250,7 +240,7 @@ void SAL_CALL KDE4FilePicker::setDisplayDirectory( const rtl::OUString &dir )
throw( uno::RuntimeException )
{
const QString url = toQString(dir);
- _dialog->setStartDir(KUrl(url));
+ _dialog->setUrl(KUrl(url));
}
rtl::OUString SAL_CALL KDE4FilePicker::getDisplayDirectory()
@@ -263,16 +253,63 @@ rtl::OUString SAL_CALL KDE4FilePicker::getDisplayDirectory()
uno::Sequence< ::rtl::OUString > SAL_CALL KDE4FilePicker::getFiles()
throw( uno::RuntimeException )
{
- QStringList files = _dialog->selectedFiles();
+ QStringList rawFiles = _dialog->selectedFiles();
+ QStringList files;
- uno::Sequence< ::rtl::OUString > seq(files.size());
+ // check if we need to add an extension
+ QString extension = "";
+ if ( _dialog->operationMode() == KFileDialog::Saving )
+ {
+ QCheckBox *cb = dynamic_cast<QCheckBox*> (
+ _customWidgets[ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION ]);
+
+ if (cb->isChecked())
+ {
+ extension = _dialog->currentFilter(); // assuming filter value is like this *.ext
+ extension.replace("*","");
+ }
+ }
+
+ // Workaround for the double click selection KDE4 bug
+ // kde file picker returns the file and directories for selectedFiles()
+ // when a file is double clicked
+ // make a true list of files
+ const QString dir = "file://" + KUrl(rawFiles[0]).directory();
+
+ bool singleFile = true;
+ if (rawFiles.size() > 1)
+ {
+ singleFile = false;
+ //for multi file sequences, oo expects the first param to be the directory
+ //can't treat all cases like multi file because in some instances (inserting image)
+ //oo WANTS only one entry in the final list
+ files.append(dir);
+ }
- for (int i=0 ; i<files.size() ; ++i)
+ for (USHORT i = 0; i < rawFiles.size(); ++i)
{
- const QString fileName = "file:" + files[i];
- seq[i] = toOUString(fileName);
+ // if the raw file is not the base directory (see above kde bug)
+ // we add the file to list of avail files
+ if ((dir + "/") != ("file://" + rawFiles[i]))
+ {
+ QString filename = KUrl(rawFiles[i]).fileName();
+
+ if (singleFile)
+ filename.prepend(dir + "/");
+
+ //prevent extension append if we already have one
+ if (filename.endsWith(extension))
+ files.append(filename);
+ else
+ files.append(filename + extension);
+ }
}
+ // add all files and leading directory to outgoing OO sequence
+ uno::Sequence< ::rtl::OUString > seq(files.size());
+ for (int i = 0; i < files.size(); ++i)
+ seq[i] = toOUString(files[i]);
+
return seq;
}
@@ -283,9 +320,7 @@ void SAL_CALL KDE4FilePicker::appendFilter( const ::rtl::OUString &title, const
QString f = toQString(filter);
if (!_filter.isNull())
- {
_filter.append("\n");
- }
//add to hash map for reverse lookup in getCurrentFilter
_filters.insert(f, t);
@@ -294,15 +329,18 @@ void SAL_CALL KDE4FilePicker::appendFilter( const ::rtl::OUString &title, const
//see the docs
t.replace("/", "\\/");
+ // openoffice gives us filters separated by ';' qt dialogs just want space separated
+ f.replace(";", " ");
+
_filter.append(QString("%1|%2").arg(f).arg(t));
}
void SAL_CALL KDE4FilePicker::setCurrentFilter( const rtl::OUString &title )
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- QString filter = toQString(title);
- filter.replace("/", "\\/");
- _dialog->filterWidget()->setCurrentFilter(filter);
+ QString t = toQString(title);
+ t.replace("/", "\\/");
+ _dialog->filterWidget()->setCurrentFilter(t);
}
rtl::OUString SAL_CALL KDE4FilePicker::getCurrentFilter()
@@ -312,17 +350,29 @@ rtl::OUString SAL_CALL KDE4FilePicker::getCurrentFilter()
//default if not found
if (filter.isNull())
- {
filter = "ODF Text Document (.odt)";
- }
return toOUString(filter);
}
-void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString&, const uno::Sequence<beans::StringPair>& )
+void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString& , const uno::Sequence<beans::StringPair>& filters)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- //TODO
+ if (!_filter.isNull())
+ _filter.append(QString("\n"));
+
+ const USHORT length = filters.getLength();
+ for (USHORT i = 0; i < length; ++i)
+ {
+ beans::StringPair aPair = filters[i];
+
+ _filter.append(QString("%1|%2").arg(
+ toQString(aPair.Second).replace(";", " ")).arg(
+ toQString(aPair.First).replace("/","\\/")));
+
+ if (i != length - 1)
+ _filter.append('\n');
+ }
}
void SAL_CALL KDE4FilePicker::setValue( sal_Int16 controlId, sal_Int16, const uno::Any &value )
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index a33339003a..4cdb6ce1ed 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -231,6 +231,13 @@ BackingWindow::~BackingWindow()
delete mpAccExec;
}
+void BackingWindow::GetFocus()
+{
+ if( IsVisible() )
+ maWriterButton.GrabFocus();
+ Window::GetFocus();
+}
+
class ImageContainerRes : public Resource
{
public:
diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx
index 9722ddfc86..e01a797267 100644
--- a/framework/source/services/backingwindow.hxx
+++ b/framework/source/services/backingwindow.hxx
@@ -173,6 +173,7 @@ namespace framework
virtual void DataChanged( const DataChangedEvent& rDCEvt );
virtual Window* GetParentLabelFor( const Window* pLabel ) const;
virtual Window* GetParentLabeledBy( const Window* pLabeled ) const;
+ virtual void GetFocus();
void setOwningFrame( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& xFrame );
};
diff --git a/officecfg/registry/data/org/openoffice/Inet.xcu b/officecfg/registry/data/org/openoffice/Inet.xcu
index 89e2a8477b..8e505f4051 100644
--- a/officecfg/registry/data/org/openoffice/Inet.xcu
+++ b/officecfg/registry/data/org/openoffice/Inet.xcu
@@ -35,11 +35,6 @@
<value>1</value>
</prop>
</node>
- <node oor:name="DefaultSearchEngine" install:module="defaultsearchengine">
- <prop oor:name="Name">
- <value>Google</value>
- </prop>
- </node>
<node oor:name="SearchEngines">
<node oor:name="Euroseek" oor:op="replace">
<node oor:name="And">
diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index c9747dc9de..c9e64be54e 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -521,6 +521,14 @@
<prop oor:name="DynamicBorderColors" oor:type="xs:boolean">
<value>true</value>
</prop>
+ <prop oor:name="UseDocumentTextMetrics" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
+ </node>
+ <node oor:name="com.sun.star.sheet.SpreadsheetDocument">
+ <prop oor:name="UseDocumentTextMetrics" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
</node>
</node>
</node>
diff --git a/officecfg/registry/data/org/openoffice/Office/Writer.xcu b/officecfg/registry/data/org/openoffice/Office/Writer.xcu
index e3eedf230e..b21f880402 100644
--- a/officecfg/registry/data/org/openoffice/Office/Writer.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Writer.xcu
@@ -702,33 +702,6 @@
<node oor:name="Topics"/>
</node>
</node>
- <node oor:name="Cursor" >
- <node oor:name="DirectCursor" >
- <prop oor:name="UseDirectCursor" install:module="directcursor">
- <value>true</value>
- </prop>
- <prop oor:name="Insert" install:module="directcursor">
- <value>3</value>
- </prop>
- </node>
- </node>
- <node oor:name="DefaultFont" install:module="defaultfontarial">
- <prop oor:name="Standard">
- <value >Arial</value>
- </prop>
- <prop oor:name="Heading">
- <value >Arial</value>
- </prop>
- <prop oor:name="List">
- <value >Arial</value>
- </prop>
- <prop oor:name="Caption">
- <value >Arial</value>
- </prop>
- <prop oor:name="Index">
- <value >Arial</value>
- </prop>
- </node>
<node oor:name="Layout" >
<node oor:name="Other" >
<prop oor:name="TabStop">
diff --git a/officecfg/registry/data/org/openoffice/Office/makefile.mk b/officecfg/registry/data/org/openoffice/Office/makefile.mk
index 50b67954ae..e8753721d6 100644
--- a/officecfg/registry/data/org/openoffice/Office/makefile.mk
+++ b/officecfg/registry/data/org/openoffice/Office/makefile.mk
@@ -89,8 +89,6 @@ MODULEFILES= \
Paths-macosx.xcu \
Paths-unxwnt.xcu \
Writer-cjk.xcu \
- Writer-defaultfontarial.xcu \
- Writer-directcursor.xcu \
Writer-javamail.xcu \
Impress-ogltrans.xcu \
Embedding-calc.xcu \
diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu
index 9f1871a5e1..299debc853 100644
--- a/officecfg/registry/data/org/openoffice/VCL.xcu
+++ b/officecfg/registry/data/org/openoffice/VCL.xcu
@@ -7,9 +7,6 @@
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: VCL.xcu,v $
- * $Revision: 1.62.116.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
@@ -825,64 +822,184 @@
<value>Lohit Nepali;Kalimati;Samanata;Sans</value>
</prop>
</node>
+ <node oor:name="as-IN" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Assamese;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
+ <node oor:name="bn-IN" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Bengali;Vrinda;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
<node oor:name="hi-IN" oor:op="replace">
<prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
- <value>Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif</value>
+ <value>Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
</prop>
<prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
- <value>Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
- <value>Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
- <value>Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
- <value>Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
- <value>Lohit Hindi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Hindi;Mangal;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
</node>
<node oor:name="gu-IN" oor:op="replace">
<prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
- <value>Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif</value>
+ <value>Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Gujarati;Shruti;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
+ <node oor:name="kn-IN" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Kannada;Tunga;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
+ <node oor:name="mai-IN" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Maithili;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
+ <node oor:name="ml-IN" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>Meera;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Meera;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
+ <node oor:name="mr-IN" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
</prop>
<prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
- <value>Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
- <value>Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
- <value>Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
- <value>Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
- <value>Lohit Gujarati;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Marathi;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
</node>
<node oor:name="or-IN" oor:op="replace">
<prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
- <value>utkal;Tahoma;Lucidasans;Lucida Sans;Supplement;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU;Interface User;WarpSans;Geneva;MS Sans Serif;Helv;Dialog;Albany AMT;Albany;Lucida;Arial;Nimbus Sans L;Helvetica;Charcoal;Chicago;Helmet;Interface System;Sans Serif</value>
+ <value>utkal;Kalinga;Lohit Oriya;Samyak Oriya;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
</prop>
<prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
- <value>utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
- <value>utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
- <value>utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
- <value>utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
- <value>utkal;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>utkal;Kalinga;Lohit Oriya;Samyak Oriya;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
</node>
<node oor:name="pa-IN" oor:op="replace">
@@ -907,22 +1024,62 @@
</node>
<node oor:name="ta-IN" oor:op="replace">
<prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
- <value>Lohit Tamil;Tahoma;Sans Serif</value>
+ <value>Lohit Tamil;Latha;Sans Serif</value>
</prop>
<prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
- <value>Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
- <value>Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
- <value>Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
- <value>Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
<prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
- <value>Lohit Tamil;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ <value>Lohit Tamil;Latha;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
+ <node oor:name="te-IN" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Lohit Telugu;Gautami;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
+ <node oor:name="ur" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>PakTypeNaqsh;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
</prop>
</node>
@@ -1022,6 +1179,26 @@
</node>
<node oor:name="rw" oor:op="replace">
</node>
+ <node oor:name="si" oor:op="replace">
+ <prop oor:name="UI_SANS" oor:op="replace" oor:type="xs:string">
+ <value>LKLUG;Iskoola Pota;Lucidasans;Lucida Sans;Andale Sans UI;Arial Unicode MS;Lucida Sans Unicode;clearlyU</value>
+ </prop>
+ <prop oor:name="CTL_DISPLAY" oor:op="replace" oor:type="xs:string">
+ <value>Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_HEADING" oor:op="replace" oor:type="xs:string">
+ <value>Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_PRESENTATION" oor:op="replace" oor:type="xs:string">
+ <value>Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_SPREADSHEET" oor:op="replace" oor:type="xs:string">
+ <value>Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ <prop oor:name="CTL_TEXT" oor:op="replace" oor:type="xs:string">
+ <value>Iskoola Pota;LKLUG;Tahoma;Lucidasans;Lucida Sans;Arial Unicode MS</value>
+ </prop>
+ </node>
</node>
<node oor:name="FontSubstitutions">
<node oor:name="en" oor:op="replace">
diff --git a/officecfg/registry/data/org/openoffice/makefile.mk b/officecfg/registry/data/org/openoffice/makefile.mk
index 6d5a1b264d..b953c9b1cd 100644
--- a/officecfg/registry/data/org/openoffice/makefile.mk
+++ b/officecfg/registry/data/org/openoffice/makefile.mk
@@ -47,7 +47,6 @@ XCUFILES= \
UserProfile.xcu
MODULEFILES= \
- Inet-defaultsearchengine.xcu \
Setup-brand.xcu \
Setup-writer.xcu \
Setup-calc.xcu \
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index f816a55e93..f9df58b8e3 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -844,11 +844,28 @@
</prop>
<prop oor:name="DynamicBorderColors" oor:type="xs:boolean">
<info>
- <desc>specifies whether the controls should use dynamic border coloring, if possible.
-Dymamic border coloring means that when the mouse is hovered over a control, and when a control receives the focus, this is indicated with special border colors.</desc>
+ <desc>
+ specifies whether the controls should use dynamic border coloring, if possible.
+ Dymamic border coloring means that when the mouse is hovered over a control, and when a control receives the focus, this is indicated with special border colors.
+ </desc>
</info>
<value>false</value>
</prop>
+ <prop oor:name="UseDocumentTextMetrics" oor:type="xs:boolean">
+ <info>
+ <desc>
+ controls whether form controls, when they render their text, use the same metrics as the document
+ does. If this is set to &lt;true&gt;, then the control text's appearance better matches the text
+ in the surrounding document.&lt;/p&gt;
+ &lt;p&gt;Technically, documents use a reference device for formatting, which usually has a higher
+ resolution than the actual output device. The option decides whether form controls should use
+ the same reference device as the surrounding document. However, some of OOo's document implementations
+ do not properly use their reference device in all situations, in which case the option might better
+ be disabled.&lt;p&gt;
+ </desc>
+ </info>
+ <value>true</value>
+ </prop>
</group>
<group oor:name="ProductVersionID">
<info>
@@ -1158,8 +1175,8 @@ Dymamic border coloring means that when the mouse is hovered over a control, and
<desc>
This switch decides if Interactions in the DrawingLayer are visualized using Wireframe or Full-Object
previews. If false, only Wireframe will be used. If true, Full-Object preview which gives a much better
- feedback about the object interaction will be used. This mode is used for modification and creation of
- objects. During interaction, a geometric copy of the object(s) is shown with 50% transparence in the
+ feedback about the object interaction will be used. This mode is used for modification and creation of
+ objects. During interaction, a geometric copy of the object(s) is shown with 50% transparence in the
foreground. That copy shows exactly what You will get when You end the interaction.
</desc>
<label>This switch determines if DrawingLayer Interactions show Wireframe or Full-Object preview.</label>
@@ -1181,7 +1198,8 @@ Dymamic border coloring means that when the mouse is hovered over a control, and
<prop oor:name="QuadraticFormControlRenderLimit" oor:type="xs:int">
<info>
<author>AW</author>
- <desc>This defines a Limitation for the default raster conversion of FormControls in edit mode.
+ <desc>
+ This defines a Limitation for the default raster conversion of FormControls in edit mode.
These have the ability to be displayed using this fallback to Bitmaps.
The number is the maximum number of pixels to use, e.g. 300x150 Pixels is allowed as default.
When FormControls would need more Pixels than this, the Bitmap will be limited and scaled to the needed pixel size at paint time.
@@ -1194,8 +1212,8 @@ Dymamic border coloring means that when the mouse is hovered over a control, and
<info>
<author>AW</author>
<desc>
- This switch defines if the selections in the applications (text or cells) are visualized using
- inverse (XOR) when set to false (the old selection method, also used when in HighContrast mode)
+ This switch defines if the selections in the applications (text or cells) are visualized using
+ inverse (XOR) when set to false (the old selection method, also used when in HighContrast mode)
or a transparent overlay selection using the system's selection color.
</desc>
<label>This switch defines if for text/cell selections the old inverse or the new transparent selection is to be used.</label>
@@ -5356,6 +5374,13 @@ Dymamic border coloring means that when the mouse is hovered over a control, and
</constraints>
<value>0</value>
</prop>
+ <prop oor:name="AllowDuplicateFieldNames" oor:type="xs:boolean">
+ <info>
+ <author>pl</author>
+ <desc>Specifies whether multiple form fields exported are allowed to have the same field name.</desc>
+ </info>
+ <value>false</value>
+ </prop>
<prop oor:name="IsSkipEmptyPages" oor:type="xs:boolean">
<info>
<author>FME</author>
@@ -6517,7 +6542,7 @@ Dymamic border coloring means that when the mouse is hovered over a control, and
<desc>Contains settings for smart tags.</desc>
</info>
<group oor:name="Writer">
- <info>
+ <info>
<author>FME</author>
<desc>Contains Writer specific settings for smart tags.</desc>
</info>
diff --git a/readlicense_oo/util/makefile.pmk b/readlicense_oo/util/makefile.pmk
index b5c9099a1a..1b2e1de513 100755
--- a/readlicense_oo/util/makefile.pmk
+++ b/readlicense_oo/util/makefile.pmk
@@ -62,6 +62,7 @@ $(MISC)$/readme_text.xsl : virtual
.ENDIF # "$(USE_SHELL)"!="4nt"
$(MISC)$/$(GUI)$/$(eq,$(GUI),WNT readme README)_%.html : 'virtual'
+ @@-$(MKDIRHIER) $(@:d)
$(XSLTPROC) --nonet -o $@ \
--stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \
--stringparam cp1 $(CPUNAME) --stringparam type html --stringparam lang1 $* \
@@ -71,6 +72,7 @@ $(MISC)$/$(GUI)$/$(eq,$(GUI),WNT readme README)_%.html : 'virtual'
.ENDIF # "$(GUI)"=="UNX"
$(MISC)$/$(GUI)$/$(eq,$(GUI),OS2 readme README)_%.html : 'virtual'
+ @@-$(MKDIRHIER) $(@:d)
$(XSLTPROC) --nonet -o $@ \
--stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \
--stringparam cp1 $(CPUNAME) --stringparam type html --stringparam lang1 $* \
@@ -78,6 +80,7 @@ $(MISC)$/$(GUI)$/$(eq,$(GUI),OS2 readme README)_%.html : 'virtual'
# no percent-rule to avoid ambiguous inference chains for README_<lang>.html
$(SYSTEXTDOCS) : $(MISC)$/readme_text.xsl
+ @@-$(MKDIRHIER) $(@:d)
$(XSLTPROC) --nonet -o $@ \
--stringparam os1 $(OS) --stringparam gui1 $(GUI) --stringparam com1 $(COM) \
--stringparam cp1 $(CPUNAME) --stringparam type text --stringparam lang1 $(@:b:s/readme_//:s/README_//) \
diff --git a/sfx2/inc/sfx2/filedlghelper.hxx b/sfx2/inc/sfx2/filedlghelper.hxx
index d50cf4b93c..c809fac259 100644
--- a/sfx2/inc/sfx2/filedlghelper.hxx
+++ b/sfx2/inc/sfx2/filedlghelper.hxx
@@ -230,13 +230,13 @@ public:
void SetTitle( const String& rNewTitle );
String GetPath() const;
- /** @deprected: Don't use this method to retrieve the selected files
+ /** @deprected: Don't use this method to retrieve the selected files
There are file picker which can provide multiple selected file which belong
to different folders. As this method always provides the root folder for all selected
files this cannot work.
*/
::com::sun::star::uno::Sequence< ::rtl::OUString > GetMPath() const;
-
+
/** Provides the selected files with full path information */
::com::sun::star::uno::Sequence< ::rtl::OUString > GetSelectedFiles() const;
diff --git a/sfx2/inc/sfx2/passwd.hxx b/sfx2/inc/sfx2/passwd.hxx
index 2cc5ba1133..d3d4ff2eaa 100644
--- a/sfx2/inc/sfx2/passwd.hxx
+++ b/sfx2/inc/sfx2/passwd.hxx
@@ -68,10 +68,9 @@ private:
USHORT mnMinLen;
USHORT mnExtras;
-//#if 0 // _SOLAR__PRIVATE
+ bool mbAsciiOnly;
DECL_DLLPRIVATE_LINK( EditModifyHdl, Edit* );
DECL_DLLPRIVATE_LINK( OKHdl, OKButton* );
-//#endif
public:
SfxPasswordDialog( Window* pParent, const String* pGroupText = NULL );
@@ -84,6 +83,7 @@ public:
void SetMaxLen( USHORT Len );
void SetEditHelpId( ULONG nId ) { maPasswordED.SetHelpId( nId ); }
void ShowExtras( USHORT nExtras ) { mnExtras = nExtras; }
+ void AllowAsciiOnly( bool i_bAsciiOnly = true ) { mbAsciiOnly = i_bAsciiOnly; }
virtual short Execute();
};
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 9e0c8a1da3..786a8849e1 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -296,7 +296,7 @@ ContentListBox_Impl::ContentListBox_Impl( Window* pParent, const ResId& rResId )
aDocumentImage ( SfxResId( IMG_HELP_CONTENT_DOC ) )
{
- if ( GetSettings().GetStyleSettings().GetWindowColor().IsDark() )
+ if ( GetSettings().GetStyleSettings().GetHighContrastMode() )
{
aOpenBookImage = Image( SfxResId( IMG_HELP_CONTENT_BOOK_OPEN_HC ) );
aClosedBookImage = Image( SfxResId( IMG_HELP_CONTENT_BOOK_CLOSED_HC ) );
@@ -2178,7 +2178,7 @@ sal_Bool SfxHelpTextWindow_Impl::HasSelection() const
void SfxHelpTextWindow_Impl::InitToolBoxImages()
{
sal_Bool bLarge = SvtMiscOptions().AreCurrentSymbolsLarge();
- sal_Bool bHiContrast = GetBackground().GetColor().IsDark();
+ sal_Bool bHiContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
aIndexOnImage = Image( SfxResId(
bLarge ? bHiContrast ? IMG_HELP_TOOLBOX_HCL_INDEX_ON : IMG_HELP_TOOLBOX_L_INDEX_ON
@@ -2584,7 +2584,7 @@ long SfxHelpTextWindow_Impl::PreNotify( NotifyEvent& rNEvt )
if ( pCmdEvt->GetCommand() == COMMAND_CONTEXTMENU && pCmdWin != this && pCmdWin != &aToolBox )
{
- sal_Bool bHiContrast = GetSettings().GetStyleSettings().GetMenuColor().IsDark();
+ sal_Bool bHiContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
Point aPos;
if ( pCmdEvt->IsMouseEvent() )
aPos = pCmdEvt->GetMousePosPixel();
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index d59d36855c..b448392766 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -269,8 +269,12 @@ SfxDocumentInfoItem::SfxDocumentInfoItem( const String& rFile,
for ( sal_Int32 i = 0; i < nCount; ++i )
{
// "fix" property? => not a custom property => ignore it!
- if ( !(pProps[i].Attributes & ::com::sun::star::beans::PropertyAttribute::REMOVABLE) )
+ if (!(pProps[i].Attributes &
+ ::com::sun::star::beans::PropertyAttribute::REMOVABLE))
+ {
+ DBG_ASSERT(false, "non-removable user-defined property?");
continue;
+ }
uno::Any aValue = xSet->getPropertyValue(pProps[i].Name);
CustomProperty* pProp = new CustomProperty( pProps[i].Name, aValue );
@@ -424,7 +428,13 @@ void SfxDocumentInfoItem::UpdateDocumentInfo(
const beans::Property* pProps = lProps.getConstArray();
sal_Int32 nCount = lProps.getLength();
for ( sal_Int32 j = 0; j < nCount; ++j )
- xContainer->removeProperty( pProps[j].Name );
+ {
+ if ((pProps[j].Attributes &
+ ::com::sun::star::beans::PropertyAttribute::REMOVABLE))
+ {
+ xContainer->removeProperty( pProps[j].Name );
+ }
+ }
for ( sal_uInt32 k = 0; k < m_aCustomProperties.size(); ++k )
{
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 4bf2a95cc4..e14d9118f0 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2612,7 +2612,7 @@ Sequence< ::rtl::OUString > FileDialogHelper::GetSelectedFiles() const
if ( nFiles > 1 )
{
aResultSeq = Sequence< ::rtl::OUString >( nFiles-1 );
-
+
INetURLObject aPath( lFiles[0] );
aPath.setFinalSlash();
@@ -2629,7 +2629,7 @@ Sequence< ::rtl::OUString > FileDialogHelper::GetSelectedFiles() const
else
aResultSeq = lFiles;
}
-
+
return aResultSeq;
}
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index 628258eb13..23fe8c98ba 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -43,10 +43,35 @@
#include "dialog.hrc"
#include "passwd.hrc"
+#include "vcl/sound.hxx"
+
// -----------------------------------------------------------------------
IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG )
{
+ if( mbAsciiOnly )
+ {
+ rtl::OUString aTest( maPasswordED.GetText() );
+ const sal_Unicode* pTest = aTest.getStr();
+ sal_Int32 nLen = aTest.getLength();
+ rtl::OUStringBuffer aFilter( nLen );
+ bool bReset = false;
+ for( sal_Int32 i = 0; i < nLen; i++ )
+ {
+ if( *pTest > 0x007f )
+ bReset = true;
+ else
+ aFilter.append( *pTest );
+ pTest++;
+ }
+ if( bReset )
+ {
+ Sound::Beep( SOUND_ERROR );
+ maPasswordED.SetSelection( Selection( 0, nLen ) );
+ maPasswordED.ReplaceSelected( aFilter.makeStringAndClear() );
+ }
+
+ }
maOKBtn.Enable( maPasswordED.GetText().Len() >= mnMinLen );
return 0;
}
@@ -88,7 +113,8 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
maConfirmStr ( SfxResId( STR_PASSWD_CONFIRM ) ),
mnMinLen ( 5 ),
- mnExtras ( 0 )
+ mnExtras ( 0 ),
+ mbAsciiOnly ( false )
{
FreeResource();
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 2cc7b52d25..315e9ee437 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -2407,7 +2407,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages()
return;
// let the families collection update the images
- sal_Bool bIsHighContrast = m_pFloat->GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bIsHighContrast = m_pFloat->GetSettings().GetStyleSettings().GetHighContrastMode();
pStyleFamilies->updateImages( *m_pStyleFamiliesId, bIsHighContrast ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL );
// and set the new images on our toolbox
@@ -2424,7 +2424,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages()
void SfxTemplateDialog_Impl::updateNonFamilyImages()
{
m_aActionTbR.SetImageList( ImageList( SfxResId(
- m_pFloat->GetDisplayBackground().GetColor().IsDark() ? IMG_LST_STYLE_DESIGNER_HC
+ m_pFloat->GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_LST_STYLE_DESIGNER_HC
: DLG_STYLE_DESIGNER ) ) );
}
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 93fbfa1a81..c30cbd4dbc 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -79,6 +79,7 @@
#include "comphelper/storagehelper.hxx"
#include "comphelper/mediadescriptor.hxx"
#include "comphelper/sequenceasvector.hxx"
+#include "comphelper/stlunosequence.hxx"
#include "sot/storage.hxx"
#include "sfx2/docfile.hxx"
#include "sax/tools/converter.hxx"
@@ -322,7 +323,7 @@ private:
/// standard meta data (multiple occurrences)
std::map< ::rtl::OUString,
std::vector<css::uno::Reference<css::xml::dom::XNode> > > m_metaList;
- /// user-defined meta data (meta:user-defined)
+ /// user-defined meta data (meta:user-defined) @ATTENTION may be null!
css::uno::Reference<css::beans::XPropertyContainer> m_xUserDefined;
// now for some meta-data attributes; these are not updated directly in the
// DOM because updates (detecting "empty" elements) would be quite messy
@@ -998,9 +999,12 @@ SfxDocumentMetaData::updateElement(const char *i_name,
void SAL_CALL SfxDocumentMetaData::updateUserDefinedAndAttributes()
{
createUserDefined();
- css::uno::Reference<css::beans::XPropertySet> xPSet(m_xUserDefined,css::uno::UNO_QUERY_THROW);
- std::pair<css::uno::Sequence< ::rtl::OUString>, AttrVector> udStringsAttrs = propsToStrings(xPSet);
- (void) setMetaList("meta:user-defined", udStringsAttrs.first,&udStringsAttrs.second);
+ const css::uno::Reference<css::beans::XPropertySet> xPSet(m_xUserDefined,
+ css::uno::UNO_QUERY_THROW);
+ const std::pair<css::uno::Sequence< ::rtl::OUString>, AttrVector>
+ udStringsAttrs( propsToStrings(xPSet) );
+ (void) setMetaList("meta:user-defined", udStringsAttrs.first,
+ &udStringsAttrs.second);
// update elements with attributes
std::vector<std::pair<const char *, ::rtl::OUString> > attributes;
@@ -1217,15 +1221,13 @@ void SAL_CALL SfxDocumentMetaData::init(
std::vector<css::uno::Reference<css::xml::dom::XNode> > & vec =
m_metaList[::rtl::OUString::createFromAscii("meta:user-defined")];
- // user-defined meta data: create PropertyBag which only accepts property
- // values of allowed types
+ m_xUserDefined.clear(); // #i105826#: reset (may be re-initialization)
if ( !vec.empty() )
{
createUserDefined();
}
// user-defined meta data: initialize PropertySet from DOM nodes
-
for (std::vector<css::uno::Reference<css::xml::dom::XNode> >::iterator
it = vec.begin(); it != vec.end(); ++it) {
css::uno::Reference<css::xml::dom::XElement> xElem(*it,
@@ -1301,10 +1303,14 @@ void SAL_CALL SfxDocumentMetaData::init(
////////////////////////////////////////////////////////////////////////////
SfxDocumentMetaData::SfxDocumentMetaData(
- css::uno::Reference< css::uno::XComponentContext > const & context) :
- BaseMutex(), SfxDocumentMetaData_Base(m_aMutex),
- m_xContext(context), m_NotifyListeners(m_aMutex),
- m_isInitialized(false), m_isModified(false)
+ css::uno::Reference< css::uno::XComponentContext > const & context)
+ : BaseMutex()
+ , SfxDocumentMetaData_Base(m_aMutex)
+ , m_xContext(context)
+ , m_NotifyListeners(m_aMutex)
+ , m_isInitialized(false)
+ , m_isModified(false)
+ , m_AutoloadSecs(0)
{
DBG_ASSERT(context.is(), "SfxDocumentMetaData: context is null");
DBG_ASSERT(context->getServiceManager().is(),
@@ -2168,7 +2174,7 @@ void SAL_CALL SfxDocumentMetaData::setModified( ::sal_Bool bModified )
::osl::MutexGuard g(m_aMutex);
checkInit();
m_isModified = bModified;
- if ( !bModified )
+ if ( !bModified && m_xUserDefined.is() )
{
xMB.set(m_xUserDefined, css::uno::UNO_QUERY);
DBG_ASSERT(xMB.is(),
@@ -2241,6 +2247,8 @@ void SAL_CALL SfxDocumentMetaData::serialize(
void SfxDocumentMetaData::createUserDefined()
{
+ // user-defined meta data: create PropertyBag which only accepts property
+ // values of allowed types
if ( !m_xUserDefined.is() )
{
css::uno::Sequence<css::uno::Type> types(10);
@@ -2258,29 +2266,37 @@ void SfxDocumentMetaData::createUserDefined()
args[0] <<= css::beans::NamedValue(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllowedTypes")),
css::uno::makeAny(types));
- // #i94175#: ODF 1.1 allows empty user-defined property names!
- args[1] <<= css::beans::NamedValue(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AllowEmptyPropertyName")),
+ // #i94175#: ODF allows empty user-defined property names!
+ args[1] <<= css::beans::NamedValue( ::rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("AllowEmptyPropertyName")),
css::uno::makeAny(sal_True));
- css::uno::Reference<css::lang::XMultiComponentFactory> xMsf (m_xContext->getServiceManager());
+ const css::uno::Reference<css::lang::XMultiComponentFactory> xMsf(
+ m_xContext->getServiceManager());
m_xUserDefined.set(
- xMsf->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.PropertyBag")), m_xContext),
+ xMsf->createInstanceWithContext(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.beans.PropertyBag")), m_xContext),
css::uno::UNO_QUERY_THROW);
- css::uno::Reference<css::lang::XInitialization> xInit(m_xUserDefined,
- css::uno::UNO_QUERY);
+ const css::uno::Reference<css::lang::XInitialization> xInit(
+ m_xUserDefined, css::uno::UNO_QUERY);
if (xInit.is()) {
xInit->initialize(args);
}
- css::uno::Reference<css::util::XModifyBroadcaster> xMB(m_xUserDefined,css::uno::UNO_QUERY);
- if (xMB.is())
+ const css::uno::Reference<css::util::XModifyBroadcaster> xMB(
+ m_xUserDefined, css::uno::UNO_QUERY);
+ if (xMB.is())
{
- css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > aListener = m_NotifyListeners.getElements();
- const css::uno::Reference< css::uno::XInterface >* pIter = aListener.getConstArray();
- const css::uno::Reference< css::uno::XInterface >* pEnd = pIter + aListener.getLength();
- for(;pIter != pEnd;++pIter )
- xMB->addModifyListener(css::uno::Reference< css::util::XModifyListener >(*pIter,css::uno::UNO_QUERY));
+ const css::uno::Sequence<css::uno::Reference<css::uno::XInterface> >
+ listeners(m_NotifyListeners.getElements());
+ for (css::uno::Reference< css::uno::XInterface > const * iter =
+ ::comphelper::stl_begin(listeners);
+ iter != ::comphelper::stl_end(listeners); ++iter) {
+ xMB->addModifyListener(
+ css::uno::Reference< css::util::XModifyListener >(*iter,
+ css::uno::UNO_QUERY));
+ }
}
}
}
diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx
index 830b27d900..28c0760ddf 100644
--- a/sfx2/source/doc/docvor.cxx
+++ b/sfx2/source/doc/docvor.cxx
@@ -1188,7 +1188,7 @@ void SfxOrganizeListBox_Impl::RequestingChilds( SvLBoxEntry* pEntry )
// einfuegen
BmpColorMode eColorMode = BMP_COLOR_NORMAL;
- if ( GetDisplayBackground().GetColor().IsDark() )
+ if ( GetSettings().GetStyleSettings().GetHighContrastMode() )
eColorMode = BMP_COLOR_HIGHCONTRAST;
@@ -1480,7 +1480,7 @@ const Image &SfxOrganizeListBox_Impl::GetClosedBmp(USHORT nLevel) const
*/
{
- BOOL bHC = GetBackground().GetColor().IsDark();
+ BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
const Image* pRet = NULL;
switch( nLevel )
@@ -1514,7 +1514,7 @@ const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(USHORT nLevel) const
*/
{
- BOOL bHC = GetBackground().GetColor().IsDark();
+ BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
const Image* pRet = NULL;
switch( nLevel )
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index 1974c4e59a..50eaf3d549 100644
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -451,7 +451,7 @@ SfxAppMenuControl_Impl::SfxAppMenuControl_Impl(
// Determine the current background color setting for menus
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
m_nSymbolsStyle = rSettings.GetSymbolsStyle();
- m_bWasHiContrastMode = rSettings.GetMenuColor().IsDark();
+ m_bWasHiContrastMode = rSettings.GetHighContrastMode();
m_bShowMenuImages = rSettings.GetUseImagesInMenus();
Reference<com::sun::star::lang::XMultiServiceFactory> aXMultiServiceFactory(::comphelper::getProcessServiceFactory());
@@ -477,7 +477,7 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu )
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
ULONG nSymbolsStyle = rSettings.GetSymbolsStyle();
- BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark();
+ BOOL bIsHiContrastMode = rSettings.GetHighContrastMode();
BOOL bShowMenuImages = rSettings.GetUseImagesInMenus();
if (( nSymbolsStyle != m_nSymbolsStyle ) ||
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index 5c42c0ef42..9c251c0456 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -336,11 +336,7 @@ SfxVirtualMenu::~SfxVirtualMenu()
BOOL SfxVirtualMenu::IsHiContrastMode() const
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- Color aMenuColor = rSettings.GetMenuColor();
- if ( aMenuColor.IsDark() )
- return TRUE;
- else
- return FALSE;
+ return rSettings.GetHighContrastMode();
}
//--------------------------------------------------------------------
diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx
index f69afa02fc..c634009ed3 100644
--- a/sfx2/source/toolbox/imgmgr.cxx
+++ b/sfx2/source/toolbox/imgmgr.cxx
@@ -229,7 +229,7 @@ void SfxImageManager_Impl::SetSymbolsSize_Impl( sal_Int16 nNewSymbolsSize )
if ( pInf->nFlags & SFX_TOOLBOX_CHANGESYMBOLSET )
{
ToolBox *pBox = pInf->pToolBox;
- BOOL bHiContrast = pBox->GetBackground().GetColor().IsDark();
+ BOOL bHiContrast = pBox->GetSettings().GetStyleSettings().GetHighContrastMode();
USHORT nCount = pBox->GetItemCount();
for ( USHORT nPos=0; nPos<nCount; nPos++ )
{
@@ -424,6 +424,6 @@ void SfxImageManager::SetImagesForceSize( ToolBox& rToolBox, BOOL bHiContrast, B
void SfxImageManager::SetImages( ToolBox& rToolBox )
{
BOOL bLarge = ( pImp->m_nSymbolsSize == SFX_SYMBOLS_SIZE_LARGE );
- BOOL bHiContrast = rToolBox.GetBackground().GetColor().IsDark();
+ BOOL bHiContrast = rToolBox.GetSettings().GetStyleSettings().GetHighContrastMode();
SetImagesForceSize( rToolBox, bHiContrast, bLarge );
}
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index f0efa2da90..417ec9bf44 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -1529,7 +1529,7 @@ SfxAppToolBoxControl_Impl::SfxAppToolBoxControl_Impl( USHORT nSlotId, USHORT nId
// Determine the current background color of the menus
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
m_nSymbolsStyle = rSettings.GetSymbolsStyle();
- m_bWasHiContrastMode = rSettings.GetMenuColor().IsDark();
+ m_bWasHiContrastMode = rSettings.GetHighContrastMode();
m_bShowMenuImages = rSettings.GetUseImagesInMenus();
SetImage( String() );
@@ -1654,7 +1654,7 @@ void SfxAppToolBoxControl_Impl::SetImage( const String &rURL )
aURL = sFallback;
BOOL bBig = SvtMiscOptions().AreCurrentSymbolsLarge();
- BOOL bHC = GetToolBox().GetBackground().GetColor().IsDark();
+ BOOL bHC = GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode();
Image aImage = SvFileInformationManager::GetImageNoDefault( INetURLObject( aURL ), bBig, bHC );
if ( !aImage )
aImage = !!aMenuImage ? aMenuImage :
@@ -1805,7 +1805,7 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu )
{
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
ULONG nSymbolsStyle = rSettings.GetSymbolsStyle();
- BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark();
+ BOOL bIsHiContrastMode = rSettings.GetHighContrastMode();
BOOL bShowMenuImages = rSettings.GetUseImagesInMenus();
if (( nSymbolsStyle != m_nSymbolsStyle ) ||
diff --git a/shell/source/backends/kdebe/makefile.mk b/shell/source/backends/kdebe/makefile.mk
index 8bc0b475be..6159be6be1 100644
--- a/shell/source/backends/kdebe/makefile.mk
+++ b/shell/source/backends/kdebe/makefile.mk
@@ -77,11 +77,11 @@ SHL1OBJS=$(SLOFILES)
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
SHL1IMPLIB=i$(SHL1TARGET)
+SHL1LINKFLAGS+=$(KDE_LIBS) -lkio
SHL1STDLIBS= \
$(CPPUHELPERLIB) \
$(CPPULIB) \
- $(SALLIB) \
- $(KDE_LIBS) -lkio
+ $(SALLIB)
SHL1VERSIONMAP=exports.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
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/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/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/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/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/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/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..ce2ae1563f 100644
--- a/svx/source/cui/numpages.cxx
+++ b/svx/source/cui/numpages.cxx
@@ -378,18 +378,12 @@ int SvxSingleNumPickTabPage::DeactivatePage(SfxItemSet *_pSet)
void SvxSingleNumPickTabPage::Reset( const SfxItemSet& rSet )
{
- const SfxPoolItem* pItem;
-// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
- //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
- SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
- if(eState != SFX_ITEM_SET)
- {
- nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
- eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
- }
- DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
+ nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE;
+
+ const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+
delete pSaveNum;
- pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+ pSaveNum = new SvxNumRule(*rItem.GetNumRule());
if(!pActNum)
pActNum = new SvxNumRule(*pSaveNum);
@@ -570,17 +564,12 @@ int SvxBulletPickTabPage::DeactivatePage(SfxItemSet *_pSet)
void SvxBulletPickTabPage::Reset( const SfxItemSet& rSet )
{
- const SfxPoolItem* pItem;
- //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
- SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
- if(eState != SFX_ITEM_SET)
- {
- nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
- eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
- }
- DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
+ nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE;
+
+ const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+
delete pSaveNum;
- pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+ pSaveNum = new SvxNumRule(*rItem.GetNumRule());
// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
@@ -800,17 +789,12 @@ int SvxNumPickTabPage::DeactivatePage(SfxItemSet *_pSet)
void SvxNumPickTabPage::Reset( const SfxItemSet& rSet )
{
- const SfxPoolItem* pItem;
- //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
- SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
- if(eState != SFX_ITEM_SET)
- {
- nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
- eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
- }
- DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
+ nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE;
+
+ const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+
delete pSaveNum;
- pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+ pSaveNum = new SvxNumRule(*rItem.GetNumRule());
// nActNumLvl = ((SwNumBulletTabDialog*)GetTabDialog())->GetActNumLevel();
if(!pActNum)
@@ -1105,17 +1089,12 @@ BOOL SvxBitmapPickTabPage::FillItemSet( SfxItemSet& rSet )
void SvxBitmapPickTabPage::Reset( const SfxItemSet& rSet )
{
- const SfxPoolItem* pItem;
- //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
- SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
- if(eState != SFX_ITEM_SET)
- {
- nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
- eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
- }
- DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
+ nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE;
+
+ const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+
delete pSaveNum;
- pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+ pSaveNum = new SvxNumRule(*rItem.GetNumRule());
if(!pActNum)
pActNum = new SvxNumRule(*pSaveNum);
@@ -1537,17 +1516,12 @@ BOOL SvxNumOptionsTabPage::FillItemSet( SfxItemSet& rSet )
--------------------------------------------------*/
void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
{
- const SfxPoolItem* pItem;
- //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
- SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
- if(eState != SFX_ITEM_SET)
- {
- nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
- eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
- }
- DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
+ nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE;
+
+ const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+
delete pSaveNum;
- pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+ pSaveNum = new SvxNumRule(*rItem.GetNumRule());
// Ebenen einfuegen
if(!aLevelLB.GetEntryCount())
@@ -1591,6 +1565,7 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
pPreviewWIN->SetNumRule(pActNum);
aSameLevelCB.Check(pActNum->IsContinuousNumbering());
+ const SfxPoolItem* pItem = 0;
//ColorListBox bei Bedarf fuellen
if ( pActNum->IsFeatureSupported( NUM_BULLET_COLOR ) )
{
@@ -3434,17 +3409,12 @@ BOOL SvxNumPositionTabPage::FillItemSet( SfxItemSet& rSet )
--------------------------------------------------*/
void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet )
{
- const SfxPoolItem* pItem;
- //im Draw gibt es das Item als WhichId, im Writer nur als SlotId
- SfxItemState eState = rSet.GetItemState(SID_ATTR_NUMBERING_RULE, FALSE, &pItem);
- if(eState != SFX_ITEM_SET)
- {
- nNumItemId = rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE);
- eState = rSet.GetItemState(nNumItemId, FALSE, &pItem);
- }
- DBG_ASSERT(eState == SFX_ITEM_SET, "kein Item gefunden!");
+ nNumItemId = rSet.GetPool() ? rSet.GetPool()->GetWhich( SID_ATTR_NUMBERING_RULE ) : SID_ATTR_NUMBERING_RULE;
+
+ const SvxNumBulletItem& rItem = static_cast< const SvxNumBulletItem& >( rSet.Get( nNumItemId, TRUE ) );
+
delete pSaveNum;
- pSaveNum = new SvxNumRule(*((SvxNumBulletItem*)pItem)->GetNumRule());
+ pSaveNum = new SvxNumRule(*rItem.GetNumRule());
// Ebenen einfuegen
if(!aLevelLB.GetEntryCount())
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/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/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/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/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/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/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index dbee37d04b..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;
@@ -5016,16 +5016,16 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
ApplyAttributes( rSt, aSet, aObjData );
pRet->SetMergedItemSet(aSet);
}
- else if ( aObjData.eShapeType == mso_sptLine )
- {
- basegfx::B2DPolygon aPoly;
- aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top()));
- aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom()));
- pRet = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly));
- pRet->SetModel( pSdrModel );
- ApplyAttributes( rSt, aSet, aObjData );
- pRet->SetMergedItemSet(aSet);
- }
+ else if ( aObjData.eShapeType == mso_sptLine )
+ {
+ basegfx::B2DPolygon aPoly;
+ aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top()));
+ aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom()));
+ pRet = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly));
+ pRet->SetModel( pSdrModel );
+ ApplyAttributes( rSt, aSet, aObjData );
+ pRet->SetMergedItemSet(aSet);
+ }
else
{
if ( GetCustomShapeContent( aObjData.eShapeType ) || IsProperty( DFF_Prop_pVertices ) )
@@ -7099,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;
}
@@ -8184,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/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/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..31fe3da220 100644
--- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
+++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx
@@ -370,6 +370,9 @@ namespace sdr
OverlayManager::ImpDrawMembers(aBufferRememberedRangeLogic, getOutputDevice());
}
+ // #i80730# removed: VCL hack for transparent child windows
+ // No longer needed, checked in DEV300 m54
+
// #i80730# restore visibility of VCL cursor
if(bCursorWasEnabled)
{
diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
index e38cb57378..93e8b3a6e7 100644
--- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
@@ -68,7 +68,20 @@ namespace drawinglayer
// add shadow
if(aRetval.hasElements() && getSdrSTAttribute().getShadow())
{
- aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow());
+ // #i105323# add generic shadow only for 2D shapes. For
+ // 3D shapes shadow will be set at the individual created
+ // visualisation objects and be visualized by the 3d renderer
+ // as a single shadow.
+ //
+ // The shadow for AutoShapes could be handled uniformely by not setting any
+ // shadow items at the helper model objects and only adding shadow here for
+ // 2D and 3D (and it works, too), but this would lead to two 3D scenes for
+ // the 3D object; one for the shadow aond one for the content. The one for the
+ // shadow will be correct (using ColorModifierStack), but expensive.
+ if(!get3DShape())
+ {
+ aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow());
+ }
}
return aRetval;
@@ -79,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)
{
}
@@ -99,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/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
index 9d58a01d55..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
@@ -278,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
@@ -294,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));
}
}
@@ -312,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/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/sdrrectangleprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrrectangleprimitive2d.cxx
index 209684653a..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
@@ -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/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/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/svdfppt.cxx b/svx/source/svdraw/svdfppt.cxx
index dbf535ba0a..0ecf714548 100644
--- a/svx/source/svdraw/svdfppt.cxx
+++ b/svx/source/svdraw/svdfppt.cxx
@@ -7662,7 +7662,7 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
}
}
-SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTableArry, SvxMSDffSolverContainer* pSolverContainer ) const
+SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTableArry, SvxMSDffSolverContainer* pSolverContainer )
{
SdrObject* pRet = pGroup;
sal_uInt32 nRows = pTableArry[ 1 ];
@@ -7786,6 +7786,15 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
pTable->uno_unlock();
pTable->SetSnapRect( pGroup->GetSnapRect() );
pRet = pTable;
+
+ //Remove Objects from shape map
+ SdrObjListIter aIter( *pGroup, IM_DEEPWITHGROUPS );
+ while( aIter.IsMore() )
+ {
+ SdrObject* pPartObj = aIter.Next();
+ removeShapeId( pPartObj );
+ }
+
SdrObject::Free( pGroup );
}
catch( Exception& )
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/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/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx
index 80d5114e09..fc4be63462 100644
--- a/ucb/source/ucp/odma/odma_content.cxx
+++ b/ucb/source/ucp/odma/odma_content.cxx
@@ -565,7 +565,7 @@ uno::Any SAL_CALL Content::execute(
ODM_DELETE,
lpszNewDocId);
- delete lpszNewDocId;
+ delete [] lpszNewDocId;
}
if(bError)
ucbhelper::cancelCommandExecution(
diff --git a/ucb/source/ucp/odma/odma_datasupplier.cxx b/ucb/source/ucp/odma/odma_datasupplier.cxx
index ad1d6151e2..a047921752 100644
--- a/ucb/source/ucp/odma/odma_datasupplier.cxx
+++ b/ucb/source/ucp/odma/odma_datasupplier.cxx
@@ -329,10 +329,10 @@ sal_Bool DataSupplier::getResult( sal_uInt32 nIndex )
// now close the query
odm = NODMQueryClose(ContentProvider::getHandle(), pQueryId);
- delete lpszDMSList;
- delete pQueryId;
- delete lpszDocId;
- delete lpszDocName;
+ delete [] lpszDMSList;
+ delete [] pQueryId;
+ delete [] lpszDocId;
+ delete [] lpszDocName;
if ( !bFound )
m_pImpl->m_bCountFinal = sal_True;
diff --git a/ucb/source/ucp/odma/odma_provider.cxx b/ucb/source/ucp/odma/odma_provider.cxx
index a124ff077b..988af49933 100644
--- a/ucb/source/ucp/odma/odma_provider.cxx
+++ b/ucb/source/ucp/odma/odma_provider.cxx
@@ -230,7 +230,7 @@ uno::Reference< ucb::XContent > SAL_CALL ContentProvider::queryContent(
aProp->m_sContentType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODMA_CONTENT_TYPE));
append(aProp);
}
- delete lpszDocName;
+ delete [] lpszDocName;
}
else // we got an already fetched name here so look for it
{
@@ -298,11 +298,11 @@ void ContentProvider::saveDocument(const ::rtl::OString& _sDocumentId)
OSL_ENSURE(odm == ODM_SUCCESS,"Could not save document!");
if(odm != ODM_SUCCESS)
{
- delete lpszDocId;
+ delete [] lpszDocId;
throw uno::Exception();
}
aIter->second->m_sDocumentId = rtl::OString(lpszDocId);
- delete lpszDocId;
+ delete [] lpszDocId;
}
}
// -----------------------------------------------------------------------------
@@ -414,7 +414,7 @@ void ContentProvider::fillDocumentProperties(const ::rtl::Reference<ContentPrope
lpszDocInfo,
ODM_DOCID_MAX);
*/
- delete lpszDocInfo;
+ delete [] lpszDocInfo;
}
// -----------------------------------------------------------------------------
void ContentProvider::append(const ::rtl::Reference<ContentProperties>& _rProp)
@@ -482,16 +482,16 @@ void ContentProvider::append(const ::rtl::Reference<ContentProperties>& _rProp)
}
while(nCount > nMaxCount);
- delete lpszDocInfo;
- delete lpszDocId;
- delete lpszDocName;
+ delete [] lpszDocInfo;
+ delete [] lpszDocId;
+ delete [] lpszDocName;
}
// now close the query
odm = NODMQueryClose(ContentProvider::getHandle(), pQueryId);
- delete pQueryId;
+ delete [] pQueryId;
}
- delete lpszDMSList;
+ delete [] lpszDMSList;
return aReturn;
@@ -547,11 +547,11 @@ void ContentProvider::append(const ::rtl::Reference<ContentProperties>& _rProp)
_rProp->m_bIsOpen = sal_True;
break;
default:
- delete pFileName;
+ delete [] pFileName;
throw uno::Exception(); // TODO give a more precise error message here
}
- delete pFileName;
+ delete [] pFileName;
}
return _rProp->m_sFileURL;
}
diff --git a/xmlhelp/source/com/sun/star/help/makefile.mk b/xmlhelp/source/com/sun/star/help/makefile.mk
index 1e1a2c518f..db6e619b31 100644
--- a/xmlhelp/source/com/sun/star/help/makefile.mk
+++ b/xmlhelp/source/com/sun/star/help/makefile.mk
@@ -58,8 +58,6 @@ CFLAGS+=-DSYSTEM_EXPAT
JAVACLASSFILES = \
- $(SOLARBINDIR)$/help$/$(PACKAGE)$/HelpIndexerTool.class \
- $(SOLARBINDIR)$/help$/$(PACKAGE)$/HelpFileDocument.class \
$(CLASSDIR)$/$(PACKAGE)$/HelpSearch.class \
$(CLASSDIR)$/$(PACKAGE)$/HelpComponent.class \
$(CLASSDIR)$/$(PACKAGE)$/HelpIndexer.class
@@ -75,9 +73,7 @@ TRANSEX3FILES = \
ADDFILES = $(subst,$(SOLARBINDIR)$/help,$(CLASSDIR) $(TRANSEX3FILES))
-#JAVAFILES = $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES)))
-
-JARFILES = ridl.jar jurt.jar unoil.jar juh.jar HelpIndexerTool.jar
+JARFILES = ridl.jar jurt.jar unoil.jar juh.jar
.IF "$(SYSTEM_LUCENE)" == "YES"
XCLASSPATH!:=$(XCLASSPATH)$(PATH_SEPERATOR)$(LUCENE_CORE_JAR)$(PATH_SEPERATOR)$(LUCENE_ANALYZERS_JAR)
COMP=fix_system_lucene
@@ -96,6 +92,7 @@ CUSTOMMANIFESTFILE = MANIFEST.MF
ALLTAR : $(ADDFILES)
.IF "$(JARTARGETN)"!=""
+$(JAVATARGET) : $(ADDFILES)
$(JARTARGETN) : $(ADDFILES)
$(JARTARGETN) : $(COMP)
.ENDIF
diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx
index cf4b66225c..917673d06d 100644
--- a/xmloff/source/script/XMLEventExport.cxx
+++ b/xmloff/source/script/XMLEventExport.cxx
@@ -341,6 +341,11 @@ const XMLEventNameTranslation aStandardEventTable[] =
{ "OnSaveToFailed", XML_NAMESPACE_OFFICE, "save-to-failed" },
{ "OnSubComponentOpened", XML_NAMESPACE_OFFICE, "subcomponent-opened" },
{ "OnSubComponentClosed", XML_NAMESPACE_OFFICE, "subcomponent-closed" },
+ { "OnStorageChanged", XML_NAMESPACE_OFFICE, "storage-changed" },
+ { "OnMailMergeFinished", XML_NAMESPACE_OFFICE, "mail-merge-finished" },
+ { "OnFieldMerge", XML_NAMESPACE_OFFICE, "field-merge" },
+ { "OnFieldMergeFinished", XML_NAMESPACE_OFFICE, "field-merge-finished" },
+ { "OnLayoutFinished", XML_NAMESPACE_OFFICE, "layout-finished" },
{ NULL, 0, 0 }
};