summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-11-11 18:24:14 +0100
committerAndras Timar <atimar@suse.com>2012-11-11 18:24:14 +0100
commit06ec1c089519ef3249464aa09eadf03a8db93a39 (patch)
tree85b2eb6d8ba6ca95e18e1ff82151224cb14106f6 /svx
parent8e0d67bed54633d555a4601a5d79e2d5ba7ab2bb (diff)
parent3f899eae02eaad0b967de749fe09b869ba93ad6d (diff)
Merge branch 'master' into feature/killsdf
Conflicts: Repository.mk RepositoryFixes.mk connectivity/prj/build.lst extensions/prj/build.lst filter/prj/build.lst fpicker/prj/build.lst l10ntools/StaticLibrary_transex.mk saxon/build.xml shell/prj/build.lst solenv/gbuild/AllLangResTarget.mk solenv/gbuild/Configuration.mk solenv/gbuild/UI.mk ucb/source/ucp/webdav/webdavcontent.cxx
Diffstat (limited to 'svx')
-rw-r--r--svx/Library_svxcore.mk1
-rw-r--r--svx/Package_inc.mk2
-rw-r--r--svx/inc/svx/charthelper.hxx52
-rw-r--r--svx/inc/svx/checklbx.hxx4
-rw-r--r--svx/inc/svx/ctredlin.hxx20
-rw-r--r--svx/inc/svx/dialogs.hrc45
-rw-r--r--svx/inc/svx/fontlb.hxx12
-rw-r--r--svx/inc/svx/msdffdef.hxx41
-rw-r--r--svx/inc/svx/numvset.hxx9
-rw-r--r--svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx41
-rw-r--r--svx/inc/svx/simptabl.hxx4
-rw-r--r--svx/inc/svx/svdhdl.hxx2
-rw-r--r--svx/inc/svx/svdmrkv.hxx2
-rw-r--r--svx/inc/svx/svdoashp.hxx4
-rw-r--r--svx/inc/svx/svdobj.hxx45
-rw-r--r--svx/inc/svx/svdograf.hxx50
-rw-r--r--svx/inc/svx/svdstr.hrc48
-rw-r--r--svx/inc/svx/svdxcgv.hxx43
-rw-r--r--svx/inc/svx/svxdlg.hxx2
-rw-r--r--svx/inc/svx/unoshprp.hxx54
-rw-r--r--svx/inc/svx/xattr.hxx44
-rw-r--r--svx/inc/svx/xdef.hxx40
-rw-r--r--svx/inc/svx/xlncapit.hxx55
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx12
-rw-r--r--svx/source/dialog/_bmpmask.cxx40
-rw-r--r--svx/source/dialog/checklbx.cxx14
-rw-r--r--svx/source/dialog/ctredlin.cxx28
-rw-r--r--svx/source/dialog/docrecovery.cxx85
-rw-r--r--svx/source/dialog/fntctrl.cxx90
-rw-r--r--svx/source/dialog/fontlb.cxx14
-rw-r--r--svx/source/dialog/langbox.cxx3
-rw-r--r--svx/source/dialog/simptabl.cxx8
-rw-r--r--svx/source/dialog/srchdlg.cxx6
-rw-r--r--svx/source/dialog/svxbmpnumvalueset.cxx38
-rw-r--r--svx/source/fmcomp/gridcell.cxx6
-rw-r--r--svx/source/fmcomp/gridctrl.cxx28
-rw-r--r--svx/source/form/datanavi.cxx44
-rw-r--r--svx/source/form/filtnav.cxx95
-rw-r--r--svx/source/form/fmexch.cxx16
-rw-r--r--svx/source/form/fmshimp.cxx10
-rw-r--r--svx/source/form/fmsrcimp.cxx14
-rw-r--r--svx/source/form/formcontroller.cxx3
-rw-r--r--svx/source/form/navigatortree.cxx92
-rw-r--r--svx/source/form/sqlparserclient.cxx6
-rw-r--r--svx/source/form/tabwin.cxx4
-rw-r--r--svx/source/inc/datanavi.hxx10
-rw-r--r--svx/source/inc/docrecovery.hxx34
-rw-r--r--svx/source/inc/filtnav.hxx20
-rw-r--r--svx/source/inc/fmexch.hxx18
-rw-r--r--svx/source/inc/fmexpl.hxx30
-rw-r--r--svx/source/inc/fmservs.hxx1
-rw-r--r--svx/source/inc/gridcell.hxx2
-rw-r--r--svx/source/inc/sqlparserclient.hxx4
-rw-r--r--svx/source/sdr/attribute/sdrformtextattribute.cxx49
-rw-r--r--svx/source/sdr/contact/viewcontactofgraphic.cxx48
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrole2obj.cxx109
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx164
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx45
-rw-r--r--svx/source/sdr/primitive2d/sdrdecompositiontools.cxx39
-rw-r--r--svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx45
-rw-r--r--svx/source/smarttags/SmartTagMgr.cxx6
-rw-r--r--svx/source/src/errtxt.src4
-rw-r--r--svx/source/svdraw/ActionDescriptionProvider.cxx6
-rw-r--r--svx/source/svdraw/charthelper.cxx137
-rw-r--r--svx/source/svdraw/svddrgmt.cxx51
-rw-r--r--svx/source/svdraw/svdedtv.cxx61
-rw-r--r--svx/source/svdraw/svdedtv2.cxx100
-rw-r--r--svx/source/svdraw/svdfmtf.cxx74
-rw-r--r--svx/source/svdraw/svdfmtf.hxx39
-rw-r--r--svx/source/svdraw/svdhdl.cxx6
-rw-r--r--svx/source/svdraw/svdmrkv.cxx19
-rw-r--r--svx/source/svdraw/svdoashp.cxx27
-rw-r--r--svx/source/svdraw/svdobj.cxx52
-rw-r--r--svx/source/svdraw/svdograf.cxx358
-rw-r--r--svx/source/svdraw/svdoole2.cxx6
-rw-r--r--svx/source/svdraw/svdorect.cxx54
-rw-r--r--svx/source/svdraw/svdotextpathdecomposition.cxx12
-rw-r--r--svx/source/svdraw/svdstr.src56
-rw-r--r--svx/source/svdraw/svdxcgv.cxx90
-rw-r--r--svx/source/table/tablertfimporter.cxx2
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx41
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx3
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx18
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx4
-rw-r--r--svx/source/unodraw/recoveryui.cxx7
-rw-r--r--svx/source/unodraw/unoshap2.cxx51
-rw-r--r--svx/source/unodraw/unoshape.cxx12
-rw-r--r--svx/source/unodraw/unoshtxt.cxx18
-rw-r--r--svx/source/xml/xmlexport.cxx9
-rw-r--r--svx/source/xml/xmlgrhlp.cxx43
-rw-r--r--svx/source/xml/xmlxtexp.cxx10
-rw-r--r--svx/source/xoutdev/xattr2.cxx182
-rw-r--r--svx/source/xoutdev/xpool.cxx41
-rw-r--r--svx/workben/msview/msview.cxx39
94 files changed, 1958 insertions, 1574 deletions
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index ec1b98f5bc0d..486d4cca2b14 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -249,6 +249,7 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\
svx/source/sdr/properties/e3dcompoundproperties \
svx/source/sdr/properties/oleproperties \
svx/source/svdraw/clonelist \
+ svx/source/svdraw/charthelper \
svx/source/svdraw/gradtrns \
svx/source/svdraw/polypolygoneditor \
svx/source/svdraw/sdrhittesthelper \
diff --git a/svx/Package_inc.mk b/svx/Package_inc.mk
index 392dcab57e26..62c13f87a6d1 100644
--- a/svx/Package_inc.mk
+++ b/svx/Package_inc.mk
@@ -57,6 +57,7 @@ $(eval $(call gb_Package_add_file,svx_inc,inc/svx/ucsubset.hxx,svx/ucsubset.hxx)
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/sderitm.hxx,svx/sderitm.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/obj3d.hxx,svx/obj3d.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/dbcharsethelper.hxx,svx/dbcharsethelper.hxx))
+$(eval $(call gb_Package_add_file,svx_inc,inc/svx/charthelper.hxx,svx/charthelper.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdangitm.hxx,svx/sdangitm.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/grfcrop.hxx,svx/grfcrop.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/sxtraitm.hxx,svx/sxtraitm.hxx))
@@ -401,6 +402,7 @@ $(eval $(call gb_Package_add_file,svx_inc,inc/svx/svxgrahicitem.hxx,svx/svxgrahi
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/xflbstit.hxx,svx/xflbstit.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/galbrws.hxx,svx/galbrws.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/unomod.hxx,svx/unomod.hxx))
+$(eval $(call gb_Package_add_file,svx_inc,inc/svx/xlncapit.hxx,svx/xlncapit.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/xlnclit.hxx,svx/xlnclit.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/deflt3d.hxx,svx/deflt3d.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/e3dundo.hxx,svx/e3dundo.hxx))
diff --git a/svx/inc/svx/charthelper.hxx b/svx/inc/svx/charthelper.hxx
new file mode 100644
index 000000000000..3b43c4bb7f10
--- /dev/null
+++ b/svx/inc/svx/charthelper.hxx
@@ -0,0 +1,52 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef CHARTHELPER_HXX
+#define CHARTHELPER_HXX
+
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <basegfx/range/b2drange.hxx>
+#include <svx/svxdllapi.h>
+#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+namespace svt { class EmbeddedObjectRef; }
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SVX_DLLPUBLIC ChartHelper
+{
+public:
+ // test if given reference is a chart
+ static bool IsChart(const svt::EmbeddedObjectRef& xObjRef);
+
+ // try to access rXModel in case of a chart to to get the chart content
+ // as sequence of primitives. Return range of primitives (chart size) in rRange;
+ // it will be used to embed the chart to the SdrObject transformation. This
+ // allows to define possible distances between chart and SDrObject bounds here
+ static drawinglayer::primitive2d::Primitive2DSequence tryToGetChartContentAsPrimitive2DSequence(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rXModel,
+ basegfx::B2DRange& rRange);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //CHARTHELPER_HXX
diff --git a/svx/inc/svx/checklbx.hxx b/svx/inc/svx/checklbx.hxx
index 1e977ddeff83..a2c62540fc8f 100644
--- a/svx/inc/svx/checklbx.hxx
+++ b/svx/inc/svx/checklbx.hxx
@@ -49,7 +49,7 @@ private:
using SvTreeListBox::InsertEntry;
// Avoid ambiguity with new InsertEntry:
- virtual SvLBoxEntry* InsertEntry( const XubString& rText, SvLBoxEntry* pParent,
+ virtual SvTreeListEntry* InsertEntry( const XubString& rText, SvTreeListEntry* pParent,
sal_Bool bChildrenOnDemand,
sal_uIntPtr nPos, void* pUserData,
SvLBoxButtonKind eButtonKind );
@@ -75,7 +75,7 @@ public:
sal_uInt16 GetCheckedEntryCount() const;
void CheckEntryPos ( sal_uInt16 nPos, sal_Bool bCheck = sal_True );
sal_Bool IsChecked ( sal_uInt16 nPos ) const;
- void ToggleCheckButton ( SvLBoxEntry* pEntry );
+ void ToggleCheckButton ( SvTreeListEntry* pEntry );
void* SetEntryData ( sal_uInt16 nPos, void* pNewData );
void* GetEntryData ( sal_uInt16 nPos ) const;
diff --git a/svx/inc/svx/ctredlin.hxx b/svx/inc/svx/ctredlin.hxx
index 64348d9bbfc1..2eabe080f7a2 100644
--- a/svx/inc/svx/ctredlin.hxx
+++ b/svx/inc/svx/ctredlin.hxx
@@ -67,7 +67,7 @@ public:
void* pData;
};
-class SvxRedlinEntry : public SvLBoxEntry
+class SvxRedlinEntry : public SvTreeListEntry
{
public:
SvxRedlinEntry();
@@ -82,12 +82,12 @@ private:
Color aPrivColor;
public:
- SvLBoxColorString( SvLBoxEntry*,sal_uInt16 nFlags,const XubString& rStr,
+ SvLBoxColorString( SvTreeListEntry*,sal_uInt16 nFlags,const XubString& rStr,
const Color& rCol);
SvLBoxColorString();
~SvLBoxColorString();
- void Paint( const Point&, SvTreeListBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* );
+ void Paint( const Point&, SvTreeListBox& rDev, sal_uInt16 nFlags,SvTreeListEntry* );
SvLBoxItem* Create() const;
};
@@ -115,8 +115,8 @@ private:
protected:
- virtual StringCompare ColCompare(SvLBoxEntry*,SvLBoxEntry*);
- virtual void InitEntry(SvLBoxEntry*,const XubString&,const Image&,const Image&,SvLBoxButtonKind);
+ virtual StringCompare ColCompare(SvTreeListEntry*,SvTreeListEntry*);
+ virtual void InitEntry(SvTreeListEntry*, const OUString&, const Image&, const Image&, SvLBoxButtonKind);
@@ -148,14 +148,14 @@ public:
sal_Bool IsValidComment(const String* pComment);
// }
- SvLBoxEntry* InsertEntry(const String& ,RedlinData *pUserData,
- SvLBoxEntry* pParent=NULL,sal_uIntPtr nPos=LIST_APPEND);
+ SvTreeListEntry* InsertEntry(const String& ,RedlinData *pUserData,
+ SvTreeListEntry* pParent=NULL,sal_uIntPtr nPos=LIST_APPEND);
- SvLBoxEntry* InsertEntry(const String& ,RedlinData *pUserData,const Color&,
- SvLBoxEntry* pParent=NULL,sal_uIntPtr nPos=LIST_APPEND);
+ SvTreeListEntry* InsertEntry(const String& ,RedlinData *pUserData,const Color&,
+ SvTreeListEntry* pParent=NULL,sal_uIntPtr nPos=LIST_APPEND);
- virtual SvLBoxEntry* CreateEntry() const;
+ virtual SvTreeListEntry* CreateEntry() const;
void SetColCompareHdl(const Link& rLink ) { aColCompareLink = rLink; }
const Link& GetColCompareHdl() const { return aColCompareLink; }
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index d5fa1b3bee1b..714106525ffa 100644
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
@@ -1,29 +1,21 @@
-/*************************************************************************
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _SVX_DIALOGS_HRC
#define _SVX_DIALOGS_HRC
@@ -466,6 +458,11 @@
#define RID_SVXSTR_TBLAFMT_YELLOW (RID_SVX_START + 575)
#define RID_SVXSTR_TBLAFMT_END (RID_SVX_START + 576)
+// string resources for XLineCap item
+#define RID_SVXSTR_LINECAP_BUTT (RID_SVX_START + 586 )
+#define RID_SVXSTR_LINECAP_ROUND (RID_SVX_START + 587 )
+#define RID_SVXSTR_LINECAP_SQUARE (RID_SVX_START + 588 )
+
// string resources for XLineJoint item
#define RID_SVXSTR_LINEJOINT_NONE RID_SVXSTR_NONE
#define RID_SVXSTR_LINEJOINT_MIDDLE (RID_SVX_START + 589 )
@@ -1030,3 +1027,5 @@
#define RID_SVXSTR_DOC_LOAD (SVX_OOO_BUILD_START + 6)
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/svx/fontlb.hxx b/svx/inc/svx/fontlb.hxx
index dad16fa35218..5781e3a93a86 100644
--- a/svx/inc/svx/fontlb.hxx
+++ b/svx/inc/svx/fontlb.hxx
@@ -46,7 +46,7 @@ private:
public:
SvLBoxFontString();
SvLBoxFontString(
- SvLBoxEntry* pEntry,
+ SvTreeListEntry* pEntry,
sal_uInt16 nFlags,
const XubString& rString,
const Font& rFont,
@@ -57,14 +57,14 @@ public:
/** Creates a new empty list box item. */
virtual SvLBoxItem* Create() const;
- void InitViewData( SvTreeListBox*,SvLBoxEntry*,SvViewDataItem* );
+ void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* );
/** Paints this entry to the specified position, using the own font settings. */
void Paint(
const Point& rPos,
SvTreeListBox& rDev,
sal_uInt16 nFlags,
- SvLBoxEntry* pEntry );
+ SvTreeListEntry* pEntry );
};
@@ -103,11 +103,11 @@ protected:
/** Initializes a new SvLBoxFontString entry.
@descr Uses current value of maEntryFont to set the entry font (if mbUseFont is true). */
virtual void InitEntry(
- SvLBoxEntry* pEntry,
- const XubString& rEntryText,
+ SvTreeListEntry* pEntry,
+ const OUString& rEntryText,
const Image& rCollImg,
const Image& rExpImg,
- SvLBoxButtonKind eButtonKind );
+ SvLBoxButtonKind eButtonKind);
};
// ============================================================================
diff --git a/svx/inc/svx/msdffdef.hxx b/svx/inc/svx/msdffdef.hxx
index 016197f83dc4..e0b1b10aeede 100644
--- a/svx/inc/svx/msdffdef.hxx
+++ b/svx/inc/svx/msdffdef.hxx
@@ -1,35 +1,25 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _MSDFFDEF_HXX
#define _MSDFFDEF_HXX
-
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/gen.hxx>
@@ -579,6 +569,9 @@ enum DFF_TextHeader {
#define DFF_PBit_Hidden 0x00000002
#define DFF_PBit_Print 0x00000001
+// properties of the second property set
+#define DFF_Prop_metroBlob 937 // XML ZipPackage*
+
//---------------------------------------------------------------------------
// linchpin: the shape type
//---------------------------------------------------------------------------
diff --git a/svx/inc/svx/numvset.hxx b/svx/inc/svx/numvset.hxx
index 546644490226..030f0231b47f 100644
--- a/svx/inc/svx/numvset.hxx
+++ b/svx/inc/svx/numvset.hxx
@@ -64,8 +64,12 @@ class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet
com::sun::star::uno::Sequence<
com::sun::star::uno::Reference<
com::sun::star::container::XIndexAccess> > aOutlineSettings;
+
+ void init(sal_uInt16 nType);
+
public:
SvxNumValueSet( Window* pParent, const ResId& rResId, sal_uInt16 nType );
+ SvxNumValueSet( Window* pParent, WinBits nWinStyle, sal_uInt16 nType );
~SvxNumValueSet();
virtual void UserDraw( const UserDrawEvent& rUDEvt );
@@ -92,6 +96,8 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
Timer aFormatTimer;
sal_Bool bGrfNotFound;
+ void init();
+
protected:
DECL_LINK(FormatHdl_Impl, void *);
@@ -101,7 +107,8 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet
Timer& GetFormatTimer() {return aFormatTimer;}
public:
- SvxBmpNumValueSet( Window* pParent, const ResId& rResId);
+ SvxBmpNumValueSet(Window* pParent, const ResId& rResId);
+ SvxBmpNumValueSet(Window* pParent, WinBits nWinStyle);
~SvxBmpNumValueSet();
virtual void UserDraw( const UserDrawEvent& rUDEvt );
diff --git a/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx b/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx
index 3581179a3204..fb97f3e49884 100644
--- a/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx
+++ b/svx/inc/svx/sdr/contact/viewcontactofsdrole2obj.hxx
@@ -1,35 +1,27 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX
#define _SDR_CONTACT_VIEWCONTACTOFSDROLE2OBJ_HXX
#include <svx/sdr/contact/viewcontactofsdrrectobj.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
//////////////////////////////////////////////////////////////////////////////
// predeclarations
@@ -57,6 +49,9 @@ namespace sdr
return (SdrOle2Obj&)GetSdrObject();
}
+ /// helper to create transformation from SdrObject
+ basegfx::B2DHomMatrix createObjectTransform() const;
+
// basic constructor, used from SdrObject.
explicit ViewContactOfSdrOle2Obj(SdrOle2Obj& rOle2Obj);
virtual ~ViewContactOfSdrOle2Obj();
diff --git a/svx/inc/svx/simptabl.hxx b/svx/inc/svx/simptabl.hxx
index b12314f3da6e..89093d62f84a 100644
--- a/svx/inc/svx/simptabl.hxx
+++ b/svx/inc/svx/simptabl.hxx
@@ -96,7 +96,7 @@ protected:
virtual void Command( const CommandEvent& rCEvt );
- virtual StringCompare ColCompare(SvLBoxEntry*,SvLBoxEntry*);
+ virtual StringCompare ColCompare(SvTreeListEntry*,SvTreeListEntry*);
public:
SvxSimpleTable(SvxSimpleTableContainer& rParent, WinBits nBits = WB_BORDER);
@@ -139,7 +139,7 @@ public:
void SortByCol(sal_uInt16,sal_Bool bDir=sal_True);
sal_Bool GetSortDirection(){ return bSortDirection;}
sal_uInt16 GetSortedCol(){ return nSortCol;}
- SvLBoxItem* GetEntryAtPos( SvLBoxEntry* pEntry, sal_uInt16 nPos ) const;
+ SvLBoxItem* GetEntryAtPos( SvTreeListEntry* pEntry, sal_uInt16 nPos ) const;
CommandEvent GetCommandEvent()const;
inline sal_Bool IsFocusOnCellEnabled() const { return IsCellFocusEnabled(); }
diff --git a/svx/inc/svx/svdhdl.hxx b/svx/inc/svx/svdhdl.hxx
index 3a44b927fb20..10fcc84a9c98 100644
--- a/svx/inc/svx/svdhdl.hxx
+++ b/svx/inc/svx/svdhdl.hxx
@@ -480,7 +480,7 @@ public:
// 3.Level Position (x+y)
void Sort();
sal_uIntPtr GetHdlCount() const { return aList.size(); }
- SdrHdl* GetHdl(sal_uIntPtr nNum) const { return aList[nNum]; }
+ SdrHdl* GetHdl(sal_uIntPtr nNum) const { return nNum != CONTAINER_ENTRY_NOTFOUND ? aList[nNum] : NULL; }
sal_uIntPtr GetHdlNum(const SdrHdl* pHdl) const;
void SetHdlSize(sal_uInt16 nSiz);
sal_uInt16 GetHdlSize() const { return nHdlSize; }
diff --git a/svx/inc/svx/svdmrkv.hxx b/svx/inc/svx/svdmrkv.hxx
index 37c31345e4eb..944d3bdab432 100644
--- a/svx/inc/svx/svdmrkv.hxx
+++ b/svx/inc/svx/svdmrkv.hxx
@@ -53,6 +53,7 @@
#define SDRSEARCH_MARKED 0x0400 /* Nur markierte Objekte/Punkte/... */
#define SDRSEARCH_PASS2BOUND 0x0800 /* Wenn nix gefunden, dann neuer 2. Versuch mit BoundRectHit */
#define SDRSEARCH_PASS3NEAREST 0x1000 /* Wenn nix gefunden, dann neuer 3. Versuch mit NearestBoundRectHit */
+#define SDRSEARCH_BEFOREMARK 0x2000 /* if one marked one found, ignore all behind that */
#define SDRSEARCH_PICKMARKABLE (SDRSEARCH_TESTMARKABLE)
#define SDRSEARCH_PICKTEXTEDIT (SDRSEARCH_DEEP|SDRSEARCH_TESTMARKABLE|SDRSEARCH_TESTTEXTEDIT)
@@ -181,6 +182,7 @@ protected:
//HMHvoid ImpShowMarkHdl(bool bNoRefHdl);
virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uIntPtr nOptions, const SetOfByte* pMVisLay) const;
virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, sal_uIntPtr nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const;
+ virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, sal_uIntPtr nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj,const SdrMarkList * pMarkList) const;
sal_Bool ImpIsFrameHandles() const;
void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, String& rStr, sal_uInt16 nVal=0, sal_uInt16 nOpt=0) const;
diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx
index 8b91894485c5..efbfac201292 100644
--- a/svx/inc/svx/svdoashp.hxx
+++ b/svx/inc/svx/svdoashp.hxx
@@ -101,10 +101,12 @@ public:
com::sun::star::uno::Reference< com::sun::star::drawing::XShape > mXRenderedCustomShape;
+ mutable com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeEngine > mxCustomShapeEngine;
+
// #i37011# render geometry shadow
SdrObject* mpLastShadowGeometry;
- static com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeEngine > GetCustomShapeEngine( const SdrObjCustomShape* pCustomShape );
+ com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeEngine > GetCustomShapeEngine() const;
// SVX_DLLPRIVATE com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::drawing::XCustomShapeHandle > >
// SdrObjCustomShape::GetInteraction( const SdrObjCustomShape* pCustomShape ) const;
diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx
index 6c5b67b05f02..ed32170d36db 100644
--- a/svx/inc/svx/svdobj.hxx
+++ b/svx/inc/svx/svdobj.hxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _SVDOBJ_HXX
#define _SVDOBJ_HXX
@@ -932,7 +923,13 @@ public:
// Bei der Konvertierung von TextObj nach PathObj wird es wohl so sein,
// dass beide Modi (bLineToArea=true/false) identisch sind.
// Defaulted sind diese Methoden auf "Ich kann das nicht" (FALSE/NULL).
- virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier) const;
+ virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier /*, bool bAddText */) const;
+#ifdef FIXME_REMOVE_WHEN_RE_BASE_COMPLETE
+ SdrObject* DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const
+ {
+ return DoConvertToPolyObj(sal_Bool bBezier);
+ }
+#endif
SdrObject* ConvertToPolyObj(bool bBezier, bool bLineToArea) const;
// convert this path object to contour object; bForceLineDash converts even
diff --git a/svx/inc/svx/svdograf.hxx b/svx/inc/svx/svdograf.hxx
index eb2235f995e3..77db13a75521 100644
--- a/svx/inc/svx/svdograf.hxx
+++ b/svx/inc/svx/svdograf.hxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _SVDOGRAF_HXX
#define _SVDOGRAF_HXX
@@ -106,6 +97,7 @@ private:
rtl::OUString aFileName; // Wenn es sich um einen Link handelt, steht hier der Dateiname drin.
rtl::OUString aFilterName;
GraphicObject* pGraphic; // Zur Beschleunigung von Bitmapausgaben, besonders von gedrehten.
+ GraphicObject* mpReplacementGraphic;
SdrGraphicLink* pGraphicLink; // Und hier noch ein Pointer fuer gelinkte Grafiken
bool bMirrored:1; // True bedeutet, die Grafik ist horizontal, d.h. ueber die Y-Achse gespiegelt auszugeben.
@@ -135,6 +127,7 @@ public:
void SetGraphicObject( const GraphicObject& rGrfObj );
const GraphicObject& GetGraphicObject(bool bForceSwapIn = false) const;
+ const GraphicObject* GetReplacementGraphicObject() const;
void NbcSetGraphic(const Graphic& rGrf);
void SetGraphic(const Graphic& rGrf);
@@ -148,8 +141,6 @@ public:
// Keep ATM for SD.
bool IsAnimated() const;
bool IsEPS() const;
- bool IsRenderGraphic() const;
- bool HasRenderGraphic() const;
bool IsSwappedOut() const;
const MapMode& GetGrafPrefMapMode() const;
@@ -200,7 +191,14 @@ public:
virtual void SetPage(SdrPage* pNewPage);
virtual void SetModel(SdrModel* pNewModel);
- virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier) const;
+ bool isEmbeddedSvg() const;
+ GDIMetaFile getMetafileFromEmbeddedSvg() const;
+
+#ifdef FIXME_REMOVE_WHEN_RE_BASE_COMPLETE
+ virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier, bool bAddText) const
+#else
+ virtual SdrObject* DoConvertToPolyObj(sal_Bool bBezier /*, bool bAddText */) const;
+#endif
virtual void AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly = false );
diff --git a/svx/inc/svx/svdstr.hrc b/svx/inc/svx/svdstr.hrc
index e23cfbad5853..a78d88dfdb2d 100644
--- a/svx/inc/svx/svdstr.hrc
+++ b/svx/inc/svx/svdstr.hrc
@@ -1,29 +1,21 @@
-/*************************************************************************
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#define SDR_ResourceBegin 2560
@@ -183,7 +175,13 @@
#define STR_ObjNameSingulFONTWORK (STR_ObjNameBegin+145)
#define STR_ObjNamePluralFONTWORK (STR_ObjNameBegin+146)
-#define STR_ObjNameEnd (STR_ObjNamePluralFONTWORK)
+
+// Svg support
+#define STR_ObjNameSingulGRAFSVG (STR_ObjNameBegin + 147)
+#define STR_ObjNamePluralGRAFSVG (STR_ObjNameBegin + 148)
+
+#define STR_ObjNameEnd (STR_ObjNamePluralGRAFSVG)
+
#define STR_EditBegin (STR_ObjNameEnd+1)
#define STR_EditWithCopy (STR_EditBegin + 0)
#define STR_EditPosSize (STR_EditBegin + 1)
@@ -716,3 +714,5 @@
#define STR_TABLE_STYLE (SIP_Begin + 274)
#define STR_TABLE_STYLE_SETTINGS (SIP_Begin + 275)
#define SIP_SA_CROP_MARKERS (SIP_Begin + 276)
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/inc/svx/svdxcgv.hxx b/svx/inc/svx/svdxcgv.hxx
index 30fe9df55e14..4918df0c16ad 100644
--- a/svx/inc/svx/svdxcgv.hxx
+++ b/svx/inc/svx/svdxcgv.hxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _SVDXCGV_HXX
#define _SVDXCGV_HXX
@@ -73,11 +64,11 @@ public:
// Alle markierten Objekte in ein Metafile stecken. Z.Zt. noch etwas
// buggee (Offset..., Fremdgrafikobjekte (SdrGrafObj), Virtuelle
// Objektkopien (SdrVirtObj) mit Ankerpos<>(0,0)).
- virtual GDIMetaFile GetMarkedObjMetaFile(sal_Bool bNoVDevIfOneMtfMarked=sal_False) const;
+ GDIMetaFile GetMarkedObjMetaFile(bool bNoVDevIfOneMtfMarked = false) const;
// Alle markierten Objekte auf eine Bitmap malen. Diese hat die Farbtiefe
// und Aufloesung des Bildschirms.
- virtual Bitmap GetMarkedObjBitmap(sal_Bool bNoVDevIfOneBmpMarked=sal_False) const;
+ BitmapEx GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked = false) const;
// Alle markierten Objekte in ein neues Model kopieren. Dieses neue Model
// hat dann genau eine Page. Das Flag PageNotValid an diesem Model ist
@@ -91,8 +82,6 @@ public:
// der Default-Layer zugewiesen (Layer 0, (dokumentglobaler Standardlayer).
virtual SdrModel* GetMarkedObjModel() const;
- GDIMetaFile GetAllMarkedMetaFile(sal_Bool bNoVDevIfOneMtfMarked=sal_False) const { return GetMarkedObjMetaFile(bNoVDevIfOneMtfMarked); }
- Bitmap GetAllMarkedBitmap(sal_Bool bNoVDevIfOneBmpMarked=sal_False) const { return GetMarkedObjBitmap(bNoVDevIfOneBmpMarked); }
Graphic GetAllMarkedGraphic() const;
SdrModel* GetAllMarkedModel() const { return GetMarkedObjModel(); }
diff --git a/svx/inc/svx/svxdlg.hxx b/svx/inc/svx/svxdlg.hxx
index fdb75d346a8c..05c952d2e959 100644
--- a/svx/inc/svx/svxdlg.hxx
+++ b/svx/inc/svx/svxdlg.hxx
@@ -429,7 +429,7 @@ public:
SfxBindings* pBindings,
sal_uInt32 nResId)=0;
virtual AbstractFmSearchDialog* CreateFmSearchDialog(Window* pParent, //add for FmSearchDialog
- const String& strInitialText,
+ const OUString& strInitialText,
const ::std::vector< String >& _rContexts,
sal_Int16 nInitialContext,
const Link& lnkContextSupplier)=0;
diff --git a/svx/inc/svx/unoshprp.hxx b/svx/inc/svx/unoshprp.hxx
index 8fee2c1165be..1d4f72cfb06d 100644
--- a/svx/inc/svx/unoshprp.hxx
+++ b/svx/inc/svx/unoshprp.hxx
@@ -1,30 +1,22 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
#ifndef _SVX_UNOSHPRP_HXX
#define _SVX_UNOSHPRP_HXX
@@ -37,6 +29,7 @@
#include <com/sun/star/awt/Gradient.hpp>
#include <com/sun/star/drawing/Hatch.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/LineCap.hpp>
#include <com/sun/star/drawing/LineDash.hpp>
#include <com/sun/star/drawing/LineJoint.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
@@ -129,6 +122,9 @@
#define OWN_ATTR_TRANSFORMATION (OWN_ATTR_VALUE_START+46)
#define OWN_ATTR_BASE_GEOMETRY (OWN_ATTR_VALUE_START+47)
+/// reuse attr slots for GraphicObject which will never be used together with graphic object
+#define OWN_ATTR_REPLACEMENTGRAFURL (OWN_ATTR_VALUE_START+14)
+
#define OWN_ATTR_APPLET_DOCBASE (OWN_ATTR_VALUE_START+48)
#define OWN_ATTR_APPLET_CODEBASE (OWN_ATTR_VALUE_START+49)
#define OWN_ATTR_APPLET_NAME (OWN_ATTR_VALUE_START+50)
@@ -216,6 +212,7 @@
{ MAP_CHAR_LEN(UNO_NAME_SHADOWYDIST), SDRATTR_SHADOWYDIST, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM},
#define LINE_PROPERTIES_DEFAULTS\
+ { MAP_CHAR_LEN(UNO_NAME_LINECAP), XATTR_LINECAP, &::getCppuType((const ::com::sun::star::drawing::LineCap*)0), 0, 0}, \
{ MAP_CHAR_LEN(UNO_NAME_LINECOLOR), XATTR_LINECOLOR, &::getCppuType((const sal_Int32*)0) , 0, 0}, \
{ MAP_CHAR_LEN(UNO_NAME_LINEENDCENTER), XATTR_LINEENDCENTER, &::getBooleanCppuType() , 0, 0}, \
{ MAP_CHAR_LEN(UNO_NAME_LINEENDWIDTH), XATTR_LINEENDWIDTH, &::getCppuType((const sal_Int32*)0) , 0, SFX_METRIC_ITEM}, \
@@ -423,11 +420,12 @@
#define SPECIAL_GRAPHOBJ_PROPERTIES \
SPECIAL_GRAPHOBJ_PROPERTIES_DEFAULTS \
- { MAP_CHAR_LEN(UNO_NAME_GRAPHIC_GRAPHICCROP), SDRATTR_GRAFCROP , &::getCppuType((const ::com::sun::star::text::GraphicCrop*)0), 0, 0 }, \
- { MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAFURL), OWN_ATTR_GRAFURL , &::getCppuType((const ::rtl::OUString*)0), 0, 0 }, \
- { MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAFSTREAMURL),OWN_ATTR_GRAFSTREAMURL , &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, \
- { MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_FILLBITMAP), OWN_ATTR_VALUE_FILLBITMAP , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap>*)0) , 0, 0}, \
- { MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAPHIC), OWN_ATTR_VALUE_GRAPHIC , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic>*)0) , 0, 0},
+ { MAP_CHAR_LEN(UNO_NAME_GRAPHIC_GRAPHICCROP), SDRATTR_GRAFCROP , &::getCppuType((const ::com::sun::star::text::GraphicCrop*)0), 0, 0 }, \
+ { MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAFURL), OWN_ATTR_GRAFURL , &::getCppuType((const ::rtl::OUString*)0), 0, 0 }, \
+ { MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_REPLACEMENTGRAFURL), OWN_ATTR_REPLACEMENTGRAFURL , &::getCppuType((const ::rtl::OUString*)0), 0, 0 }, \
+ { MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAFSTREAMURL), OWN_ATTR_GRAFSTREAMURL , &::getCppuType((const ::rtl::OUString*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, \
+ { MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_FILLBITMAP), OWN_ATTR_VALUE_FILLBITMAP , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XBitmap>*)0) , 0, 0}, \
+ { MAP_CHAR_LEN(UNO_NAME_GRAPHOBJ_GRAPHIC), OWN_ATTR_VALUE_GRAPHIC , &::getCppuType((const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic>*)0) , 0, 0},
#define SPECIAL_3DSCENEOBJECT_PROPERTIES_DEFAULTS \
diff --git a/svx/inc/svx/xattr.hxx b/svx/inc/svx/xattr.hxx
index dad046eb93fb..d3d1a1b6e057 100644
--- a/svx/inc/svx/xattr.hxx
+++ b/svx/inc/svx/xattr.hxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _XATTR_HXX
#define _XATTR_HXX
@@ -40,6 +31,7 @@
#include <svx/xtextit0.hxx>
#include <svx/xsetit.hxx>
#include <svx/xlinjoit.hxx>
+#include <svx/xlncapit.hxx>
#endif // _XATTR_HXX
diff --git a/svx/inc/svx/xdef.hxx b/svx/inc/svx/xdef.hxx
index beaaa8a38179..a148f1ecdc78 100644
--- a/svx/inc/svx/xdef.hxx
+++ b/svx/inc/svx/xdef.hxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
+/*
+ * This file is part of the LibreOffice project.
*
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
+ * This file incorporates work covered by the following license notice:
*
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _XDEF_HXX
#define _XDEF_HXX
@@ -55,7 +46,8 @@
#define XATTR_LINEENDCENTER (XATTR_LINE_FIRST + 9) /* V3: 1009 V2: 1009 */
#define XATTR_LINETRANSPARENCE (XATTR_LINE_FIRST + 10) /* V3: 1010 V2: 1010 */
#define XATTR_LINEJOINT (XATTR_LINE_FIRST + 11) /* V3: 1011 V2: 1011 */
-#define XATTR_LINE_LAST XATTR_LINEJOINT
+#define XATTR_LINECAP (XATTR_LINE_FIRST + 12) /* V3: 1012 */
+#define XATTR_LINE_LAST XATTR_LINECAP
#define XATTRSET_LINE (XATTR_LINE_LAST + 1) /* V3: 1017 V2: 1017 */
#define XATTR_FILL_FIRST (XATTRSET_LINE + 1) /* V3: 1018 V2: 1018 */
diff --git a/svx/inc/svx/xlncapit.hxx b/svx/inc/svx/xlncapit.hxx
new file mode 100644
index 000000000000..b43b6c83a49f
--- /dev/null
+++ b/svx/inc/svx/xlncapit.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _SVX_XLNCAPIT_HXX
+#define _SVX_XLNCAPIT_HXX
+
+#include <svx/svxdllapi.h>
+#include <svl/eitem.hxx>
+#include <svx/xenum.hxx>
+#include <com/sun/star/drawing/LineCap.hpp>
+
+//---------------------
+// class LineStyleItem
+//---------------------
+
+class SVX_DLLPUBLIC XLineCapItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+ XLineCapItem(com::sun::star::drawing::LineCap eLineCap = com::sun::star::drawing::LineCap_BUTT);
+ XLineCapItem(SvStream& rIn);
+
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream& rIn, sal_uInt16 nVer ) const;
+
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual sal_uInt16 GetValueCount() const;
+ com::sun::star::drawing::LineCap GetValue() const;
+};
+
+#endif // _SVX_XLNCAPIT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index da4394481002..f46c72e9e67c 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -56,6 +56,7 @@
#include <numeric>
#include <algorithm>
#include <comphelper/processfactory.hxx>
+#include <com/sun/star/i18n/BreakIterator.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -833,19 +834,14 @@ SdrObject* CreateSdrObjectFromParagraphOutlines( const FWData& rFWData, const Sd
return pRet;
}
-::com::sun::star::uno::Reference < ::com::sun::star::i18n::XBreakIterator > EnhancedCustomShapeFontWork::mxBreakIterator = 0;
+Reference < i18n::XBreakIterator > EnhancedCustomShapeFontWork::mxBreakIterator = 0;
Reference < i18n::XBreakIterator > EnhancedCustomShapeFontWork::GetBreakIterator()
{
if ( !mxBreakIterator.is() )
{
- Reference< lang::XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- Reference < XInterface > xI = xMSF->createInstance( rtl::OUString("com.sun.star.i18n.BreakIterator") );
- if ( xI.is() )
- {
- Any x = xI->queryInterface( ::getCppuType((const Reference< i18n::XBreakIterator >*)0) );
- x >>= mxBreakIterator;
- }
+ Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
+ mxBreakIterator = i18n::BreakIterator::create(xContext);
}
return mxBreakIterator;
}
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 3213c01d230e..34e9a951dffd 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <vcl/wrkwin.hxx>
#include <tools/shl.hxx>
@@ -1002,9 +993,6 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
default:
{
- OSL_ENSURE( pAction->GetType() != META_RENDERGRAPHIC_ACTION,
- "META_RENDERGRAPHIC_ACTION currently not supported at masking" );
-
pAction->Duplicate();
aMtf.AddAction( pAction );
}
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx
index a6b79d060870..92f46498a434 100644
--- a/svx/source/dialog/checklbx.cxx
+++ b/svx/source/dialog/checklbx.cxx
@@ -111,7 +111,7 @@ void SvxCheckListBox::SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect )
sal_uInt16 SvxCheckListBox::GetSelectEntryPos() const
{
- SvLBoxEntry* pEntry = GetCurEntry();
+ SvTreeListEntry* pEntry = GetCurEntry();
if ( pEntry )
return (sal_uInt16)GetModel()->GetAbsPos( pEntry );
@@ -122,7 +122,7 @@ sal_uInt16 SvxCheckListBox::GetSelectEntryPos() const
String SvxCheckListBox::GetText( sal_uInt16 nPos ) const
{
- SvLBoxEntry* pEntry = GetEntry( nPos );
+ SvTreeListEntry* pEntry = GetEntry( nPos );
if ( pEntry )
return GetEntryText( pEntry );
@@ -190,7 +190,7 @@ void* SvxCheckListBox::GetEntryData( sal_uInt16 nPos ) const
// -----------------------------------------------------------------------
-void SvxCheckListBox::ToggleCheckButton( SvLBoxEntry* pEntry )
+void SvxCheckListBox::ToggleCheckButton( SvTreeListEntry* pEntry )
{
if ( pEntry )
{
@@ -208,7 +208,7 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.IsLeft() )
{
const Point aPnt = rMEvt.GetPosPixel();
- SvLBoxEntry* pEntry = GetEntry( aPnt );
+ SvTreeListEntry* pEntry = GetEntry( aPnt );
if ( pEntry )
{
@@ -228,7 +228,7 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt )
// check if the entry below the mouse changed during the base method call. This is possible if,
// for instance, a handler invoked by the base class tampers with the list entries.
- const SvLBoxEntry* pNewEntry = GetEntry( aPnt );
+ const SvTreeListEntry* pNewEntry = GetEntry( aPnt );
if ( pNewEntry != pEntry )
return;
@@ -249,7 +249,7 @@ void SvxCheckListBox::KeyInput( const KeyEvent& rKEvt )
if ( rKey.GetCode() == KEY_RETURN || rKey.GetCode() == KEY_SPACE )
{
- SvLBoxEntry* pEntry = GetCurEntry();
+ SvTreeListEntry* pEntry = GetCurEntry();
if ( pEntry )
{
@@ -265,7 +265,7 @@ void SvxCheckListBox::KeyInput( const KeyEvent& rKEvt )
// -----------------------------------------------------------------------
-SvLBoxEntry* SvxCheckListBox::InsertEntry( const XubString& rText, SvLBoxEntry* pParent, sal_Bool bChildrenOnDemand, sal_uIntPtr nPos, void* pUserData, SvLBoxButtonKind eButtonKind )
+SvTreeListEntry* SvxCheckListBox::InsertEntry( const XubString& rText, SvTreeListEntry* pParent, sal_Bool bChildrenOnDemand, sal_uIntPtr nPos, void* pUserData, SvLBoxButtonKind eButtonKind )
{
return SvTreeListBox::InsertEntry( rText, pParent, bChildrenOnDemand, nPos, pUserData, eButtonKind );
}
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index e1600455b8e2..0b106cc48e84 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -77,7 +77,7 @@ RedlinData::~RedlinData()
//----------------------------------------------------------------------------
SvxRedlinEntry::SvxRedlinEntry()
- :SvLBoxEntry()
+ :SvTreeListEntry()
{
}
@@ -94,7 +94,7 @@ SvxRedlinEntry::~SvxRedlinEntry()
DBG_NAME(SvLBoxColorString);
-SvLBoxColorString::SvLBoxColorString( SvLBoxEntry*pEntry,sal_uInt16 nFlags,const XubString& rStr,
+SvLBoxColorString::SvLBoxColorString( SvTreeListEntry*pEntry,sal_uInt16 nFlags,const XubString& rStr,
const Color& rCol)
: SvLBoxString( pEntry, nFlags, rStr )
@@ -122,7 +122,7 @@ SvLBoxItem* SvLBoxColorString::Create() const
}
void SvLBoxColorString::Paint( const Point& rPos, SvTreeListBox& rDev,
- sal_uInt16 nFlags, SvLBoxEntry* pEntry )
+ sal_uInt16 nFlags, SvTreeListEntry* pEntry )
/* [Description]
Paint function of the SvLBoxColorString class. The relevant text with the
@@ -166,7 +166,7 @@ SvxRedlinTable::~SvxRedlinTable()
delete pCommentSearcher;
}
-StringCompare SvxRedlinTable::ColCompare(SvLBoxEntry* pLeft,SvLBoxEntry* pRight)
+StringCompare SvxRedlinTable::ColCompare(SvTreeListEntry* pLeft,SvTreeListEntry* pRight)
{
StringCompare eCompare=COMPARE_EQUAL;
@@ -387,8 +387,8 @@ sal_Bool SvxRedlinTable::IsValidComment(const String* pCommentStr)
return nTheFlag;
}
-SvLBoxEntry* SvxRedlinTable::InsertEntry(const String& rStr,RedlinData *pUserData,
- SvLBoxEntry* pParent,sal_uIntPtr nPos)
+SvTreeListEntry* SvxRedlinTable::InsertEntry(const String& rStr,RedlinData *pUserData,
+ SvTreeListEntry* pParent,sal_uIntPtr nPos)
{
aEntryColor=GetTextColor();
if(pUserData!=NULL)
@@ -414,8 +414,8 @@ SvLBoxEntry* SvxRedlinTable::InsertEntry(const String& rStr,RedlinData *pUserDat
}
-SvLBoxEntry* SvxRedlinTable::InsertEntry(const String& rStr,RedlinData *pUserData,const Color& aColor,
- SvLBoxEntry* pParent,sal_uIntPtr nPos)
+SvTreeListEntry* SvxRedlinTable::InsertEntry(const String& rStr,RedlinData *pUserData,const Color& aColor,
+ SvTreeListEntry* pParent,sal_uIntPtr nPos)
{
aEntryColor=aColor;
@@ -435,13 +435,13 @@ SvLBoxEntry* SvxRedlinTable::InsertEntry(const String& rStr,RedlinData *pUserDat
return SvxSimpleTable::InsertEntry( aFirstStr, pParent, sal_False, nPos, pUserData );
}
-SvLBoxEntry* SvxRedlinTable::CreateEntry() const
+SvTreeListEntry* SvxRedlinTable::CreateEntry() const
{
return new SvxRedlinEntry;
}
-void SvxRedlinTable::InitEntry( SvLBoxEntry* pEntry, const XubString& rStr,
- const Image& rColl, const Image& rExp, SvLBoxButtonKind eButtonKind )
+void SvxRedlinTable::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr,
+ const Image& rColl, const Image& rExp, SvLBoxButtonKind eButtonKind)
{
SvLBoxButton* pButton;
SvLBoxString* pString;
@@ -462,9 +462,9 @@ void SvxRedlinTable::InitEntry( SvLBoxEntry* pEntry, const XubString& rStr,
XubString aToken;
- xub_Unicode* pCurToken = (xub_Unicode*)aCurEntry.GetBuffer();
+ sal_Unicode* pCurToken = (sal_Unicode*)aCurEntry.GetBuffer();
sal_uInt16 nCurTokenLen;
- xub_Unicode* pNextToken = (xub_Unicode*)GetToken( pCurToken, nCurTokenLen );
+ sal_Unicode* pNextToken = (sal_Unicode*)GetToken( pCurToken, nCurTokenLen );
sal_uInt16 nCount = TabCount(); nCount--;
for( sal_uInt16 nToken = 0; nToken < nCount; nToken++ )
@@ -479,7 +479,7 @@ void SvxRedlinTable::InitEntry( SvLBoxEntry* pEntry, const XubString& rStr,
pCurToken = pNextToken;
if( pCurToken )
- pNextToken = (xub_Unicode*)GetToken( pCurToken, nCurTokenLen );
+ pNextToken = (sal_Unicode*)GetToken( pCurToken, nCurTokenLen );
else
nCurTokenLen = 0;
}
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index 621c928dc6f0..ba62dd19e5e8 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -53,9 +53,10 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/util/URL.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
+#include <com/sun/star/frame/AutoRecovery.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
+#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <osl/file.hxx>
@@ -134,9 +135,9 @@ short TabDialog4Recovery::Execute()
}
//===============================================
-RecoveryCore::RecoveryCore(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR ,
- sal_Bool bUsedForSaving)
- : m_xSMGR ( xSMGR )
+RecoveryCore::RecoveryCore(const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+ sal_Bool bUsedForSaving)
+ : m_xContext ( rxContext )
, m_pListener ( 0 )
, m_bListenForSaving(bUsedForSaving)
{
@@ -150,9 +151,9 @@ RecoveryCore::~RecoveryCore()
}
//===============================================
-css::uno::Reference< css::lang::XMultiServiceFactory > RecoveryCore::getSMGR()
+css::uno::Reference< css::uno::XComponentContext > RecoveryCore::getComponentContext()
{
- return m_xSMGR;
+ return m_xContext;
}
//===============================================
@@ -211,9 +212,9 @@ sal_Bool RecoveryCore::isBrokenTempEntry(const TURLInfo& rInfo)
}
//===============================================
-void RecoveryCore::saveBrokenTempEntries(const ::rtl::OUString& sPath)
+void RecoveryCore::saveBrokenTempEntries(const OUString& rPath)
{
- if (sPath.isEmpty())
+ if (rPath.isEmpty())
return;
if (!m_xRealCore.is())
@@ -225,7 +226,7 @@ void RecoveryCore::saveBrokenTempEntries(const ::rtl::OUString& sPath)
lCopyArgs[0].Name = PROP_DISPATCHASYNCHRON;
lCopyArgs[0].Value <<= sal_False;
lCopyArgs[1].Name = PROP_SAVEPATH;
- lCopyArgs[1].Value <<= sPath;
+ lCopyArgs[1].Value <<= rPath;
lCopyArgs[2].Name = PROP_ENTRYID;
// lCopyArgs[2].Value will be changed during next loop ...
@@ -249,9 +250,9 @@ void RecoveryCore::saveBrokenTempEntries(const ::rtl::OUString& sPath)
}
//===============================================
-void RecoveryCore::saveAllTempEntries(const ::rtl::OUString& sPath)
+void RecoveryCore::saveAllTempEntries(const OUString& rPath)
{
- if (sPath.isEmpty())
+ if (rPath.isEmpty())
return;
if (!m_xRealCore.is())
@@ -263,7 +264,7 @@ void RecoveryCore::saveAllTempEntries(const ::rtl::OUString& sPath)
lCopyArgs[0].Name = PROP_DISPATCHASYNCHRON;
lCopyArgs[0].Value <<= sal_False;
lCopyArgs[1].Name = PROP_SAVEPATH;
- lCopyArgs[1].Value <<= sPath;
+ lCopyArgs[1].Value <<= rPath;
lCopyArgs[2].Name = PROP_ENTRYID;
// lCopyArgs[2].Value will be changed during next loop ...
@@ -506,12 +507,12 @@ void SAL_CALL RecoveryCore::statusChanged(const css::frame::FeatureStateEvent& a
aNew.ID = lInfo.getUnpackedValueOrDefault(STATEPROP_ID , (sal_Int32)0 );
aNew.DocState = lInfo.getUnpackedValueOrDefault(STATEPROP_STATE , (sal_Int32)0 );
- aNew.OrgURL = lInfo.getUnpackedValueOrDefault(STATEPROP_ORGURL , ::rtl::OUString());
- aNew.TempURL = lInfo.getUnpackedValueOrDefault(STATEPROP_TEMPURL , ::rtl::OUString());
- aNew.FactoryURL = lInfo.getUnpackedValueOrDefault(STATEPROP_FACTORYURL , ::rtl::OUString());
- aNew.TemplateURL = lInfo.getUnpackedValueOrDefault(STATEPROP_TEMPLATEURL, ::rtl::OUString());
- aNew.DisplayName = lInfo.getUnpackedValueOrDefault(STATEPROP_TITLE , ::rtl::OUString());
- aNew.Module = lInfo.getUnpackedValueOrDefault(STATEPROP_MODULE , ::rtl::OUString());
+ aNew.OrgURL = lInfo.getUnpackedValueOrDefault(STATEPROP_ORGURL , OUString());
+ aNew.TempURL = lInfo.getUnpackedValueOrDefault(STATEPROP_TEMPURL , OUString());
+ aNew.FactoryURL = lInfo.getUnpackedValueOrDefault(STATEPROP_FACTORYURL , OUString());
+ aNew.TemplateURL = lInfo.getUnpackedValueOrDefault(STATEPROP_TEMPLATEURL, OUString());
+ aNew.DisplayName = lInfo.getUnpackedValueOrDefault(STATEPROP_TITLE , OUString());
+ aNew.Module = lInfo.getUnpackedValueOrDefault(STATEPROP_MODULE , OUString());
// search for already existing items and update her nState value ...
TURLList::iterator pIt;
@@ -576,14 +577,14 @@ void RecoveryCore::impl_startListening()
// listening already initialized ?
if (m_xRealCore.is())
return;
- m_xRealCore = css::uno::Reference< css::frame::XDispatch >(m_xSMGR->createInstance(SERVICENAME_RECOVERYCORE), css::uno::UNO_QUERY_THROW);
+ m_xRealCore = css::frame::AutoRecovery::create(m_xContext);
css::util::URL aURL;
if (m_bListenForSaving)
aURL.Complete = RECOVERY_CMD_DO_EMERGENCY_SAVE;
else
aURL.Complete = RECOVERY_CMD_DO_RECOVERY;
- css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::getComponentContext(m_xSMGR)));
+ css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(m_xContext));
xParser->parseStrict(aURL);
/* Note: addStatusListener() call us synchronous back ... so we
@@ -603,7 +604,7 @@ void RecoveryCore::impl_stopListening()
aURL.Complete = RECOVERY_CMD_DO_EMERGENCY_SAVE;
else
aURL.Complete = RECOVERY_CMD_DO_RECOVERY;
- css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::getComponentContext(m_xSMGR)));
+ css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(m_xContext));
xParser->parseStrict(aURL);
m_xRealCore->removeStatusListener(static_cast< css::frame::XStatusListener* >(this), aURL);
@@ -616,7 +617,7 @@ css::util::URL RecoveryCore::impl_getParsedURL(const ::rtl::OUString& sURL)
css::util::URL aURL;
aURL.Complete = sURL;
- css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::getComponentContext(m_xSMGR)));
+ css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(m_xContext));
xParser->parseStrict(aURL);
return aURL;
@@ -833,8 +834,8 @@ SaveProgressDialog::SaveProgressDialog(Window* pParent,
, m_pCore ( pCore )
{
FreeResource();
- PluginProgress* pProgress = new PluginProgress( &m_aProgrParent, pCore->getSMGR() );
- m_xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW);
+ PluginProgress* pProgress = new PluginProgress( &m_aProgrParent, css::uno::Reference<css::lang::XMultiServiceFactory>(pCore->getComponentContext()->getServiceManager(), css::uno::UNO_QUERY_THROW) );
+ m_xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW);
}
//===============================================
@@ -883,7 +884,7 @@ void SaveProgressDialog::end()
}
//===============================================
-RecovDocListEntry::RecovDocListEntry( SvLBoxEntry* pEntry,
+RecovDocListEntry::RecovDocListEntry( SvTreeListEntry* pEntry,
sal_uInt16 nFlags,
const String& sText )
: SvLBoxString( pEntry, nFlags, sText )
@@ -894,10 +895,10 @@ RecovDocListEntry::RecovDocListEntry( SvLBoxEntry* pEntry,
void RecovDocListEntry::Paint(const Point& aPos ,
SvTreeListBox& aDevice,
sal_uInt16 /*nFlags */,
- SvLBoxEntry* pEntry )
+ SvTreeListEntry* pEntry )
{
const Image* pImg = 0;
- const String* pTxt = 0;
+ const OUString* pTxt = 0;
RecovDocList* pList = static_cast< RecovDocList* >(&aDevice);
TURLInfo* pInfo = (TURLInfo*)pEntry->GetUserData();
@@ -970,13 +971,13 @@ RecovDocList::~RecovDocList()
}
//===============================================
-void RecovDocList::InitEntry( SvLBoxEntry* pEntry ,
- const XubString& sText ,
- const Image& aImage1,
- const Image& aImage2,
- SvLBoxButtonKind eButtonKind)
+void RecovDocList::InitEntry(SvTreeListEntry* pEntry,
+ const OUString& rText,
+ const Image& rImage1,
+ const Image& rImage2,
+ SvLBoxButtonKind eButtonKind)
{
- SvTabListBox::InitEntry(pEntry, sText, aImage1, aImage2, eButtonKind);
+ SvTabListBox::InitEntry(pEntry, rText, rImage1, rImage2, eButtonKind);
DBG_ASSERT( TabCount() == 2, "*RecovDocList::InitEntry(): structure missmatch" );
SvLBoxString* pCol = (SvLBoxString*)pEntry->GetItem(2);
@@ -1036,7 +1037,7 @@ RecoveryDialog::RecoveryDialog(Window* pParent,
sal_Bool bCrashRepEnabled( sal_False );
css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey(
- pCore->getSMGR(),
+ pCore->getComponentContext(),
CFG_PACKAGE_RECOVERY,
CFG_PATH_CRASHREPORTER,
CFG_ENTRY_ENABLED,
@@ -1044,8 +1045,8 @@ RecoveryDialog::RecoveryDialog(Window* pParent,
aVal >>= bCrashRepEnabled;
m_bRecoveryOnly = !bCrashRepEnabled;
- PluginProgress* pProgress = new PluginProgress( &m_aProgrParent, pCore->getSMGR() );
- m_xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW);
+ PluginProgress* pProgress = new PluginProgress( &m_aProgrParent, css::uno::Reference<css::lang::XMultiServiceFactory>(pCore->getComponentContext()->getServiceManager(), css::uno::UNO_QUERY_THROW) );
+ m_xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pProgress), css::uno::UNO_QUERY_THROW);
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
Wallpaper aBackground( rStyleSettings.GetWindowColor() );
@@ -1074,12 +1075,12 @@ RecoveryDialog::RecoveryDialog(Window* pParent,
String sName( rInfo.DisplayName );
sName += '\t';
sName += impl_getStatusString( rInfo );
- SvLBoxEntry* pEntry = m_aFileListLB.InsertEntry(sName, rInfo.StandardImage, rInfo.StandardImage);
+ SvTreeListEntry* pEntry = m_aFileListLB.InsertEntry(sName, rInfo.StandardImage, rInfo.StandardImage);
pEntry->SetUserData((void*)&rInfo);
}
// mark first item
- SvLBoxEntry* pFirst = m_aFileListLB.First();
+ SvTreeListEntry* pFirst = m_aFileListLB.First();
if (pFirst)
m_aFileListLB.SetCursor(pFirst, sal_True);
}
@@ -1332,7 +1333,7 @@ void RecoveryDialog::updateItems()
sal_uIntPtr i = 0;
for ( i=0; i<c; ++i )
{
- SvLBoxEntry* pEntry = m_aFileListLB.GetEntry(i);
+ SvTreeListEntry* pEntry = m_aFileListLB.GetEntry(i);
if ( !pEntry )
continue;
@@ -1356,7 +1357,7 @@ void RecoveryDialog::stepNext(TURLInfo* pItem)
sal_uIntPtr i = 0;
for (i=0; i<c; ++i)
{
- SvLBoxEntry* pEntry = m_aFileListLB.GetEntry(i);
+ SvTreeListEntry* pEntry = m_aFileListLB.GetEntry(i);
if (!pEntry)
continue;
@@ -1548,8 +1549,8 @@ IMPL_LINK_NOARG(BrokenRecoveryDialog, SaveButtonHdl)
//===============================================
void BrokenRecoveryDialog::impl_askForSavePath()
{
- css::uno::Reference< css::ui::dialogs::XFolderPicker > xFolderPicker(
- m_pCore->getSMGR()->createInstance(SERVICENAME_FOLDERPICKER), css::uno::UNO_QUERY_THROW);
+ css::uno::Reference< css::ui::dialogs::XFolderPicker2 > xFolderPicker =
+ css::ui::dialogs::FolderPicker::create( m_pCore->getComponentContext() );
INetURLObject aURL(m_sSavePath, INET_PROT_FILE);
xFolderPicker->setDisplayDirectory(aURL.GetMainURL(INetURLObject::NO_DECODE));
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index c09f3bfc3fac..2c37904575ea 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -33,7 +33,7 @@
#include <vcl/svapp.hxx>
#include <unicode/uchar.h>
#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <com/sun/star/i18n/BreakIterator.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
@@ -87,6 +87,7 @@
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using ::com::sun::star::i18n::XBreakIterator;
+using ::com::sun::star::i18n::BreakIterator;
// -----------------------------------------------------------------------
// small helper functions to set fonts
@@ -176,7 +177,6 @@ class FontPrevWin_Impl
bool m_bCTLEnabled;
- void _CheckScript();
public:
inline FontPrevWin_Impl() :
pPrinter( NULL ), bDelPrinter( sal_False ),
@@ -213,12 +213,6 @@ public:
// sets the 100%-Font-Widths
};
-void FontPrevWin_Impl::CheckScript()
-{
- if( aText != aScriptText )
- _CheckScript();
-}
-
inline void FontPrevWin_Impl::Invalidate100PercentFontWidth()
{
n100PercentFontWidth = n100PercentFontWidthCJK = n100PercentFontWidthCTL = -1;
@@ -237,15 +231,19 @@ inline sal_Bool FontPrevWin_Impl::Is100PercentFontWidthValid() const
// class FontPrevWin_Impl -----------------------------------------------
/*
- * void FontPrevWin_Impl::_CheckScript()
* evalutates the scripttypes of the actual string.
* Afterwards the positions of script change are notified in aScriptChg,
* the scripttypes in aScriptType.
* The aTextWidth array will be filled with zero.
*/
-
-void FontPrevWin_Impl::_CheckScript()
+void FontPrevWin_Impl::CheckScript()
{
+ assert(aText.Len()); // must have a preview text here!
+ if (aText == aScriptText)
+ {
+ return; // already initialized
+ }
+
aScriptText = aText;
aScriptChg.clear();
@@ -254,54 +252,50 @@ void FontPrevWin_Impl::_CheckScript()
if( !xBreak.is() )
{
- Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- xBreak = Reference< XBreakIterator >(xMSF->createInstance(
- ::rtl::OUString("com.sun.star.i18n.BreakIterator") ),UNO_QUERY);
+ Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
+ xBreak = BreakIterator::create(xContext);
}
- if( xBreak.is() )
+ sal_uInt16 nScript = xBreak->getScriptType( aText, 0 );
+ sal_uInt16 nChg = 0;
+ if( com::sun::star::i18n::ScriptType::WEAK == nScript )
{
- sal_uInt16 nScript = xBreak->getScriptType( aText, 0 );
- sal_uInt16 nChg = 0;
- if( com::sun::star::i18n::ScriptType::WEAK == nScript )
- {
- nChg = (xub_StrLen)xBreak->endOfScript( aText, nChg, nScript );
- if( nChg < aText.Len() )
- nScript = xBreak->getScriptType( aText, nChg );
- else
- nScript = com::sun::star::i18n::ScriptType::LATIN;
- }
+ nChg = (xub_StrLen)xBreak->endOfScript( aText, nChg, nScript );
+ if( nChg < aText.Len() )
+ nScript = xBreak->getScriptType( aText, nChg );
+ else
+ nScript = com::sun::star::i18n::ScriptType::LATIN;
+ }
- do
+ do
+ {
+ nChg = (xub_StrLen)xBreak->endOfScript( aText, nChg, nScript );
+ if (nChg < aText.Len() && nChg > 0 &&
+ (com::sun::star::i18n::ScriptType::WEAK ==
+ xBreak->getScriptType(aText, nChg - 1)))
{
- nChg = (xub_StrLen)xBreak->endOfScript( aText, nChg, nScript );
- if (nChg < aText.Len() && nChg > 0 &&
- (com::sun::star::i18n::ScriptType::WEAK ==
- xBreak->getScriptType(aText, nChg - 1)))
+ int8_t nType = u_charType(aText.GetChar(nChg) );
+ if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK ||
+ nType == U_COMBINING_SPACING_MARK )
{
- int8_t nType = u_charType(aText.GetChar(nChg) );
- if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK ||
- nType == U_COMBINING_SPACING_MARK )
- {
- aScriptChg.push_back( nChg - 1 );
- }
- else
- {
- aScriptChg.push_back( nChg );
- }
+ aScriptChg.push_back( nChg - 1 );
}
else
{
aScriptChg.push_back( nChg );
}
- aScriptType.push_back( nScript );
- aTextWidth.push_back( 0 );
+ }
+ else
+ {
+ aScriptChg.push_back( nChg );
+ }
+ aScriptType.push_back( nScript );
+ aTextWidth.push_back( 0 );
- if( nChg < aText.Len() )
- nScript = xBreak->getScriptType( aText, nChg );
- else
- break;
- } while( sal_True );
- }
+ if( nChg < aText.Len() )
+ nScript = xBreak->getScriptType( aText, nChg );
+ else
+ break;
+ } while( sal_True );
}
/*
diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx
index 99388a6b106f..bcfc2e0f4fec 100644
--- a/svx/source/dialog/fontlb.cxx
+++ b/svx/source/dialog/fontlb.cxx
@@ -40,7 +40,7 @@ SvLBoxFontString::SvLBoxFontString() :
}
SvLBoxFontString::SvLBoxFontString(
- SvLBoxEntry* pEntry, sal_uInt16 nFlags, const XubString& rString,
+ SvTreeListEntry* pEntry, sal_uInt16 nFlags, const XubString& rString,
const Font& rFont, const Color* pColor ) :
SvLBoxString( pEntry, nFlags, rString ),
maFont( rFont ),
@@ -64,7 +64,7 @@ SvLBoxItem* SvLBoxFontString::Create() const
return new SvLBoxFontString;
}
-void SvLBoxFontString::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry )
+void SvLBoxFontString::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvTreeListEntry* pEntry )
{
DBG_CHKTHIS( SvLBoxFontString, 0 );
Font aOldFont( rDev.GetFont() );
@@ -81,7 +81,7 @@ void SvLBoxFontString::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16
rDev.SetFont( aOldFont );
}
-void SvLBoxFontString::InitViewData( SvTreeListBox* pView, SvLBoxEntry* pEntry, SvViewDataItem* pViewData )
+void SvLBoxFontString::InitViewData( SvTreeListBox* pView, SvTreeListEntry* pEntry, SvViewDataItem* pViewData )
{
DBG_CHKTHIS( SvLBoxFontString, 0 );
Font aOldFont( pView->GetFont() );
@@ -113,7 +113,7 @@ void SvxFontListBox::InsertFontEntry( const String& rString, const Font& rFont,
void SvxFontListBox::SelectEntryPos( sal_uInt16 nPos, bool bSelect )
{
- SvLBoxEntry* pEntry = GetEntry( nPos );
+ SvTreeListEntry* pEntry = GetEntry( nPos );
if( pEntry )
{
Select( pEntry, bSelect );
@@ -128,7 +128,7 @@ void SvxFontListBox::SetNoSelection()
sal_uLong SvxFontListBox::GetSelectEntryPos() const
{
- SvLBoxEntry* pSvLBoxEntry = FirstSelected();
+ SvTreeListEntry* pSvLBoxEntry = FirstSelected();
return pSvLBoxEntry ? GetModel()->GetAbsPos( pSvLBoxEntry ) : LIST_APPEND;
}
@@ -138,9 +138,9 @@ XubString SvxFontListBox::GetSelectEntry() const
}
void SvxFontListBox::InitEntry(
- SvLBoxEntry* pEntry, const XubString& rEntryText,
+ SvTreeListEntry* pEntry, const OUString& rEntryText,
const Image& rCollImg, const Image& rExpImg,
- SvLBoxButtonKind eButtonKind )
+ SvLBoxButtonKind eButtonKind)
{
if( mbUseFont )
{
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 72e385aa2fef..46258ada77da 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -26,7 +26,6 @@
*
************************************************************************/
-#include <com/sun/star/linguistic2/XLinguServiceManager.hpp>
#include <com/sun/star/linguistic2/XAvailableLocales.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <linguistic/misc.hxx>
@@ -150,7 +149,7 @@ SvxLanguageBox::SvxLanguageBox( Window* pParent, WinBits nBits, sal_Bool bCheck
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxLanguageBox(Window *pParent, VclBuilder::stringmap &)
{
SvxLanguageBox *pListBox = new SvxLanguageBox(pParent, WB_LEFT|WB_DROPDOWN|WB_VCENTER|WB_3DLOOK);
- pListBox->SetBestDropDownLineCount();
+ pListBox->EnableAutoSize(true);
return pListBox;
}
diff --git a/svx/source/dialog/simptabl.cxx b/svx/source/dialog/simptabl.cxx
index e76ad7ba8f18..bee99c2f23cc 100644
--- a/svx/source/dialog/simptabl.cxx
+++ b/svx/source/dialog/simptabl.cxx
@@ -420,7 +420,7 @@ IMPL_LINK( SvxSimpleTable, HeaderBarDblClick, HeaderBar*, pCtr)
return 0;
}
-SvLBoxItem* SvxSimpleTable::GetEntryAtPos( SvLBoxEntry* pEntry, sal_uInt16 nPos ) const
+SvLBoxItem* SvxSimpleTable::GetEntryAtPos( SvTreeListEntry* pEntry, sal_uInt16 nPos ) const
{
DBG_ASSERT(pEntry,"GetEntryText:Invalid Entry");
SvLBoxItem* pItem = NULL;
@@ -441,7 +441,7 @@ SvLBoxItem* SvxSimpleTable::GetEntryAtPos( SvLBoxEntry* pEntry, sal_uInt16 nPos
return pItem;
}
-StringCompare SvxSimpleTable::ColCompare(SvLBoxEntry* pLeft,SvLBoxEntry* pRight)
+StringCompare SvxSimpleTable::ColCompare(SvTreeListEntry* pLeft,SvTreeListEntry* pRight)
{
StringCompare eCompare=COMPARE_EQUAL;
@@ -471,8 +471,8 @@ StringCompare SvxSimpleTable::ColCompare(SvLBoxEntry* pLeft,SvLBoxEntry* pRight)
IMPL_LINK( SvxSimpleTable, CompareHdl, SvSortData*, pData)
{
- SvLBoxEntry* pLeft = (SvLBoxEntry*)(pData->pLeft );
- SvLBoxEntry* pRight = (SvLBoxEntry*)(pData->pRight );
+ SvTreeListEntry* pLeft = (SvTreeListEntry*)(pData->pLeft );
+ SvTreeListEntry* pRight = (SvTreeListEntry*)(pData->pRight );
return (long) ColCompare(pLeft,pRight);
}
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index b6aae0b4b176..1a092e6fb3b5 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -46,6 +46,7 @@
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <comphelper/processfactory.hxx>
#include <svl/itempool.hxx>
@@ -461,9 +462,8 @@ void SvxSearchDialog::Construct_Impl()
try
{
uno::Reference< lang::XMultiServiceFactory > xMgr = getProcessServiceFactory();
- uno::Reference< lang::XMultiServiceFactory > xConfigurationProvider(xMgr->createInstance(
- ::rtl::OUString( "com.sun.star.configuration.ConfigurationProvider")),
- uno::UNO_QUERY);
+ uno::Reference< lang::XMultiServiceFactory > xConfigurationProvider =
+ configuration::theDefaultProvider::get( comphelper::getComponentContext(xMgr) );
uno::Sequence< uno::Any > aArgs(1);
::rtl::OUString sPath( "/org.openoffice.Office.Common/SearchOptions/");
aArgs[0] <<= sPath;
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 13a2e344bb44..72063f93dd5d 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -402,15 +402,25 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
pDev->SetLineColor(aOldColor);
}
-SvxNumValueSet::SvxNumValueSet( Window* pParent, const ResId& rResId, sal_uInt16 nType ) :
+SvxNumValueSet::SvxNumValueSet( Window* pParent, const ResId& rResId, sal_uInt16 nType )
+ : ValueSet( pParent, rResId )
+{
+ init(nType);
+}
- ValueSet( pParent, rResId ),
+SvxNumValueSet::SvxNumValueSet( Window* pParent, WinBits nWinStyle, sal_uInt16 nType )
+ : ValueSet( pParent, nWinStyle )
+{
+ init(nType);
+}
- aLineColor ( COL_LIGHTGRAY ),
- nPageType ( nType ),
- bHTMLMode ( sal_False ),
- pVDev ( NULL )
+void SvxNumValueSet::init(sal_uInt16 nType)
{
+ aLineColor = COL_LIGHTGRAY;
+ nPageType = nType;
+ bHTMLMode = sal_False;
+ pVDev = NULL;
+
SetColCount( 4 );
SetLineCount( 2 );
SetStyle( GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER );
@@ -465,12 +475,21 @@ void SvxNumValueSet::SetOutlineNumberingSettings(
}
}
-SvxBmpNumValueSet::SvxBmpNumValueSet( Window* pParent, const ResId& rResId ) :
+SvxBmpNumValueSet::SvxBmpNumValueSet( Window* pParent, const ResId& rResId )
+ : SvxNumValueSet( pParent, rResId, NUM_PAGETYPE_BMP )
+{
+ init();
+}
- SvxNumValueSet( pParent, rResId, NUM_PAGETYPE_BMP ),
- bGrfNotFound( sal_False )
+SvxBmpNumValueSet::SvxBmpNumValueSet( Window* pParent, WinBits nWinStyle )
+ : SvxNumValueSet( pParent, nWinStyle, NUM_PAGETYPE_BMP )
+{
+ init();
+}
+void SvxBmpNumValueSet::init()
{
+ bGrfNotFound = sal_False;
GalleryExplorer::BeginLocking(GALLERY_THEME_BULLETS);
SetStyle( GetStyle() | WB_VSCROLL );
SetLineCount( 3 );
@@ -478,6 +497,7 @@ SvxBmpNumValueSet::SvxBmpNumValueSet( Window* pParent, const ResId& rResId ) :
aFormatTimer.SetTimeoutHdl(LINK(this, SvxBmpNumValueSet, FormatHdl_Impl));
}
+
SvxBmpNumValueSet::~SvxBmpNumValueSet()
{
GalleryExplorer::EndLocking(GALLERY_THEME_BULLETS);
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 5c5772101b81..47ac9d70e189 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -187,7 +187,7 @@ void DbGridColumn::CreateControl(sal_Int32 _nFieldPos, const Reference< ::com::s
DbCellControl* pCellControl = NULL;
if (m_rParent.IsFilterMode())
{
- pCellControl = new DbFilterField(m_rParent.getServiceManager(),*this);
+ pCellControl = new DbFilterField(comphelper::getComponentContext(m_rParent.getServiceManager()),*this);
}
else
{
@@ -2747,9 +2747,9 @@ sal_Bool DbListBox::commitControl()
DBG_NAME(DbFilterField);
/*************************************************************************/
-DbFilterField::DbFilterField(const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,DbGridColumn& _rColumn)
+DbFilterField::DbFilterField(const Reference< ::com::sun::star::uno::XComponentContext >& rxContext,DbGridColumn& _rColumn)
:DbCellControl(_rColumn)
- ,OSQLParserClient(_rxORB)
+ ,OSQLParserClient(rxContext)
,m_nControlClass(::com::sun::star::form::FormComponentType::TEXTFIELD)
,m_bFilterList(sal_False)
,m_bFilterListFilled(sal_False)
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 61491ba16824..6f7c70056edf 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -44,12 +44,13 @@
#include <com/sun/star/sdbc/XResultSetUpdate.hpp>
#include <com/sun/star/sdbcx/Privilege.hpp>
#include <com/sun/star/container/XChild.hpp>
-#include <com/sun/star/util/XNumberFormatter.hpp>
+#include <com/sun/star/util/NumberFormatter.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/PropertyChangeEvent.hpp>
#include <comphelper/extract.hxx>
+#include <comphelper/processfactory.hxx>
#include <tools/resid.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/menu.hxx>
@@ -1451,23 +1452,20 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt
m_xFormatter = NULL;
OStaticDataAccessTools aStaticTools;
Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = aStaticTools.getNumberFormats(aStaticTools.getRowSetConnection(_xCursor), sal_True);
- if (xSupplier.is() && m_xServiceFactory.is())
+ if (xSupplier.is())
{
- m_xFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(
- m_xServiceFactory->createInstance(FM_NUMBER_FORMATTER),
+ m_xFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(
+ ::com::sun::star::util::NumberFormatter::create(comphelper::getComponentContext(m_xServiceFactory)),
UNO_QUERY);
- if (m_xFormatter.is())
- {
- m_xFormatter->attachNumberFormatsSupplier(xSupplier);
+ m_xFormatter->attachNumberFormatsSupplier(xSupplier);
- // retrieve the datebase of the Numberformatter
- try
- {
- xSupplier->getNumberFormatSettings()->getPropertyValue(rtl::OUString("NullDate")) >>= m_aNullDate;
- }
- catch(Exception&)
- {
- }
+ // retrieve the datebase of the Numberformatter
+ try
+ {
+ xSupplier->getNumberFormatSettings()->getPropertyValue(rtl::OUString("NullDate")) >>= m_aNullDate;
+ }
+ catch(Exception&)
+ {
}
}
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index d98787cc5974..c77b7f1d92ab 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -170,7 +170,7 @@ namespace svxform
}
void DataTreeListBox::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel*/ )
{
- SvLBoxEntry* pSelected = FirstSelected();
+ SvTreeListEntry* pSelected = FirstSelected();
if ( !pSelected )
// no drag without an entry
return;
@@ -258,7 +258,7 @@ namespace svxform
m_pXFormsPage->DoMenuAction( _nSelectedPopupEntry );
}
- void DataTreeListBox::RemoveEntry( SvLBoxEntry* _pEntry )
+ void DataTreeListBox::RemoveEntry( SvTreeListEntry* _pEntry )
{
if ( _pEntry )
{
@@ -272,7 +272,7 @@ namespace svxform
sal_uIntPtr i, nCount = GetEntryCount();
for ( i = 0; i < nCount; ++i )
{
- SvLBoxEntry* pEntry = GetEntry(i);
+ SvTreeListEntry* pEntry = GetEntry(i);
if ( pEntry )
delete static_cast< ItemNode* >( pEntry->GetUserData() );
}
@@ -361,7 +361,7 @@ namespace svxform
}
//------------------------------------------------------------------------
void XFormsPage::AddChildren(
- SvLBoxEntry* _pParent, const ImageList& _rImgLst,
+ SvTreeListEntry* _pParent, const ImageList& _rImgLst,
const Reference< css::xml::dom::XNode >& _xNode )
{
DBG_ASSERT( m_xUIHelper.is(), "XFormsPage::AddChildren(): invalid UIHelper" );
@@ -397,7 +397,7 @@ namespace svxform
if ( !sName.isEmpty() )
{
ItemNode* pNode = new ItemNode( xChild );
- SvLBoxEntry* pEntry = m_aItemList.InsertEntry(
+ SvTreeListEntry* pEntry = m_aItemList.InsertEntry(
sName, aExpImg, aCollImg, _pParent, sal_False, LIST_APPEND, pNode );
if ( xChild->hasAttributes() )
{
@@ -456,7 +456,7 @@ namespace svxform
Reference< XSet > xSubmissions( xModel->getSubmissions(), UNO_QUERY );
xSubmissions->insert( makeAny( xNewSubmission ) );
Reference< XPropertySet > xNewPropSet( xNewSubmission, UNO_QUERY );
- SvLBoxEntry* pEntry = AddEntry( xNewPropSet );
+ SvTreeListEntry* pEntry = AddEntry( xNewPropSet );
m_aItemList.Select( pEntry, sal_True );
bIsDocModified = true;
}
@@ -469,7 +469,7 @@ namespace svxform
else
{
DataItemType eType = DITElement;
- SvLBoxEntry* pEntry = m_aItemList.FirstSelected();
+ SvTreeListEntry* pEntry = m_aItemList.FirstSelected();
ItemNode* pNode = NULL;
Reference< css::xml::dom::XNode > xParentNode;
Reference< XPropertySet > xNewBinding;
@@ -582,7 +582,7 @@ namespace svxform
{
if ( RET_OK == nReturn )
{
- SvLBoxEntry* pNewEntry = AddEntry( pNode, bIsElement );
+ SvTreeListEntry* pNewEntry = AddEntry( pNode, bIsElement );
m_aItemList.MakeVisible( pNewEntry );
m_aItemList.Select( pNewEntry, sal_True );
bIsDocModified = true;
@@ -609,7 +609,7 @@ namespace svxform
{
if ( RET_OK == nReturn )
{
- SvLBoxEntry* pNewEntry = AddEntry( xNewBinding );
+ SvTreeListEntry* pNewEntry = AddEntry( xNewBinding );
m_aItemList.Select( pNewEntry, sal_True );
bIsDocModified = true;
}
@@ -634,7 +634,7 @@ namespace svxform
case TBI_ITEM_EDIT:
{
bHandled = true;
- SvLBoxEntry* pEntry = m_aItemList.FirstSelected();
+ SvTreeListEntry* pEntry = m_aItemList.FirstSelected();
if ( pEntry )
{
if ( DGTSubmission == m_eGroup && m_aItemList.GetParent( pEntry ) )
@@ -759,9 +759,9 @@ namespace svxform
}
//------------------------------------------------------------------------
- SvLBoxEntry* XFormsPage::AddEntry( ItemNode* _pNewNode, bool _bIsElement )
+ SvTreeListEntry* XFormsPage::AddEntry( ItemNode* _pNewNode, bool _bIsElement )
{
- SvLBoxEntry* pParent = m_aItemList.FirstSelected();
+ SvTreeListEntry* pParent = m_aItemList.FirstSelected();
const ImageList& rImageList = m_pNaviWin->GetItemImageList();
sal_uInt16 nImageID = ( _bIsElement ) ? IID_ELEMENT : IID_ATTRIBUTE;
Image aImage = rImageList.GetImage( nImageID );
@@ -965,9 +965,9 @@ namespace svxform
};
//------------------------------------------------------------------------
- SvLBoxEntry* XFormsPage::AddEntry( const Reference< XPropertySet >& _rEntry )
+ SvTreeListEntry* XFormsPage::AddEntry( const Reference< XPropertySet >& _rEntry )
{
- SvLBoxEntry* pEntry = NULL;
+ SvTreeListEntry* pEntry = NULL;
const ImageList& rImageList = m_pNaviWin->GetItemImageList();
Image aImage = rImageList.GetImage( IID_ELEMENT );
@@ -1038,7 +1038,7 @@ namespace svxform
//------------------------------------------------------------------------
void XFormsPage::EditEntry( const Reference< XPropertySet >& _rEntry )
{
- SvLBoxEntry* pEntry = NULL;
+ SvTreeListEntry* pEntry = NULL;
rtl::OUString sTemp;
if ( DGTSubmission == m_eGroup )
@@ -1062,7 +1062,7 @@ namespace svxform
String sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_BIND );
sEntry += String( sTemp );
sal_uIntPtr nPos = 0;
- SvLBoxEntry* pChild = m_aItemList.GetEntry( pEntry, nPos++ );
+ SvTreeListEntry* pChild = m_aItemList.GetEntry( pEntry, nPos++ );
m_aItemList.SetEntryText( pChild, sEntry );
_rEntry->getPropertyValue( PN_SUBMISSION_REF ) >>= sTemp;
sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_REF );
@@ -1096,7 +1096,7 @@ namespace svxform
bool XFormsPage::RemoveEntry()
{
bool bRet = false;
- SvLBoxEntry* pEntry = m_aItemList.FirstSelected();
+ SvTreeListEntry* pEntry = m_aItemList.FirstSelected();
if ( pEntry &&
( DGTInstance != m_eGroup || m_aItemList.GetParent( pEntry ) ) )
{
@@ -1121,7 +1121,7 @@ namespace svxform
aQBox.SetMessText( sMessText );
if ( aQBox.Execute() == RET_YES )
{
- SvLBoxEntry* pParent = m_aItemList.GetParent( pEntry );
+ SvTreeListEntry* pParent = m_aItemList.GetParent( pEntry );
DBG_ASSERT( pParent, "XFormsPage::RemoveEntry(): no parent entry" );
ItemNode* pParentNode = static_cast< ItemNode* >( pParent->GetUserData() );
DBG_ASSERT( pParentNode && pParentNode->m_xNode.is(), "XFormsPage::RemoveEntry(): no parent XNode" );
@@ -1427,7 +1427,7 @@ namespace svxform
sal_Bool bEnableEdit = sal_False;
sal_Bool bEnableRemove = sal_False;
- SvLBoxEntry* pEntry = m_aItemList.FirstSelected();
+ SvTreeListEntry* pEntry = m_aItemList.FirstSelected();
if ( pEntry )
{
bEnableAdd = sal_True;
@@ -3211,7 +3211,7 @@ namespace svxform
else if ( &m_aEditNamespaceBtn == pBtn )
{
ManageNamespaceDialog aDlg( this, m_pConditionDlg, true );
- SvLBoxEntry* pEntry = m_aNamespacesList.FirstSelected();
+ SvTreeListEntry* pEntry = m_aNamespacesList.FirstSelected();
DBG_ASSERT( pEntry, "NamespaceItemDialog::ClickHdl(): no entry" );
String sPrefix( m_aNamespacesList.GetEntryText( pEntry, 0 ) );
aDlg.SetNamespace(
@@ -3229,7 +3229,7 @@ namespace svxform
}
else if ( &m_aDeleteNamespaceBtn == pBtn )
{
- SvLBoxEntry* pEntry = m_aNamespacesList.FirstSelected();
+ SvTreeListEntry* pEntry = m_aNamespacesList.FirstSelected();
DBG_ASSERT( pEntry, "NamespaceItemDialog::ClickHdl(): no entry" );
::rtl::OUString sPrefix( m_aNamespacesList.GetEntryText( pEntry, 0 ) );
m_aRemovedList.push_back( sPrefix );
@@ -3257,7 +3257,7 @@ namespace svxform
sal_Int32 nEntryCount = m_aNamespacesList.GetEntryCount();
for( i = 0; i < nEntryCount; ++i )
{
- SvLBoxEntry* pEntry = m_aNamespacesList.GetEntry(i);
+ SvTreeListEntry* pEntry = m_aNamespacesList.GetEntry(i);
::rtl::OUString sPrefix( m_aNamespacesList.GetEntryText( pEntry, 0 ) );
::rtl::OUString sURL( m_aNamespacesList.GetEntryText( pEntry, 1 ) );
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 4cde508a406a..a9ab319df386 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -38,9 +38,10 @@
#include <com/sun/star/awt/XTextComponent.hpp>
#include <com/sun/star/form/runtime/XFormController.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <com/sun/star/util/XNumberFormatter.hpp>
+#include <com/sun/star/util/NumberFormatter.hpp>
#include <com/sun/star/beans/XFastPropertySet.hpp>
+#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/property.hxx>
#include <comphelper/sequence.hxx>
@@ -103,6 +104,8 @@ namespace svxform
using ::com::sun::star::util::XNumberFormatsSupplier;
using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::util::XNumberFormatter;
+ using ::com::sun::star::util::XNumberFormatter2;
+ using ::com::sun::star::util::NumberFormatter;
using ::com::sun::star::sdbc::XRowSet;
using ::com::sun::star::lang::Locale;
using ::com::sun::star::sdb::SQLContext;
@@ -550,7 +553,7 @@ TYPEINIT1(FmFilterModel, FmParentData);
//------------------------------------------------------------------------
FmFilterModel::FmFilterModel(const Reference< XMultiServiceFactory >& _rxFactory)
:FmParentData(_rxFactory,NULL, ::rtl::OUString())
- ,OSQLParserClient(_rxFactory)
+ ,OSQLParserClient(comphelper::getComponentContext(_rxFactory))
,m_xORB(_rxFactory)
,m_pAdapter(NULL)
,m_pCurrentItems(NULL)
@@ -873,7 +876,7 @@ void FmFilterModel::Remove( const ::std::vector<FmFilterData*>::iterator& rPos )
FmFilterData* pData = *rPos;
pData->GetParent()->GetChildren().erase( rPos );
- // notify the view, this will remove the actual SvLBoxEntry
+ // notify the view, this will remove the actual SvTreeListEntry
FmFilterRemovedHint aRemoveHint( pData );
Broadcast( aRemoveHint );
@@ -895,7 +898,7 @@ sal_Bool FmFilterModel::ValidateText(FmFilterItem* pItem, UniString& rText, UniS
// obtain a number formatter for this connection
// TODO: shouldn't this be cached?
Reference< XNumberFormatsSupplier > xFormatSupplier = aStaticTools.getNumberFormats( xConnection, sal_True );
- Reference< XNumberFormatter > xFormatter( m_xORB->createInstance( FM_NUMBER_FORMATTER ), UNO_QUERY );
+ Reference< XNumberFormatter > xFormatter( NumberFormatter::create( comphelper::getComponentContext(m_xORB) ), UNO_QUERY_THROW );
xFormatter->attachNumberFormatsSupplier( xFormatSupplier );
// get the field (database column) which the item is responsible for
@@ -1038,16 +1041,16 @@ void FmFilterModel::EnsureEmptyFilterRows( FmParentData& _rItem )
class FmFilterItemsString : public SvLBoxString
{
public:
- FmFilterItemsString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr )
+ FmFilterItemsString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr )
:SvLBoxString(pEntry,nFlags,rStr){}
- virtual void Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry);
- virtual void InitViewData( SvTreeListBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData);
+ virtual void Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvTreeListEntry* pEntry);
+ virtual void InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* pViewData);
};
const int nxDBmp = 12;
//------------------------------------------------------------------------
-void FmFilterItemsString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 /*nFlags*/, SvLBoxEntry* pEntry )
+void FmFilterItemsString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 /*nFlags*/, SvTreeListEntry* pEntry )
{
FmFilterItems* pRow = (FmFilterItems*)pEntry->GetUserData();
FmFormItem* pForm = (FmFormItem*)pRow->GetParent();
@@ -1080,7 +1083,7 @@ void FmFilterItemsString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt
}
//------------------------------------------------------------------------
-void FmFilterItemsString::InitViewData( SvTreeListBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData)
+void FmFilterItemsString::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* pViewData)
{
if( !pViewData )
pViewData = pView->GetViewDataItem( pEntry, this );
@@ -1098,21 +1101,21 @@ class FmFilterString : public SvLBoxString
UniString m_aName;
public:
- FmFilterString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr, const UniString& aName)
+ FmFilterString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr, const UniString& aName)
:SvLBoxString(pEntry,nFlags,rStr)
,m_aName(aName)
{
m_aName.AppendAscii(": ");
}
- virtual void Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry);
- virtual void InitViewData( SvTreeListBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData);
+ virtual void Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvTreeListEntry* pEntry);
+ virtual void InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* pViewData);
};
const int nxD = 4;
//------------------------------------------------------------------------
-void FmFilterString::InitViewData( SvTreeListBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData)
+void FmFilterString::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* pViewData)
{
if( !pViewData )
pViewData = pView->GetViewDataItem( pEntry, this );
@@ -1129,7 +1132,7 @@ void FmFilterString::InitViewData( SvTreeListBox* pView,SvLBoxEntry* pEntry, SvV
}
//------------------------------------------------------------------------
-void FmFilterString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 /*nFlags*/, SvLBoxEntry* /*pEntry*/ )
+void FmFilterString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 /*nFlags*/, SvTreeListEntry* /*pEntry*/ )
{
Font aOldFont( rDev.GetFont());
Font aFont( aOldFont );
@@ -1193,7 +1196,7 @@ void FmFilterNavigator::UpdateContent(const Reference< XIndexAccess > & xControl
m_pModel->Update(xControllers, xCurrent);
// expand the filters for the current controller
- SvLBoxEntry* pEntry = FindEntry(m_pModel->GetCurrentForm());
+ SvTreeListEntry* pEntry = FindEntry(m_pModel->GetCurrentForm());
if (pEntry && !IsExpanded(pEntry))
{
SelectAll(sal_False);
@@ -1212,7 +1215,7 @@ void FmFilterNavigator::UpdateContent(const Reference< XIndexAccess > & xControl
}
//------------------------------------------------------------------------
-sal_Bool FmFilterNavigator::EditingEntry( SvLBoxEntry* pEntry, Selection& rSelection )
+sal_Bool FmFilterNavigator::EditingEntry( SvTreeListEntry* pEntry, Selection& rSelection )
{
m_pEditingCurrently = pEntry;
if (!SvTreeListBox::EditingEntry( pEntry, rSelection ))
@@ -1222,7 +1225,7 @@ sal_Bool FmFilterNavigator::EditingEntry( SvLBoxEntry* pEntry, Selection& rSelec
}
//------------------------------------------------------------------------
-sal_Bool FmFilterNavigator::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText )
+sal_Bool FmFilterNavigator::EditedEntry( SvTreeListEntry* pEntry, const rtl::OUString& rNewText )
{
DBG_ASSERT(pEntry == m_pEditingCurrently, "FmFilterNavigator::EditedEntry: suspicious entry!");
m_pEditingCurrently = NULL;
@@ -1269,7 +1272,7 @@ sal_Bool FmFilterNavigator::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUStrin
}
//------------------------------------------------------------------------
-IMPL_LINK( FmFilterNavigator, OnRemove, SvLBoxEntry*, pEntry )
+IMPL_LINK( FmFilterNavigator, OnRemove, SvTreeListEntry*, pEntry )
{
// now remove the entry
m_pModel->Remove((FmFilterData*) pEntry->GetUserData());
@@ -1294,7 +1297,7 @@ IMPL_LINK_NOARG(FmFilterNavigator, OnDropActionTimer)
break;
case DA_EXPANDNODE:
{
- SvLBoxEntry* pToExpand = GetEntry(m_aTimerTriggered);
+ SvTreeListEntry* pToExpand = GetEntry(m_aTimerTriggered);
if (pToExpand && (GetChildCount(pToExpand) > 0) && !IsExpanded(pToExpand))
// tja, eigentlich muesste ich noch testen, ob die Node nicht schon expandiert ist, aber ich
// habe dazu weder in den Basisklassen noch im Model eine Methode gefunden ...
@@ -1341,7 +1344,7 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt )
}
else
{ // is it an entry whith children, and not yet expanded?
- SvLBoxEntry* pDropppedOn = GetEntry(aDropPos);
+ SvTreeListEntry* pDropppedOn = GetEntry(aDropPos);
if (pDropppedOn && (GetChildCount(pDropppedOn) > 0) && !IsExpanded(pDropppedOn))
{
// -> aufklappen
@@ -1379,7 +1382,7 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt )
if (!FindEntry(m_aControlExchange->getFormItem()))
return DND_ACTION_NONE;
- SvLBoxEntry* pDropTarget = GetEntry(aDropPos);
+ SvTreeListEntry* pDropTarget = GetEntry(aDropPos);
if (!pDropTarget)
return DND_ACTION_NONE;
@@ -1405,7 +1408,7 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt )
// -----------------------------------------------------------------------------
namespace
{
- FmFilterItems* getTargetItems(SvLBoxEntry* _pTarget)
+ FmFilterItems* getTargetItems(SvTreeListEntry* _pTarget)
{
FmFilterData* pData = static_cast<FmFilterData*>(_pTarget->GetUserData());
FmFilterItems* pTargetItems = pData->ISA(FmFilterItems)
@@ -1429,14 +1432,14 @@ sal_Int8 FmFilterNavigator::ExecuteDrop( const ExecuteDropEvent& rEvt )
// das Ziel des Drop sowie einige Daten darueber
Point aDropPos = rEvt.maPosPixel;
- SvLBoxEntry* pDropTarget = GetEntry( aDropPos );
+ SvTreeListEntry* pDropTarget = GetEntry( aDropPos );
if (!pDropTarget)
return DND_ACTION_NONE;
// search the container where to add the items
FmFilterItems* pTargetItems = getTargetItems(pDropTarget);
SelectAll(sal_False);
- SvLBoxEntry* pEntry = FindEntry(pTargetItems);
+ SvTreeListEntry* pEntry = FindEntry(pTargetItems);
Select(pEntry, sal_True);
SetCurEntry(pEntry);
@@ -1446,11 +1449,11 @@ sal_Int8 FmFilterNavigator::ExecuteDrop( const ExecuteDropEvent& rEvt )
}
//------------------------------------------------------------------------
-void FmFilterNavigator::InitEntry(SvLBoxEntry* pEntry,
- const XubString& rStr,
+void FmFilterNavigator::InitEntry(SvTreeListEntry* pEntry,
+ const OUString& rStr,
const Image& rImg1,
const Image& rImg2,
- SvLBoxButtonKind eButtonKind)
+ SvLBoxButtonKind eButtonKind)
{
SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind );
SvLBoxString* pString = NULL;
@@ -1465,7 +1468,7 @@ void FmFilterNavigator::InitEntry(SvLBoxEntry* pEntry,
}
//------------------------------------------------------------------------
-sal_Bool FmFilterNavigator::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
+sal_Bool FmFilterNavigator::Select( SvTreeListEntry* pEntry, sal_Bool bSelect )
{
if (bSelect == IsSelected(pEntry)) // das passiert manchmal, ich glaube, die Basisklasse geht zu sehr auf Nummer sicher ;)
return sal_True;
@@ -1519,23 +1522,23 @@ void FmFilterNavigator::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
else if( rHint.ISA(FmFilterTextChangedHint) )
{
FmFilterTextChangedHint* pHint = (FmFilterTextChangedHint*)&rHint;
- SvLBoxEntry* pEntry = FindEntry(pHint->GetData());
+ SvTreeListEntry* pEntry = FindEntry(pHint->GetData());
if (pEntry)
SetEntryText( pEntry, pHint->GetData()->GetText());
}
else if( rHint.ISA(FmFilterCurrentChangedHint) )
{
// invalidate the entries
- for (SvLBoxEntry* pEntry = First(); pEntry != NULL;
+ for (SvTreeListEntry* pEntry = First(); pEntry != NULL;
pEntry = Next(pEntry))
GetModel()->InvalidateEntry( pEntry );
}
}
//------------------------------------------------------------------------
-SvLBoxEntry* FmFilterNavigator::FindEntry(const FmFilterData* pItem) const
+SvTreeListEntry* FmFilterNavigator::FindEntry(const FmFilterData* pItem) const
{
- SvLBoxEntry* pEntry = NULL;
+ SvTreeListEntry* pEntry = NULL;
if (pItem)
{
for (pEntry = First(); pEntry != NULL; pEntry = Next( pEntry ))
@@ -1554,7 +1557,7 @@ void FmFilterNavigator::Insert(FmFilterData* pItem, sal_uLong nPos)
const FmParentData* pParent = pItem->GetParent() ? pItem->GetParent() : GetFilterModel();
// insert the item
- SvLBoxEntry* pParentEntry = FindEntry( pParent );
+ SvTreeListEntry* pParentEntry = FindEntry( pParent );
InsertEntry( pItem->GetText(), pItem->GetImage(), pItem->GetImage(), pParentEntry, sal_False, nPos, pItem );
if ( pParentEntry )
Expand( pParentEntry );
@@ -1564,7 +1567,7 @@ void FmFilterNavigator::Insert(FmFilterData* pItem, sal_uLong nPos)
void FmFilterNavigator::Remove(FmFilterData* pItem)
{
// der Entry zu den Daten
- SvLBoxEntry* pEntry = FindEntry(pItem);
+ SvTreeListEntry* pEntry = FindEntry(pItem);
if (pEntry == m_pEditingCurrently)
// cancel editing
@@ -1581,7 +1584,7 @@ FmFormItem* FmFilterNavigator::getSelectedFilterItems(::std::vector<FmFilterItem
sal_Bool bHandled = sal_True;
sal_Bool bFoundSomething = sal_False;
- for (SvLBoxEntry* pEntry = FirstSelected();
+ for (SvTreeListEntry* pEntry = FirstSelected();
bHandled && pEntry != NULL;
pEntry = NextSelected(pEntry))
{
@@ -1665,7 +1668,7 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt )
{
// die Stelle, an der geklickt wurde
Point aWhere;
- SvLBoxEntry* pClicked = NULL;
+ SvTreeListEntry* pClicked = NULL;
if (rEvt.IsMouseEvent())
{
aWhere = rEvt.GetMousePosPixel();
@@ -1689,7 +1692,7 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt )
}
::std::vector<FmFilterData*> aSelectList;
- for (SvLBoxEntry* pEntry = FirstSelected();
+ for (SvTreeListEntry* pEntry = FirstSelected();
pEntry != NULL;
pEntry = NextSelected(pEntry))
{
@@ -1758,9 +1761,9 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt )
SvTreeListBox::Command( rEvt );
}
// -----------------------------------------------------------------------------
-SvLBoxEntry* FmFilterNavigator::getNextEntry(SvLBoxEntry* _pStartWith)
+SvTreeListEntry* FmFilterNavigator::getNextEntry(SvTreeListEntry* _pStartWith)
{
- SvLBoxEntry* pEntry = _pStartWith ? _pStartWith : LastSelected();
+ SvTreeListEntry* pEntry = _pStartWith ? _pStartWith : LastSelected();
pEntry = Next(pEntry);
// we need the next filter entry
while( pEntry && GetChildCount( pEntry ) == 0 && pEntry != Last() )
@@ -1768,9 +1771,9 @@ SvLBoxEntry* FmFilterNavigator::getNextEntry(SvLBoxEntry* _pStartWith)
return pEntry;
}
// -----------------------------------------------------------------------------
-SvLBoxEntry* FmFilterNavigator::getPrevEntry(SvLBoxEntry* _pStartWith)
+SvTreeListEntry* FmFilterNavigator::getPrevEntry(SvTreeListEntry* _pStartWith)
{
- SvLBoxEntry* pEntry = _pStartWith ? _pStartWith : FirstSelected();
+ SvTreeListEntry* pEntry = _pStartWith ? _pStartWith : FirstSelected();
pEntry = Prev(pEntry);
// check if the previous entry is a filter, if so get the next prev
if ( pEntry && GetChildCount( pEntry ) != 0 )
@@ -1799,11 +1802,11 @@ void FmFilterNavigator::KeyInput(const KeyEvent& rKEvt)
if ( !getSelectedFilterItems( aItemList ) )
break;
- ::std::mem_fun1_t<SvLBoxEntry*,FmFilterNavigator,SvLBoxEntry*> getter = ::std::mem_fun(&FmFilterNavigator::getNextEntry);
+ ::std::mem_fun1_t<SvTreeListEntry*,FmFilterNavigator,SvTreeListEntry*> getter = ::std::mem_fun(&FmFilterNavigator::getNextEntry);
if ( rKeyCode.GetCode() == KEY_UP )
getter = ::std::mem_fun(&FmFilterNavigator::getPrevEntry);
- SvLBoxEntry* pTarget = getter( this, NULL );
+ SvTreeListEntry* pTarget = getter( this, NULL );
if ( !pTarget )
break;
@@ -1871,8 +1874,8 @@ void FmFilterNavigator::DeleteSelection()
{
// to avoid the deletion of an entry twice (e.g. deletion of a parent and afterward
// the deletion of it's child, i have to shrink the selecton list
- ::std::vector<SvLBoxEntry*> aEntryList;
- for (SvLBoxEntry* pEntry = FirstSelected();
+ ::std::vector<SvTreeListEntry*> aEntryList;
+ for (SvTreeListEntry* pEntry = FirstSelected();
pEntry != NULL;
pEntry = NextSelected(pEntry))
{
@@ -1888,7 +1891,7 @@ void FmFilterNavigator::DeleteSelection()
// Remove the selection
SelectAll(sal_False);
- for (::std::vector<SvLBoxEntry*>::reverse_iterator i = aEntryList.rbegin();
+ for (::std::vector<SvTreeListEntry*>::reverse_iterator i = aEntryList.rbegin();
// link problems with operator ==
i.base() != aEntryList.rend().base(); ++i)
{
diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx
index fab396509a3a..4e39878b0502 100644
--- a/svx/source/form/fmexch.cxx
+++ b/svx/source/form/fmexch.cxx
@@ -204,20 +204,20 @@ namespace svxform
}
//--------------------------------------------------------------------
- size_t OControlTransferData::onEntryRemoved( SvLBoxEntry* _pEntry )
+ size_t OControlTransferData::onEntryRemoved( SvTreeListEntry* _pEntry )
{
m_aSelectedEntries.erase( _pEntry );
return m_aSelectedEntries.size();
}
//--------------------------------------------------------------------
- void OControlTransferData::addSelectedEntry( SvLBoxEntry* _pEntry )
+ void OControlTransferData::addSelectedEntry( SvTreeListEntry* _pEntry )
{
m_aSelectedEntries.insert( _pEntry );
}
//--------------------------------------------------------------------
- void OControlTransferData::setFocusEntry( SvLBoxEntry* _pFocusEntry )
+ void OControlTransferData::setFocusEntry( SvTreeListEntry* _pFocusEntry )
{
m_pFocusEntry = _pFocusEntry;
}
@@ -229,7 +229,7 @@ namespace svxform
}
//------------------------------------------------------------------------
- void OControlTransferData::buildPathFormat(SvTreeListBox* pTreeBox, SvLBoxEntry* pRoot)
+ void OControlTransferData::buildPathFormat(SvTreeListBox* pTreeBox, SvTreeListEntry* pRoot)
{
m_aControlPaths.realloc(0);
@@ -246,9 +246,9 @@ namespace svxform
{
// erst mal sammeln wir den Pfad in einem Array ein
::std::vector< sal_uInt32 > aCurrentPath;
- SvLBoxEntry* pCurrentEntry = *loop;
+ SvTreeListEntry* pCurrentEntry = *loop;
- SvLBoxEntry* pLoop = pCurrentEntry;
+ SvTreeListEntry* pLoop = pCurrentEntry;
while (pLoop != pRoot)
{
aCurrentPath.push_back(pLoop->GetChildListPos());
@@ -270,7 +270,7 @@ namespace svxform
}
//------------------------------------------------------------------------
- void OControlTransferData::buildListFromPath(SvTreeListBox* pTreeBox, SvLBoxEntry* pRoot)
+ void OControlTransferData::buildListFromPath(SvTreeListBox* pTreeBox, SvTreeListEntry* pRoot)
{
ListBoxEntrySet aEmpty;
m_aSelectedEntries.swap( aEmpty );
@@ -281,7 +281,7 @@ namespace svxform
{
sal_Int32 nThisPatLength = pPaths[i].getLength();
const sal_uInt32* pThisPath = pPaths[i].getConstArray();
- SvLBoxEntry* pSearch = pRoot;
+ SvTreeListEntry* pSearch = pRoot;
for (sal_Int32 j=0; j<nThisPatLength; ++j)
pSearch = pTreeBox->GetEntry(pSearch, pThisPath[j]);
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index f9506a3e480c..813d43629c7c 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -59,6 +59,7 @@
#include <com/sun/star/awt/XCheckBox.hpp>
#include <com/sun/star/awt/XListBox.hpp>
#include <com/sun/star/awt/XTextComponent.hpp>
+#include <com/sun/star/beans/Introspection.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
@@ -84,7 +85,6 @@
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/util/XNumberFormatter.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <com/sun/star/beans/XIntrospection.hpp>
#include <comphelper/extract.hxx>
#include <comphelper/evtmethodhelper.hxx>
@@ -385,16 +385,16 @@ namespace
Sequence< Type> aModelListeners;
Sequence< Type> aControlListeners;
- Reference< XIntrospection> xModelIntrospection(::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString("com.sun.star.beans.Introspection")), UNO_QUERY);
- Reference< XIntrospection> xControlIntrospection(::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString("com.sun.star.beans.Introspection")), UNO_QUERY);
+ Reference< XIntrospection> xModelIntrospection = Introspection::create(::comphelper::getProcessComponentContext());
+ Reference< XIntrospection> xControlIntrospection = Introspection::create(::comphelper::getProcessComponentContext());
- if (xModelIntrospection.is() && xModel.is())
+ if (xModel.is())
{
Any aModel(makeAny(xModel));
aModelListeners = xModelIntrospection->inspect(aModel)->getSupportedListeners();
}
- if (xControlIntrospection.is() && xControl.is())
+ if (xControl.is())
{
Any aControl(makeAny(xControl));
aControlListeners = xControlIntrospection->inspect(aControl)->getSupportedListeners();
diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx
index f9d6a85f864a..14fb1fca3639 100644
--- a/svx/source/form/fmsrcimp.cxx
+++ b/svx/source/form/fmsrcimp.cxx
@@ -49,7 +49,7 @@
#include <com/sun/star/i18n/CollatorOptions.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
-#include <com/sun/star/util/XNumberFormatter.hpp>
+#include <com/sun/star/util/NumberFormatter.hpp>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/util/XNumberFormats.hpp>
@@ -686,7 +686,7 @@ FmSearchEngine::FmSearchEngine(const Reference< XMultiServiceFactory >& _rxORB,
:m_xSearchCursor(xCursor)
,m_xFormatSupplier(xFormatSupplier)
- ,m_aCharacterClassficator( _rxORB, SvtSysLocale().GetLocaleData().getLocale() )
+ ,m_aCharacterClassficator( comphelper::getComponentContext(_rxORB), SvtSysLocale().GetLocaleData().getLocale() )
,m_aStringCompare( _rxORB )
,m_nCurrentFieldIndex(-2) // -1 hat schon eine Bedeutung, also nehme ich -2 fuer 'ungueltig'
,m_bUsingTextComponents(sal_False)
@@ -710,10 +710,10 @@ FmSearchEngine::FmSearchEngine(const Reference< XMultiServiceFactory >& _rxORB,
{
DBG_CTOR(FmSearchEngine,NULL);
- m_xFormatter = Reference< ::com::sun::star::util::XNumberFormatter > (::comphelper::getProcessServiceFactory()
- ->createInstance(FM_NUMBER_FORMATTER), UNO_QUERY);
- if (m_xFormatter.is())
- m_xFormatter->attachNumberFormatsSupplier(m_xFormatSupplier);
+ m_xFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(
+ ::com::sun::star::util::NumberFormatter::create( ::comphelper::getProcessComponentContext() ),
+ UNO_QUERY_THROW);
+ m_xFormatter->attachNumberFormatsSupplier(m_xFormatSupplier);
Init(sVisibleFields);
}
@@ -723,7 +723,7 @@ FmSearchEngine::FmSearchEngine(const Reference< XMultiServiceFactory >& _rxORB,
const Reference< XResultSet > & xCursor, const ::rtl::OUString& sVisibleFields,
const InterfaceArray& arrFields, FMSEARCH_MODE eMode)
:m_xSearchCursor(xCursor)
- ,m_aCharacterClassficator( _rxORB, SvtSysLocale().GetLocaleData().getLocale() )
+ ,m_aCharacterClassficator( comphelper::getComponentContext(_rxORB), SvtSysLocale().GetLocaleData().getLocale() )
,m_aStringCompare( _rxORB )
,m_nCurrentFieldIndex(-2) // -1 hat schon eine Bedeutung, also nehme ich -2 fuer 'ungueltig'
,m_bUsingTextComponents(sal_True)
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index fb5f281cb80e..8c7fc1e70f98 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -75,6 +75,7 @@
#include <comphelper/extract.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/namedvaluecollection.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/propagg.hxx>
#include <comphelper/property.hxx>
#include <comphelper/sequence.hxx>
@@ -559,7 +560,7 @@ DBG_NAME( FormController )
FormController::FormController(const Reference< XMultiServiceFactory > & _rxORB )
:FormController_BASE( m_aMutex )
,OPropertySetHelper( FormController_BASE::rBHelper )
- ,OSQLParserClient( _rxORB )
+ ,OSQLParserClient( comphelper::getComponentContext(_rxORB) )
,m_aContext( _rxORB )
,m_aActivateListeners(m_aMutex)
,m_aModifyListeners(m_aMutex)
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index c0a151706e28..fe5968f542fd 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -229,7 +229,7 @@ namespace svxform
// wenn es GENAU eine Form gibt, auch diese expandieren
if (m_pRootEntry)
{
- SvLBoxEntry* pFirst = FirstChild(m_pRootEntry);
+ SvTreeListEntry* pFirst = FirstChild(m_pRootEntry);
if (pFirst && !NextSibling(pFirst))
Expand(pFirst);
}
@@ -239,7 +239,7 @@ namespace svxform
sal_Bool NavigatorTree::implAllowExchange( sal_Int8 _nAction, sal_Bool* _pHasNonHidden )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::implAllowExchange" );
- SvLBoxEntry* pCurEntry = GetCurEntry();
+ SvTreeListEntry* pCurEntry = GetCurEntry();
if (!pCurEntry)
return sal_False;
@@ -338,7 +338,7 @@ namespace svxform
if (rEvt.IsMouseEvent())
{
ptWhere = rEvt.GetMousePosPixel();
- SvLBoxEntry* ptClickedOn = GetEntry(ptWhere);
+ SvTreeListEntry* ptClickedOn = GetEntry(ptWhere);
if (ptClickedOn == NULL)
break;
if ( !IsSelected(ptClickedOn) )
@@ -353,7 +353,7 @@ namespace svxform
if (m_arrCurrentSelection.empty()) // kann nur bei Kontextmenue ueber Tastatur passieren
break;
- SvLBoxEntry* pCurrent = GetCurEntry();
+ SvTreeListEntry* pCurrent = GetCurEntry();
if (!pCurrent)
break;
ptWhere = GetEntryPosition(pCurrent);
@@ -500,7 +500,7 @@ namespace svxform
case SID_FM_TAB_DIALOG:
{
// dieser Slot galt bei genau einem selektierten Formular
- SvLBoxEntry* pSelectedForm = *m_arrCurrentSelection.begin();
+ SvTreeListEntry* pSelectedForm = *m_arrCurrentSelection.begin();
DBG_ASSERT( IsFormEntry(pSelectedForm), "NavigatorTree::Command: Dieser Eintrag muss ein FormEntry sein." );
FmFormData* pFormData = (FmFormData*)pSelectedForm->GetUserData();
@@ -554,11 +554,11 @@ namespace svxform
}
//------------------------------------------------------------------------
- SvLBoxEntry* NavigatorTree::FindEntry( FmEntryData* pEntryData )
+ SvTreeListEntry* NavigatorTree::FindEntry( FmEntryData* pEntryData )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::FindEntry" );
if( !pEntryData ) return NULL;
- SvLBoxEntry* pCurEntry = First();
+ SvTreeListEntry* pCurEntry = First();
FmEntryData* pCurEntryData;
while( pCurEntry )
{
@@ -594,7 +594,7 @@ namespace svxform
else if( rHint.ISA(FmNavModelReplacedHint) )
{
FmEntryData* pData = ((FmNavModelReplacedHint*)&rHint)->GetEntryData();
- SvLBoxEntry* pEntry = FindEntry( pData );
+ SvTreeListEntry* pEntry = FindEntry( pData );
if (pEntry)
{ // das Image neu setzen
SetCollapsedEntryBmp( pEntry, pData->GetNormalImage() );
@@ -605,7 +605,7 @@ namespace svxform
else if( rHint.ISA(FmNavNameChangedHint) )
{
FmNavNameChangedHint* pNameChangedHint = (FmNavNameChangedHint*)&rHint;
- SvLBoxEntry* pEntry = FindEntry( pNameChangedHint->GetEntryData() );
+ SvTreeListEntry* pEntry = FindEntry( pNameChangedHint->GetEntryData() );
SetEntryText( pEntry, pNameChangedHint->GetNewName() );
}
@@ -634,13 +634,13 @@ namespace svxform
}
//------------------------------------------------------------------------
- SvLBoxEntry* NavigatorTree::Insert( FmEntryData* pEntryData, sal_uIntPtr nRelPos )
+ SvTreeListEntry* NavigatorTree::Insert( FmEntryData* pEntryData, sal_uIntPtr nRelPos )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::Insert" );
//////////////////////////////////////////////////////////////////////
// Aktuellen Eintrag einfuegen
- SvLBoxEntry* pParentEntry = FindEntry( pEntryData->GetParent() );
- SvLBoxEntry* pNewEntry;
+ SvTreeListEntry* pParentEntry = FindEntry( pEntryData->GetParent() );
+ SvTreeListEntry* pNewEntry;
if( !pParentEntry )
pNewEntry = InsertEntry( pEntryData->GetText(),
@@ -679,7 +679,7 @@ namespace svxform
return;
// der Entry zu den Daten
- SvLBoxEntry* pEntry = FindEntry( pEntryData );
+ SvTreeListEntry* pEntry = FindEntry( pEntryData );
if (!pEntry)
return;
@@ -709,7 +709,7 @@ namespace svxform
}
//------------------------------------------------------------------------
- sal_Bool NavigatorTree::IsFormEntry( SvLBoxEntry* pEntry )
+ sal_Bool NavigatorTree::IsFormEntry( SvTreeListEntry* pEntry )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::IsFormEntry" );
FmEntryData* pEntryData = (FmEntryData*)pEntry->GetUserData();
@@ -717,7 +717,7 @@ namespace svxform
}
//------------------------------------------------------------------------
- sal_Bool NavigatorTree::IsFormComponentEntry( SvLBoxEntry* pEntry )
+ sal_Bool NavigatorTree::IsFormComponentEntry( SvTreeListEntry* pEntry )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::IsFormComponentEntry" );
FmEntryData* pEntryData = (FmEntryData*)pEntry->GetUserData();
@@ -728,7 +728,7 @@ namespace svxform
sal_Bool NavigatorTree::implAcceptPaste( )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::implAcceptPaste" );
- SvLBoxEntry* pFirstSelected = FirstSelected();
+ SvTreeListEntry* pFirstSelected = FirstSelected();
if ( !pFirstSelected || NextSelected( pFirstSelected ) )
// no selected entry, or at least two selected entries
return sal_False;
@@ -748,7 +748,7 @@ namespace svxform
}
//------------------------------------------------------------------------
- sal_Int8 NavigatorTree::implAcceptDataTransfer( const DataFlavorExVector& _rFlavors, sal_Int8 _nAction, SvLBoxEntry* _pTargetEntry, sal_Bool _bDnD )
+ sal_Int8 NavigatorTree::implAcceptDataTransfer( const DataFlavorExVector& _rFlavors, sal_Int8 _nAction, SvTreeListEntry* _pTargetEntry, sal_Bool _bDnD )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::implAcceptDataTransfer" );
// no target -> no drop
@@ -825,7 +825,7 @@ namespace svxform
DBG_ASSERT(aDropped.size() >= 1, "NavigatorTree::implAcceptDataTransfer: keine Eintraege !");
sal_Bool bDropTargetIsComponent = IsFormComponentEntry( _pTargetEntry );
- //SvLBoxEntry* pDropTargetParent = GetParent( _pTargetEntry );
+ //SvTreeListEntry* pDropTargetParent = GetParent( _pTargetEntry );
// conditions to disallow the drop
// 0) the root entry is part of the list (can't DnD the root!)
@@ -838,7 +838,7 @@ namespace svxform
// collect the ancestors of the drop targte (speeds up 3)
SvLBoxEntrySortedArray arrDropAnchestors;
- SvLBoxEntry* pLoop = _pTargetEntry;
+ SvTreeListEntry* pLoop = _pTargetEntry;
while (pLoop)
{
arrDropAnchestors.insert(pLoop);
@@ -850,8 +850,8 @@ namespace svxform
++dropped
)
{
- SvLBoxEntry* pCurrent = *dropped;
- SvLBoxEntry* pCurrentParent = GetParent(pCurrent);
+ SvTreeListEntry* pCurrent = *dropped;
+ SvTreeListEntry* pCurrentParent = GetParent(pCurrent);
// test for 0)
if (pCurrent == m_pRootEntry)
@@ -914,7 +914,7 @@ namespace svxform
bNeedTrigger = sal_True;
} else
{ // auf einem Entry mit Children, der nicht aufgeklappt ist ?
- SvLBoxEntry* pDropppedOn = GetEntry(aDropPos);
+ SvTreeListEntry* pDropppedOn = GetEntry(aDropPos);
if (pDropppedOn && (GetChildCount(pDropppedOn) > 0) && !IsExpanded(pDropppedOn))
{
// -> aufklappen
@@ -950,7 +950,7 @@ namespace svxform
}
//------------------------------------------------------------------------
- sal_Int8 NavigatorTree::implExecuteDataTransfer( const OControlTransferData& _rData, sal_Int8 _nAction, SvLBoxEntry* _pTargetEntry, sal_Bool _bDnD )
+ sal_Int8 NavigatorTree::implExecuteDataTransfer( const OControlTransferData& _rData, sal_Int8 _nAction, SvTreeListEntry* _pTargetEntry, sal_Bool _bDnD )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::implExecuteDataTransfer" );
const DataFlavorExVector& rDataFlavors = _rData.GetDataFlavorExVector();
@@ -1035,7 +1035,7 @@ namespace svxform
}
}
- SvLBoxEntry* pToSelect = FindEntry(pNewControlData);
+ SvTreeListEntry* pToSelect = FindEntry(pNewControlData);
Select(pToSelect, sal_True);
if (i == 0)
SetCurEntry(pToSelect);
@@ -1090,7 +1090,7 @@ namespace svxform
)
{
// ein paar Daten zum aktuellen Element
- SvLBoxEntry* pCurrent = *dropped;
+ SvTreeListEntry* pCurrent = *dropped;
DBG_ASSERT(pCurrent != NULL, "NavigatorTree::implExecuteDataTransfer: ungueltiger Eintrag");
DBG_ASSERT(GetParent(pCurrent) != NULL, "NavigatorTree::implExecuteDataTransfer: ungueltiger Eintrag");
// die Root darf nicht gedraggt werden
@@ -1182,10 +1182,10 @@ namespace svxform
GetNavModel()->GetRootList()->insert( pCurrentUserData, nIndex );
// dann bei mir selber bekanntgeben und neu selektieren
- SvLBoxEntry* pNew = Insert( pCurrentUserData, nIndex );
+ SvTreeListEntry* pNew = Insert( pCurrentUserData, nIndex );
if ( ( aDropped.begin() == dropped ) && pNew )
{
- SvLBoxEntry* pParent = GetParent( pNew );
+ SvTreeListEntry* pParent = GetParent( pNew );
if ( pParent )
Expand( pParent );
}
@@ -1269,10 +1269,10 @@ namespace svxform
}
//------------------------------------------------------------------------
- void NavigatorTree::ModelHasRemoved( SvListEntry* _pEntry )
+ void NavigatorTree::ModelHasRemoved( SvTreeListEntry* _pEntry )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::ModelHasRemoved" );
- SvLBoxEntry* pTypedEntry = static_cast< SvLBoxEntry* >( _pEntry );
+ SvTreeListEntry* pTypedEntry = static_cast< SvTreeListEntry* >( _pEntry );
if ( doingKeyboardCut() )
m_aCutEntries.erase( pTypedEntry );
@@ -1301,7 +1301,7 @@ namespace svxform
for ( SvLBoxEntrySortedArray::const_iterator it = m_arrCurrentSelection.begin();
it != m_arrCurrentSelection.end(); ++it )
{
- SvLBoxEntry* pEntry = *it;
+ SvTreeListEntry* pEntry = *it;
if ( pEntry )
{
m_aCutEntries.insert( pEntry );
@@ -1349,7 +1349,7 @@ namespace svxform
}
//------------------------------------------------------------------------
- sal_Bool NavigatorTree::EditingEntry( SvLBoxEntry* pEntry, Selection& rSelection )
+ sal_Bool NavigatorTree::EditingEntry( SvTreeListEntry* pEntry, Selection& rSelection )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::EditingEntry" );
if (!SvTreeListBox::EditingEntry( pEntry, rSelection ))
@@ -1360,7 +1360,7 @@ namespace svxform
}
//------------------------------------------------------------------------
- void NavigatorTree::NewForm( SvLBoxEntry* pParentEntry )
+ void NavigatorTree::NewForm( SvTreeListEntry* pParentEntry )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::NewForm" );
//////////////////////////////////////////////////////////////////////
@@ -1417,12 +1417,12 @@ namespace svxform
//////////////////////////////////////////////////////////////////////
// In EditMode schalten
- SvLBoxEntry* pNewEntry = FindEntry( pNewFormData );
+ SvTreeListEntry* pNewEntry = FindEntry( pNewFormData );
EditEntry( pNewEntry );
}
//------------------------------------------------------------------------
- FmControlData* NavigatorTree::NewControl( const ::rtl::OUString& rServiceName, SvLBoxEntry* pParentEntry, sal_Bool bEditName )
+ FmControlData* NavigatorTree::NewControl( const ::rtl::OUString& rServiceName, SvTreeListEntry* pParentEntry, sal_Bool bEditName )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::NewControl" );
//////////////////////////////////////////////////////////////////////
@@ -1462,7 +1462,7 @@ namespace svxform
{
//////////////////////////////////////////////////////////////////////
// In EditMode schalten
- SvLBoxEntry* pNewEntry = FindEntry( pNewFormControlData );
+ SvTreeListEntry* pNewEntry = FindEntry( pNewFormControlData );
Select( pNewEntry, sal_True );
EditEntry( pNewEntry );
}
@@ -1506,7 +1506,7 @@ namespace svxform
}
//------------------------------------------------------------------------
- sal_Bool NavigatorTree::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText )
+ sal_Bool NavigatorTree::EditedEntry( SvTreeListEntry* pEntry, const rtl::OUString& rNewText )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::EditedEntry" );
if (EditingCanceled())
@@ -1545,7 +1545,7 @@ namespace svxform
{
case DA_EXPANDNODE:
{
- SvLBoxEntry* pToExpand = GetEntry(m_aTimerTriggered);
+ SvTreeListEntry* pToExpand = GetEntry(m_aTimerTriggered);
if (pToExpand && (GetChildCount(pToExpand) > 0) && !IsExpanded(pToExpand))
// tja, eigentlich muesste ich noch testen, ob die Node nicht schon expandiert ist, aber ich
// habe dazu weder in den Basisklassen noch im Model eine Methode gefunden ...
@@ -1609,7 +1609,7 @@ namespace svxform
++i
)
{
- SvLBoxEntry* pEntry = *i;
+ SvTreeListEntry* pEntry = *i;
if ( !pEntry )
continue;
@@ -1868,7 +1868,7 @@ namespace svxform
m_nFormsSelected = m_nControlsSelected = m_nHiddenControls = 0;
m_bRootSelected = sal_False;
- SvLBoxEntry* pSelectionLoop = FirstSelected();
+ SvTreeListEntry* pSelectionLoop = FirstSelected();
while (pSelectionLoop)
{
// erst mal die Zaehlung der verschiedenen Elemente
@@ -1893,7 +1893,7 @@ namespace svxform
m_arrCurrentSelection.insert(pSelectionLoop);
else
{
- SvLBoxEntry* pParentLoop = GetParent(pSelectionLoop);
+ SvTreeListEntry* pParentLoop = GetParent(pSelectionLoop);
while (pParentLoop)
{
// eigentlich muesste ich testen, ob das Parent in der m_arrCurrentSelection steht ...
@@ -1917,7 +1917,7 @@ namespace svxform
}
else if (sdiHow == SDI_NORMALIZED_FORMARK)
{
- SvLBoxEntry* pParent = GetParent(pSelectionLoop);
+ SvTreeListEntry* pParent = GetParent(pSelectionLoop);
if (!pParent || !IsSelected(pParent) || IsFormEntry(pSelectionLoop))
m_arrCurrentSelection.insert(pSelectionLoop);
}
@@ -1943,7 +1943,7 @@ namespace svxform
else
{
// erst mal gleiche ich meine aktuelle Selektion mit der geforderten SelectList ab
- SvLBoxEntry* pSelection = FirstSelected();
+ SvTreeListEntry* pSelection = FirstSelected();
while (pSelection)
{
FmEntryData* pCurrent = (FmEntryData*)pSelection->GetUserData();
@@ -1969,7 +1969,7 @@ namespace svxform
}
// jetzt habe ich in der SelectList genau die Eintraege, die noch selektiert werden muessen
- // zwei Moeglichkeiten : 1) ich gehe durch die SelectList, besorge mir zu jedem Eintrag meinen SvLBoxEntry
+ // zwei Moeglichkeiten : 1) ich gehe durch die SelectList, besorge mir zu jedem Eintrag meinen SvTreeListEntry
// und selektiere diesen (waere irgendwie intuitiver ;)) 2) ich gehe durch alle meine SvLBoxEntries und selektiere
// genau die, die ich in der SelectList finde
// 1) braucht O(k*n) (k=Laenge der SelectList, n=Anzahl meiner Entries), plus den Fakt, dass FindEntry nicht den
@@ -1977,7 +1977,7 @@ namespace svxform
// 2) braucht O(n*log k), dupliziert aber etwas Code (naemlich den aus FindEntry)
// da das hier eine relativ oft aufgerufenen Stelle sein koennte (bei jeder Aenderung in der Markierung in der View !),
// nehme ich doch lieber letzteres
- SvLBoxEntry* pLoop = First();
+ SvTreeListEntry* pLoop = First();
while( pLoop )
{
FmEntryData* pCurEntryData = (FmEntryData*)pLoop->GetUserData();
@@ -2027,7 +2027,7 @@ namespace svxform
for (SvLBoxEntrySortedArray::const_iterator it = m_arrCurrentSelection.begin();
it != m_arrCurrentSelection.end(); ++it)
{
- SvLBoxEntry* pSelectionLoop = *it;
+ SvTreeListEntry* pSelectionLoop = *it;
// Bei Formselektion alle Controls dieser Form markieren
if (IsFormEntry(pSelectionLoop) && (pSelectionLoop != m_pRootEntry))
MarkViewObj((FmFormData*)pSelectionLoop->GetUserData(), sal_True, sal_False);
@@ -2095,7 +2095,7 @@ namespace svxform
}
//------------------------------------------------------------------------
- sal_Bool NavigatorTree::Select( SvLBoxEntry* pEntry, sal_Bool bSelect )
+ sal_Bool NavigatorTree::Select( SvTreeListEntry* pEntry, sal_Bool bSelect )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "NavigatorTree::Select" );
if (bSelect == IsSelected(pEntry)) // das passiert manchmal, ich glaube, die Basisklasse geht zu sehr auf Nummer sicher ;)
diff --git a/svx/source/form/sqlparserclient.cxx b/svx/source/form/sqlparserclient.cxx
index f9eb42ee1e6e..ea3ffc9d847a 100644
--- a/svx/source/form/sqlparserclient.cxx
+++ b/svx/source/form/sqlparserclient.cxx
@@ -32,16 +32,16 @@ namespace svxform
//= OSQLParserClient
//====================================================================
//--------------------------------------------------------------------
- OSQLParserClient::OSQLParserClient(const Reference< XMultiServiceFactory >& _rxORB)
+ OSQLParserClient::OSQLParserClient(const Reference< XComponentContext >& rxContext)
{
- m_xORB = _rxORB;
+ m_xContext = rxContext;
}
//--------------------------------------------------------------------
bool OSQLParserClient::ensureLoaded() const
{
if ( !ODbtoolsClient::ensureLoaded() )
return false;
- m_xParser = getFactory()->createSQLParser(m_xORB,getParseContext());
+ m_xParser = getFactory()->createSQLParser(m_xContext,getParseContext());
return m_xParser.is();
}
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index accb2c1ed08a..8fa8b73c5c85 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -161,7 +161,7 @@ sal_Bool FmFieldWinListBox::DoubleClickHdl()
//------------------------------------------------------------------------------
void FmFieldWinListBox::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel*/ )
{
- SvLBoxEntry* pSelected = FirstSelected();
+ SvTreeListEntry* pSelected = FirstSelected();
if (!pSelected)
// no drag without a field
return;
@@ -250,7 +250,7 @@ void FmFieldWin::GetFocus()
//-----------------------------------------------------------------------
sal_Bool FmFieldWin::createSelectionControls( )
{
- SvLBoxEntry* pSelected = pListBox->FirstSelected();
+ SvTreeListEntry* pSelected = pListBox->FirstSelected();
if ( pSelected )
{
// build a descriptor for the currently selected field
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 462c9911665e..3949d4c6536a 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -136,7 +136,7 @@ namespace svxform
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
void DeleteAndClear();
- void RemoveEntry( SvLBoxEntry* _pEntry );
+ void RemoveEntry( SvTreeListEntry* _pEntry );
};
//========================================================================
@@ -163,12 +163,12 @@ namespace svxform
DECL_LINK(TbxSelectHdl, void *);
DECL_LINK(ItemSelectHdl, void *);
- void AddChildren( SvLBoxEntry* _pParent,
+ void AddChildren( SvTreeListEntry* _pParent,
const ImageList& _rImgLst,
const XNode_ref& _xNode );
bool DoToolBoxAction( sal_uInt16 _nToolBoxID );
- SvLBoxEntry* AddEntry( ItemNode* _pNewNode, bool _bIsElement );
- SvLBoxEntry* AddEntry( const XPropertySet_ref& _rPropSet );
+ SvTreeListEntry* AddEntry( ItemNode* _pNewNode, bool _bIsElement );
+ SvTreeListEntry* AddEntry( const XPropertySet_ref& _rPropSet );
void EditEntry( const XPropertySet_ref& _rPropSet );
bool RemoveEntry();
@@ -190,7 +190,7 @@ namespace svxform
bool DoMenuAction( sal_uInt16 _nMenuID );
void EnableMenuItems( Menu* _pMenu );
- inline SvLBoxEntry* GetSelectedItem() const { return m_aItemList.FirstSelected(); }
+ inline SvTreeListEntry* GetSelectedItem() const { return m_aItemList.FirstSelected(); }
inline const String& GetInstanceName() const { return m_sInstanceName; }
inline const String& GetInstanceURL() const { return m_sInstanceURL; }
inline bool GetLinkOnce() const { return m_bLinkOnce; }
diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx
index 12cb6804b1d6..213196005e9b 100644
--- a/svx/source/inc/docrecovery.hxx
+++ b/svx/source/inc/docrecovery.hxx
@@ -60,8 +60,6 @@
#define RECOVERY_CMD_DO_ENTRY_CLEANUP rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.autorecovery:/doEntryCleanUp" ))
#define SERVICENAME_PROGRESSFACTORY rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.StatusIndicatorFactory"))
-#define SERVICENAME_RECOVERYCORE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.AutoRecovery" ))
-#define SERVICENAME_FOLDERPICKER rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FolderPicker" ))
#define SERVICENAME_DESKTOP rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))
#define PROP_PARENTWINDOW rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Window" ))
@@ -214,7 +212,7 @@ class RecoveryCore : public ::cppu::WeakImplHelper1< css::frame::XStatusListener
private:
/// TODO
- css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
/// TODO
css::uno::Reference< css::frame::XDispatch > m_xRealCore;
@@ -243,8 +241,8 @@ class RecoveryCore : public ::cppu::WeakImplHelper1< css::frame::XStatusListener
//---------------------------------------
/** @short TODO */
- RecoveryCore(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR ,
- sal_Bool bUsedForSaving);
+ RecoveryCore(const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+ sal_Bool bUsedForSaving);
//---------------------------------------
/** @short TODO */
@@ -252,7 +250,7 @@ class RecoveryCore : public ::cppu::WeakImplHelper1< css::frame::XStatusListener
//---------------------------------------
/** @short TODO */
- virtual css::uno::Reference< css::lang::XMultiServiceFactory > getSMGR();
+ virtual css::uno::Reference< css::uno::XComponentContext > getComponentContext();
//---------------------------------------
/** @short TODO */
@@ -571,14 +569,14 @@ class RecovDocListEntry : public SvLBoxString
//---------------------------------------
/** @short TODO */
- RecovDocListEntry( SvLBoxEntry* pEntry,
+ RecovDocListEntry( SvTreeListEntry* pEntry,
sal_uInt16 nFlags,
const String& sText );
//---------------------------------------
/** @short TODO */
virtual void Paint(
- const Point& aPos, SvTreeListBox& aDevice, sal_uInt16 nFlags, SvLBoxEntry* pEntry);
+ const Point& aPos, SvTreeListBox& aDevice, sal_uInt16 nFlags, SvTreeListEntry* pEntry);
};
//===============================================
@@ -592,11 +590,11 @@ class RecovDocList : public SvxSimpleTable
Image m_aYellowCheckImg;
Image m_aRedCrossImg;
- String m_aSuccessRecovStr;
- String m_aOrigDocRecovStr;
- String m_aRecovFailedStr;
- String m_aRecovInProgrStr;
- String m_aNotRecovYetStr;
+ OUString m_aSuccessRecovStr;
+ OUString m_aOrigDocRecovStr;
+ OUString m_aRecovFailedStr;
+ OUString m_aRecovInProgrStr;
+ OUString m_aNotRecovYetStr;
//-------------------------------------------
// interface
@@ -611,11 +609,11 @@ class RecovDocList : public SvxSimpleTable
//---------------------------------------
/** @short TODO */
- virtual void InitEntry( SvLBoxEntry* pEntry ,
- const XubString& sText ,
- const Image& aImage1,
- const Image& aImage2,
- SvLBoxButtonKind eButtonKind);
+ virtual void InitEntry(SvTreeListEntry* pEntry,
+ const OUString& rText,
+ const Image& rImage1,
+ const Image& rImage2,
+ SvLBoxButtonKind eButtonKind);
};
//===============================================
diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx
index 753b38db21a2..805cd8c3311a 100644
--- a/svx/source/inc/filtnav.hxx
+++ b/svx/source/inc/filtnav.hxx
@@ -259,7 +259,7 @@ class FmFilterNavigator : public SvTreeListBox, public SfxListener
enum DROP_ACTION{ DA_SCROLLUP, DA_SCROLLDOWN, DA_EXPANDNODE };
FmFilterModel* m_pModel;
- SvLBoxEntry* m_pEditingCurrently;
+ SvTreeListEntry* m_pEditingCurrently;
OFilterExchangeHelper m_aControlExchange;
@@ -284,22 +284,22 @@ protected:
virtual void KeyInput( const KeyEvent& rKEvt );
virtual void Command( const CommandEvent& rEvt );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
- virtual void InitEntry(SvLBoxEntry* pEntry, const XubString& rStr, const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind);
- virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
- virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSelection );
- virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText );
+ virtual void InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind);
+ virtual sal_Bool Select( SvTreeListEntry* pEntry, sal_Bool bSelect=sal_True );
+ virtual sal_Bool EditingEntry( SvTreeListEntry* pEntry, Selection& rSelection );
+ virtual sal_Bool EditedEntry( SvTreeListEntry* pEntry, const rtl::OUString& rNewText );
virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt );
virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt );
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
void DeleteSelection();
- SvLBoxEntry* FindEntry(const FmFilterData* pItem) const;
+ SvTreeListEntry* FindEntry(const FmFilterData* pItem) const;
void Insert(FmFilterData* pItem, sal_uLong nPos);
void Remove(FmFilterData* pItem);
- DECL_LINK(OnRemove, SvLBoxEntry*);
- DECL_LINK(OnEdited, SvLBoxEntry*);
+ DECL_LINK(OnRemove, SvTreeListEntry*);
+ DECL_LINK(OnEdited, SvTreeListEntry*);
DECL_LINK(OnDropActionTimer, void*);
private:
@@ -319,8 +319,8 @@ private:
If <TRUE/> the items will not be removed from the model, otherwise they will.
*/
void insertFilterItem(const ::std::vector<FmFilterItem*>& _rFilterList,FmFilterItems* _pTargetItems,sal_Bool _bCopy = sal_False);
- SvLBoxEntry* getPrevEntry(SvLBoxEntry* _pStartWith = NULL);
- SvLBoxEntry* getNextEntry(SvLBoxEntry* _pStartWith = NULL);
+ SvTreeListEntry* getPrevEntry(SvTreeListEntry* _pStartWith = NULL);
+ SvTreeListEntry* getNextEntry(SvTreeListEntry* _pStartWith = NULL);
using SvTreeListBox::Select;
using SvTreeListBox::ExecuteDrop;
diff --git a/svx/source/inc/fmexch.hxx b/svx/source/inc/fmexch.hxx
index 2bafd5652392..3221e644a376 100644
--- a/svx/source/inc/fmexch.hxx
+++ b/svx/source/inc/fmexch.hxx
@@ -27,7 +27,7 @@
#include <svx/svxdllapi.h>
-class SvLBoxEntry;
+class SvTreeListEntry;
//========================================================================
class SvTreeListBox;
@@ -39,7 +39,7 @@ namespace svxform
//====================================================================
- typedef ::std::set< SvLBoxEntry* > ListBoxEntrySet;
+ typedef ::std::set< SvTreeListEntry* > ListBoxEntrySet;
//====================================================================
//= OLocalExchange
@@ -141,7 +141,7 @@ namespace svxform
m_xFormsRoot; // the root of the forms collection where the entries we represent reside
// this uniquely identifies the page and the document
- SvLBoxEntry* m_pFocusEntry;
+ SvTreeListEntry* m_pFocusEntry;
protected:
// updates m_aCurrentFormats with all formats we currently could supply
@@ -157,8 +157,8 @@ namespace svxform
inline const DataFlavorExVector& GetDataFlavorExVector() const;
- void addSelectedEntry( SvLBoxEntry* _pEntry );
- void setFocusEntry( SvLBoxEntry* _pFocusEntry );
+ void addSelectedEntry( SvTreeListEntry* _pEntry );
+ void setFocusEntry( SvTreeListEntry* _pFocusEntry );
/** notifies the data transfer object that a certain entry has been removed from the owning tree
@@ -168,18 +168,18 @@ namespace svxform
@param _pEntry
@return the number of entries remaining in the selection.
*/
- size_t onEntryRemoved( SvLBoxEntry* _pEntry );
+ size_t onEntryRemoved( SvTreeListEntry* _pEntry );
void setFormsRoot(
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& _rxFormsRoot
) { m_xFormsRoot = _rxFormsRoot; }
- void buildPathFormat(SvTreeListBox* pTreeBox, SvLBoxEntry* pRoot);
+ void buildPathFormat(SvTreeListBox* pTreeBox, SvTreeListEntry* pRoot);
// baut aus m_aSelectedEntries m_aControlPaths auf
// (es wird davon ausgegangen, dass die Eintraege in m_aSelectedEntries sortiert sind in Bezug auf die Nachbar-Beziehung)
- void buildListFromPath(SvTreeListBox* pTreeBox, SvLBoxEntry* pRoot);
+ void buildListFromPath(SvTreeListBox* pTreeBox, SvTreeListEntry* pRoot);
// der umgekehrte Weg : wirft alles aus m_aSelectedEntries weg und baut es mittels m_aControlPaths neu auf
void addHiddenControlsFormat(const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > seqInterfaces);
@@ -187,7 +187,7 @@ namespace svxform
// (es erfolgt KEINE Ueberpruefung, ob dadurch auch tatsaechlich nur hidden Controls bezeichnet werden, dass muss der
// Aufrufer sicherstellen)
- SvLBoxEntry* focused() const { return m_pFocusEntry; }
+ SvTreeListEntry* focused() const { return m_pFocusEntry; }
const ListBoxEntrySet& selected() const { return m_aSelectedEntries; }
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >
hiddenControls() const { return m_aHiddenControlModels; }
diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx
index 89a8dd67702b..981fa10e3b80 100644
--- a/svx/source/inc/fmexpl.hxx
+++ b/svx/source/inc/fmexpl.hxx
@@ -417,7 +417,7 @@ namespace svxform
};
//========================================================================
- typedef std::set<SvLBoxEntry*> SvLBoxEntrySortedArray;
+ typedef std::set<SvTreeListEntry*> SvLBoxEntrySortedArray;
class NavigatorTree : public SvTreeListBox, public SfxListener
{
@@ -438,8 +438,8 @@ namespace svxform
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
NavigatorTreeModel* m_pNavModel;
- SvLBoxEntry* m_pRootEntry;
- SvLBoxEntry* m_pEditEntry;
+ SvTreeListEntry* m_pRootEntry;
+ SvTreeListEntry* m_pEditEntry;
sal_uLong nEditEvent;
@@ -463,9 +463,9 @@ namespace svxform
void UpdateContent();
- FmControlData* NewControl( const ::rtl::OUString& rServiceName, SvLBoxEntry* pParentEntry, sal_Bool bEditName = sal_True );
- void NewForm( SvLBoxEntry* pParentEntry );
- SvLBoxEntry* Insert( FmEntryData* pEntryData, sal_uLong nRelPos=LIST_APPEND );
+ FmControlData* NewControl( const ::rtl::OUString& rServiceName, SvTreeListEntry* pParentEntry, sal_Bool bEditName = sal_True );
+ void NewForm( SvTreeListEntry* pParentEntry );
+ SvTreeListEntry* Insert( FmEntryData* pEntryData, sal_uLong nRelPos=LIST_APPEND );
void Remove( FmEntryData* pEntryData );
@@ -527,21 +527,21 @@ namespace svxform
void MarkViewObj( FmControlData* pControlData, sal_Bool bMarkHandles, sal_Bool bMark );
void UnmarkAllViewObj();
- sal_Bool IsFormEntry( SvLBoxEntry* pEntry );
- sal_Bool IsFormComponentEntry( SvLBoxEntry* pEntry );
+ sal_Bool IsFormEntry( SvTreeListEntry* pEntry );
+ sal_Bool IsFormComponentEntry( SvTreeListEntry* pEntry );
::rtl::OUString GenerateName( FmEntryData* pEntryData );
NavigatorTreeModel* GetNavModel() const { return m_pNavModel; }
- SvLBoxEntry* FindEntry( FmEntryData* pEntryData );
+ SvTreeListEntry* FindEntry( FmEntryData* pEntryData );
- virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText );
- virtual sal_Bool Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
- virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& );
+ virtual sal_Bool EditedEntry( SvTreeListEntry* pEntry, const rtl::OUString& rNewText );
+ virtual sal_Bool Select( SvTreeListEntry* pEntry, sal_Bool bSelect=sal_True );
+ virtual sal_Bool EditingEntry( SvTreeListEntry* pEntry, Selection& );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
virtual void KeyInput( const KeyEvent& rKEvt );
- virtual void ModelHasRemoved( SvListEntry* _pEntry );
+ virtual void ModelHasRemoved( SvTreeListEntry* _pEntry );
using SvTreeListBox::Insert;
using SvTreeListBox::ExecuteDrop;
@@ -550,10 +550,10 @@ namespace svxform
private:
sal_Int8 implAcceptDataTransfer( const DataFlavorExVector& _rFlavors, sal_Int8 _nAction, const Point& _rDropPos, sal_Bool _bDnD );
- sal_Int8 implAcceptDataTransfer( const DataFlavorExVector& _rFlavors, sal_Int8 _nAction, SvLBoxEntry* _pTargetEntry, sal_Bool _bDnD );
+ sal_Int8 implAcceptDataTransfer( const DataFlavorExVector& _rFlavors, sal_Int8 _nAction, SvTreeListEntry* _pTargetEntry, sal_Bool _bDnD );
sal_Int8 implExecuteDataTransfer( const OControlTransferData& _rData, sal_Int8 _nAction, const Point& _rDropPos, sal_Bool _bDnD );
- sal_Int8 implExecuteDataTransfer( const OControlTransferData& _rData, sal_Int8 _nAction, SvLBoxEntry* _pTargetEntry, sal_Bool _bDnD );
+ sal_Int8 implExecuteDataTransfer( const OControlTransferData& _rData, sal_Int8 _nAction, SvTreeListEntry* _pTargetEntry, sal_Bool _bDnD );
// check if a cut, copy, or drag operation can be started in the current situation
sal_Bool implAllowExchange( sal_Int8 _nAction, sal_Bool* _pHasNonHidden = NULL );
diff --git a/svx/source/inc/fmservs.hxx b/svx/source/inc/fmservs.hxx
index fe1c9273bc18..61ad6dc6150b 100644
--- a/svx/source/inc/fmservs.hxx
+++ b/svx/source/inc/fmservs.hxx
@@ -21,7 +21,6 @@
#include <svx/svxdllapi.h>
-#define FM_NUMBER_FORMATTER rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.NumberFormatter" ) )
#define FM_COMPONENT_EDIT rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.Edit" ) )
#define FM_COMPONENT_TEXTFIELD rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.TextField" ) )
#define FM_COMPONENT_LISTBOX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "stardiv.one.form.component.ListBox" ) )
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index 3e56d9895d51..49e8ada74b54 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -708,7 +708,7 @@ class DbFilterField
public:
TYPEINFO();
- DbFilterField(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,DbGridColumn& _rColumn);
+ DbFilterField(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, DbGridColumn& _rColumn);
virtual ~DbFilterField();
virtual void Init( Window& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& xCursor );
diff --git a/svx/source/inc/sqlparserclient.hxx b/svx/source/inc/sqlparserclient.hxx
index d97ee70b53e0..0630eda44450 100644
--- a/svx/source/inc/sqlparserclient.hxx
+++ b/svx/source/inc/sqlparserclient.hxx
@@ -46,14 +46,14 @@ namespace svxform
{
private:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xORB;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
protected:
mutable ::rtl::Reference< ::connectivity::simple::ISQLParser > m_xParser;
protected:
OSQLParserClient(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext);
virtual bool ensureLoaded() const;
protected:
diff --git a/svx/source/sdr/attribute/sdrformtextattribute.cxx b/svx/source/sdr/attribute/sdrformtextattribute.cxx
index 9fa5b8a48c67..9feff429c046 100644
--- a/svx/source/sdr/attribute/sdrformtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrformtextattribute.cxx
@@ -1,31 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <svx/sdr/attribute/sdrformtextattribute.hxx>
#include <basegfx/vector/b2enums.hxx>
@@ -46,12 +36,15 @@
#include <svx/xlnclit.hxx>
#include <svx/xlnwtit.hxx>
#include <svx/xlinjoit.hxx>
+#include <svx/xlinjoit.hxx>
+#include <svx/xlncapit.hxx>
#include <svx/xlineit0.hxx>
#include <svx/xdash.hxx>
#include <svx/xlndsit.hxx>
#include <drawinglayer/attribute/lineattribute.hxx>
#include <drawinglayer/attribute/strokeattribute.hxx>
#include <svx/sdr/attribute/sdrformtextoutlineattribute.hxx>
+#include <com/sun/star/drawing/LineCap.hpp>
//////////////////////////////////////////////////////////////////////////////
// helper to get line, stroke and transparence attributes from SfxItemSet
@@ -119,7 +112,13 @@ namespace
const sal_uInt32 nLineWidth = ((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
const XLineJoint eLineJoint = ((const XLineJointItem&)(rSet.Get(XATTR_LINEJOINT))).GetValue();
- return drawinglayer::attribute::LineAttribute(aColorAttribute, (double)nLineWidth, impGetB2DLineJoin(eLineJoint));
+ const com::sun::star::drawing::LineCap eLineCap = ((const XLineCapItem&)(rSet.Get(XATTR_LINECAP))).GetValue();
+
+ return drawinglayer::attribute::LineAttribute(
+ aColorAttribute,
+ (double)nLineWidth,
+ impGetB2DLineJoin(eLineJoint),
+ eLineCap);
}
drawinglayer::attribute::StrokeAttribute impGetStrokeAttribute(const SfxItemSet& rSet)
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index ef8c1ccaf1fa..144f9919810a 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <svx/sdr/contact/viewcontactofgraphic.hxx>
#include <svx/sdr/contact/viewobjectcontactofgraphic.hxx>
@@ -413,11 +404,12 @@ namespace sdr
{
// create primitive. Info: Calling the copy-constructor of GraphicObject in this
// SdrGrafPrimitive2D constructor will force a full swap-in of the graphic
- const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::SdrGrafPrimitive2D(
- aObjectMatrix,
- aAttribute,
- rGraphicObject,
- aLocalGrafInfo));
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::SdrGrafPrimitive2D(
+ aObjectMatrix,
+ aAttribute,
+ rGraphicObject,
+ aLocalGrafInfo));
xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
}
diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
index 6b0cdb6de04d..4dd6e207a07e 100644
--- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx
@@ -1,31 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <svx/sdr/contact/viewcontactofsdrole2obj.hxx>
#include <svx/svdoole2.hxx>
@@ -41,6 +31,8 @@
#include <vcl/svapp.hxx>
#include <svx/sdr/primitive2d/sdrolecontentprimitive2d.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
+#include <svx/charthelper.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -67,7 +59,7 @@ namespace sdr
{
}
- drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createPrimitive2DSequenceWithParameters() const
+ basegfx::B2DHomMatrix ViewContactOfSdrOle2Obj::createObjectTransform() const
{
// take unrotated snap rect (direct model data) for position and size
const Rectangle& rRectangle = GetOle2Obj().GetGeoRect();
@@ -77,9 +69,18 @@ namespace sdr
const GeoStat& rGeoStat(GetOle2Obj().GetGeoStat());
const double fShearX(rGeoStat.nShearWink ? tan((36000 - rGeoStat.nShearWink) * F_PI18000) : 0.0);
const double fRotate(rGeoStat.nDrehWink ? (36000 - rGeoStat.nDrehWink) * F_PI18000 : 0.0);
- const basegfx::B2DHomMatrix aObjectMatrix(basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix(
- aObjectRange.getWidth(), aObjectRange.getHeight(), fShearX, fRotate,
- aObjectRange.getMinX(), aObjectRange.getMinY()));
+
+ return basegfx::tools::createScaleShearXRotateTranslateB2DHomMatrix(
+ aObjectRange.getWidth(), aObjectRange.getHeight(),
+ fShearX,
+ fRotate,
+ aObjectRange.getMinX(), aObjectRange.getMinY());
+ }
+
+ drawinglayer::primitive2d::Primitive2DSequence ViewContactOfSdrOle2Obj::createPrimitive2DSequenceWithParameters() const
+ {
+ // get object transformation
+ const basegfx::B2DHomMatrix aObjectMatrix(createObjectTransform());
// Prepare attribute settings, will be used soon anyways
const SfxItemSet& rItemSet = GetOle2Obj().GetMergedItemSet();
@@ -87,28 +88,58 @@ namespace sdr
drawinglayer::primitive2d::createNewSdrLineFillShadowTextAttribute(
rItemSet,
GetOle2Obj().getText(0)));
-
- // #i102063# embed OLE content in an own primitive; this will be able to decompose accessing
- // the weak SdrOle2 reference and will also implement getB2DRange() for fast BoundRect
- // calculations without OLE Graphic access (which may trigger e.g. chart recalculation).
- // It will also take care of HighContrast and ScaleContent
- const drawinglayer::primitive2d::Primitive2DReference xOleContent(
- new drawinglayer::primitive2d::SdrOleContentPrimitive2D(
+ drawinglayer::primitive2d::Primitive2DReference xContent;
+
+ if(GetOle2Obj().IsChart())
+ {
+ // try to get chart primitives and chart range directly from xChartModel
+ basegfx::B2DRange aChartContentRange;
+ const drawinglayer::primitive2d::Primitive2DSequence aChartSequence(
+ ChartHelper::tryToGetChartContentAsPrimitive2DSequence(
+ GetOle2Obj().getXModel(),
+ aChartContentRange));
+ const double fWidth(aChartContentRange.getWidth());
+ const double fHeight(aChartContentRange.getHeight());
+
+ if(aChartSequence.hasElements()
+ && basegfx::fTools::more(fWidth, 0.0)
+ && basegfx::fTools::more(fHeight, 0.0))
+ {
+ // create embedding transformation
+ basegfx::B2DHomMatrix aEmbed(
+ basegfx::tools::createTranslateB2DHomMatrix(
+ -aChartContentRange.getMinX(),
+ -aChartContentRange.getMinY()));
+
+ aEmbed.scale(1.0 / fWidth, 1.0 / fHeight);
+ aEmbed = aObjectMatrix * aEmbed;
+ xContent = new drawinglayer::primitive2d::TransformPrimitive2D(
+ aEmbed,
+ aChartSequence);
+ }
+ }
+
+ if(!xContent.is())
+ {
+ // #i102063# embed OLE content in an own primitive; this will be able to decompose accessing
+ // the weak SdrOle2 reference and will also implement getB2DRange() for fast BoundRect
+ // calculations without OLE Graphic access (which may trigger e.g. chart recalculation).
+ // It will also take care of HighContrast and ScaleContent
+ xContent = 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()
- ));
+ GetOle2Obj().getEmbeddedObjectRef().getGraphicVersion() );
+ }
// create primitive. Use Ole2 primitive here. Prepare attribute settings, will
// be used soon anyways. Always create primitives to allow the decomposition of
// SdrOle2Primitive2D to create needed invisible elements for HitTest and/or BoundRect
- const drawinglayer::primitive2d::Primitive2DSequence xOLEContent(&xOleContent, 1);
const drawinglayer::primitive2d::Primitive2DReference xReference(
new drawinglayer::primitive2d::SdrOle2Primitive2D(
- xOLEContent,
+ drawinglayer::primitive2d::Primitive2DSequence(&xContent, 1),
aObjectMatrix,
aAttribute));
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx
index 674c79a3aa68..cb4edcb0f98a 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrole2obj.cxx
@@ -1,31 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <svx/sdr/contact/viewobjectcontactofsdrole2obj.hxx>
#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
@@ -33,12 +23,12 @@
#include <svx/svdoole2.hxx>
#include <svx/sdr/contact/objectcontact.hxx>
#include <svx/svdview.hxx>
-#include <drawinglayer/primitive2d/chartprimitive2d.hxx>
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <com/sun/star/embed/EmbedMisc.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -73,7 +63,6 @@ namespace sdr
const bool bIsOutplaceActive(nState == embed::EmbedStates::ACTIVE);
const bool bIsInplaceActive((nState == embed::EmbedStates::INPLACE_ACTIVE) || (nState == embed::EmbedStates::UI_ACTIVE));
- const bool bIsChart(rSdrOle2.IsChart());
bool bDone(false);
if(!bDone && bIsInplaceActive)
@@ -88,122 +77,49 @@ namespace sdr
if( !bDone )
{
- const Rectangle& rObjectRectangle(rSdrOle2.GetGeoRect());
- const basegfx::B2DRange aObjectRange(rObjectRectangle.Left(), rObjectRectangle.Top(), rObjectRectangle.Right(), rObjectRectangle.Bottom());
-
- // create object transform
- basegfx::B2DHomMatrix aObjectTransform;
- aObjectTransform.set(0, 0, aObjectRange.getWidth());
- aObjectTransform.set(1, 1, aObjectRange.getHeight());
- aObjectTransform.set(0, 2, aObjectRange.getMinX());
- aObjectTransform.set(1, 2, aObjectRange.getMinY());
-
- if(bIsChart)
+ //old stuff that should be reworked
{
- //charts must be painted resolution dependent!! #i82893#, #i75867#
-
- // for chart, to not lose the current better quality visualisation which
- // uses a direct paint, use a primtive wrapper for that exceptional case. The renderers
- // will then ATM paint it to an OutputDevice directly.
- // In later versions this should be replaced by getting the Primitive2DSequnce from
- // the chart and using it.
- // to be able to render something in non-VCL using renderers, the wrapper is a
- // GroupPrimitive2D which automatically decomposes to the already created Metafile
- // content.
- // For being completely compatible, ATM Window and VDEV PrettyPrinting is suppressed.
- // It works in the VCL renderers, though. So for activating again with VCL primitive
- // renderers, change conditions here.
-
- // determine if embedding and PrettyPrinting shall be done at all
- uno::Reference< frame::XModel > xChartModel;
- bool bDoChartPrettyPrinting(true);
-
- // the original ChartPrettyPainter does not do it for Window
- if(bDoChartPrettyPrinting && GetObjectContact().isOutputToWindow())
+ //if no replacement image is available load the OLE object
+// if(!rSdrOle2.GetGraphic()) //try to fetch the metafile - this can lead to the actual creation of the metafile what can be extremely expensive (e.g. for big charts)!!! #i101925#
+// {
+// // try to create embedded object
+// rSdrOle2.GetObjRef(); //this loads the OLE object if it is not loaded already
+// }
+ const svt::EmbeddedObjectRef& xObjRef = rSdrOle2.getEmbeddedObjectRef();
+ if(xObjRef.is())
{
- bDoChartPrettyPrinting = false;
- }
+ const sal_Int64 nMiscStatus(xObjRef->getStatus(rSdrOle2.GetAspect()));
- // the original ChartPrettyPainter does not do it for VDEV
- if(bDoChartPrettyPrinting && GetObjectContact().isOutputToVirtualDevice())
- {
- if(GetObjectContact().isOutputToPDFFile())
+ // this hack (to change model data during PAINT argh(!)) should be reworked
+ if(!rSdrOle2.IsResizeProtect() && (nMiscStatus & embed::EmbedMisc::EMBED_NEVERRESIZE))
{
- // #i97982#
- // For PDF files, allow PrettyPrinting
+ const_cast< SdrOle2Obj* >(&rSdrOle2)->SetResizeProtect(true);
}
- else
- {
- bDoChartPrettyPrinting = false;
- }
- }
-
- // the chart model is needed. Check if it's available
- if(bDoChartPrettyPrinting)
- {
- // get chart model
- xChartModel = rSdrOle2.getXModel();
- if(!xChartModel.is())
+ SdrPageView* pPageView = GetObjectContact().TryToGetSdrPageView();
+ if(pPageView && (nMiscStatus & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE))
{
- bDoChartPrettyPrinting = false;
+ // connect plugin object
+ pPageView->GetView().DoConnect(const_cast< SdrOle2Obj* >(&rSdrOle2));
}
}
+ }//end old stuff to rework
- if(bDoChartPrettyPrinting)
- {
- // embed MetaFile data in a specialized Wrapper Primitive which holds also the ChartModel needed
- // for PrettyPrinting
- const drawinglayer::primitive2d::Primitive2DReference xReference(new drawinglayer::primitive2d::ChartPrimitive2D(
- xChartModel, aObjectTransform, xRetval));
- xRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
- bDone = true;
- }
- }
-
- if( !bDone )
- {
- //old stuff that should be reworked
- {
- //if no replacement image is available load the OLE object
- if(!rSdrOle2.GetGraphic()) //try to fetch the metafile - this can lead to the actual creation of the metafile what can be extremely expensive (e.g. for big charts)!!! #i101925#
- {
- // try to create embedded object
- rSdrOle2.GetObjRef(); //this loads the OLE object if it is not loaded already
- }
- const svt::EmbeddedObjectRef& xObjRef = rSdrOle2.getEmbeddedObjectRef();
- if(xObjRef.is())
- {
- const sal_Int64 nMiscStatus(xObjRef->getStatus(rSdrOle2.GetAspect()));
-
- // this hack (to change model data during PAINT argh(!)) should be reworked
- if(!rSdrOle2.IsResizeProtect() && (nMiscStatus & embed::EmbedMisc::EMBED_NEVERRESIZE))
- {
- const_cast< SdrOle2Obj* >(&rSdrOle2)->SetResizeProtect(true);
- }
-
- SdrPageView* pPageView = GetObjectContact().TryToGetSdrPageView();
- if(pPageView && (nMiscStatus & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE))
- {
- // connect plugin object
- pPageView->GetView().DoConnect(const_cast< SdrOle2Obj* >(&rSdrOle2));
- }
- }
- }//end old stuff to rework
-
- // create OLE primitive stuff directly at VC with HC as parameter
- const ViewContactOfSdrOle2Obj& rVC = static_cast< const ViewContactOfSdrOle2Obj& >(GetViewContact());
- xRetval = rVC.createPrimitive2DSequenceWithParameters();
- }
+ // create OLE primitive stuff directly at VC with HC as parameter
+ const ViewContactOfSdrOle2Obj& rVC = static_cast< const ViewContactOfSdrOle2Obj& >(GetViewContact());
+ xRetval = rVC.createPrimitive2DSequenceWithParameters();
if(bIsOutplaceActive)
{
// do not shade when printing or PDF exporting
if(!GetObjectContact().isOutputToPrinter() && !GetObjectContact().isOutputToRecordingMetaFile())
{
+ // get object transformation
+ const basegfx::B2DHomMatrix aObjectMatrix(static_cast< ViewContactOfSdrOle2Obj& >(GetViewContact()).createObjectTransform());
+
// shade the representation if the object is activated outplace
basegfx::B2DPolygon aObjectOutline(basegfx::tools::createUnitPolygon());
- aObjectOutline.transform(aObjectTransform);
+ aObjectOutline.transform(aObjectMatrix);
// Use a FillHatchPrimitive2D with necessary attributes
const drawinglayer::attribute::FillHatchAttribute aFillHatch(
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 0c079b77c08f..3fd7b44fc8ca 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <svx/sdr/primitive2d/sdrattributecreator.hxx>
#include <svl/itemset.hxx>
@@ -35,6 +26,7 @@
#include <svx/xlntrit.hxx>
#include <svx/xlnwtit.hxx>
#include <svx/xlinjoit.hxx>
+#include <svx/xlncapit.hxx>
#include <svx/xlnclit.hxx>
#include <svx/xlnstwit.hxx>
#include <svx/xlnedwit.hxx>
@@ -82,6 +74,7 @@
#include <drawinglayer/attribute/sdrlightingattribute3d.hxx>
#include <drawinglayer/attribute/sdrlightattribute3d.hxx>
#include <svx/sdr/attribute/sdrfilltextattribute.hxx>
+#include <com/sun/star/drawing/LineCap.hpp>
//////////////////////////////////////////////////////////////////////////////
@@ -241,6 +234,7 @@ namespace drawinglayer
const sal_uInt32 nWidth(((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue());
const Color aColor(((const XLineColorItem&)(rSet.Get(XATTR_LINECOLOR))).GetColorValue());
const XLineJoint eJoint(((const XLineJointItem&)(rSet.Get(XATTR_LINEJOINT))).GetValue());
+ const com::sun::star::drawing::LineCap eCap(((const XLineCapItem&)(rSet.Get(XATTR_LINECAP))).GetValue());
::std::vector< double > aDotDashArray;
double fFullDotDashLen(0.0);
@@ -259,6 +253,7 @@ namespace drawinglayer
(double)nWidth,
(double)nTransparence * 0.01,
aColor.getBColor(),
+ eCap,
aDotDashArray,
fFullDotDashLen);
}
@@ -596,7 +591,11 @@ namespace drawinglayer
// make sure it's not empty, use default instead
if(aBitmap.IsEmpty())
{
+ // #i118485# Add PrefMapMode and PrefSize to avoid mini-tiling and
+ // expensive primitive processing in this case. Use 10x10 cm
aBitmap = Bitmap(Size(4,4), 8);
+ aBitmap.SetPrefMapMode(MapMode(MAP_100TH_MM));
+ aBitmap.SetPrefSize(Size(10000.0, 10000.0));
}
// if there is no logical size, create a size from pixel size and set MapMode accordingly
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index 81b792f68660..fe8320163241 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <svx/sdr/primitive2d/sdrdecompositiontools.hxx>
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
@@ -133,7 +124,7 @@ namespace drawinglayer
aScaledPolygon.transform(rObjectTransform);
// create line and stroke attribute
- const attribute::LineAttribute aLineAttribute(rLine.getColor(), rLine.getWidth(), rLine.getJoin());
+ const attribute::LineAttribute aLineAttribute(rLine.getColor(), rLine.getWidth(), rLine.getJoin(), rLine.getCap());
const attribute::StrokeAttribute aStrokeAttribute(rLine.getDotDashArray(), rLine.getFullDotDashLen());
BasePrimitive2D* pNewLinePrimitive = 0L;
diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
index 93b09553c3e9..aeccd8611bec 100644
--- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <svx/sdr/primitive2d/sdrgrafprimitive2d.hxx>
#include <drawinglayer/primitive2d/graphicprimitive2d.hxx>
@@ -34,8 +25,8 @@
#include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx>
#include <drawinglayer/primitive2d/sdrdecompositiontools2d.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
namespace drawinglayer
{
@@ -98,6 +89,7 @@ namespace drawinglayer
// add graphic content
if(255L != getGraphicAttr().GetTransparency())
{
+ // standard graphic fill
const Primitive2DReference xGraphicContentPrimitive(
new GraphicPrimitive2D(
getTransform(),
@@ -164,7 +156,8 @@ namespace drawinglayer
bool SdrGrafPrimitive2D::isTransparent() const
{
- return ((0L != getGraphicAttr().GetTransparency()) || (getGraphicObject().IsTransparent()));
+ return ((0L != getGraphicAttr().GetTransparency())
+ || (getGraphicObject().IsTransparent()));
}
// provide unique ID
diff --git a/svx/source/smarttags/SmartTagMgr.cxx b/svx/source/smarttags/SmartTagMgr.cxx
index 6fcbcb8dd8d4..229214f19616 100644
--- a/svx/source/smarttags/SmartTagMgr.cxx
+++ b/svx/source/smarttags/SmartTagMgr.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -382,10 +383,7 @@ void SmartTagMgr::PrepareConfiguration( const rtl::OUString& rConfigurationGroup
aPathArgument.Value = aAny;
Sequence< Any > aArguments( 1 );
aArguments[ 0 ] <<= aPathArgument;
- Reference< lang::XMultiServiceFactory > xConfProv( mxContext->getServiceManager()->createInstanceWithContext("com.sun.star.configuration.ConfigurationProvider", mxContext), UNO_QUERY );
-
- if ( !xConfProv.is() )
- return;
+ Reference< lang::XMultiServiceFactory > xConfProv = configuration::theDefaultProvider::get( mxContext );
// try to get read-write access to configuration:
Reference< XInterface > xConfigurationAccess;
diff --git a/svx/source/src/errtxt.src b/svx/source/src/errtxt.src
index 29a2a335189c..63e995420624 100644
--- a/svx/source/src/errtxt.src
+++ b/svx/source/src/errtxt.src
@@ -512,6 +512,10 @@ Resource RID_ERRHDL
{
Text [ en-US ] = "The password of a shared spreadsheet cannot be set or changed.\nDeactivate sharing mode first.";
};
+ String ERRCODE_SFX_FORMAT_ROWCOL
+ {
+ Text [ en-US ] = "File format error found at $(ARG1)(row,col).";
+ };
};
// eof ------------------------------------------------------------------------
diff --git a/svx/source/svdraw/ActionDescriptionProvider.cxx b/svx/source/svdraw/ActionDescriptionProvider.cxx
index 55441715ecfd..af0a1f293c9b 100644
--- a/svx/source/svdraw/ActionDescriptionProvider.cxx
+++ b/svx/source/svdraw/ActionDescriptionProvider.cxx
@@ -65,10 +65,8 @@
if(!nResID)
return rtl::OUString();
- XubString aStr(ImpGetResStr(nResID));
- XubString aName(rObjectName);
- aStr.SearchAndReplaceAscii("%1", aName);
- return rtl::OUString(aStr);
+ OUString aStr(ImpGetResStr(nResID));
+ return aStr.replaceAll("%1", rObjectName);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/charthelper.cxx b/svx/source/svdraw/charthelper.cxx
new file mode 100644
index 000000000000..c4cb613279ed
--- /dev/null
+++ b/svx/source/svdraw/charthelper.cxx
@@ -0,0 +1,137 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <svx/charthelper.hxx>
+#include <svtools/embedhlp.hxx>
+#include <tools/globname.hxx>
+#include <sot/clsids.hxx>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/util/XUpdatable.hpp>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <comphelper/processfactory.hxx>
+#include <com/sun/star/graphic/XPrimitiveFactory2D.hpp>
+#include <drawinglayer/geometry/viewinformation2d.hxx>
+
+//// header for function rtl_createUuid
+//#include <rtl/uuid.h>
+//#include <vcl/pdfextoutdevdata.hxx>
+//
+//#include <com/sun/star/lang/XUnoTunnel.hpp>
+//#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+//#include <svtools/embedhlp.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+using namespace ::com::sun::star;
+
+//////////////////////////////////////////////////////////////////////////////
+
+bool ChartHelper::IsChart(const svt::EmbeddedObjectRef& xObjRef)
+{
+ if(!xObjRef.is())
+ {
+ return false;
+ }
+
+ const SvGlobalName aObjClsId(xObjRef->getClassID());
+
+ if(SvGlobalName(SO3_SCH_CLASSID_30) == aObjClsId
+ || SvGlobalName(SO3_SCH_CLASSID_40) == aObjClsId
+ || SvGlobalName(SO3_SCH_CLASSID_50) == aObjClsId
+ || SvGlobalName(SO3_SCH_CLASSID_60) == aObjClsId)
+ {
+ return true;
+ }
+
+ return false;
+}
+
+drawinglayer::primitive2d::Primitive2DSequence ChartHelper::tryToGetChartContentAsPrimitive2DSequence(
+ const uno::Reference< ::frame::XModel >& rXModel,
+ basegfx::B2DRange& rRange)
+{
+ drawinglayer::primitive2d::Primitive2DSequence aRetval;
+
+ if(rXModel.is())
+ {
+ try
+ {
+ const uno::Reference< lang::XMultiServiceFactory > xChartFact(rXModel, uno::UNO_QUERY_THROW);
+ const uno::Reference< lang::XUnoTunnel > xChartView(xChartFact->createInstance(::rtl::OUString::createFromAscii("com.sun.star.chart2.ChartView")), uno::UNO_QUERY_THROW);
+ const uno::Reference< util::XUpdatable > xUpdatable(xChartView, uno::UNO_QUERY_THROW);
+
+ if(xUpdatable.is())
+ {
+ xUpdatable->update();
+
+ const uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier(rXModel, uno::UNO_QUERY_THROW);
+ const uno::Reference< container::XIndexAccess > xShapeAccess(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW);
+
+ if(xShapeAccess.is() && xShapeAccess->getCount())
+ {
+ const sal_Int32 nShapeCount(xShapeAccess->getCount());
+ const uno::Reference< lang::XMultiServiceFactory > xMgr(::comphelper::getProcessServiceFactory());
+ const uno::Reference< graphic::XPrimitiveFactory2D > xPrimitiveFactory(
+ xMgr->createInstance(
+ String(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.graphic.PrimitiveFactory2D" ))),
+ uno::UNO_QUERY);
+
+ if(xPrimitiveFactory.is())
+ {
+ const uno::Sequence< beans::PropertyValue > aParams;
+ uno::Reference< drawing::XShape > xShape;
+
+ for(sal_Int32 a(0); a < nShapeCount; a++)
+ {
+ xShapeAccess->getByIndex(a) >>= xShape;
+
+ if(xShape.is())
+ {
+ const drawinglayer::primitive2d::Primitive2DSequence aNew(
+ xPrimitiveFactory->createPrimitivesFromXShape(
+ xShape,
+ aParams));
+
+ drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(
+ aRetval,
+ aNew);
+ }
+ }
+ }
+ }
+ }
+ }
+ catch(uno::Exception&)
+ {
+ OSL_ENSURE(false, "Unexpected exception!");
+ }
+
+ if(aRetval.hasElements())
+ {
+ const drawinglayer::geometry::ViewInformation2D aViewInformation2D;
+
+ rRange = drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(aRetval, aViewInformation2D);
+ }
+ }
+
+ return aRetval;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 8c7762ffcf24..c16bbdba6721 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -1,31 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include "svddrgm1.hxx"
#include <math.h>
@@ -3610,6 +3600,19 @@ bool SdrDragCrop::EndSdrDrag(bool bCopy)
double fScaleX = ( aGraphicSize.Width() - rOldCrop.GetLeft() - rOldCrop.GetRight() ) / (double)aOldRect.GetWidth();
double fScaleY = ( aGraphicSize.Height() - rOldCrop.GetTop() - rOldCrop.GetBottom() ) / (double)aOldRect.GetHeight();
+ // to correct the never working combination of cropped images and mirroring
+ // I have to correct the rectangles the calculation is based on here. In the current
+ // core geometry stuff a vertical mirror is expressed as 180 degree rotation. All
+ // this can be removed again when aw080 will have cleaned up the old
+ // (non-)transformation mess in the core.
+ if(18000 == pObj->GetGeoStat().nDrehWink)
+ {
+ // old notation of vertical mirror, need to correct diffs since both rects
+ // are rotated by 180 degrees
+ aOldRect = Rectangle(aOldRect.TopLeft() - (aOldRect.BottomRight() - aOldRect.TopLeft()), aOldRect.TopLeft());
+ aNewRect = Rectangle(aNewRect.TopLeft() - (aNewRect.BottomRight() - aNewRect.TopLeft()), aNewRect.TopLeft());
+ }
+
sal_Int32 nDiffLeft = aNewRect.nLeft - aOldRect.nLeft;
sal_Int32 nDiffTop = aNewRect.nTop - aOldRect.nTop;
sal_Int32 nDiffRight = aNewRect.nRight - aOldRect.nRight;
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index dfdf7efedddc..4914b98fb689 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -1,31 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <vcl/metaact.hxx>
#include <svx/svdedtv.hxx>
@@ -47,12 +37,6 @@
// #i13033#
#include <clonelist.hxx>
-////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-// EditView
-////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
void SdrEditView::ImpResetPossibilityFlags()
{
bReadOnly =sal_False;
@@ -618,19 +602,20 @@ void SdrEditView::CheckPossibilities()
if (!bOrthoDesiredOnMarked && !aInfo.bNoOrthoDesired) bOrthoDesiredOnMarked=sal_True;
// check ImportMtf
- if (!bImportMtfPossible) {
- sal_Bool bGraf=HAS_BASE(SdrGrafObj,pObj);
- sal_Bool bOle2=HAS_BASE(SdrOle2Obj,pObj);
+ if (!bImportMtfPossible)
+ {
+ const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj);
+ const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(pObj);
- if( bGraf &&
- ((SdrGrafObj*)pObj)->HasGDIMetaFile() &&
- !( ((SdrGrafObj*)pObj)->IsEPS() || ((SdrGrafObj*)pObj)->IsRenderGraphic() ) )
+ if(pSdrGrafObj && ((pSdrGrafObj->HasGDIMetaFile() && !pSdrGrafObj->IsEPS()) || pSdrGrafObj->isEmbeddedSvg()))
{
bImportMtfPossible = sal_True;
}
- if (bOle2)
- bImportMtfPossible=((SdrOle2Obj*)pObj)->GetObjRef().is();
+ if(pSdrOle2Obj)
+ {
+ bImportMtfPossible = pSdrOle2Obj->GetObjRef().is();
+ }
}
}
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 4fd186a518e5..d97a83275d71 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1,31 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <svx/svdedtv.hxx>
#include <editeng/outliner.hxx>
@@ -2016,30 +2006,78 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo)
SdrGrafObj* pGraf=PTR_CAST(SdrGrafObj,pObj);
SdrOle2Obj* pOle2=PTR_CAST(SdrOle2Obj,pObj);
sal_uIntPtr nInsAnz=0;
- if (pGraf!=NULL && pGraf->HasGDIMetaFile())
+ Rectangle aLogicRect;
+
+ if(pGraf && (pGraf->HasGDIMetaFile() || pGraf->isEmbeddedSvg()))
{
- ImpSdrGDIMetaFileImport aFilter(*pMod);
- aFilter.SetScaleRect(pGraf->GetSnapRect());
- aFilter.SetLayer(pObj->GetLayer());
- nInsAnz=aFilter.DoImport(pGraf->GetTransformedGraphic().GetGDIMetaFile(),*pOL,nInsPos,pProgrInfo);
+ GDIMetaFile aMetaFile;
+
+ if(pGraf->HasGDIMetaFile())
+ {
+ aMetaFile = pGraf->GetTransformedGraphic(
+ SDRGRAFOBJ_TRANSFORMATTR_COLOR|SDRGRAFOBJ_TRANSFORMATTR_MIRROR).GetGDIMetaFile();
+ }
+ else if(pGraf->isEmbeddedSvg())
+ {
+ aMetaFile = pGraf->getMetafileFromEmbeddedSvg();
+ }
+
+ if(aMetaFile.GetActionSize())
+ {
+ ImpSdrGDIMetaFileImport aFilter(*pMod);
+
+ aLogicRect = pGraf->GetLogicRect();
+ aFilter.SetScaleRect(aLogicRect);
+ aFilter.SetLayer(pObj->GetLayer());
+
+ nInsAnz = aFilter.DoImport(aMetaFile, *pOL, nInsPos, pProgrInfo);
+ }
}
if ( pOle2!=NULL && pOle2->GetGraphic() )
{
ImpSdrGDIMetaFileImport aFilter(*pMod);
- aFilter.SetScaleRect(pOle2->GetLogicRect());
+
+ aLogicRect = pOle2->GetLogicRect();
+ aFilter.SetScaleRect(aLogicRect);
aFilter.SetLayer(pObj->GetLayer());
nInsAnz=aFilter.DoImport(pOle2->GetGraphic()->GetGDIMetaFile(),*pOL,nInsPos,pProgrInfo);
}
if (nInsAnz!=0)
{
+ // transformation
+ GeoStat aGeoStat(pGraf ? pGraf->GetGeoStat() : pOle2->GetGeoStat());
sal_uIntPtr nObj=nInsPos;
+
+ if(aGeoStat.nShearWink)
+ {
+ aGeoStat.RecalcTan();
+ }
+
+ if(aGeoStat.nDrehWink)
+ {
+ aGeoStat.RecalcSinCos();
+ }
+
for (sal_uIntPtr i=0; i<nInsAnz; i++)
{
if( bUndo )
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pOL->GetObj(nObj)));
// update new MarkList
- SdrMark aNewMark(pOL->GetObj(nObj), pPV);
+ SdrObject* pCandidate = pOL->GetObj(nObj);
+
+ // apply original transformation
+ if(aGeoStat.nShearWink)
+ {
+ pCandidate->NbcShear(aLogicRect.TopLeft(), aGeoStat.nShearWink, aGeoStat.nTan, false);
+ }
+
+ if(aGeoStat.nDrehWink)
+ {
+ pCandidate->NbcRotate(aLogicRect.TopLeft(), aGeoStat.nDrehWink, aGeoStat.nSin, aGeoStat.nCos);
+ }
+
+ SdrMark aNewMark(pCandidate, pPV);
aNewMarked.InsertEntry(aNewMark);
nObj++;
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index b8c007ea97fb..1fd41d246214 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -1,31 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include "svdfmtf.hxx"
#include <editeng/editdata.hxx>
@@ -40,6 +30,7 @@
#include <editeng/crsditem.hxx>
#include <editeng/shdditem.hxx>
#include <svx/xlnclit.hxx>
+#include <svx/xlncapit.hxx>
#include <svx/xlnwtit.hxx>
#include <svx/xflclit.hxx>
#include <svx/xgrad.hxx>
@@ -79,6 +70,7 @@ ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport(SdrModel& rModel):
pPage(NULL),pModel(NULL),nLayer(0),
nLineWidth(0),
maLineJoin(basegfx::B2DLINEJOIN_NONE),
+ maLineCap(com::sun::star::drawing::LineCap_BUTT),
maDash(XDASH_RECT, 0, 0, 0, 0, 0),
fScaleX(0.0),fScaleY(0.0),
bFntDirty(sal_True),
@@ -195,7 +187,6 @@ sal_uIntPtr ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf,
case META_POP_ACTION : DoAction((MetaPopAction &)*pAct); break;
case META_HATCH_ACTION : DoAction((MetaHatchAction &)*pAct); break;
case META_COMMENT_ACTION : DoAction((MetaCommentAction &)*pAct, pMtf); break;
- case META_RENDERGRAPHIC_ACTION : DoAction((MetaRenderGraphicAction &)*pAct); break;
}
if(pProgrInfo != NULL)
@@ -309,6 +300,9 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr
break;
}
+ // Add LineCap support
+ pLineAttr->Put(XLineCapItem(maLineCap));
+
if(((maDash.GetDots() && maDash.GetDotLen()) || (maDash.GetDashes() && maDash.GetDashLen())) && maDash.GetDistance())
{
pLineAttr->Put(XLineDashItem(String(), maDash));
@@ -354,10 +348,13 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, bool bForceTextAttr
pTextAttr->Put(SvxOverlineItem(aFnt.GetOverline(), EE_CHAR_OVERLINE));
pTextAttr->Put(SvxCrossedOutItem(aFnt.GetStrikeout(), EE_CHAR_STRIKEOUT));
pTextAttr->Put(SvxShadowedItem(aFnt.IsShadow(), EE_CHAR_SHADOW));
- pTextAttr->Put(SvxAutoKernItem(aFnt.IsKerning(), EE_CHAR_KERNING));
+
+ // #i118485# Setting this item leads to problems (written #i118498# for this)
+ // pTextAttr->Put(SvxAutoKernItem(aFnt.IsKerning(), EE_CHAR_KERNING));
+
pTextAttr->Put(SvxWordLineModeItem(aFnt.IsWordLineMode(), EE_CHAR_WLM));
pTextAttr->Put(SvxContourItem(aFnt.IsOutline(), EE_CHAR_OUTLINE));
- pTextAttr->Put(SvxColorItem(aFnt.GetColor(), EE_CHAR_COLOR));
+ pTextAttr->Put(SvxColorItem(aVD.GetTextColor(), EE_CHAR_COLOR));
//... svxfont textitem svditext
bFntDirty=sal_False;
}
@@ -480,6 +477,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaLineAction& rAct)
SdrPathObj* pPath = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aLine));
nLineWidth = nNewLineWidth;
maLineJoin = rLineInfo.GetLineJoin();
+ maLineCap = rLineInfo.GetLineCap();
maDash = XDash(XDASH_RECT,
rLineInfo.GetDotCount(), rLineInfo.GetDotLen(),
rLineInfo.GetDashCount(), rLineInfo.GetDashLen(),
@@ -685,6 +683,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaPolyLineAction& rAct )
basegfx::B2DPolyPolygon(aSource));
nLineWidth = nNewLineWidth;
maLineJoin = rLineInfo.GetLineJoin();
+ maLineCap = rLineInfo.GetLineCap();
maDash = XDash(XDASH_RECT,
rLineInfo.GetDotCount(), rLineInfo.GetDotLen(),
rLineInfo.GetDashCount(), rLineInfo.GetDashLen(),
@@ -1021,25 +1020,4 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM
}
}
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-void ImpSdrGDIMetaFileImport::DoAction(MetaRenderGraphicAction& rAct)
-{
- GDIMetaFile aMtf;
- const ::vcl::RenderGraphic& rRenderGraphic = rAct.GetRenderGraphic();
- Rectangle aRect( rAct.GetPoint(), rAct.GetSize() );
- const Point aPos;
- const Size aPrefSize( rRenderGraphic.GetPrefSize() );
-
- aRect.Right()++; aRect.Bottom()++;
-
- aMtf.SetPrefMapMode( rRenderGraphic.GetPrefMapMode() );
- aMtf.SetPrefSize( aPrefSize );
- aMtf.AddAction( new MetaRenderGraphicAction( aPos, aPrefSize, rRenderGraphic ) );
- aMtf.WindStart();
-
- SdrGrafObj* pGraf=new SdrGrafObj( aMtf, aRect );
- InsertObj( pGraf );
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx
index f0fc89ec4f09..5f31f583e45e 100644
--- a/svx/source/svdraw/svdfmtf.hxx
+++ b/svx/source/svdraw/svdfmtf.hxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#ifndef _SVDFMTF_HXX
#define _SVDFMTF_HXX
@@ -65,6 +56,7 @@ protected:
Color aOldLineColor;
sal_Int32 nLineWidth;
basegfx::B2DLineJoin maLineJoin;
+ com::sun::star::drawing::LineCap maLineCap;
XDash maDash;
sal_Bool bMov;
@@ -121,7 +113,6 @@ protected:
void DoAction(MetaISectRectClipRegionAction& rAct) { rAct.Execute(&aVD); }
void DoAction(MetaISectRegionClipRegionAction& rAct) { rAct.Execute(&aVD); }
void DoAction(MetaCommentAction& rAct, GDIMetaFile* pMtf);
- void DoAction(MetaRenderGraphicAction& rAct);
void ImportText( const Point& rPos, const XubString& rStr, const MetaAction& rAct );
void SetAttributes(SdrObject* pObj, bool bForceTextAttr = false);
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 7931db8656a5..7b7548f3a0be 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -1911,7 +1911,7 @@ void SdrHdlList::TravelFocusHdl(sal_Bool bForward)
}
// build new HdlNum
- sal_uInt32 nNewHdlNum(nNewHdl);
+ sal_uIntPtr nNewHdlNum(nNewHdl);
// look for old num in sorted array
if(nNewHdl != CONTAINER_ENTRY_NOTFOUND)
@@ -2020,7 +2020,7 @@ void SdrHdlList::SetHdlSize(sal_uInt16 nSiz)
nHdlSize = nSiz;
// propagate change to IAOs
- for(sal_uInt32 i=0; i<GetHdlCount(); i++)
+ for(sal_uIntPtr i=0; i<GetHdlCount(); i++)
{
SdrHdl* pHdl = GetHdl(i);
pHdl->Touch();
@@ -2036,7 +2036,7 @@ void SdrHdlList::SetMoveOutside(sal_Bool bOn)
bMoveOutside = bOn;
// propagate change to IAOs
- for(sal_uInt32 i=0; i<GetHdlCount(); i++)
+ for(sal_uIntPtr i=0; i<GetHdlCount(); i++)
{
SdrHdl* pHdl = GetHdl(i);
pHdl->Touch();
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 2f16e1d1ec97..2bb822113efc 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1573,7 +1573,12 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, sal_uIntPtr nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const
{
+ return (*this).CheckSingleSdrObjectHit(rPnt,nTol,pOL,pPV,nOptions,pMVisLay,rpRootObj,NULL);
+}
+SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, sal_uIntPtr nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj,const SdrMarkList * pMarkList) const
+{
sal_Bool bBack=(nOptions & SDRSEARCH_BACKWARD)!=0;
+ sal_Bool bBefMrk=(nOptions & SDRSEARCH_BEFOREMARK)!=0;
SdrObject* pRet=NULL;
rpRootObj=NULL;
if (pOL!=NULL)
@@ -1595,7 +1600,16 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
{
pObj = pOL->GetObj(nObjNum);
}
-
+ if (bBefMrk)
+ {
+ if ((pMarkList)!=NULL)
+ {
+ if ((*pMarkList).FindObject(pObj)!=CONTAINER_ENTRY_NOTFOUND)
+ {
+ return NULL;
+ }
+ }
+ }
pRet=CheckSingleSdrObjectHit(rPnt,nTol,pObj,pPV,nOptions,pMVisLay);
if (pRet!=NULL) rpRootObj=pObj;
if (bBack) nObjNum++;
@@ -1689,7 +1703,7 @@ sal_Bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj,
if (pnPassNum!=NULL) *pnPassNum|=SDRSEARCHPASS_MASTERPAGE;
nTmpOptions=nTmpOptions | SDRSEARCH_IMPISMASTER;
}
- pHitObj=CheckSingleSdrObjectHit(aPt,nTol,pObjList,pPV,nTmpOptions,pMVisLay,pObj);
+ pHitObj=CheckSingleSdrObjectHit(aPt,nTol,pObjList,pPV,nTmpOptions,pMVisLay,pObj,&(GetMarkedObjectList()));
if (bBack) nPgNum++;
}
}
@@ -1796,6 +1810,7 @@ sal_Bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPag
return bFnd;
}
+
void SdrMarkView::UnmarkAllObj(SdrPageView* pPV)
{
if (GetMarkedObjectCount()!=0) {
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 4236d4bab00d..0a07979b83bd 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -96,7 +96,6 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::drawing;
-
static void lcl_ShapeSegmentFromBinary( EnhancedCustomShapeSegment& rSegInfo, sal_uInt16 nSDat )
{
switch( nSDat >> 8 )
@@ -399,16 +398,18 @@ SdrObject* ImpCreateShadowObjectClone(const SdrObject& rOriginal, const SfxItemS
////////////////////////////////////////////////////////////////////////////////////////////////////
-Reference< XCustomShapeEngine > SdrObjCustomShape::GetCustomShapeEngine( const SdrObjCustomShape* pCustomShape )
+Reference< XCustomShapeEngine > SdrObjCustomShape::GetCustomShapeEngine() const
{
- Reference< XCustomShapeEngine > xCustomShapeEngine;
- String aEngine(((SdrCustomShapeEngineItem&)pCustomShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE )).GetValue());
+ if (mxCustomShapeEngine.is())
+ return mxCustomShapeEngine;
+
+ String aEngine(((SdrCustomShapeEngineItem&)GetMergedItem( SDRATTR_CUSTOMSHAPE_ENGINE )).GetValue());
if ( !aEngine.Len() )
aEngine = String( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.drawing.EnhancedCustomShapeEngine" ) );
Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
- Reference< XShape > aXShape = GetXShapeForSdrObject( (SdrObjCustomShape*)pCustomShape );
+ Reference< XShape > aXShape = GetXShapeForSdrObject(const_cast<SdrObjCustomShape*>(this));
if ( aXShape.is() )
{
if ( aEngine.Len() && xFactory.is() )
@@ -420,16 +421,18 @@ Reference< XCustomShapeEngine > SdrObjCustomShape::GetCustomShapeEngine( const S
aArgument[ 0 ] <<= aPropValues;
Reference< XInterface > xInterface( xFactory->createInstanceWithArguments( aEngine, aArgument ) );
if ( xInterface.is() )
- xCustomShapeEngine = Reference< XCustomShapeEngine >( xInterface, UNO_QUERY );
+ mxCustomShapeEngine = Reference< XCustomShapeEngine >( xInterface, UNO_QUERY );
}
}
- return xCustomShapeEngine;
+
+ return mxCustomShapeEngine;
}
+
const SdrObject* SdrObjCustomShape::GetSdrObjectFromCustomShape() const
{
if ( !mXRenderedCustomShape.is() )
{
- Reference< XCustomShapeEngine > xCustomShapeEngine( GetCustomShapeEngine( this ) );
+ Reference< XCustomShapeEngine > xCustomShapeEngine( GetCustomShapeEngine() );
if ( xCustomShapeEngine.is() )
((SdrObjCustomShape*)this)->mXRenderedCustomShape = xCustomShapeEngine->render();
}
@@ -556,10 +559,12 @@ double SdrObjCustomShape::GetExtraTextRotation( const bool bPreRotation ) const
*pAny >>= fExtraTextRotateAngle;
return fExtraTextRotateAngle;
}
+
sal_Bool SdrObjCustomShape::GetTextBounds( Rectangle& rTextBound ) const
{
sal_Bool bRet = sal_False;
- Reference< XCustomShapeEngine > xCustomShapeEngine( GetCustomShapeEngine( this ) ); // a candidate for being cached
+
+ Reference< XCustomShapeEngine > xCustomShapeEngine( GetCustomShapeEngine() );
if ( xCustomShapeEngine.is() )
{
awt::Rectangle aR( xCustomShapeEngine->getTextBounds() );
@@ -574,7 +579,7 @@ sal_Bool SdrObjCustomShape::GetTextBounds( Rectangle& rTextBound ) const
basegfx::B2DPolyPolygon SdrObjCustomShape::GetLineGeometry( const SdrObjCustomShape* pCustomShape, const sal_Bool bBezierAllowed )
{
basegfx::B2DPolyPolygon aRetval;
- Reference< XCustomShapeEngine > xCustomShapeEngine( GetCustomShapeEngine( pCustomShape ) );
+ Reference< XCustomShapeEngine > xCustomShapeEngine( pCustomShape->GetCustomShapeEngine() );
if ( xCustomShapeEngine.is() )
{
com::sun::star::drawing::PolyPolygonBezierCoords aBezierCoords = xCustomShapeEngine->getLineGeometry();
@@ -598,7 +603,7 @@ std::vector< SdrCustomShapeInteraction > SdrObjCustomShape::GetInteractionHandle
std::vector< SdrCustomShapeInteraction > xRet;
try
{
- Reference< XCustomShapeEngine > xCustomShapeEngine( GetCustomShapeEngine( pCustomShape ) );
+ Reference< XCustomShapeEngine > xCustomShapeEngine( pCustomShape->GetCustomShapeEngine() );
if ( xCustomShapeEngine.is() )
{
int i;
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 1bff49d54bc7..51b908955bbf 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <com/sun/star/lang/XComponent.hpp>
@@ -1201,10 +1192,10 @@ basegfx::B2DPolyPolygon SdrObject::TakeContour() const
// use neutral ViewInformation
const drawinglayer::geometry::ViewInformation2D aViewInformation2D;
- // create extractor, process and get result
- drawinglayer::processor2d::ContourExtractor2D aExtractor(aViewInformation2D);
+ // create extractor, process and get result (with hairlines as opened polygons)
+ drawinglayer::processor2d::ContourExtractor2D aExtractor(aViewInformation2D, false);
aExtractor.process(xSequence);
- const std::vector< basegfx::B2DPolyPolygon >& rResult(aExtractor.getExtractedContour());
+ const basegfx::B2DPolyPolygonVector& rResult(aExtractor.getExtractedContour());
const sal_uInt32 nSize(rResult.size());
// when count is one, it is implied that the object has only its normal
@@ -2411,7 +2402,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, bool bForceLineDas
aExtractor.process(xSequence);
// #i102241# check for line results
- const std::vector< basegfx::B2DPolygon >& rHairlineVector = aExtractor.getExtractedHairlines();
+ const basegfx::B2DPolygonVector& rHairlineVector = aExtractor.getExtractedHairlines();
if(!rHairlineVector.empty())
{
@@ -2423,7 +2414,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, bool bForceLineDas
}
// #i102241# check for fill rsults
- const std::vector< basegfx::B2DPolyPolygon >& rLineFillVector(aExtractor.getExtractedLineFills());
+ const basegfx::B2DPolyPolygonVector& rLineFillVector(aExtractor.getExtractedLineFills());
if(!rLineFillVector.empty())
{
@@ -2698,7 +2689,7 @@ SdrObject* SdrObject::ConvertToContourObj(SdrObject* pRet, bool bForceLineDash)
SdrObject* SdrObject::ConvertToPolyObj(bool bBezier, bool bLineToArea) const
{
- SdrObject* pRet = DoConvertToPolyObj(bBezier);
+ SdrObject* pRet = DoConvertToPolyObj(bBezier /*, true */); // FIXME_REMOVE_WHEN_RE_BASE_COMPLETE
if(pRet && bLineToArea)
{
@@ -2718,7 +2709,8 @@ SdrObject* SdrObject::ConvertToPolyObj(bool bBezier, bool bLineToArea) const
////////////////////////////////////////////////////////////////////////////////////////////////////
-SdrObject* SdrObject::DoConvertToPolyObj(sal_Bool /*bBezier*/) const
+// FIXME_REMOVE_WHEN_RE_BASE_COMPLETE comment ..
+SdrObject* SdrObject::DoConvertToPolyObj(sal_Bool /*bBezier*/ /*, bool */ /*bAddText*/) const
{
return NULL;
}
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index bc9d0f7f2fa4..f3d0f22a7403 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <unotools/streamwrap.hxx>
@@ -324,8 +315,11 @@ SdrGrafObj::SdrGrafObj()
bMirrored ( false )
{
pGraphic = new GraphicObject;
+ mpReplacementGraphic = 0;
pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
- bNoShear = true;
+
+ // #i118485# Shear allowed and possible now
+ bNoShear = false;
mbGrafAnimationAllowed = true;
@@ -346,8 +340,11 @@ SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect)
bMirrored ( false )
{
pGraphic = new GraphicObject( rGrf );
+ mpReplacementGraphic = 0;
pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
- bNoShear = true;
+
+ // #i118485# Shear allowed and possible now
+ bNoShear = false;
mbGrafAnimationAllowed = true;
@@ -368,8 +365,11 @@ SdrGrafObj::SdrGrafObj( const Graphic& rGrf )
bMirrored ( false )
{
pGraphic = new GraphicObject( rGrf );
+ mpReplacementGraphic = 0;
pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
- bNoShear = true;
+
+ // #i118485# Shear allowed and possible now
+ bNoShear = false;
mbGrafAnimationAllowed = true;
@@ -387,6 +387,7 @@ SdrGrafObj::SdrGrafObj( const Graphic& rGrf )
SdrGrafObj::~SdrGrafObj()
{
delete pGraphic;
+ delete mpReplacementGraphic;
ImpLinkAbmeldung();
}
@@ -395,6 +396,8 @@ SdrGrafObj::~SdrGrafObj()
void SdrGrafObj::SetGraphicObject( const GraphicObject& rGrfObj )
{
*pGraphic = rGrfObj;
+ delete mpReplacementGraphic;
+ mpReplacementGraphic = 0;
pGraphic->SetSwapStreamHdl( LINK( this, SdrGrafObj, ImpSwapHdl ), SWAPGRAPHIC_TIMEOUT );
pGraphic->SetUserData();
mbIsPreview = false;
@@ -414,11 +417,28 @@ const GraphicObject& SdrGrafObj::GetGraphicObject(bool bForceSwapIn) const
return *pGraphic;
}
+const GraphicObject* SdrGrafObj::GetReplacementGraphicObject() const
+{
+ if(!mpReplacementGraphic && pGraphic)
+ {
+ const SvgDataPtr& rSvgDataPtr = pGraphic->GetGraphic().getSvgData();
+
+ if(rSvgDataPtr.get())
+ {
+ const_cast< SdrGrafObj* >(this)->mpReplacementGraphic = new GraphicObject(rSvgDataPtr->getReplacement());
+ }
+ }
+
+ return mpReplacementGraphic;
+}
+
// -----------------------------------------------------------------------------
void SdrGrafObj::NbcSetGraphic( const Graphic& rGrf )
{
pGraphic->SetGraphic( rGrf );
+ delete mpReplacementGraphic;
+ mpReplacementGraphic = 0;
pGraphic->SetUserData();
mbIsPreview = false;
}
@@ -497,16 +517,6 @@ bool SdrGrafObj::IsEPS() const
return pGraphic->IsEPS();
}
-bool SdrGrafObj::IsRenderGraphic() const
-{
- return pGraphic->IsRenderGraphic();
-}
-
-bool SdrGrafObj::HasRenderGraphic() const
-{
- return pGraphic->HasRenderGraphic();
-}
-
bool SdrGrafObj::IsSwappedOut() const
{
return mbIsPreview ? true : pGraphic->IsSwappedOut();
@@ -661,7 +671,6 @@ const rtl::OUString& SdrGrafObj::GetFilterName() const
void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
{
bool bAnim = pGraphic->IsAnimated();
- bool bRenderGraphic = pGraphic->HasRenderGraphic();
bool bNoPresGrf = ( pGraphic->GetType() != GRAPHIC_NONE ) && !bEmptyPresObj;
rInfo.bResizeFreeAllowed = aGeo.nDrehWink % 9000 == 0 ||
@@ -669,19 +678,22 @@ void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
aGeo.nDrehWink % 27000 == 0;
rInfo.bResizePropAllowed = true;
- rInfo.bRotateFreeAllowed = bNoPresGrf && !bAnim && !bRenderGraphic;
- rInfo.bRotate90Allowed = bNoPresGrf && !bAnim && !bRenderGraphic;
- rInfo.bMirrorFreeAllowed = bNoPresGrf && !bAnim && !bRenderGraphic;
- rInfo.bMirror45Allowed = bNoPresGrf && !bAnim && !bRenderGraphic;
- rInfo.bMirror90Allowed = !bEmptyPresObj && !bRenderGraphic;
+ rInfo.bRotateFreeAllowed = bNoPresGrf && !bAnim;
+ rInfo.bRotate90Allowed = bNoPresGrf && !bAnim;
+ rInfo.bMirrorFreeAllowed = bNoPresGrf && !bAnim;
+ rInfo.bMirror45Allowed = bNoPresGrf && !bAnim;
+ rInfo.bMirror90Allowed = !bEmptyPresObj;
rInfo.bTransparenceAllowed = false;
rInfo.bGradientAllowed = false;
- rInfo.bShearAllowed = false;
+
+ // #i118485# Shear allowed and possible now
+ rInfo.bShearAllowed = true;
+
rInfo.bEdgeRadiusAllowed=false;
- rInfo.bCanConvToPath = false;
+ rInfo.bCanConvToPath = !IsEPS();
rInfo.bCanConvToPathLineToArea = false;
rInfo.bCanConvToPolyLineToArea = false;
- rInfo.bCanConvToPoly = !IsEPS() && !bRenderGraphic;
+ rInfo.bCanConvToPoly = !IsEPS();
rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary());
}
@@ -726,38 +738,50 @@ void SdrGrafObj::ImpSetLinkedGraphic( const Graphic& rGraphic )
void SdrGrafObj::TakeObjNameSingul(XubString& rName) const
{
- switch( pGraphic->GetType() )
+ if(pGraphic)
{
- case GRAPHIC_BITMAP:
- {
- const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || ( (const SdrGrafTransparenceItem&) GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
- ( IsLinkedGraphic() ? STR_ObjNameSingulGRAFBMPTRANSLNK : STR_ObjNameSingulGRAFBMPTRANS ) :
- ( IsLinkedGraphic() ? STR_ObjNameSingulGRAFBMPLNK : STR_ObjNameSingulGRAFBMP ) );
+ const SvgDataPtr& rSvgDataPtr = pGraphic->GetGraphic().getSvgData();
- rName=ImpGetResStr( nId );
+ if(rSvgDataPtr.get())
+ {
+ rName = ImpGetResStr(STR_ObjNameSingulGRAFSVG);
}
- break;
+ else
+ {
+ switch( pGraphic->GetType() )
+ {
+ case GRAPHIC_BITMAP:
+ {
+ const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || ( (const SdrGrafTransparenceItem&) GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
+ ( IsLinkedGraphic() ? STR_ObjNameSingulGRAFBMPTRANSLNK : STR_ObjNameSingulGRAFBMPTRANS ) :
+ ( IsLinkedGraphic() ? STR_ObjNameSingulGRAFBMPLNK : STR_ObjNameSingulGRAFBMP ) );
- case GRAPHIC_GDIMETAFILE:
- rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNameSingulGRAFMTFLNK : STR_ObjNameSingulGRAFMTF );
- break;
+ rName=ImpGetResStr( nId );
+ }
+ break;
- case GRAPHIC_NONE:
- rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNameSingulGRAFNONELNK : STR_ObjNameSingulGRAFNONE );
- break;
+ case GRAPHIC_GDIMETAFILE:
+ rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNameSingulGRAFMTFLNK : STR_ObjNameSingulGRAFMTF );
+ break;
- default:
- rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNameSingulGRAFLNK : STR_ObjNameSingulGRAF );
- break;
- }
+ case GRAPHIC_NONE:
+ rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNameSingulGRAFNONELNK : STR_ObjNameSingulGRAFNONE );
+ break;
- const String aName(GetName());
+ default:
+ rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNameSingulGRAFLNK : STR_ObjNameSingulGRAF );
+ break;
+ }
+ }
- if( aName.Len() )
- {
- rName.AppendAscii( " '" );
- rName += aName;
- rName += sal_Unicode( '\'' );
+ const String aName(GetName());
+
+ if( aName.Len() )
+ {
+ rName.AppendAscii( " '" );
+ rName += aName;
+ rName += sal_Unicode( '\'' );
+ }
}
}
@@ -765,38 +789,50 @@ void SdrGrafObj::TakeObjNameSingul(XubString& rName) const
void SdrGrafObj::TakeObjNamePlural( XubString& rName ) const
{
- switch( pGraphic->GetType() )
+ if(pGraphic)
{
- case GRAPHIC_BITMAP:
- {
- const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || ( (const SdrGrafTransparenceItem&) GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
- ( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPTRANSLNK : STR_ObjNamePluralGRAFBMPTRANS ) :
- ( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPLNK : STR_ObjNamePluralGRAFBMP ) );
+ const SvgDataPtr& rSvgDataPtr = pGraphic->GetGraphic().getSvgData();
- rName=ImpGetResStr( nId );
+ if(rSvgDataPtr.get())
+ {
+ rName = ImpGetResStr(STR_ObjNamePluralGRAFSVG);
}
- break;
+ else
+ {
+ switch( pGraphic->GetType() )
+ {
+ case GRAPHIC_BITMAP:
+ {
+ const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || ( (const SdrGrafTransparenceItem&) GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
+ ( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPTRANSLNK : STR_ObjNamePluralGRAFBMPTRANS ) :
+ ( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPLNK : STR_ObjNamePluralGRAFBMP ) );
- case GRAPHIC_GDIMETAFILE:
- rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNamePluralGRAFMTFLNK : STR_ObjNamePluralGRAFMTF );
- break;
+ rName=ImpGetResStr( nId );
+ }
+ break;
- case GRAPHIC_NONE:
- rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNamePluralGRAFNONELNK : STR_ObjNamePluralGRAFNONE );
- break;
+ case GRAPHIC_GDIMETAFILE:
+ rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNamePluralGRAFMTFLNK : STR_ObjNamePluralGRAFMTF );
+ break;
- default:
- rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNamePluralGRAFLNK : STR_ObjNamePluralGRAF );
- break;
- }
+ case GRAPHIC_NONE:
+ rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNamePluralGRAFNONELNK : STR_ObjNamePluralGRAFNONE );
+ break;
- const String aName(GetName());
+ default:
+ rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNamePluralGRAFLNK : STR_ObjNamePluralGRAF );
+ break;
+ }
+ }
- if( aName.Len() )
- {
- rName.AppendAscii( " '" );
- rName += aName;
- rName += sal_Unicode( '\'' );
+ const String aName(GetName());
+
+ if( aName.Len() )
+ {
+ rName.AppendAscii( " '" );
+ rName += aName;
+ rName += sal_Unicode( '\'' );
+ }
}
}
@@ -919,7 +955,8 @@ void SdrGrafObj::NbcMirror(const Point& rRef1, const Point& rRef2)
void SdrGrafObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear)
{
- SdrRectObj::NbcRotate( rRef, nWink, tn, bVShear );
+ // #i118485# Call Shear now, old version redirected to rotate
+ SdrRectObj::NbcShear(rRef, nWink, tn, bVShear);
}
// -----------------------------------------------------------------------------
@@ -1025,34 +1062,104 @@ bool SdrGrafObj::HasGDIMetaFile() const
// -----------------------------------------------------------------------------
-SdrObject* SdrGrafObj::DoConvertToPolyObj(sal_Bool bBezier) const
+bool SdrGrafObj::isEmbeddedSvg() const
+{
+ return GRAPHIC_BITMAP == GetGraphicType() && GetGraphic().getSvgData().get();
+}
+
+GDIMetaFile SdrGrafObj::getMetafileFromEmbeddedSvg() const
+{
+ GDIMetaFile aRetval;
+
+ if(isEmbeddedSvg() && GetModel())
+ {
+ VirtualDevice aOut;
+ const Rectangle aBoundRect(GetCurrentBoundRect());
+ const MapMode aMap(GetModel()->GetScaleUnit(), Point(), GetModel()->GetScaleFraction(), GetModel()->GetScaleFraction());
+
+ aOut.EnableOutput(false);
+ aOut.SetMapMode(aMap);
+ aRetval.Record(&aOut);
+ SingleObjectPainter(aOut);
+ aRetval.Stop();
+ aRetval.WindStart();
+ aRetval.Move(-aBoundRect.Left(), -aBoundRect.Top());
+ aRetval.SetPrefMapMode(aMap);
+ aRetval.SetPrefSize(aBoundRect.GetSize());
+ }
+
+ return aRetval;
+}
+
+SdrObject* SdrGrafObj::DoConvertToPolyObj(sal_Bool bBezier /*, bool bAddText */ ) const
{
+ bool bAddText = true; // FIXME_REMOVE_WHEN_RE_BASE_COMPLETE
SdrObject* pRetval = NULL;
+ GraphicType aGraphicType(GetGraphicType());
+ GDIMetaFile aMtf;
- switch( GetGraphicType() )
+ if(isEmbeddedSvg())
+ {
+ // Embedded Svg
+ // There is currently no helper to create SdrObjects from primitives (even if I'm thinking
+ // about writing one for some time). To get the roundtrip to SdrObjects it is necessary to
+ // use the old converter path over the MetaFile mechanism. Create Metafile from Svg
+ // primitives here pretty directly
+ aMtf = getMetafileFromEmbeddedSvg();
+ aGraphicType = GRAPHIC_GDIMETAFILE;
+ }
+ else if(GRAPHIC_GDIMETAFILE == aGraphicType)
+ {
+ aMtf = GetTransformedGraphic(SDRGRAFOBJ_TRANSFORMATTR_COLOR|SDRGRAFOBJ_TRANSFORMATTR_MIRROR).GetGDIMetaFile();
+ }
+
+ switch(aGraphicType)
{
case GRAPHIC_GDIMETAFILE:
{
// Sort into group and return ONLY those objects that can be created from the MetaFile.
- SdrObjGroup* pGrp = new SdrObjGroup();
ImpSdrGDIMetaFileImport aFilter(*GetModel());
- aFilter.SetScaleRect(GetSnapRect());
+ aFilter.SetScaleRect(aRect);
aFilter.SetLayer(GetLayer());
- sal_uInt32 nInsAnz = aFilter.DoImport(GetTransformedGraphic().GetGDIMetaFile(), *pGrp->GetSubList(), 0);
+ SdrObjGroup* pGrp = new SdrObjGroup();
+ sal_uInt32 nInsAnz = aFilter.DoImport(aMtf, *pGrp->GetSubList(), 0);
+
if(nInsAnz)
{
+ {
+ // copy transformation
+ GeoStat aGeoStat(GetGeoStat());
+
+ if(aGeoStat.nShearWink)
+ {
+ aGeoStat.RecalcTan();
+ pGrp->NbcShear(aRect.TopLeft(), aGeoStat.nShearWink, aGeoStat.nTan, false);
+ }
+
+ if(aGeoStat.nDrehWink)
+ {
+ aGeoStat.RecalcSinCos();
+ pGrp->NbcRotate(aRect.TopLeft(), aGeoStat.nDrehWink, aGeoStat.nSin, aGeoStat.nCos);
+ }
+ }
+
pRetval = pGrp;
pGrp->NbcSetLayer(GetLayer());
pGrp->SetModel(GetModel());
- pRetval = ImpConvertAddText(pRetval, bBezier);
+
+ if(bAddText)
+ {
+ pRetval = ImpConvertAddText(pRetval, bBezier);
+ }
// convert all children
if( pRetval )
{
SdrObject* pHalfDone = pRetval;
- pRetval = pHalfDone->DoConvertToPolyObj(bBezier);
+ pRetval = pHalfDone->DoConvertToPolyObj(bBezier
+ /*, bAddText */ ); // FIXME_REMOVE_WHEN_RE_BASE_COMPLETE
SdrObject::Free( pHalfDone ); // resulting object is newly created
if( pRetval )
@@ -1068,13 +1175,43 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(sal_Bool bBezier) const
}
}
else
+ {
delete pGrp;
+ }
+
+ // #i118485# convert line and fill
+ // FIXME_REMOVE_WHEN_RE_BASE_COMPLETE
+ SdrObject* pLineFill = SdrRectObj::DoConvertToPolyObj(bBezier /*, false */);
+
+ if(pLineFill)
+ {
+ if(pRetval)
+ {
+ pGrp = dynamic_cast< SdrObjGroup* >(pRetval);
+
+ if(!pGrp)
+ {
+ pGrp = new SdrObjGroup();
+
+ pGrp->NbcSetLayer(GetLayer());
+ pGrp->SetModel(GetModel());
+ pGrp->GetSubList()->NbcInsertObject(pRetval);
+ }
+
+ pGrp->GetSubList()->NbcInsertObject(pLineFill, 0);
+ }
+ else
+ {
+ pRetval = pLineFill;
+ }
+ }
+
break;
}
case GRAPHIC_BITMAP:
{
// create basic object and add fill
- pRetval = SdrRectObj::DoConvertToPolyObj(bBezier);
+ pRetval = SdrRectObj::DoConvertToPolyObj(bBezier /*, bAddText */); // FIXME_REMOVE_WHEN_RE_BASE_COMPLETE
// save bitmap as an attribute
if(pRetval)
@@ -1095,7 +1232,7 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(sal_Bool bBezier) const
case GRAPHIC_NONE:
case GRAPHIC_DEFAULT:
{
- pRetval = SdrRectObj::DoConvertToPolyObj(bBezier);
+ pRetval = SdrRectObj::DoConvertToPolyObj(bBezier /*, bAddText */); // FIXME_REMOVE_WHEN_RE_BASE_COMPLETE
break;
}
}
@@ -1240,8 +1377,9 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
if( pGraphic->HasUserData() )
{
::comphelper::LifecycleProxy proxy;
+ OUString aUserData = pGraphic->GetUserData();
uno::Reference<io::XInputStream> const xStream(
- pModel->GetDocumentStream(pGraphic->GetUserData(), proxy));
+ pModel->GetDocumentStream(aUserData, proxy));
::boost::scoped_ptr<SvStream> const pStream( (xStream.is())
? ::utl::UcbStreamHelper::CreateStream(xStream)
@@ -1270,16 +1408,14 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
mbIsPreview = true;
}
- if( !GraphicFilter::GetGraphicFilter().ImportGraphic( aGraphic,
- pGraphic->GetUserData(),
- *pStream,
- GRFILTER_FORMAT_DONTKNOW,
- NULL, 0, pFilterData ) )
+ if(!GraphicFilter::GetGraphicFilter().ImportGraphic(
+ aGraphic, aUserData, *pStream,
+ GRFILTER_FORMAT_DONTKNOW, NULL, 0, pFilterData))
{
- const String aUserData( pGraphic->GetUserData() );
+ const String aNewUserData( pGraphic->GetUserData() );
pGraphic->SetGraphic( aGraphic );
- pGraphic->SetUserData( aUserData );
+ pGraphic->SetUserData( aNewUserData );
// Graphic successfully swapped in.
pRet = GRFMGR_AUTOSWAPSTREAM_LOADED;
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 06b7caa2d964..25db389488a2 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -1,5 +1,5 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*h************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -80,7 +80,7 @@
#include <svx/svdetc.hxx>
#include <svx/svdview.hxx>
#include "unomlstr.hxx"
-#include <svtools/chartprettypainter.hxx>
+#include <svx/charthelper.hxx>
#include <svx/sdr/contact/viewcontactofsdrole2obj.hxx>
#include <svx/svdograf.hxx>
#include <svx/sdr/properties/oleproperties.hxx>
@@ -2030,7 +2030,7 @@ sal_Bool SdrOle2Obj::IsChart() const
{
if ( !m_bTypeAsked )
{
- m_bChart = ChartPrettyPainter::IsChart(xObjRef);
+ m_bChart = ChartHelper::IsChart(xObjRef);
m_bTypeAsked = true;
}
return m_bChart;
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index 01bc247a8651..a22a33deaaf5 100644
--- a/svx/source/svdraw/svdorect.cxx
+++ b/svx/source/svdraw/svdorect.cxx
@@ -1,31 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <svx/svdorect.hxx>
#include <math.h>
@@ -575,8 +565,12 @@ SdrGluePoint SdrRectObj::GetCornerGluePoint(sal_uInt16 nPosNum) const
return aGP;
}
-SdrObject* SdrRectObj::DoConvertToPolyObj(sal_Bool bBezier) const
+// FIXME_REMOVE_WHEN_RE_BASE_COMPLETE
+SdrObject* SdrRectObj::DoConvertToPolyObj(sal_Bool bBezier /*, bool bAddText */) const
{
+ // FIXME_REMOVE_WHEN_RE_BASE_COMPLETE
+ bool bAddText = true;
+
XPolygon aXP(ImpCalcXPoly(aRect,GetEckenradius()));
{ // TODO: this is only for the moment, until we have the new TakeContour()
aXP.Remove(0,1);
@@ -587,12 +581,18 @@ SdrObject* SdrRectObj::DoConvertToPolyObj(sal_Bool bBezier) const
aPolyPolygon.removeDoublePoints();
SdrObject* pRet = 0L;
- if(!IsTextFrame() || HasFill() || HasLine())
+ // small correction: Do not create something when no fill and no line. To
+ // be sure to not damage something with non-text frames, do this only
+ // when used with bAddText==false from other converters
+ if((bAddText && !IsTextFrame()) || HasFill() || HasLine())
{
pRet = ImpConvertMakeObj(aPolyPolygon, sal_True, bBezier);
}
- pRet = ImpConvertAddText(pRet, bBezier);
+ if(bAddText)
+ {
+ pRet = ImpConvertAddText(pRet, bBezier);
+ }
return pRet;
}
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index f0935bb0ae0c..889052801ae0 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -41,7 +41,7 @@
#include <vcl/virdev.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
-#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <com/sun/star/i18n/BreakIterator.hpp>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
#include <editeng/unolingu.hxx>
@@ -270,14 +270,8 @@ namespace
mrShadowDecomposition(rShadowDecomposition)
{
// prepare BreakIterator
- Reference < XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
- Reference < XInterface > xInterface = xMSF->createInstance(::rtl::OUString("com.sun.star.i18n.BreakIterator"));
-
- if(xInterface.is())
- {
- Any x = xInterface->queryInterface(::getCppuType((const Reference< XBreakIterator >*)0));
- x >>= mxBreak;
- }
+ Reference < XComponentContext > xContext = ::comphelper::getProcessComponentContext();
+ mxBreak = com::sun::star::i18n::BreakIterator::create(xContext);
}
void HandlePair(const basegfx::B2DPolygon rPolygonCandidate, const ::std::vector< const impPathTextPortion* >& rTextPortions)
diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src
index 6dfe076d0ef6..d7c03823b6ba 100644
--- a/svx/source/svdraw/svdstr.src
+++ b/svx/source/svdraw/svdstr.src
@@ -1,30 +1,21 @@
-/*************************************************************************
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-/* StarView resource file */
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include "svx/svdstr.hrc"
// Ab hier gecachte Strings
@@ -448,7 +439,21 @@ String STR_ObjNamePluralGRAFMACLNK
{
Text [ en-US ] = "Linked Mac graphics" ;
};
- ////////////////////////////////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+// Svg support
+
+String STR_ObjNameSingulGRAFSVG
+{
+ Text [ en-US ] = "SVG" ;
+};
+String STR_ObjNamePluralGRAFSVG
+{
+ Text [ en-US ] = "SVGs" ;
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
String STR_ObjNameSingulOLE2
{
Text [ en-US ] = "embedded object (OLE)" ;
@@ -2821,3 +2826,4 @@ String STR_ObjNamePluralFONTWORK
Text [ en-US ] = "font works" ;
};
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 275f57087092..df282db62db8 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -1,31 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <vector>
#include <editeng/editeng.hxx>
@@ -454,24 +444,38 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po
////////////////////////////////////////////////////////////////////////////////////////////////////
-Bitmap SdrExchangeView::GetMarkedObjBitmap( sal_Bool bNoVDevIfOneBmpMarked ) const
+BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked) const
{
- Bitmap aBmp;
+ BitmapEx aBmp;
if( AreObjectsMarked() )
{
- if( bNoVDevIfOneBmpMarked )
+ if(1 == GetMarkedObjectCount())
{
- SdrObject* pGrafObjTmp = GetMarkedObjectByIndex( 0 );
- SdrGrafObj* pGrafObj = ( GetMarkedObjectCount() == 1 ) ? PTR_CAST( SdrGrafObj, pGrafObjTmp ) : NULL;
+ if(bNoVDevIfOneBmpMarked)
+ {
+ SdrObject* pGrafObjTmp = GetMarkedObjectByIndex( 0 );
+ SdrGrafObj* pGrafObj = ( GetMarkedObjectCount() == 1 ) ? PTR_CAST( SdrGrafObj, pGrafObjTmp ) : NULL;
+
+ if( pGrafObj && ( pGrafObj->GetGraphicType() == GRAPHIC_BITMAP ) )
+ {
+ aBmp = pGrafObj->GetTransformedGraphic().GetBitmapEx();
+ }
+ }
+ else
+ {
+ const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(GetMarkedObjectByIndex(0));
- if( pGrafObj && ( pGrafObj->GetGraphicType() == GRAPHIC_BITMAP ) )
- aBmp = pGrafObj->GetTransformedGraphic().GetBitmap();
+ if(pSdrGrafObj && pSdrGrafObj->isEmbeddedSvg())
+ {
+ aBmp = pSdrGrafObj->GetGraphic().getSvgData()->getReplacement();
+ }
+ }
}
if( !aBmp )
{
- const Graphic aGraphic( GetMarkedObjMetaFile( bNoVDevIfOneBmpMarked ) );
+ const Graphic aGraphic(GetMarkedObjMetaFile(bNoVDevIfOneBmpMarked));
// #i102089# support user's settings of AA and LineSnap when the MetaFile gets
// raster-converted to a bitmap
@@ -482,7 +486,7 @@ Bitmap SdrExchangeView::GetMarkedObjBitmap( sal_Bool bNoVDevIfOneBmpMarked ) con
aDrawinglayerOpt.IsAntiAliasing(),
aDrawinglayerOpt.IsSnapHorVerLinesToDiscrete());
- aBmp = aGraphic.GetBitmap(aParameters);
+ aBmp = aGraphic.GetBitmapEx(aParameters);
}
}
@@ -491,7 +495,7 @@ Bitmap SdrExchangeView::GetMarkedObjBitmap( sal_Bool bNoVDevIfOneBmpMarked ) con
// -----------------------------------------------------------------------------
-GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile( sal_Bool bNoVDevIfOneMtfMarked ) const
+GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile(bool bNoVDevIfOneMtfMarked) const
{
GDIMetaFile aMtf;
@@ -570,7 +574,7 @@ Graphic SdrExchangeView::GetAllMarkedGraphic() const
if( ( 1 == GetMarkedObjectCount() ) && GetSdrMarkByIndex( 0 ) )
aRet = SdrExchangeView::GetObjGraphic( pMod, GetMarkedObjectByIndex( 0 ) );
else
- aRet = GetMarkedObjMetaFile( sal_False );
+ aRet = GetMarkedObjMetaFile(false);
}
return aRet;
@@ -590,10 +594,18 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject*
if(pSdrGrafObj)
{
- // Make behaviour coherent with metafile
- // recording below (which of course also takes
- // view-transformed objects)
- aRet = pSdrGrafObj->GetTransformedGraphic();
+ if(pSdrGrafObj->isEmbeddedSvg())
+ {
+ // get Metafile for Svg content
+ aRet = pSdrGrafObj->getMetafileFromEmbeddedSvg();
+ }
+ else
+ {
+ // Make behaviour coherent with metafile
+ // recording below (which of course also takes
+ // view-transformed objects)
+ aRet = pSdrGrafObj->GetTransformedGraphic();
+ }
}
else if(pSdrOle2Obj)
{
diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx
index 77d340fa5de1..a0f6b8a3ae6a 100644
--- a/svx/source/table/tablertfimporter.cxx
+++ b/svx/source/table/tablertfimporter.cxx
@@ -282,8 +282,6 @@ void SdrTableRTFParser::FillTable()
if( xCellInfo->maItemSet.GetItemState(SDRATTR_TABLE_BORDER,sal_False,&pPoolItem)==SFX_ITEM_SET)
xCell->SetMergedItem( *pPoolItem );
- String sDebug = mpOutliner->GetText( mpOutliner->GetParagraph( xCellInfo->mnStartPara ), xCellInfo->mnParaCount );
-
OutlinerParaObject* pTextObject = mpOutliner->CreateParaObject( (sal_uInt16)xCellInfo->mnStartPara, (sal_uInt16)xCellInfo->mnParaCount );
if( pTextObject )
{
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 6599e85b0d0d..de11a0238814 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -1,31 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <string>
@@ -1034,8 +1024,7 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
if( !pGrafObj ||
( pGrafObj->GetGraphicType() == GRAPHIC_NONE ) ||
- ( pGrafObj->GetGraphicType() == GRAPHIC_DEFAULT ) ||
- pGrafObj->HasRenderGraphic() )
+ ( pGrafObj->GetGraphicType() == GRAPHIC_DEFAULT ))
{
bEnableColors = bEnableTransparency = bEnableCrop = false;
break;
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 81192762e963..bca2249f4d21 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -747,7 +747,6 @@ void SvxFontNameBox_Impl::EnableControls_Impl()
bEnable = aFontOpt.IsFontWYSIWYGEnabled();
EnableWYSIWYG( bEnable );
- EnableSymbols( bEnable );
}
// -----------------------------------------------------------------------
@@ -1330,7 +1329,7 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( sal_uInt16 nId, const Reference< XFrame
SetOutputSizePixel( Size( 114, 144 ) );
m_aLineStyleLb.SetSourceUnit( FUNIT_TWIP );
- m_aLineStyleLb.SetNone( SVX_RESSTR(STR_NONE) );
+ m_aLineStyleLb.SetNone( SVX_RESSTR(RID_SVXSTR_NONE) );
using namespace table::BorderLineStyle;
m_aLineStyleLb.InsertEntry( SvxBorderLine::getWidthImpl( SOLID ), SOLID );
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index f58ef9e722c6..41580525a169 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -207,7 +207,7 @@ void DictionaryList::refillFromDictionary( sal_Int32 nTextConversionOptions )
nConversionPropertyType = xPropertyType->getPropertyType(aLeft, aRight);
DictionaryEntry* pEntry = new DictionaryEntry( aLeft, aRight, nConversionPropertyType );
- SvLBoxEntry* pLBEntry = InsertEntry( makeTabString( *pEntry ) );
+ SvTreeListEntry* pLBEntry = InsertEntry( makeTabString( *pEntry ) );
pLBEntry->SetUserData( pEntry );
}
@@ -232,7 +232,7 @@ DictionaryEntry* DictionaryList::getFirstSelectedEntry() const
DictionaryEntry* DictionaryList::getEntryOnPos( sal_Int32 nPos ) const
{
DictionaryEntry* pEntry=0;
- SvLBoxEntry* pLBEntry = GetEntryOnPos( nPos );
+ SvTreeListEntry* pLBEntry = GetEntryOnPos( nPos );
if(pLBEntry)
pEntry = (DictionaryEntry*)pLBEntry->GetUserData();
return pEntry;
@@ -262,14 +262,14 @@ void DictionaryList::addEntry( const rtl::OUString& rTerm, const rtl::OUString&
return;
DictionaryEntry* pEntry = new DictionaryEntry( rTerm, rMapping, nConversionPropertyType, sal_True );
- SvLBoxEntry* pLBEntry = InsertEntryToColumn( makeTabString( *pEntry ), nPos );
+ SvTreeListEntry* pLBEntry = InsertEntryToColumn( makeTabString( *pEntry ), nPos );
pLBEntry->SetUserData( pEntry );
SelectRow( GetEntryPos( pLBEntry ) );
}
void DictionaryList::deleteEntryOnPos( sal_Int32 nPos )
{
- SvLBoxEntry* pLBEntry = GetEntryOnPos( nPos );
+ SvTreeListEntry* pLBEntry = GetEntryOnPos( nPos );
DictionaryEntry* pEntry = getEntryOnPos( nPos );
if( pLBEntry )
RemoveParentKeepChildren( pLBEntry );
@@ -291,7 +291,7 @@ sal_uIntPtr DictionaryList::deleteEntries( const rtl::OUString& rTerm )
if( rTerm.equals( pCurEntry->m_aTerm ) )
{
nPos = nN;
- SvLBoxEntry* pCurLBEntry = GetEntryOnPos( nN );
+ SvTreeListEntry* pCurLBEntry = GetEntryOnPos( nN );
RemoveParentKeepChildren( pCurLBEntry );
if( pCurEntry->m_bNewEntry )
delete pCurEntry;
@@ -375,12 +375,12 @@ sal_uInt16 DictionaryList::getSortColumn() const
IMPL_LINK( DictionaryList, CompareHdl, SvSortData*, pData )
{
- SvLBoxEntry* pLeft = (SvLBoxEntry*)(pData->pLeft );
- SvLBoxEntry* pRight = (SvLBoxEntry*)(pData->pRight );
+ SvTreeListEntry* pLeft = (SvTreeListEntry*)(pData->pLeft );
+ SvTreeListEntry* pRight = (SvTreeListEntry*)(pData->pRight );
return (long) ColumnCompare(pLeft,pRight);
}
-StringCompare DictionaryList::ColumnCompare( SvLBoxEntry* pLeft, SvLBoxEntry* pRight )
+StringCompare DictionaryList::ColumnCompare( SvTreeListEntry* pLeft, SvTreeListEntry* pRight )
{
StringCompare eCompare=COMPARE_EQUAL;
@@ -408,7 +408,7 @@ StringCompare DictionaryList::ColumnCompare( SvLBoxEntry* pLeft, SvLBoxEntry* pR
return eCompare;
}
-SvLBoxItem* DictionaryList::getItemAtColumn( SvLBoxEntry* pEntry, sal_uInt16 nColumn ) const
+SvLBoxItem* DictionaryList::getItemAtColumn( SvTreeListEntry* pEntry, sal_uInt16 nColumn ) const
{
SvLBoxItem* pItem = NULL;
if( pEntry )
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
index 19709d89afeb..45d76eb2e967 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx
@@ -109,8 +109,8 @@ private:
String makeTabString( const DictionaryEntry& rEntry ) const;
DECL_LINK( CompareHdl, SvSortData* );
- StringCompare ColumnCompare( SvLBoxEntry* pLeft, SvLBoxEntry* pRight );
- SvLBoxItem* getItemAtColumn( SvLBoxEntry* pEntry, sal_uInt16 nColumn ) const;
+ StringCompare ColumnCompare( SvTreeListEntry* pLeft, SvTreeListEntry* pRight );
+ SvLBoxItem* getItemAtColumn( SvTreeListEntry* pEntry, sal_uInt16 nColumn ) const;
public:
::com::sun::star::uno::Reference<
diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx
index 27e81e929888..5da4fbd6e37b 100644
--- a/svx/source/unodraw/recoveryui.cxx
+++ b/svx/source/unodraw/recoveryui.cxx
@@ -33,6 +33,7 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <osl/file.hxx>
#include <rtl/bootstrap.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/configurationhelper.hxx>
#include <vcl/svapp.hxx>
@@ -261,7 +262,7 @@ RecoveryUI::EJob RecoveryUI::impl_classifyJob(const css::util::URL& aURL)
sal_Bool RecoveryUI::impl_doEmergencySave()
{
// create core service, which implements the real "emergency save" algorithm.
- svxdr::RecoveryCore* pCore = new svxdr::RecoveryCore(m_xSMGR, sal_True);
+ svxdr::RecoveryCore* pCore = new svxdr::RecoveryCore(comphelper::getComponentContext(m_xSMGR), sal_True);
css::uno::Reference< css::frame::XStatusListener > xCore(pCore);
// create all needed dialogs for this operation
@@ -290,7 +291,7 @@ void RecoveryUI::impl_doRecovery()
sal_Bool bCrashRepEnabled(sal_False);
css::uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey(
- m_xSMGR,
+ comphelper::getComponentContext(m_xSMGR),
CFG_PACKAGE_RECOVERY,
CFG_PATH_CRASHREPORTER,
CFG_ENTRY_ENABLED,
@@ -299,7 +300,7 @@ void RecoveryUI::impl_doRecovery()
bRecoveryOnly = !bCrashRepEnabled;
// create core service, which implements the real "emergency save" algorithm.
- svxdr::RecoveryCore* pCore = new svxdr::RecoveryCore(m_xSMGR, sal_False);
+ svxdr::RecoveryCore* pCore = new svxdr::RecoveryCore(comphelper::getComponentContext(m_xSMGR), sal_False);
css::uno::Reference< css::frame::XStatusListener > xCore(pCore);
// create all needed dialogs for this operation
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 04da106169a1..8a02d44ee0be 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/awt/FontSlant.hpp>
@@ -1666,6 +1657,20 @@ bool SvxGraphicObject::getPropertyValueImpl( const ::rtl::OUString& rName, const
break;
}
+ case OWN_ATTR_REPLACEMENTGRAFURL:
+ {
+ const GraphicObject* pGrafObj = static_cast< SdrGrafObj* >(mpObj.get())->GetReplacementGraphicObject();
+
+ if(pGrafObj)
+ {
+ OUString aURL(RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));
+ aURL += OStringToOUString(pGrafObj->GetUniqueID(), RTL_TEXTENCODING_ASCII_US);
+ rValue <<= aURL;
+ }
+
+ break;
+ }
+
case OWN_ATTR_GRAFSTREAMURL:
{
const OUString aStreamURL( ( (SdrGrafObj*) mpObj.get() )->GetGrafStreamURL() );
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 2875ad6f6fd0..975f573f63a4 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1,5 +1,5 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/**h***********************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -711,7 +711,7 @@ uno::Any SvxShape::GetBitmap( sal_Bool bMetaFile /* = sal_False */ ) const throw
aRect.Justify();
Size aSize(aRect.GetSize());
- GDIMetaFile aMtf( pView->GetAllMarkedMetaFile() );
+ GDIMetaFile aMtf( pView->GetMarkedObjMetaFile() );
if( bMetaFile )
{
SvMemoryStream aDestStrm( 65535, 65535 );
@@ -3999,7 +3999,7 @@ SvxShapeText::SvxShapeText( SdrObject* pObject, const SfxItemPropertyMapEntry* p
: SvxShape( pObject, pPropertyMap, pPropertySet ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
{
if( pObject && pObject->GetModel() )
- SetEditSource( new SvxTextEditSource( pObject, 0, static_cast< cppu::OWeakObject * >( static_cast< SvxShape * >( this ) ) ) );
+ SetEditSource( new SvxTextEditSource( pObject, 0, static_cast< cppu::OWeakObject * >( static_cast< SvxShape * >( this ) ) ) );
}
//----------------------------------------------------------------------
@@ -4013,7 +4013,7 @@ SvxShapeText::~SvxShapeText() throw ()
void SvxShapeText::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
{
if( pNewObj && (NULL == GetEditSource()))
- SetEditSource( new SvxTextEditSource( pNewObj, 0, static_cast< cppu::OWeakObject * >( static_cast< SvxShape* >(this) ) ) );
+ SetEditSource( new SvxTextEditSource( pNewObj, 0, static_cast< cppu::OWeakObject * >( static_cast< SvxShape* >(this) ) ) );
SvxShape::Create( pNewObj, pNewPage );
}
@@ -4247,12 +4247,12 @@ uno::Any SAL_CALL SvxShapeRect::queryAggregation( const uno::Type & rType ) thro
void SAL_CALL SvxShapeRect::acquire() throw()
{
- SvxShapeText::acquire();
+ SvxShapeText::acquire();
}
void SAL_CALL SvxShapeRect::release() throw()
{
- SvxShapeText::release();
+ SvxShapeText::release();
}
//----------------------------------------------------------------------
// XServiceInfo
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index c1e3110bbfad..ea7a5f92faaf 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -51,7 +51,7 @@
#include <editeng/editobj.hxx>
#include <editeng/unotext.hxx>
-#include <com/sun/star/linguistic2/XLinguServiceManager.hpp>
+#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
#include <comphelper/processfactory.hxx>
#include <svx/sdrpaintwindow.hxx>
@@ -100,7 +100,7 @@ private:
SdrOutliner* mpOutliner;
SvxOutlinerForwarder* mpTextForwarder;
SvxDrawOutlinerViewForwarder* mpViewForwarder; // if non-NULL, use GetViewModeTextForwarder text forwarder
- css::uno::Reference< css::linguistic2::XLinguServiceManager > m_xLinguServiceManager;
+ css::uno::Reference< css::linguistic2::XLinguServiceManager2 > m_xLinguServiceManager;
Point maTextOffset;
sal_Bool mbDataValid;
sal_Bool mbDestroyed;
@@ -585,17 +585,13 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
if ( !m_xLinguServiceManager.is() )
{
- css::uno::Reference< css::lang::XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
- m_xLinguServiceManager = css::uno::Reference< css::linguistic2::XLinguServiceManager >(
- xMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.linguistic2.LinguServiceManager" ))), css::uno::UNO_QUERY );
+ css::uno::Reference< css::uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ m_xLinguServiceManager.set(css::linguistic2::LinguServiceManager::create(xContext));
}
- if ( m_xLinguServiceManager.is() )
- {
- css::uno::Reference< css::linguistic2::XHyphenator > xHyphenator( m_xLinguServiceManager->getHyphenator(), css::uno::UNO_QUERY );
- if( xHyphenator.is() )
- mpOutliner->SetHyphenator( xHyphenator );
- }
+ css::uno::Reference< css::linguistic2::XHyphenator > xHyphenator( m_xLinguServiceManager->getHyphenator(), css::uno::UNO_QUERY );
+ if( xHyphenator.is() )
+ mpOutliner->SetHyphenator( xHyphenator );
}
diff --git a/svx/source/xml/xmlexport.cxx b/svx/source/xml/xmlexport.cxx
index 0109eff91986..f7f97ce2b3a1 100644
--- a/svx/source/xml/xmlexport.cxx
+++ b/svx/source/xml/xmlexport.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/xml/sax/Parser.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <com/sun/star/xml/sax/Writer.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
#include <com/sun/star/xml/sax/SAXParseException.hpp>
@@ -77,6 +78,7 @@ sal_Bool SvxDrawingLayerExport( SdrModel* pModel, const uno::Reference<io::XOutp
}
uno::Reference< lang::XMultiServiceFactory> xServiceFactory( ::comphelper::getProcessServiceFactory() );
+ uno::Reference< uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
if( !xServiceFactory.is() )
{
OSL_FAIL( "got no service manager" );
@@ -85,12 +87,7 @@ sal_Bool SvxDrawingLayerExport( SdrModel* pModel, const uno::Reference<io::XOutp
if( bDocRet )
{
- uno::Reference< uno::XInterface > xWriter( xServiceFactory->createInstance( OUString( "com.sun.star.xml.sax.Writer" ) ) );
- if( !xWriter.is() )
- {
- OSL_FAIL( "com.sun.star.xml.sax.Writer service missing" );
- bDocRet = sal_False;
- }
+ uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create( xContext );
::comphelper::IEmbeddedHelper *pPersist = pModel->GetPersist();
if( pPersist )
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 215c8fe88e86..d428c147b195 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -1,30 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
+/*
+ * This file is part of the LibreOffice project.
*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * Copyright 2000, 2010 Oracle and/or its affiliates.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <comphelper/string.hxx>
#include <sal/macros.h>
@@ -152,7 +143,7 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const ::rtl::OUString& rGraphi
{
pStm->SetVersion( SOFFICE_FILEFORMAT_8 );
pStm->SetCompressMode( COMPRESSMODE_ZBITMAP );
- ( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( *pStm, GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC );
+ ( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( *pStm );
bRet = ( pStm->GetError() == 0 );
}
}
@@ -638,7 +629,7 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt
pStream->Write( rLink.GetData(), rLink.GetDataSize() );
}
else
- rMtf.Write( *pStream, GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC );
+ rMtf.Write( *pStream );
bRet = ( pStream->GetError() == 0 );
}
@@ -720,7 +711,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s
case( GFX_LINK_TYPE_NATIVE_WMF ): aExtension = String( ".wmf" ); break;
case( GFX_LINK_TYPE_NATIVE_MET ): aExtension = String( ".met" ); break;
case( GFX_LINK_TYPE_NATIVE_PCT ): aExtension = String( ".pct" ); break;
- case( GFX_LINK_TYPE_NATIVE_SVG ):
+ case( GFX_LINK_TYPE_NATIVE_SVG ):
// backward-compat kludge: since no released OOo
// version to date can handle svg properly, wrap it up
// into an svm. slight catch22 here, since strict ODF
diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx
index a2f8322b1763..794d61d9291e 100644
--- a/svx/source/xml/xmlxtexp.cxx
+++ b/svx/source/xml/xmlxtexp.cxx
@@ -28,7 +28,7 @@
#include <tools/urlobj.hxx>
#include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <com/sun/star/xml/sax/Writer.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
#include <com/sun/star/drawing/LineDash.hpp>
@@ -237,18 +237,14 @@ bool SvxXMLXTableExportComponent::save(
try
{
uno::Reference< lang::XMultiServiceFactory> xServiceFactory( ::comphelper::getProcessServiceFactory() );
+ uno::Reference< uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
if( !xServiceFactory.is() )
{
OSL_FAIL( "got no service manager" );
return false;
}
- uno::Reference< uno::XInterface > xWriter( xServiceFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" ) ) ) );
- if( !xWriter.is() )
- {
- OSL_FAIL( "com.sun.star.xml.sax.Writer service missing" );
- return false;
- }
+ uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create( xContext );
uno::Reference < io::XStream > xStream;
uno::Reference < io::XOutputStream > xOut;
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index b5df3c7f359b..581bcd0104cd 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -1,32 +1,24 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
+/*
+ * This file is part of the LibreOffice project.
*
- * This file is part of OpenOffice.org.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <com/sun/star/drawing/LineJoint.hpp>
+#include <com/sun/star/drawing/LineCap.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <svx/dialogs.hrc>
@@ -290,6 +282,150 @@ sal_uInt16 XLineJointItem::GetValueCount() const
return 5;
}
+//-----------------------
+// class XLineCapItem -
+//-----------------------
+
+TYPEINIT1_AUTOFACTORY(XLineCapItem, SfxEnumItem);
+
+// -----------------------------------------------------------------------------
+
+XLineCapItem::XLineCapItem(com::sun::star::drawing::LineCap eLineCap)
+: SfxEnumItem(XATTR_LINECAP, sal::static_int_cast< sal_uInt16 >(eLineCap))
+{
+}
+
+// -----------------------------------------------------------------------------
+
+XLineCapItem::XLineCapItem( SvStream& rIn )
+: SfxEnumItem(XATTR_LINECAP, rIn)
+{
+}
+
+// -----------------------------------------------------------------------------
+
+sal_uInt16 XLineCapItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) const
+{
+ return 1;
+}
+
+// -----------------------------------------------------------------------------
+
+SfxPoolItem* XLineCapItem::Create( SvStream& rIn, sal_uInt16 nVer ) const
+{
+ XLineCapItem* pRet = new XLineCapItem( rIn );
+
+ if(nVer < 1)
+ pRet->SetValue(com::sun::star::drawing::LineCap_BUTT);
+
+ return pRet;
+}
+
+// -----------------------------------------------------------------------------
+
+SfxPoolItem* XLineCapItem::Clone(SfxItemPool* /*pPool*/) const
+{
+ return new XLineCapItem( *this );
+}
+
+// -----------------------------------------------------------------------------
+
+SfxItemPresentation XLineCapItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/,
+ SfxMapUnit /*ePresUnit*/, XubString& rText, const IntlWrapper*) const
+{
+ rText.Erase();
+
+ switch( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE: return ePres;
+
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ {
+ sal_uInt16 nId = 0;
+
+ switch( GetValue() )
+ {
+ default: /*com::sun::star::drawing::LineCap_BUTT*/
+ nId = RID_SVXSTR_LINECAP_BUTT;
+ break;
+
+ case(com::sun::star::drawing::LineCap_ROUND):
+ nId = RID_SVXSTR_LINECAP_ROUND;
+ break;
+
+ case(com::sun::star::drawing::LineCap_SQUARE):
+ nId = RID_SVXSTR_LINECAP_SQUARE;
+ break;
+ }
+
+ if( nId )
+ rText = SVX_RESSTR( nId );
+
+ return ePres;
+ }
+ default:
+ return SFX_ITEM_PRESENTATION_NONE;
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+bool XLineCapItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
+{
+ const com::sun::star::drawing::LineCap eCap(GetValue());
+ rVal <<= eCap;
+ return true;
+}
+
+// -----------------------------------------------------------------------------
+
+bool XLineCapItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
+{
+ com::sun::star::drawing::LineCap eUnoCap;
+
+ if(!(rVal >>= eUnoCap))
+ {
+ // also try an int (for Basic)
+ sal_Int32 nLJ(0);
+
+ if(!(rVal >>= nLJ))
+ {
+ return false;
+ }
+
+ eUnoCap = (com::sun::star::drawing::LineCap)nLJ;
+ }
+
+ OSL_ENSURE(com::sun::star::drawing::LineCap_BUTT == eUnoCap
+ || com::sun::star::drawing::LineCap_ROUND == eUnoCap
+ || com::sun::star::drawing::LineCap_SQUARE == eUnoCap, "Unknown enum value in XATTR_LINECAP (!)");
+
+ SetValue(sal::static_int_cast< sal_uInt16 >(eUnoCap));
+
+ return true;
+}
+
+// -----------------------------------------------------------------------------
+
+sal_uInt16 XLineCapItem::GetValueCount() const
+{
+ // don't forget to update the api interface also
+ return 3;
+}
+
+// -----------------------------------------------------------------------------
+
+com::sun::star::drawing::LineCap XLineCapItem::GetValue() const
+{
+ const com::sun::star::drawing::LineCap eRetval((com::sun::star::drawing::LineCap)SfxEnumItem::GetValue());
+ OSL_ENSURE(com::sun::star::drawing::LineCap_BUTT == eRetval
+ || com::sun::star::drawing::LineCap_ROUND == eRetval
+ || com::sun::star::drawing::LineCap_SQUARE == eRetval, "Unknown enum value in XATTR_LINECAP (!)");
+
+ return eRetval;
+}
+
//------------------------------
// class XFillTransparenceItem
//------------------------------
diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx
index 9cb1a4f53a28..9b577b186bfd 100644
--- a/svx/source/xoutdev/xpool.cxx
+++ b/svx/source/xoutdev/xpool.cxx
@@ -1,31 +1,21 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
+/*
+ * This file is part of the LibreOffice project.
*
- * This file is part of OpenOffice.org.
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
+ * This file incorporates work covered by the following license notice:
*
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
#include <svx/xtable.hxx>
#include "svx/xattr.hxx"
@@ -36,7 +26,7 @@
/*************************************************************************
|*
-|* Konstruktor
+|* Constructor
|*
\************************************************************************/
@@ -90,6 +80,7 @@ XOutdevItemPool::XOutdevItemPool(
mppLocalPoolDefaults[XATTR_LINEENDCENTER -XATTR_START] = new XLineEndCenterItem;
mppLocalPoolDefaults[XATTR_LINETRANSPARENCE -XATTR_START] = new XLineTransparenceItem;
mppLocalPoolDefaults[XATTR_LINEJOINT -XATTR_START] = new XLineJointItem;
+ mppLocalPoolDefaults[XATTR_LINECAP -XATTR_START] = new XLineCapItem;
mppLocalPoolDefaults[XATTR_FILLSTYLE -XATTR_START] = new XFillStyleItem;
mppLocalPoolDefaults[XATTR_FILLCOLOR -XATTR_START] = new XFillColorItem (aNullStr,aNullFillCol);
mppLocalPoolDefaults[XATTR_FILLGRADIENT -XATTR_START] = new XFillGradientItem(aNullGrad);
diff --git a/svx/workben/msview/msview.cxx b/svx/workben/msview/msview.cxx
index 4d35ebaf515b..5c80b04780ee 100644
--- a/svx/workben/msview/msview.cxx
+++ b/svx/workben/msview/msview.cxx
@@ -490,13 +490,13 @@ void Atom::compare( Atom* pAtom )
class AtomBoxString : public SvLBoxString
{
public:
- AtomBoxString( SvLBoxEntry* pEntry, const String& rStr )
+ AtomBoxString( SvTreeListEntry* pEntry, const String& rStr )
: SvLBoxString( pEntry, 0, rStr )
{ }
~AtomBoxString() { }
- void Paint( const Point& rPos, SvLBox& rOutDev, USHORT nViewDataEntryFlags, SvLBoxEntry* pEntry )
+ void Paint( const Point& rPos, SvLBox& rOutDev, USHORT nViewDataEntryFlags, SvTreeListEntry* pEntry )
{
Color aOldTextColor = rOutDev.GetTextColor();
@@ -530,16 +530,16 @@ public:
void SetExpandingHdl(const Link& rNewHdl){maExpandingHdl=rNewHdl;}
const Link& GetExpandingHdl() const { return maExpandingHdl; }
- virtual BOOL Expand( SvLBoxEntry* pParent );
- virtual BOOL Collapse( SvLBoxEntry* pParent );
+ virtual BOOL Expand( SvTreeListEntry* pParent );
+ virtual BOOL Collapse( SvTreeListEntry* pParent );
- SvLBoxEntry* findAtom( Atom* pAtom );
+ SvTreeListEntry* findAtom( Atom* pAtom );
- virtual void InitEntry(SvLBoxEntry*,const XubString&,const Image&,const Image&);
+ virtual void InitEntry(SvTreeListEntry*, const OUString&, const Image&, const Image&);
virtual void SetTabs();
private:
- void InsertAtom( const Atom* pAtom, SvLBoxEntry* pParent = 0 );
+ void InsertAtom( const Atom* pAtom, SvTreeListEntry* pParent = 0 );
const Atom* mpRootAtom;
ResMgr* mpResMgr;
Image maImgFolder;
@@ -551,7 +551,7 @@ private:
Link maExpandingHdl;
};
-typedef std::pair< AtomContainerTreeListBox*, SvLBoxEntry* > AtomContainerEntryPair;
+typedef std::pair< AtomContainerTreeListBox*, SvTreeListEntry* > AtomContainerEntryPair;
AtomContainerTreeListBox::AtomContainerTreeListBox( Window* pParent )
: SvTreeListBox( pParent, WB_HASBUTTONS|WB_HASLINES|WB_HASBUTTONSATROOT|WB_3DLOOK|WB_BORDER ),
@@ -591,16 +591,17 @@ void AtomContainerTreeListBox::SetTabs()
AddTab( nStartPos, SV_LBOXTAB_DYNAMIC|SV_LBOXTAB_ADJUST_LEFT | SV_LBOXTAB_SHOW_SELECTION );
}
-void AtomContainerTreeListBox::InitEntry(SvLBoxEntry* pEntry,const XubString& aStr,const Image& aCollEntryBmp,const Image& aExpEntryBmp)
+void AtomContainerTreeListBox::InitEntry(SvTreeListEntry* pEntry, const OUString& aStr,
+ const Image& aCollEntryBmp, const Image& aExpEntryBmp)
{
pEntry->AddItem( new SvLBoxContextBmp( pEntry,0, aCollEntryBmp,aExpEntryBmp, SVLISTENTRYFLAG_EXPANDED ) );
pEntry->AddItem( new SvLBoxContextBmp( pEntry,0, maImgAtom, maImgAtom, SVLISTENTRYFLAG_EXPANDED ) );
pEntry->AddItem( new AtomBoxString( pEntry, aStr ) );
}
-SvLBoxEntry* AtomContainerTreeListBox::findAtom( Atom* pAtom )
+SvTreeListEntry* AtomContainerTreeListBox::findAtom( Atom* pAtom )
{
- SvLBoxEntry* pEntry = First();
+ SvTreeListEntry* pEntry = First();
while( pEntry )
{
if( pEntry->GetUserData() == pAtom )
@@ -612,7 +613,7 @@ SvLBoxEntry* AtomContainerTreeListBox::findAtom( Atom* pAtom )
return 0;
}
-BOOL AtomContainerTreeListBox::Expand( SvLBoxEntry* pParent )
+BOOL AtomContainerTreeListBox::Expand( SvTreeListEntry* pParent )
{
BOOL bRet = FALSE;
if( !mbRecursiveGuard )
@@ -627,7 +628,7 @@ BOOL AtomContainerTreeListBox::Expand( SvLBoxEntry* pParent )
return bRet;
}
-BOOL AtomContainerTreeListBox::Collapse( SvLBoxEntry* pParent )
+BOOL AtomContainerTreeListBox::Collapse( SvTreeListEntry* pParent )
{
BOOL bRet = FALSE;
if( !mbRecursiveGuard )
@@ -648,7 +649,7 @@ void AtomContainerTreeListBox::SetRootAtom( const Atom* pAtom )
InsertAtom( mpRootAtom );
}
-void AtomContainerTreeListBox::InsertAtom( const Atom* pAtom, SvLBoxEntry* pParent /* = 0 */ )
+void AtomContainerTreeListBox::InsertAtom( const Atom* pAtom, SvTreeListEntry* pParent /* = 0 */ )
{
if( pAtom )
{
@@ -671,7 +672,7 @@ void AtomContainerTreeListBox::InsertAtom( const Atom* pAtom, SvLBoxEntry* pPare
sprintf( buffer, " (I: %lu L: %lu)", (UINT32)rHeader.nRecVer, (UINT32)rHeader.nRecLen );
aText += String( rtl::OUString::createFromAscii( buffer ) );
- SvLBoxEntry* pEntry = 0;
+ SvTreeListEntry* pEntry = 0;
if( pAtom->isContainer() && pAtom->findFirstChildAtom() )
{
pEntry = InsertEntry( aText, maImgExpanded, maImgCollapsed, pParent );
@@ -959,7 +960,7 @@ static String GetAtomText( const Atom* pAtom )
IMPL_LINK(MSViewerWorkWindow,implSelectHdl, AtomContainerTreeListBox*, pListBox )
{
int nPane = (pListBox == mpListBox[1]) ? 1 : 0;
- SvLBoxEntry* pEntry = mpListBox[nPane]->FirstSelected();
+ SvTreeListEntry* pEntry = mpListBox[nPane]->FirstSelected();
if( pEntry && pEntry->GetUserData() )
{
Atom* pAtom = static_cast<Atom*>( pEntry->GetUserData() );
@@ -986,7 +987,7 @@ void MSViewerWorkWindow::Sync( AtomContainerEntryPair* pPair, int nAction )
Atom* pAtom = static_cast<Atom*>(pPair->second->GetUserData());
if( pAtom && pAtom->getCompareAtom() )
{
- SvLBoxEntry* pEntry = pDestinationListBox->findAtom( pAtom->getCompareAtom() );
+ SvTreeListEntry* pEntry = pDestinationListBox->findAtom( pAtom->getCompareAtom() );
if(pEntry )
{
@@ -1009,7 +1010,7 @@ void MSViewerWorkWindow::Sync( AtomContainerEntryPair* pPair, int nAction )
IMPL_LINK(MSViewerWorkWindow, implExpandingHdl, AtomContainerEntryPair*, pPair )
{
- SvLBoxEntry* pEntry = pPair->second;
+ SvTreeListEntry* pEntry = pPair->second;
if( pEntry && pEntry->GetUserData() )
{
Atom* pAtom = static_cast<Atom*>( pEntry->GetUserData() );
@@ -1118,7 +1119,7 @@ void MSViewerWorkWindow::Resize()
}
comphelper::setProcessServiceFactory( xMSF );
- InitVCL( xMSF );
+ InitVCL();
String aConfigURL;
if( ::utl::LocalFileHelper::ConvertPhysicalNameToURL( Application::GetAppFileName(), aConfigURL ) )