summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basegfx/inc/basegfx/numeric/ftools.hxx2
-rw-r--r--basegfx/inc/basegfx/polygon/b2dpolygoncutandtouch.hxx8
-rw-r--r--basegfx/inc/basegfx/polygon/b2dpolygontools.hxx4
-rw-r--r--basegfx/inc/basegfx/polygon/b2dtrapezoid.hxx132
-rw-r--r--basegfx/inc/basegfx/tuple/b2dtuple.hxx10
-rw-r--r--basegfx/inc/basegfx/tuple/b2i64tuple.hxx2
-rw-r--r--basegfx/inc/basegfx/tuple/b2ituple.hxx2
-rw-r--r--basegfx/inc/basegfx/tuple/b3dtuple.hxx10
-rw-r--r--basegfx/inc/basegfx/tuple/b3i64tuple.hxx2
-rw-r--r--basegfx/inc/basegfx/tuple/b3ituple.hxx2
-rw-r--r--basegfx/prj/d.lst1
-rw-r--r--basegfx/source/polygon/b2dpolygoncutandtouch.cxx90
-rw-r--r--basegfx/source/polygon/b2dpolygontools.cxx18
-rw-r--r--basegfx/source/polygon/b2dtrapezoid.cxx1227
-rw-r--r--basegfx/source/polygon/makefile.mk1
-rwxr-xr-xcanvas/source/directx/dx_5rm.cxx2
-rwxr-xr-xcanvas/source/directx/dx_9rm.cxx2
-rwxr-xr-xcanvas/source/directx/dx_canvashelper_texturefill.cxx2
-rw-r--r--canvas/source/vcl/canvashelper.cxx2
-rw-r--r--comphelper/inc/comphelper/namedvaluecollection.hxx7
-rw-r--r--comphelper/source/misc/namedvaluecollection.cxx9
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx10
-rw-r--r--i18npool/inc/i18npool/lang.h18
-rw-r--r--i18npool/source/isolang/isolang.cxx13
-rwxr-xr-xi18npool/source/isolang/langid.pl2
-rw-r--r--i18npool/source/localedata/LocaleNode.cxx4
-rw-r--r--i18npool/source/localedata/data/en_CA.xml24
-rw-r--r--i18npool/source/localedata/data/fr_CA.xml8
-rw-r--r--i18npool/source/localedata/data/hsb_DE.xml350
-rw-r--r--i18npool/source/localedata/data/locale.dtd128
-rw-r--r--i18npool/source/localedata/data/localedata_euro.map34
-rw-r--r--i18npool/source/localedata/data/localedata_others.map17
-rw-r--r--i18npool/source/localedata/data/ltg_LV.xml350
-rw-r--r--i18npool/source/localedata/data/lv_LV.xml869
-rw-r--r--i18npool/source/localedata/data/makefile.mk6
-rw-r--r--i18npool/source/localedata/data/plt_MG.xml358
-rw-r--r--i18npool/source/localedata/data/ro_RO.xml3
-rw-r--r--i18npool/source/localedata/data/shs_CA.xml20
-rw-r--r--i18npool/source/localedata/localedata.cxx3
-rw-r--r--i18npool/source/textconversion/data/stc_char.dic378
-rw-r--r--i18npool/source/textconversion/data/stc_word.dic1
-rw-r--r--padmin/source/fontentry.cxx2
-rw-r--r--rsc/source/parser/makefile.mk11
-rw-r--r--rsc/source/parser/parser.cxx59
-rw-r--r--rsc/source/parser/parser.hxx26
-rw-r--r--rsc/source/prj/start.cxx2
-rw-r--r--sax/source/expatwrap/saxwriter.cxx2
-rw-r--r--sax/source/tools/converter.cxx580
-rw-r--r--svl/inc/svl/smplhint.hxx10
-rw-r--r--svl/source/notify/makefile.mk1
-rw-r--r--svtools/inc/svtools/grfmgr.hxx5
-rw-r--r--svtools/source/contnr/templwin.cxx21
-rw-r--r--svtools/source/control/inettbc.cxx1
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx2
-rw-r--r--svtools/source/dialogs/wizardmachine.cxx1
-rw-r--r--svtools/source/graphic/grfmgr.cxx66
-rw-r--r--svtools/source/misc/imagemgr.cxx69
-rw-r--r--svtools/source/misc/langtab.src12
-rw-r--r--toolkit/inc/toolkit/helper/property.hxx1
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx8
-rw-r--r--toolkit/source/awt/vclxwindow.cxx4
-rw-r--r--toolkit/source/helper/property.cxx1
-rw-r--r--tools/inc/tools/diagnose_ex.h23
-rw-r--r--tools/inc/tools/wintypes.hxx5
-rw-r--r--unotools/inc/unotools/saveopt.hxx4
-rw-r--r--unotools/source/config/saveopt.cxx60
-rw-r--r--vcl/aqua/inc/salbmp.h1
-rwxr-xr-xvcl/aqua/inc/salpixmaputils.hxx47
-rw-r--r--vcl/aqua/source/dtrans/DataFlavorMapping.cxx60
-rw-r--r--vcl/aqua/source/dtrans/DataFlavorMapping.hxx5
-rw-r--r--vcl/aqua/source/dtrans/OSXTransferable.cxx5
-rw-r--r--vcl/aqua/source/dtrans/PictToBmpFlt.cxx91
-rw-r--r--vcl/aqua/source/dtrans/PictToBmpFlt.hxx15
-rw-r--r--vcl/aqua/source/gdi/makefile.mk1
-rw-r--r--vcl/aqua/source/gdi/salnativewidgets.cxx93
-rwxr-xr-xvcl/aqua/source/gdi/salpixmaputils.cxx36
-rw-r--r--vcl/inc/vcl/decoview.hxx2
-rw-r--r--vcl/inc/vcl/fontmanager.hxx2
-rw-r--r--vcl/inc/vcl/introwin.hxx2
-rw-r--r--vcl/inc/vcl/outdev.hxx23
-rw-r--r--vcl/inc/vcl/pdfwriter.hxx7
-rw-r--r--vcl/inc/vcl/region.hxx4
-rw-r--r--vcl/inc/vcl/salnativewidgets.hxx16
-rw-r--r--vcl/inc/vcl/status.hxx1
-rw-r--r--vcl/inc/vcl/tabctrl.hxx6
-rw-r--r--vcl/inc/vcl/tabdlg.hxx2
-rw-r--r--vcl/source/control/button.cxx36
-rw-r--r--vcl/source/control/fixed.cxx28
-rw-r--r--vcl/source/control/slider.cxx71
-rw-r--r--vcl/source/control/tabctrl.cxx100
-rw-r--r--vcl/source/fontsubset/cff.cxx128
-rw-r--r--vcl/source/gdi/bitmapex.cxx2
-rw-r--r--vcl/source/gdi/outdev3.cxx12
-rw-r--r--vcl/source/gdi/outmap.cxx210
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx15
-rw-r--r--vcl/source/gdi/pdfwriter.cxx4
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx596
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx47
-rw-r--r--vcl/source/gdi/pngwrite.cxx1
-rw-r--r--vcl/source/gdi/region.cxx27
-rw-r--r--vcl/source/gdi/salgdilayout.cxx6
-rwxr-xr-xvcl/source/gdi/sallayout.cxx6
-rw-r--r--vcl/source/window/decoview.cxx33
-rw-r--r--vcl/source/window/dlgctrl.cxx64
-rw-r--r--vcl/source/window/introwin.cxx9
-rw-r--r--vcl/source/window/mnemonic.cxx68
-rw-r--r--vcl/source/window/status.cxx104
-rw-r--r--vcl/source/window/tabdlg.cxx17
-rw-r--r--vcl/source/window/window.cxx7
-rw-r--r--vcl/source/window/window3.cxx6
-rw-r--r--vcl/source/window/winproc.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkbridge.cxx4
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx8
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx6
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx210
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx18
-rw-r--r--vcl/unx/headless/svpframe.cxx27
-rw-r--r--vcl/unx/inc/plugins/gtk/gtkgdi.hxx5
-rw-r--r--vcl/unx/inc/saldisp.hxx1
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx479
-rw-r--r--vcl/unx/kde4/KDESalGraphics.hxx10
-rw-r--r--vcl/unx/source/app/saldisp.cxx58
-rw-r--r--vcl/unx/source/fontmanager/fontconfig.cxx7
-rw-r--r--vcl/unx/source/fontmanager/fontmanager.cxx8
-rw-r--r--vcl/unx/source/fontmanager/parseAFM.cxx254
-rw-r--r--vcl/unx/source/gdi/gcach_xpeer.cxx2
-rw-r--r--vcl/unx/source/gdi/salgdi3.cxx2
-rw-r--r--vcl/unx/source/gdi/xrender_peer.cxx22
-rw-r--r--vcl/unx/source/gdi/xrender_peer.hxx9
-rw-r--r--vcl/win/source/gdi/salnativewidgets-luna.cxx68
-rw-r--r--vcl/win/source/window/MAKEFILE.MK7
131 files changed, 6278 insertions, 2052 deletions
diff --git a/basegfx/inc/basegfx/numeric/ftools.hxx b/basegfx/inc/basegfx/numeric/ftools.hxx
index b973adb8650b..0a4cdfcffdaa 100644
--- a/basegfx/inc/basegfx/numeric/ftools.hxx
+++ b/basegfx/inc/basegfx/numeric/ftools.hxx
@@ -175,7 +175,7 @@ namespace basegfx
static bool equal(const double& rfValA, const double& rfValB, const double& rfSmallValue)
{
- return (fabs(rfValA) - fabs(rfValB) <= rfSmallValue);
+ return (fabs(rfValA - rfValB) <= rfSmallValue);
}
static bool less(const double& rfValA, const double& rfValB)
diff --git a/basegfx/inc/basegfx/polygon/b2dpolygoncutandtouch.hxx b/basegfx/inc/basegfx/polygon/b2dpolygoncutandtouch.hxx
index 538baa89aa81..a9d6e0a1b6fe 100644
--- a/basegfx/inc/basegfx/polygon/b2dpolygoncutandtouch.hxx
+++ b/basegfx/inc/basegfx/polygon/b2dpolygoncutandtouch.hxx
@@ -65,6 +65,14 @@ namespace basegfx
B2DPolygon addPointsAtCuts(const B2DPolygon& rCandidate, const B2DPolyPolygon& rMask);
B2DPolyPolygon addPointsAtCuts(const B2DPolyPolygon& rCandidate, const B2DPolyPolygon& rMask);
+ // look for self-intersections in given polygon and add extra points there. Result will have no
+ // intersections on an edge
+ B2DPolygon addPointsAtCuts(const B2DPolygon& rCandidate);
+
+ // add points at all self-intersections of single polygons (depends on bSelfIntersections)
+ // and at polygon-polygon intersections
+ B2DPolyPolygon addPointsAtCuts(const B2DPolyPolygon& rCandidate, bool bSelfIntersections = true);
+
} // end of namespace tools
} // end of namespace basegfx
diff --git a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx
index bea0de5c98d6..7d1d0bc9660c 100644
--- a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx
+++ b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx
@@ -271,6 +271,10 @@ namespace basegfx
*/
B2DPolygon createPolygonFromRect( const B2DRectangle& rRect );
+ /** Create the unit polygon
+ */
+ B2DPolygon createUnitPolygon();
+
/** Create a circle polygon with given radius.
This method creates a circle approximation consisting of
diff --git a/basegfx/inc/basegfx/polygon/b2dtrapezoid.hxx b/basegfx/inc/basegfx/polygon/b2dtrapezoid.hxx
new file mode 100644
index 000000000000..70ffdf2b7339
--- /dev/null
+++ b/basegfx/inc/basegfx/polygon/b2dtrapezoid.hxx
@@ -0,0 +1,132 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: b2dpolygontriangulator.hxx,v $
+ * $Revision: 1.5 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _BGFX_POLYGON_B2DTRAPEZOID_HXX
+#define _BGFX_POLYGON_B2DTRAPEZOID_HXX
+
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <vector>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace basegfx
+{
+ // class to hold a single trapezoid
+ class B2DTrapezoid
+ {
+ private:
+ // Geometry data. YValues are down-oriented, this means bottom should
+ // be bigger than top to be below it. The constructor implementation
+ // guarantees:
+ //
+ // - mfBottomY >= mfTopY
+ // - mfTopXRight >= mfTopXLeft
+ // - mfBottomXRight >= mfBottomXLeft
+ double mfTopXLeft;
+ double mfTopXRight;
+ double mfTopY;
+ double mfBottomXLeft;
+ double mfBottomXRight;
+ double mfBottomY;
+
+ public:
+ // constructor
+ B2DTrapezoid(
+ const double& rfTopXLeft,
+ const double& rfTopXRight,
+ const double& rfTopY,
+ const double& rfBottomXLeft,
+ const double& rfBottomXRight,
+ const double& rfBottomY);
+
+ // data read access
+ const double& getTopXLeft() const { return mfTopXLeft; }
+ const double& getTopXRight() const { return mfTopXRight; }
+ const double& getTopY() const { return mfTopY; }
+ const double& getBottomXLeft() const { return mfBottomXLeft; }
+ const double& getBottomXRight() const { return mfBottomXRight; }
+ const double& getBottomY() const { return mfBottomY; }
+
+ // convenience method to get content as Polygon
+ B2DPolygon getB2DPolygon() const;
+ };
+
+ typedef ::std::vector< B2DTrapezoid > B2DTrapezoidVector;
+
+} // end of namespace basegfx
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace basegfx
+{
+ namespace tools
+ {
+ // convert SourcePolyPolygon to trapezoids. The trapezoids will be appended to
+ // ro_Result. ro_Result will not be cleared. If SourcePolyPolygon contains curves,
+ // it's default AdaptiveSubdivision will be used.
+ // CAUTION: Trapezoids are oreintation-dependent in the sense that the upper and lower
+ // lines have to be parallel to the X-Axis, thus this subdivision is NOT simply usable
+ // for primitive decompositions. To use it, the shear and rotate parts of the
+ // involved transformations HAVE to be taken into account.
+ void trapezoidSubdivide(
+ B2DTrapezoidVector& ro_Result,
+ const B2DPolyPolygon& rSourcePolyPolygon);
+
+ // directly create trapezoids from given edge. Depending on the given geometry,
+ // none up to three trapezoids will be created
+ void createLineTrapezoidFromEdge(
+ B2DTrapezoidVector& ro_Result,
+ const B2DPoint& rPointA,
+ const B2DPoint& rPointB,
+ double fLineWidth = 1.0);
+
+ // create trapezoids for all edges of the given polygon. The closed state of
+ // the polygon is taken into account. If curves are contaned, the default
+ // AdaptiveSubdivision will be used.
+ void createLineTrapezoidFromB2DPolygon(
+ B2DTrapezoidVector& ro_Result,
+ const B2DPolygon& rPolygon,
+ double fLineWidth = 1.0);
+
+ // create trapezoids for all edges of the given polyPolygon. The closed state of
+ // the PolyPolygon is taken into account. If curves are contaned, the default
+ // AdaptiveSubdivision will be used.
+ void createLineTrapezoidFromB2DPolyPolygon(
+ B2DTrapezoidVector& ro_Result,
+ const B2DPolyPolygon& rPolyPolygon,
+ double fLineWidth = 1.0);
+
+ } // end of namespace tools
+} // end of namespace basegfx
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif /* _BGFX_POLYGON_B2DTRAPEZOID_HXX */
diff --git a/basegfx/inc/basegfx/tuple/b2dtuple.hxx b/basegfx/inc/basegfx/tuple/b2dtuple.hxx
index e0e2438307e4..71dd227ac736 100644
--- a/basegfx/inc/basegfx/tuple/b2dtuple.hxx
+++ b/basegfx/inc/basegfx/tuple/b2dtuple.hxx
@@ -155,15 +155,17 @@ namespace basegfx
bool equal(const B2DTuple& rTup) const
{
return (
- fTools::equal(mfX, rTup.mfX) &&
- fTools::equal(mfY, rTup.mfY));
+ this == &rTup ||
+ (fTools::equal(mfX, rTup.mfX) &&
+ fTools::equal(mfY, rTup.mfY)));
}
bool equal(const B2DTuple& rTup, const double& rfSmallValue) const
{
return (
- fTools::equal(mfX, rTup.mfX, rfSmallValue) &&
- fTools::equal(mfY, rTup.mfY, rfSmallValue));
+ this == &rTup ||
+ (fTools::equal(mfX, rTup.mfX, rfSmallValue) &&
+ fTools::equal(mfY, rTup.mfY, rfSmallValue)));
}
// operators
diff --git a/basegfx/inc/basegfx/tuple/b2i64tuple.hxx b/basegfx/inc/basegfx/tuple/b2i64tuple.hxx
index 1bd81dc0e374..9c813c07a994 100644
--- a/basegfx/inc/basegfx/tuple/b2i64tuple.hxx
+++ b/basegfx/inc/basegfx/tuple/b2i64tuple.hxx
@@ -182,7 +182,7 @@ namespace basegfx
bool operator==( const B2I64Tuple& rTup ) const
{
- return rTup.mnX == mnX && rTup.mnY == mnY;
+ return this == &rTup || (rTup.mnX == mnX && rTup.mnY == mnY);
}
bool operator!=( const B2I64Tuple& rTup ) const
diff --git a/basegfx/inc/basegfx/tuple/b2ituple.hxx b/basegfx/inc/basegfx/tuple/b2ituple.hxx
index 9fa6e7119ee7..da29b5509dec 100644
--- a/basegfx/inc/basegfx/tuple/b2ituple.hxx
+++ b/basegfx/inc/basegfx/tuple/b2ituple.hxx
@@ -181,7 +181,7 @@ namespace basegfx
bool operator==( const B2ITuple& rTup ) const
{
- return rTup.mnX == mnX && rTup.mnY == mnY;
+ return this == &rTup || (rTup.mnX == mnX && rTup.mnY == mnY);
}
bool operator!=( const B2ITuple& rTup ) const
diff --git a/basegfx/inc/basegfx/tuple/b3dtuple.hxx b/basegfx/inc/basegfx/tuple/b3dtuple.hxx
index 6ad063d124a0..11fb797ff0ff 100644
--- a/basegfx/inc/basegfx/tuple/b3dtuple.hxx
+++ b/basegfx/inc/basegfx/tuple/b3dtuple.hxx
@@ -179,17 +179,19 @@ namespace basegfx
bool equal(const B3DTuple& rTup) const
{
return (
- ::basegfx::fTools::equal(mfX, rTup.mfX) &&
+ this == &rTup ||
+ (::basegfx::fTools::equal(mfX, rTup.mfX) &&
::basegfx::fTools::equal(mfY, rTup.mfY) &&
- ::basegfx::fTools::equal(mfZ, rTup.mfZ));
+ ::basegfx::fTools::equal(mfZ, rTup.mfZ)));
}
bool equal(const B3DTuple& rTup, const double& rfSmallValue) const
{
return (
- ::basegfx::fTools::equal(mfX, rTup.mfX, rfSmallValue) &&
+ this == &rTup ||
+ (::basegfx::fTools::equal(mfX, rTup.mfX, rfSmallValue) &&
::basegfx::fTools::equal(mfY, rTup.mfY, rfSmallValue) &&
- ::basegfx::fTools::equal(mfZ, rTup.mfZ, rfSmallValue));
+ ::basegfx::fTools::equal(mfZ, rTup.mfZ, rfSmallValue)));
}
// operators
diff --git a/basegfx/inc/basegfx/tuple/b3i64tuple.hxx b/basegfx/inc/basegfx/tuple/b3i64tuple.hxx
index 13a7cb87ace3..a2d754fe4f79 100644
--- a/basegfx/inc/basegfx/tuple/b3i64tuple.hxx
+++ b/basegfx/inc/basegfx/tuple/b3i64tuple.hxx
@@ -212,7 +212,7 @@ namespace basegfx
bool operator==( const B3I64Tuple& rTup ) const
{
- return rTup.mnX == mnX && rTup.mnY == mnY && rTup.mnZ == mnZ;
+ return this == &rTup || (rTup.mnX == mnX && rTup.mnY == mnY && rTup.mnZ == mnZ);
}
bool operator!=( const B3I64Tuple& rTup ) const
diff --git a/basegfx/inc/basegfx/tuple/b3ituple.hxx b/basegfx/inc/basegfx/tuple/b3ituple.hxx
index 4df462bf3f22..644ae07b6545 100644
--- a/basegfx/inc/basegfx/tuple/b3ituple.hxx
+++ b/basegfx/inc/basegfx/tuple/b3ituple.hxx
@@ -212,7 +212,7 @@ namespace basegfx
bool operator==( const B3ITuple& rTup ) const
{
- return rTup.mnX == mnX && rTup.mnY == mnY && rTup.mnZ == mnZ;
+ return this == &rTup || (rTup.mnX == mnX && rTup.mnY == mnY && rTup.mnZ == mnZ);
}
bool operator!=( const B3ITuple& rTup ) const
diff --git a/basegfx/prj/d.lst b/basegfx/prj/d.lst
index a58cd33e4f9c..68ab880eef62 100644
--- a/basegfx/prj/d.lst
+++ b/basegfx/prj/d.lst
@@ -73,6 +73,7 @@ mkdir: %_DEST%\inc%_EXT%\basegfx\polygon
..\inc\basegfx\polygon\b2dpolygontriangulator.hxx %_DEST%\inc%_EXT%\basegfx\polygon\b2dpolygontriangulator.hxx
..\inc\basegfx\polygon\b2dpolygoncutandtouch.hxx %_DEST%\inc%_EXT%\basegfx\polygon\b2dpolygoncutandtouch.hxx
..\inc\basegfx\polygon\b2dpolypolygoncutter.hxx %_DEST%\inc%_EXT%\basegfx\polygon\b2dpolypolygoncutter.hxx
+..\inc\basegfx\polygon\b2dtrapezoid.hxx %_DEST%\inc%_EXT%\basegfx\polygon\b2dtrapezoid.hxx
..\inc\basegfx\polygon\b3dpolygon.hxx %_DEST%\inc%_EXT%\basegfx\polygon\b3dpolygon.hxx
..\inc\basegfx\polygon\b3dpolypolygon.hxx %_DEST%\inc%_EXT%\basegfx\polygon\b3dpolypolygon.hxx
..\inc\basegfx\polygon\b3dpolygontools.hxx %_DEST%\inc%_EXT%\basegfx\polygon\b3dpolygontools.hxx
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index 9eab4b26c8b3..11955ceb22f9 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -1200,6 +1200,96 @@ namespace basegfx
return aRetval;
}
+ B2DPolygon addPointsAtCuts(const B2DPolygon& rCandidate)
+ {
+ if(rCandidate.count())
+ {
+ temporaryPointVector aTempPoints;
+
+ findCuts(rCandidate, aTempPoints);
+
+ return mergeTemporaryPointsAndPolygon(rCandidate, aTempPoints);
+ }
+ else
+ {
+ return rCandidate;
+ }
+ }
+
+ B2DPolyPolygon addPointsAtCuts(const B2DPolyPolygon& rCandidate, bool bSelfIntersections)
+ {
+ const sal_uInt32 nCount(rCandidate.count());
+
+ if(nCount)
+ {
+ B2DPolyPolygon aRetval;
+
+ if(1 == nCount)
+ {
+ if(bSelfIntersections)
+ {
+ // remove self intersections
+ aRetval.append(addPointsAtCuts(rCandidate.getB2DPolygon(0)));
+ }
+ else
+ {
+ // copy source
+ aRetval = rCandidate;
+ }
+ }
+ else
+ {
+ // first solve self cuts for all contained single polygons
+ temporaryPolygonData *pTempData = new temporaryPolygonData[nCount];
+ sal_uInt32 a, b;
+
+ for(a = 0; a < nCount; a++)
+ {
+ if(bSelfIntersections)
+ {
+ // use polygons with solved self intersections
+ pTempData[a].setPolygon(addPointsAtCuts(rCandidate.getB2DPolygon(a)));
+ }
+ else
+ {
+ // copy given polygons
+ pTempData[a].setPolygon(rCandidate.getB2DPolygon(a));
+ }
+ }
+
+ // now cuts and touches between the polygons
+ for(a = 0; a < nCount; a++)
+ {
+ for(b = 0; b < nCount; b++)
+ {
+ if(a < b)
+ {
+ // look for cuts, compare each edge polygon to following ones
+ if(pTempData[a].getRange().overlaps(pTempData[b].getRange()))
+ {
+ findCuts(pTempData[a].getPolygon(), pTempData[b].getPolygon(), pTempData[a].getTemporaryPointVector(), pTempData[b].getTemporaryPointVector());
+ }
+ }
+ }
+ }
+
+ // consolidate the result
+ for(a = 0L; a < nCount; a++)
+ {
+ aRetval.append(mergeTemporaryPointsAndPolygon(pTempData[a].getPolygon(), pTempData[a].getTemporaryPointVector()));
+ }
+
+ delete[] pTempData;
+ }
+
+ return aRetval;
+ }
+ else
+ {
+ return rCandidate;
+ }
+ }
+
////////////////////////////////////////////////////////////////////////////////
} // end of namespace tools
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 28e5bb1f430d..e54a5e2707c9 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -1835,6 +1835,24 @@ namespace basegfx
return aRetval;
}
+ B2DPolygon createUnitPolygon()
+ {
+ static B2DPolygon aRetval;
+
+ if(!aRetval.count())
+ {
+ aRetval.append( B2DPoint( 0.0, 0.0 ) );
+ aRetval.append( B2DPoint( 1.0, 0.0 ) );
+ aRetval.append( B2DPoint( 1.0, 1.0 ) );
+ aRetval.append( B2DPoint( 0.0, 1.0 ) );
+
+ // close
+ aRetval.setClosed( true );
+ }
+
+ return aRetval;
+ }
+
B2DPolygon createPolygonFromCircle( const B2DPoint& rCenter, double fRadius )
{
return createPolygonFromEllipse( rCenter, fRadius, fRadius );
diff --git a/basegfx/source/polygon/b2dtrapezoid.cxx b/basegfx/source/polygon/b2dtrapezoid.cxx
new file mode 100644
index 000000000000..4cd63f938114
--- /dev/null
+++ b/basegfx/source/polygon/b2dtrapezoid.cxx
@@ -0,0 +1,1227 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: b2dpolygontriangulator.cxx,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_basegfx.hxx"
+#include <basegfx/polygon/b2dtrapezoid.hxx>
+#include <basegfx/range/b1drange.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <list>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace basegfx
+{
+ namespace trapezoidhelper
+ {
+ //////////////////////////////////////////////////////////////////////////////
+ // helper class to hold a simple ege. This is only used for horizontal edges
+ // currently, thus the YPositions will be equal. I did not create a special
+ // class for this since holdingthe pointers is more effective and also can be
+ // used as baseclass for the traversing edges
+
+ class TrDeSimpleEdge
+ {
+ protected:
+ // pointers to start and end point
+ const B2DPoint* mpStart;
+ const B2DPoint* mpEnd;
+
+ public:
+ // constructor
+ TrDeSimpleEdge(
+ const B2DPoint* pStart,
+ const B2DPoint* pEnd)
+ : mpStart(pStart),
+ mpEnd(pEnd)
+ {
+ }
+
+ // data read access
+ const B2DPoint& getStart() const { return *mpStart; }
+ const B2DPoint& getEnd() const { return *mpEnd; }
+ };
+
+ //////////////////////////////////////////////////////////////////////////////
+ // define vector of simple edges
+
+ typedef ::std::vector< TrDeSimpleEdge > TrDeSimpleEdges;
+
+ //////////////////////////////////////////////////////////////////////////////
+ // helper class for holding a traversing edge. It will always have some
+ // distance in YPos. The slope (in a numerically useful form, see comments) is
+ // hold and used in SortValue to allow sorting traversing edges by Y, X and slope
+ // (in that order)
+
+ class TrDeEdgeEntry : public TrDeSimpleEdge
+ {
+ private:
+ // the slope in a numerical useful form for sorting
+ sal_uInt32 mnSortValue;
+
+ public:
+ // convenience data read access
+ double getDeltaX() const { return mpEnd->getX() - mpStart->getX(); }
+ double getDeltaY() const { return mpEnd->getY() - mpStart->getY(); }
+
+ // convenience data read access. SortValue is created on demand since
+ // it is not always used
+ sal_uInt32 getSortValue() const
+ {
+ if(0 != mnSortValue)
+ return mnSortValue;
+
+ // get radiant; has to be in the range ]0.0 .. pi[, thus scale to full
+ // sal_uInt32 range for maximum precision
+ const double fRadiant(atan2(getDeltaY(), getDeltaX()) * (SAL_MAX_UINT32 / F_PI));
+
+ // convert to sal_uInt32 value
+ const_cast< TrDeEdgeEntry* >(this)->mnSortValue = sal_uInt32(fRadiant);
+
+ return mnSortValue;
+ }
+
+ // constructor. SortValue can be given when known, use zero otherwise
+ TrDeEdgeEntry(
+ const B2DPoint* pStart,
+ const B2DPoint* pEnd,
+ sal_uInt32 nSortValue = 0)
+ : TrDeSimpleEdge(pStart, pEnd),
+ mnSortValue(nSortValue)
+ {
+ // force traversal of deltaY downward
+ if(mpEnd->getY() < mpStart->getY())
+ {
+ std::swap(mpStart, mpEnd);
+ }
+
+ // no horizontal edges allowed, all neeed to traverse vertically
+ OSL_ENSURE(mpEnd->getY() > mpStart->getY(), "Illegal TrDeEdgeEntry constructed (!)");
+ }
+
+ // data write access to StartPoint
+ void setStart( const B2DPoint* pNewStart)
+ {
+ OSL_ENSURE(0 != pNewStart, "No null pointer allowed here (!)");
+
+ if(mpStart != pNewStart)
+ {
+ mpStart = pNewStart;
+
+ // no horizontal edges allowed, all neeed to traverse vertivally
+ OSL_ENSURE(mpEnd->getY() > mpStart->getY(), "Illegal TrDeEdgeEntry constructed (!)");
+ }
+ }
+
+ // data write access to EndPoint
+ void setEnd( const B2DPoint* pNewEnd)
+ {
+ OSL_ENSURE(0 != pNewEnd, "No null pointer allowed here (!)");
+
+ if(mpEnd != pNewEnd)
+ {
+ mpEnd = pNewEnd;
+
+ // no horizontal edges allowed, all neeed to traverse vertivally
+ OSL_ENSURE(mpEnd->getY() > mpStart->getY(), "Illegal TrDeEdgeEntry constructed (!)");
+ }
+ }
+
+ // operator for sort support. Sort by Y, X and slope (in that order)
+ bool operator<(const TrDeEdgeEntry& rComp) const
+ {
+ if(fTools::equal(getStart().getY(), rComp.getStart().getY(), fTools::getSmallValue()))
+ {
+ if(fTools::equal(getStart().getX(), rComp.getStart().getX(), fTools::getSmallValue()))
+ {
+ // when start points are equal, use the direction the edge is pointing
+ // to. That value is created on demand and derived from atan2 in the
+ // range ]0.0 .. pi[ (without extremas, we always have a deltaY in this
+ // class) and scaled to sal_uInt32 range for best precision. 0 means no angle,
+ // while SAL_MAX_UINT32 means pi. Thus, the higher the value, the more left
+ // the edge traverses.
+ return (getSortValue() > rComp.getSortValue());
+ }
+ else
+ {
+ return fTools::less(getStart().getX(), rComp.getStart().getX());
+ }
+ }
+ else
+ {
+ return fTools::less(getStart().getY(), rComp.getStart().getY());
+ }
+ }
+
+ // method for cut support
+ B2DPoint getCutPointForGivenY(double fGivenY)
+ {
+ // Calculate cut point locally (do not use interpolate) since it is numerically
+ // necessary to guarantee the new, equal Y-coordinate
+ const double fFactor((fGivenY - getStart().getY()) / getDeltaY());
+ const double fDeltaXNew(fFactor * getDeltaX());
+
+ return B2DPoint(getStart().getX() + fDeltaXNew, fGivenY);
+ }
+ };
+
+ //////////////////////////////////////////////////////////////////////////////
+ // define double linked list of edges (for fast random insert)
+
+ typedef ::std::list< TrDeEdgeEntry > TrDeEdgeEntries;
+
+ } // end of anonymous namespace
+} // end of namespace basegfx
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace basegfx
+{
+ namespace trapezoidhelper
+ {
+ // helper class to handle the complete trapezoid subdivision of a PolyPolygon
+ class TrapezoidSubdivider
+ {
+ private:
+ // local data
+ sal_uInt32 mnInitialEdgeEntryCount;
+ TrDeEdgeEntries maTrDeEdgeEntries;
+ ::std::vector< B2DPoint > maPoints;
+ ::std::vector< B2DPoint* > maNewPoints;
+
+ void addEdgeSorted(
+ TrDeEdgeEntries::iterator aCurrent,
+ const TrDeEdgeEntry& rNewEdge)
+ {
+ // Loop while new entry is bigger, use operator<
+ while(aCurrent != maTrDeEdgeEntries.end() && (*aCurrent) < rNewEdge)
+ {
+ aCurrent++;
+ }
+
+ // Insert before first which is smaller or equal or at end
+ maTrDeEdgeEntries.insert(aCurrent, rNewEdge);
+ }
+
+ bool splitEdgeAtGivenPoint(
+ TrDeEdgeEntries::reference aEdge,
+ const B2DPoint& rCutPoint,
+ TrDeEdgeEntries::iterator aCurrent)
+ {
+ // do not create edges without deltaY: do not split when start is identical
+ if(aEdge.getStart().equal(rCutPoint, fTools::getSmallValue()))
+ {
+ return false;
+ }
+
+ // do not create edges without deltaY: do not split when end is identical
+ if(aEdge.getEnd().equal(rCutPoint, fTools::getSmallValue()))
+ {
+ return false;
+ }
+
+ const double fOldDeltaYStart(rCutPoint.getY() - aEdge.getStart().getY());
+
+ if(fTools::lessOrEqual(fOldDeltaYStart, 0.0))
+ {
+ // do not split: the resulting edge would be horizontal
+ // correct it to new start point
+ aEdge.setStart(&rCutPoint);
+ return false;
+ }
+
+ const double fNewDeltaYStart(aEdge.getEnd().getY() - rCutPoint.getY());
+
+ if(fTools::lessOrEqual(fNewDeltaYStart, 0.0))
+ {
+ // do not split: the resulting edge would be horizontal
+ // correct it to new end point
+ aEdge.setEnd(&rCutPoint);
+ return false;
+ }
+
+ // Create new entry
+ const TrDeEdgeEntry aNewEdge(
+ &rCutPoint,
+ &aEdge.getEnd(),
+ aEdge.getSortValue());
+
+ // Correct old entry
+ aEdge.setEnd(&rCutPoint);
+
+ // Insert sorted (to avoid new sort)
+ addEdgeSorted(aCurrent, aNewEdge);
+
+ return true;
+ }
+
+ bool testAndCorrectEdgeIntersection(
+ TrDeEdgeEntries::reference aEdgeA,
+ TrDeEdgeEntries::reference aEdgeB,
+ TrDeEdgeEntries::iterator aCurrent)
+ {
+ // Exclude simple cases: same start or end point
+ if(aEdgeA.getStart().equal(aEdgeB.getStart(), fTools::getSmallValue()))
+ {
+ return false;
+ }
+
+ if(aEdgeA.getStart().equal(aEdgeB.getEnd(), fTools::getSmallValue()))
+ {
+ return false;
+ }
+
+ if(aEdgeA.getEnd().equal(aEdgeB.getStart(), fTools::getSmallValue()))
+ {
+ return false;
+ }
+
+ if(aEdgeA.getEnd().equal(aEdgeB.getEnd(), fTools::getSmallValue()))
+ {
+ return false;
+ }
+
+ // Exclude simple cases: one of the edges has no length anymore
+ if(aEdgeA.getStart().equal(aEdgeA.getEnd(), fTools::getSmallValue()))
+ {
+ return false;
+ }
+
+ if(aEdgeB.getStart().equal(aEdgeB.getEnd(), fTools::getSmallValue()))
+ {
+ return false;
+ }
+
+ // check if one point is on the other edge (a touch, not a cut)
+ const B2DVector aDeltaB(aEdgeB.getDeltaX(), aEdgeB.getDeltaY());
+
+ if(tools::isPointOnEdge(aEdgeA.getStart(), aEdgeB.getStart(), aDeltaB))
+ {
+ return splitEdgeAtGivenPoint(aEdgeB, aEdgeA.getStart(), aCurrent);
+ }
+
+ if(tools::isPointOnEdge(aEdgeA.getEnd(), aEdgeB.getStart(), aDeltaB))
+ {
+ return splitEdgeAtGivenPoint(aEdgeB, aEdgeA.getEnd(), aCurrent);
+ }
+
+ const B2DVector aDeltaA(aEdgeA.getDeltaX(), aEdgeA.getDeltaY());
+
+ if(tools::isPointOnEdge(aEdgeB.getStart(), aEdgeA.getStart(), aDeltaA))
+ {
+ return splitEdgeAtGivenPoint(aEdgeA, aEdgeB.getStart(), aCurrent);
+ }
+
+ if(tools::isPointOnEdge(aEdgeB.getEnd(), aEdgeA.getStart(), aDeltaA))
+ {
+ return splitEdgeAtGivenPoint(aEdgeA, aEdgeB.getEnd(), aCurrent);
+ }
+
+ // check for cut inside edges. Use both t-values to choose the more precise
+ // one later
+ double fCutA(0.0);
+ double fCutB(0.0);
+
+ if(tools::findCut(
+ aEdgeA.getStart(), aDeltaA,
+ aEdgeB.getStart(), aDeltaB,
+ CUTFLAG_LINE,
+ &fCutA,
+ &fCutB))
+ {
+ // use a simple metric (length criteria) for choosing the numerically
+ // better cut
+ const double fSimpleLengthA(aDeltaA.getX() + aDeltaA.getY());
+ const double fSimpleLengthB(aDeltaB.getX() + aDeltaB.getY());
+ const bool bAIsLonger(fSimpleLengthA > fSimpleLengthB);
+ B2DPoint* pNewPoint = bAIsLonger
+ ? new B2DPoint(aEdgeA.getStart() + (fCutA * aDeltaA))
+ : new B2DPoint(aEdgeB.getStart() + (fCutB * aDeltaB));
+ bool bRetval(false);
+
+ // try to split both edges
+ bRetval = splitEdgeAtGivenPoint(aEdgeA, *pNewPoint, aCurrent);
+ bRetval |= splitEdgeAtGivenPoint(aEdgeB, *pNewPoint, aCurrent);
+
+ if(bRetval)
+ {
+ maNewPoints.push_back(pNewPoint);
+ }
+ else
+ {
+ delete pNewPoint;
+ }
+
+ return bRetval;
+ }
+
+ return false;
+ }
+
+ void solveHorizontalEdges(TrDeSimpleEdges& rTrDeSimpleEdges)
+ {
+ if(rTrDeSimpleEdges.size() && maTrDeEdgeEntries.size())
+ {
+ // there were horizontal edges. These can be excluded, but
+ // cuts with other edges need to be solved and added before
+ // ignoring them
+ sal_uInt32 a(0);
+
+ for(a = 0; a < rTrDeSimpleEdges.size(); a++)
+ {
+ // get horizontal edge as candidate; prepare it's range and fixed Y
+ const TrDeSimpleEdge& rHorEdge = rTrDeSimpleEdges[a];
+ const B1DRange aRange(rHorEdge.getStart().getX(), rHorEdge.getEnd().getX());
+ const double fFixedY(rHorEdge.getStart().getY());
+
+ // loop over traversing edges
+ TrDeEdgeEntries::iterator aCurrent(maTrDeEdgeEntries.begin());
+
+ do
+ {
+ // get compare edge
+ TrDeEdgeEntries::reference aCompare(*aCurrent++);
+
+ if(fTools::lessOrEqual(aCompare.getEnd().getY(), fFixedY))
+ {
+ // edge ends above horizontal edge, continue
+ continue;
+ }
+
+ if(fTools::moreOrEqual(aCompare.getStart().getY(), fFixedY))
+ {
+ // edge starts below horizontal edge, continue
+ continue;
+ }
+
+ // vertical overlap, get horizontal range
+ const B1DRange aCompareRange(aCompare.getStart().getX(), aCompare.getEnd().getX());
+
+ if(aRange.overlaps(aCompareRange))
+ {
+ // possible cut, get cut point
+ const B2DPoint aSplit(aCompare.getCutPointForGivenY(fFixedY));
+
+ if(fTools::more(aSplit.getX(), aRange.getMinimum())
+ && fTools::less(aSplit.getX(), aRange.getMaximum()))
+ {
+ // cut is in XRange of horizontal edge, potenitally needed cut
+ B2DPoint* pNewPoint = new B2DPoint(aSplit);
+
+ if(splitEdgeAtGivenPoint(aCompare, *pNewPoint, aCurrent))
+ {
+ maNewPoints.push_back(pNewPoint);
+ }
+ else
+ {
+ delete pNewPoint;
+ }
+ }
+ }
+ }
+ while(aCurrent != maTrDeEdgeEntries.end()
+ && fTools::less(aCurrent->getStart().getY(), fFixedY));
+ }
+ }
+ }
+
+ public:
+ TrapezoidSubdivider(
+ const B2DPolyPolygon& rSourcePolyPolygon)
+ : mnInitialEdgeEntryCount(0),
+ maTrDeEdgeEntries(),
+ maPoints(),
+ maNewPoints()
+ {
+ B2DPolyPolygon aSource(rSourcePolyPolygon);
+ const sal_uInt32 nPolygonCount(rSourcePolyPolygon.count());
+ TrDeSimpleEdges aTrDeSimpleEdges;
+ sal_uInt32 a(0), b(0);
+ sal_uInt32 nAllPointCount(0);
+
+ // ensure there are no curves used
+ if(aSource.areControlPointsUsed())
+ {
+ aSource = aSource.getDefaultAdaptiveSubdivision();
+ }
+
+ for(a = 0; a < nPolygonCount; a++)
+ {
+ // 1st run: count points
+ const B2DPolygon aPolygonCandidate(aSource.getB2DPolygon(a));
+ const sal_uInt32 nCount(aPolygonCandidate.count());
+
+ if(nCount > 2)
+ {
+ nAllPointCount += nCount;
+ }
+ }
+
+ if(nAllPointCount)
+ {
+ // reserve needed points. CAUTION: maPoints size is NOT to be changed anymore
+ // after 2nd loop since pointers to it are used in the edges
+ maPoints.reserve(nAllPointCount);
+
+ for(a = 0; a < nPolygonCount; a++)
+ {
+ // 2nd run: add points
+ const B2DPolygon aPolygonCandidate(aSource.getB2DPolygon(a));
+ const sal_uInt32 nCount(aPolygonCandidate.count());
+
+ if(nCount > 2)
+ {
+ for(b = 0; b < nCount; b++)
+ {
+ maPoints.push_back(aPolygonCandidate.getB2DPoint(b));
+ }
+ }
+ }
+
+ // Moved the edge construction to a 3rd run: doing it in the 2nd run is
+ // possible(and i used it), but requires a working vector::reserve()
+ // implementation, else the vector will be reallocated and the pointers
+ // in the edges may be wrong. Security first here.
+ sal_uInt32 nStartIndex(0);
+
+ for(a = 0; a < nPolygonCount; a++)
+ {
+ const B2DPolygon aPolygonCandidate(aSource.getB2DPolygon(a));
+ const sal_uInt32 nCount(aPolygonCandidate.count());
+
+ if(nCount > 2)
+ {
+ // get the last point of the current polygon
+ B2DPoint* pPrev(&maPoints[nCount + nStartIndex - 1]);
+
+ for(b = 0; b < nCount; b++)
+ {
+ // get next point
+ B2DPoint* pCurr(&maPoints[nStartIndex++]);
+
+ if(fTools::equal(pPrev->getY(), pCurr->getY(), fTools::getSmallValue()))
+ {
+ // horizontal edge, check for single point
+ if(!fTools::equal(pPrev->getX(), pCurr->getX(), fTools::getSmallValue()))
+ {
+ // X-order not needed, just add
+ aTrDeSimpleEdges.push_back(TrDeSimpleEdge(pPrev, pCurr));
+
+ const double fMiddle((pPrev->getY() + pCurr->getY()) * 0.5);
+ pPrev->setY(fMiddle);
+ pCurr->setY(fMiddle);
+ }
+ }
+ else
+ {
+ // vertical edge. Positive Y-direction is guaranteed by the
+ // TrDeEdgeEntry constructor
+ maTrDeEdgeEntries.push_back(TrDeEdgeEntry(pPrev, pCurr, 0));
+ mnInitialEdgeEntryCount++;
+ }
+
+ // prepare next step
+ pPrev = pCurr;
+ }
+ }
+ }
+ }
+
+ if(maTrDeEdgeEntries.size())
+ {
+ // single and initial sort of traversing edges
+ maTrDeEdgeEntries.sort();
+
+ // solve horizontal edges if there are any detected
+ solveHorizontalEdges(aTrDeSimpleEdges);
+ }
+ }
+
+ ~TrapezoidSubdivider()
+ {
+ // delete the extra points created for cuts
+ const sal_uInt32 nCount(maNewPoints.size());
+
+ for(sal_uInt32 a(0); a < nCount; a++)
+ {
+ delete maNewPoints[a];
+ }
+ }
+
+ void Subdivide(B2DTrapezoidVector& ro_Result)
+ {
+ // This is the central subdivider. The strategy is to use the first two entries
+ // from the traversing edges as a potential trapezoid and do the needed corrections
+ // and adaptions on the way.
+ //
+ // There always must be two edges with the same YStart value: When adding the polygons
+ // in the constructor, there is always a topmost point from which two edges start; when
+ // the topmost is an edge, there is a start and end of this edge from which two edges
+ // start. All cases have two edges with same StartY (QED).
+ //
+ // Based on this these edges get corrected when:
+ // - one is longer than the other
+ // - they intersect
+ // - they intersect with other edges
+ // - another edge starts inside the thought trapezoid
+ //
+ // All this cases again produce a valid state so that the first two edges have a common
+ // Ystart again. Some cases lead to a restart of the process, some allow consuming the
+ // edges and create the intended trapezoid.
+ //
+ // Be careful when doing chages here: It is essential to keep all possible paths
+ // in valid states and to be numerically correct. This is especially needed e.g.
+ // by using fTools::equal(..) in the more robust small-value incarnation.
+ B1DRange aLeftRange;
+ B1DRange aRightRange;
+
+ if(!maTrDeEdgeEntries.empty())
+ {
+ // measuring shows that the relation between edges and created trapezoids is
+ // mostly in the 1:1 range, thus reserve as much trapezoids as edges exist. Do
+ // not use maTrDeEdgeEntries.size() since that may be a non-constant time
+ // operation for Lists. Instead, use mnInitialEdgeEntryCount which will contain
+ // the roughly counted adds to the List
+ ro_Result.reserve(ro_Result.size() + mnInitialEdgeEntryCount);
+ }
+
+ while(!maTrDeEdgeEntries.empty())
+ {
+ // Prepare current operator and get first edge
+ TrDeEdgeEntries::iterator aCurrent(maTrDeEdgeEntries.begin());
+ TrDeEdgeEntries::reference aLeft(*aCurrent++);
+
+ if(aCurrent == maTrDeEdgeEntries.end())
+ {
+ // Should not happen: No 2nd edge; consume the single edge
+ // to not have an endless loop and start next. During development
+ // i constantly had breakpoints here, so i am sure enough to add an
+ // assertion here
+ OSL_ENSURE(false, "Trapeziod decomposer in illegal state (!)");
+ maTrDeEdgeEntries.pop_front();
+ continue;
+ }
+
+ // get second edge
+ TrDeEdgeEntries::reference aRight(*aCurrent++);
+
+ if(!fTools::equal(aLeft.getStart().getY(), aRight.getStart().getY(), fTools::getSmallValue()))
+ {
+ // Should not happen: We have a 2nd edge, but YStart is on another
+ // line; consume the single edge to not have an endless loop and start
+ // next. During development i constantly had breakpoints here, so i am
+ // sure enough to add an assertion here
+ OSL_ENSURE(false, "Trapeziod decomposer in illegal state (!)");
+ maTrDeEdgeEntries.pop_front();
+ continue;
+ }
+
+ // aLeft and aRight build a thought trapezoid now. They have a common
+ // start line (same Y for start points). Potentially, one of the edges
+ // is longer than the other. It is only needed to look at the shorter
+ // length which build the potential trapezoid. To do so, get the end points
+ // locally and adapt the evtl. longer one. Use only aLeftEnd and aRightEnd
+ // from here on, not the aLeft.getEnd() or aRight.getEnd() accesses.
+ B2DPoint aLeftEnd(aLeft.getEnd());
+ B2DPoint aRightEnd(aRight.getEnd());
+
+ // check if end points are on the same line. If yes, no adaption
+ // needs to be prepared. Also remember which one actually is longer.
+ const bool bEndOnSameLine(fTools::equal(aLeftEnd.getY(), aRightEnd.getY(), fTools::getSmallValue()));
+ bool bLeftIsLonger(false);
+
+ if(!bEndOnSameLine)
+ {
+ // check which edge is longer and correct accordingly
+ bLeftIsLonger = fTools::more(aLeftEnd.getY(), aRightEnd.getY());
+
+ if(bLeftIsLonger)
+ {
+ aLeftEnd = aLeft.getCutPointForGivenY(aRightEnd.getY());
+ }
+ else
+ {
+ aRightEnd = aRight.getCutPointForGivenY(aLeftEnd.getY());
+ }
+ }
+
+ // check for same start and end points
+ const bool bSameStartPoint(aLeft.getStart().equal(aRight.getStart(), fTools::getSmallValue()));
+ const bool bSameEndPoint(aLeftEnd.equal(aRightEnd, fTools::getSmallValue()));
+
+ // check the simple case that the edges form a 'blind' edge (deadend)
+ if(bSameStartPoint && bSameEndPoint)
+ {
+ // correct the longer edge if prepared
+ if(!bEndOnSameLine)
+ {
+ if(bLeftIsLonger)
+ {
+ B2DPoint* pNewPoint = new B2DPoint(aLeftEnd);
+
+ if(splitEdgeAtGivenPoint(aLeft, *pNewPoint, aCurrent))
+ {
+ maNewPoints.push_back(pNewPoint);
+ }
+ else
+ {
+ delete pNewPoint;
+ }
+ }
+ else
+ {
+ B2DPoint* pNewPoint = new B2DPoint(aRightEnd);
+
+ if(splitEdgeAtGivenPoint(aRight, *pNewPoint, aCurrent))
+ {
+ maNewPoints.push_back(pNewPoint);
+ }
+ else
+ {
+ delete pNewPoint;
+ }
+ }
+ }
+
+ // consume both edges and start next run
+ maTrDeEdgeEntries.pop_front();
+ maTrDeEdgeEntries.pop_front();
+
+ continue;
+ }
+
+ // check if the edges self-intersect. This can only happen when
+ // start and end point are different
+ bool bRangesSet(false);
+
+ if(!(bSameStartPoint || bSameEndPoint))
+ {
+ // get XRanges of edges
+ aLeftRange = B1DRange(aLeft.getStart().getX(), aLeftEnd.getX());
+ aRightRange = B1DRange(aRight.getStart().getX(), aRightEnd.getX());
+ bRangesSet = true;
+
+ // use fast range test first
+ if(aLeftRange.overlaps(aRightRange))
+ {
+ // real cut test and correction. If correction was needed,
+ // start new run
+ if(testAndCorrectEdgeIntersection(aLeft, aRight, aCurrent))
+ {
+ continue;
+ }
+ }
+ }
+
+ // now we need to check if there are intersections with other edges
+ // or if other edges start inside the candidate trapezoid
+ if(aCurrent != maTrDeEdgeEntries.end()
+ && fTools::less(aCurrent->getStart().getY(), aLeftEnd.getY()))
+ {
+ // get XRanges of edges
+ if(!bRangesSet)
+ {
+ aLeftRange = B1DRange(aLeft.getStart().getX(), aLeftEnd.getX());
+ aRightRange = B1DRange(aRight.getStart().getX(), aRightEnd.getX());
+ }
+
+ // build full XRange for fast check
+ B1DRange aAllRange(aLeftRange);
+ aAllRange.expand(aRightRange);
+
+ // prepare loop iterator; aCurrent needs to stay unchanged for
+ // eventual sorted insertions of new EdgeNodes. Also prepare stop flag
+ TrDeEdgeEntries::iterator aLoop(aCurrent);
+ bool bDone(false);
+
+ do
+ {
+ // get compare edge and it's XRange
+ TrDeEdgeEntries::reference aCompare(*aLoop++);
+
+ // avoid edges using the same start point as one of
+ // the edges. These can neither have their start point
+ // in the thought trapezoid nor cut with one of the edges
+ if(aCompare.getStart().equal(aRight.getStart(), fTools::getSmallValue()))
+ {
+ continue;
+ }
+
+ // get compare XRange
+ const B1DRange aCompareRange(aCompare.getStart().getX(), aCompare.getEnd().getX());
+
+ // use fast range test first
+ if(aAllRange.overlaps(aCompareRange))
+ {
+ // check for start point inside thought trapezoid
+ if(fTools::more(aCompare.getStart().getY(), aLeft.getStart().getY()))
+ {
+ // calculate the two possible split points at compare's Y
+ const B2DPoint aSplitLeft(aLeft.getCutPointForGivenY(aCompare.getStart().getY()));
+ const B2DPoint aSplitRight(aRight.getCutPointForGivenY(aCompare.getStart().getY()));
+
+ // check for start point of aCompare being inside thought
+ // trapezoid
+ if(aCompare.getStart().getX() >= aSplitLeft.getX() &&
+ aCompare.getStart().getX() <= aSplitRight.getX())
+ {
+ // is inside, correct and restart loop
+ B2DPoint* pNewLeft = new B2DPoint(aSplitLeft);
+
+ if(splitEdgeAtGivenPoint(aLeft, *pNewLeft, aCurrent))
+ {
+ maNewPoints.push_back(pNewLeft);
+ }
+ else
+ {
+ delete pNewLeft;
+ }
+
+ B2DPoint* pNewRight = new B2DPoint(aSplitRight);
+
+ if(splitEdgeAtGivenPoint(aRight, *pNewRight, aCurrent))
+ {
+ maNewPoints.push_back(pNewRight);
+ }
+ else
+ {
+ delete pNewRight;
+ }
+
+ bDone = true;
+ }
+ }
+
+ if(!bDone && aLeftRange.overlaps(aCompareRange))
+ {
+ // test for concrete cut of compare edge with left edge
+ bDone = testAndCorrectEdgeIntersection(aLeft, aCompare, aCurrent);
+ }
+
+ if(!bDone && aRightRange.overlaps(aCompareRange))
+ {
+ // test for concrete cut of compare edge with Right edge
+ bDone = testAndCorrectEdgeIntersection(aRight, aCompare, aCurrent);
+ }
+ }
+ }
+ while(!bDone
+ && aLoop != maTrDeEdgeEntries.end()
+ && fTools::less(aLoop->getStart().getY(), aLeftEnd.getY()));
+
+ if(bDone)
+ {
+ // something needed to be changed; start next loop
+ continue;
+ }
+ }
+
+ // when we get here, the intended trapezoid can be used. It needs to
+ // be corrected, eventually (if prepared); but this is no reason not to
+ // use it in the same loop iteration
+ if(!bEndOnSameLine)
+ {
+ if(bLeftIsLonger)
+ {
+ B2DPoint* pNewPoint = new B2DPoint(aLeftEnd);
+
+ if(splitEdgeAtGivenPoint(aLeft, *pNewPoint, aCurrent))
+ {
+ maNewPoints.push_back(pNewPoint);
+ }
+ else
+ {
+ delete pNewPoint;
+ }
+ }
+ else
+ {
+ B2DPoint* pNewPoint = new B2DPoint(aRightEnd);
+
+ if(splitEdgeAtGivenPoint(aRight, *pNewPoint, aCurrent))
+ {
+ maNewPoints.push_back(pNewPoint);
+ }
+ else
+ {
+ delete pNewPoint;
+ }
+ }
+ }
+
+ // the two edges start at the same Y, they use the same DeltaY, they
+ // do not cut themselves and not any other edge in range. Create a
+ // B2DTrapezoid and consume both edges
+ ro_Result.push_back(
+ B2DTrapezoid(
+ aLeft.getStart().getX(),
+ aRight.getStart().getX(),
+ aLeft.getStart().getY(),
+ aLeftEnd.getX(),
+ aRightEnd.getX(),
+ aLeftEnd.getY()));
+
+ maTrDeEdgeEntries.pop_front();
+ maTrDeEdgeEntries.pop_front();
+ }
+ }
+ };
+ } // end of anonymous namespace
+} // end of namespace basegfx
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace basegfx
+{
+ B2DTrapezoid::B2DTrapezoid(
+ const double& rfTopXLeft,
+ const double& rfTopXRight,
+ const double& rfTopY,
+ const double& rfBottomXLeft,
+ const double& rfBottomXRight,
+ const double& rfBottomY)
+ : mfTopXLeft(rfTopXLeft),
+ mfTopXRight(rfTopXRight),
+ mfTopY(rfTopY),
+ mfBottomXLeft(rfBottomXLeft),
+ mfBottomXRight(rfBottomXRight),
+ mfBottomY(rfBottomY)
+ {
+ // guarantee mfTopXRight >= mfTopXLeft
+ if(mfTopXLeft > mfTopXRight)
+ {
+ std::swap(mfTopXLeft, mfTopXRight);
+ }
+
+ // guarantee mfBottomXRight >= mfBottomXLeft
+ if(mfBottomXLeft > mfBottomXRight)
+ {
+ std::swap(mfBottomXLeft, mfBottomXRight);
+ }
+
+ // guarantee mfBottomY >= mfTopY
+ if(mfTopY > mfBottomY)
+ {
+ std::swap(mfTopY, mfBottomY);
+ std::swap(mfTopXLeft, mfBottomXLeft);
+ std::swap(mfTopXRight, mfBottomXRight);
+ }
+ }
+
+ B2DPolygon B2DTrapezoid::getB2DPolygon() const
+ {
+ B2DPolygon aRetval;
+
+ aRetval.append(B2DPoint(getTopXLeft(), getTopY()));
+ aRetval.append(B2DPoint(getTopXRight(), getTopY()));
+ aRetval.append(B2DPoint(getBottomXRight(), getBottomY()));
+ aRetval.append(B2DPoint(getBottomXLeft(), getBottomY()));
+ aRetval.setClosed(true);
+
+ return aRetval;
+ }
+} // end of namespace basegfx
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace basegfx
+{
+ namespace tools
+ {
+ // convert Source PolyPolygon to trapezoids
+ void trapezoidSubdivide(B2DTrapezoidVector& ro_Result, const B2DPolyPolygon& rSourcePolyPolygon)
+ {
+ trapezoidhelper::TrapezoidSubdivider aTrapezoidSubdivider(rSourcePolyPolygon);
+
+ aTrapezoidSubdivider.Subdivide(ro_Result);
+ }
+
+ void createLineTrapezoidFromEdge(
+ B2DTrapezoidVector& ro_Result,
+ const B2DPoint& rPointA,
+ const B2DPoint& rPointB,
+ double fLineWidth)
+ {
+ if(fTools::lessOrEqual(fLineWidth, 0.0))
+ {
+ // no line witdh
+ return;
+ }
+
+ if(rPointA.equal(rPointB, fTools::getSmallValue()))
+ {
+ // points are equal, no edge
+ return;
+ }
+
+ const double fHalfLineWidth(0.5 * fLineWidth);
+
+ if(fTools::equal(rPointA.getX(), rPointB.getX(), fTools::getSmallValue()))
+ {
+ // vertical line
+ const double fLeftX(rPointA.getX() - fHalfLineWidth);
+ const double fRightX(rPointA.getX() + fHalfLineWidth);
+
+ ro_Result.push_back(
+ B2DTrapezoid(
+ fLeftX,
+ fRightX,
+ std::min(rPointA.getY(), rPointB.getY()),
+ fLeftX,
+ fRightX,
+ std::max(rPointA.getY(), rPointB.getY())));
+ }
+ else if(fTools::equal(rPointA.getY(), rPointB.getY(), fTools::getSmallValue()))
+ {
+ // horizontal line
+ const double fLeftX(std::min(rPointA.getX(), rPointB.getX()));
+ const double fRightX(std::max(rPointA.getX(), rPointB.getX()));
+
+ ro_Result.push_back(
+ B2DTrapezoid(
+ fLeftX,
+ fRightX,
+ rPointA.getY() - fHalfLineWidth,
+ fLeftX,
+ fRightX,
+ rPointA.getY() + fHalfLineWidth));
+ }
+ else
+ {
+ // diagonal line
+ // create perpendicular vector
+ const B2DVector aDelta(rPointB - rPointA);
+ B2DVector aPerpendicular(-aDelta.getY(), aDelta.getX());
+ aPerpendicular.setLength(fHalfLineWidth);
+
+ // create StartLow, StartHigh, EndLow and EndHigh
+ const B2DPoint aStartLow(rPointA + aPerpendicular);
+ const B2DPoint aStartHigh(rPointA - aPerpendicular);
+ const B2DPoint aEndHigh(rPointB - aPerpendicular);
+ const B2DPoint aEndLow(rPointB + aPerpendicular);
+
+ // create EdgeEntries
+ basegfx::trapezoidhelper::TrDeEdgeEntries aTrDeEdgeEntries;
+
+ aTrDeEdgeEntries.push_back(basegfx::trapezoidhelper::TrDeEdgeEntry(&aStartLow, &aStartHigh, 0));
+ aTrDeEdgeEntries.push_back(basegfx::trapezoidhelper::TrDeEdgeEntry(&aStartHigh, &aEndHigh, 0));
+ aTrDeEdgeEntries.push_back(basegfx::trapezoidhelper::TrDeEdgeEntry(&aEndHigh, &aEndLow, 0));
+ aTrDeEdgeEntries.push_back(basegfx::trapezoidhelper::TrDeEdgeEntry(&aEndLow, &aStartLow, 0));
+ aTrDeEdgeEntries.sort();
+
+ // here we know we have exactly four edges, and they do not cut, touch or
+ // intersect. This makes processing much easier. Get the first two as start
+ // edges for the thought trapezoid
+ basegfx::trapezoidhelper::TrDeEdgeEntries::iterator aCurrent(aTrDeEdgeEntries.begin());
+ basegfx::trapezoidhelper::TrDeEdgeEntries::reference aLeft(*aCurrent++);
+ basegfx::trapezoidhelper::TrDeEdgeEntries::reference aRight(*aCurrent++);
+ const bool bEndOnSameLine(fTools::equal(aLeft.getEnd().getY(), aRight.getEnd().getY(), fTools::getSmallValue()));
+
+ if(bEndOnSameLine)
+ {
+ // create two triangle trapezoids
+ ro_Result.push_back(
+ B2DTrapezoid(
+ aLeft.getStart().getX(),
+ aRight.getStart().getX(),
+ aLeft.getStart().getY(),
+ aLeft.getEnd().getX(),
+ aRight.getEnd().getX(),
+ aLeft.getEnd().getY()));
+
+ basegfx::trapezoidhelper::TrDeEdgeEntries::reference aLeft2(*aCurrent++);
+ basegfx::trapezoidhelper::TrDeEdgeEntries::reference aRight2(*aCurrent++);
+
+ ro_Result.push_back(
+ B2DTrapezoid(
+ aLeft2.getStart().getX(),
+ aRight2.getStart().getX(),
+ aLeft2.getStart().getY(),
+ aLeft2.getEnd().getX(),
+ aRight2.getEnd().getX(),
+ aLeft2.getEnd().getY()));
+ }
+ else
+ {
+ // create three trapezoids. Check which edge is longer and
+ // correct accordingly
+ const bool bLeftIsLonger(fTools::more(aLeft.getEnd().getY(), aRight.getEnd().getY()));
+
+ if(bLeftIsLonger)
+ {
+ basegfx::trapezoidhelper::TrDeEdgeEntries::reference aRight2(*aCurrent++);
+ basegfx::trapezoidhelper::TrDeEdgeEntries::reference aLeft2(*aCurrent++);
+ const B2DPoint aSplitLeft(aLeft.getCutPointForGivenY(aRight.getEnd().getY()));
+ const B2DPoint aSplitRight(aRight2.getCutPointForGivenY(aLeft.getEnd().getY()));
+
+ ro_Result.push_back(
+ B2DTrapezoid(
+ aLeft.getStart().getX(),
+ aRight.getStart().getX(),
+ aLeft.getStart().getY(),
+ aSplitLeft.getX(),
+ aRight.getEnd().getX(),
+ aRight.getEnd().getY()));
+
+ ro_Result.push_back(
+ B2DTrapezoid(
+ aSplitLeft.getX(),
+ aRight.getEnd().getX(),
+ aRight.getEnd().getY(),
+ aLeft2.getStart().getX(),
+ aSplitRight.getX(),
+ aLeft2.getStart().getY()));
+
+ ro_Result.push_back(
+ B2DTrapezoid(
+ aLeft2.getStart().getX(),
+ aSplitRight.getX(),
+ aLeft2.getStart().getY(),
+ aLeft2.getEnd().getX(),
+ aRight2.getEnd().getX(),
+ aLeft2.getEnd().getY()));
+ }
+ else
+ {
+ basegfx::trapezoidhelper::TrDeEdgeEntries::reference aLeft2(*aCurrent++);
+ basegfx::trapezoidhelper::TrDeEdgeEntries::reference aRight2(*aCurrent++);
+ const B2DPoint aSplitRight(aRight.getCutPointForGivenY(aLeft.getEnd().getY()));
+ const B2DPoint aSplitLeft(aLeft2.getCutPointForGivenY(aRight.getEnd().getY()));
+
+ ro_Result.push_back(
+ B2DTrapezoid(
+ aLeft.getStart().getX(),
+ aRight.getStart().getX(),
+ aLeft.getStart().getY(),
+ aLeft.getEnd().getX(),
+ aSplitRight.getX(),
+ aLeft.getEnd().getY()));
+
+ ro_Result.push_back(
+ B2DTrapezoid(
+ aLeft.getEnd().getX(),
+ aSplitRight.getX(),
+ aLeft.getEnd().getY(),
+ aSplitLeft.getX(),
+ aRight.getEnd().getX(),
+ aRight2.getStart().getY()));
+
+ ro_Result.push_back(
+ B2DTrapezoid(
+ aSplitLeft.getX(),
+ aRight.getEnd().getX(),
+ aRight2.getStart().getY(),
+ aLeft2.getEnd().getX(),
+ aRight2.getEnd().getX(),
+ aLeft2.getEnd().getY()));
+ }
+ }
+ }
+ }
+
+ void createLineTrapezoidFromB2DPolygon(
+ B2DTrapezoidVector& ro_Result,
+ const B2DPolygon& rPolygon,
+ double fLineWidth)
+ {
+ if(fTools::lessOrEqual(fLineWidth, 0.0))
+ {
+ return;
+ }
+
+ // ensure there are no curves used
+ B2DPolygon aSource(rPolygon);
+
+ if(aSource.areControlPointsUsed())
+ {
+ aSource = aSource.getDefaultAdaptiveSubdivision();
+ }
+
+ const sal_uInt32 nPointCount(aSource.count());
+
+ if(!nPointCount)
+ {
+ return;
+ }
+
+ const sal_uInt32 nEdgeCount(aSource.isClosed() ? nPointCount : nPointCount - 1);
+ B2DPoint aCurrent(aSource.getB2DPoint(0));
+
+ ro_Result.reserve(ro_Result.size() + (3 * nEdgeCount));
+
+ for(sal_uInt32 a(0); a < nEdgeCount; a++)
+ {
+ const sal_uInt32 nNextIndex((a + 1) % nPointCount);
+ const B2DPoint aNext(aSource.getB2DPoint(nNextIndex));
+
+ createLineTrapezoidFromEdge(ro_Result, aCurrent, aNext, fLineWidth);
+ aCurrent = aNext;
+ }
+ }
+
+ void createLineTrapezoidFromB2DPolyPolygon(
+ B2DTrapezoidVector& ro_Result,
+ const B2DPolyPolygon& rPolyPolygon,
+ double fLineWidth)
+ {
+ if(fTools::lessOrEqual(fLineWidth, 0.0))
+ {
+ return;
+ }
+
+ // ensure there are no curves used
+ B2DPolyPolygon aSource(rPolyPolygon);
+
+ if(aSource.areControlPointsUsed())
+ {
+ aSource = aSource.getDefaultAdaptiveSubdivision();
+ }
+
+ const sal_uInt32 nCount(aSource.count());
+
+ if(!nCount)
+ {
+ return;
+ }
+
+ for(sal_uInt32 a(0); a < nCount; a++)
+ {
+ createLineTrapezoidFromB2DPolygon(
+ ro_Result,
+ aSource.getB2DPolygon(a),
+ fLineWidth);
+ }
+ }
+
+ } // end of namespace tools
+} // end of namespace basegfx
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/basegfx/source/polygon/makefile.mk b/basegfx/source/polygon/makefile.mk
index aeb0af6c5d1b..7ac71ada5e8e 100644
--- a/basegfx/source/polygon/makefile.mk
+++ b/basegfx/source/polygon/makefile.mk
@@ -51,6 +51,7 @@ SLOFILES= \
$(SLO)$/b2dpolygonclipper.obj \
$(SLO)$/b2dpolygontriangulator.obj \
$(SLO)$/b2dpolygoncutandtouch.obj \
+ $(SLO)$/b2dtrapezoid.obj \
$(SLO)$/b3dpolygon.obj \
$(SLO)$/b3dpolygontools.obj \
$(SLO)$/b3dpolypolygon.obj \
diff --git a/canvas/source/directx/dx_5rm.cxx b/canvas/source/directx/dx_5rm.cxx
index bf3045e52678..642ef7bd7db6 100755
--- a/canvas/source/directx/dx_5rm.cxx
+++ b/canvas/source/directx/dx_5rm.cxx
@@ -1005,7 +1005,7 @@ namespace dxcanvas
break;
default:
- ENSURE_OR_RETURN(false,
+ ENSURE_OR_RETURN_FALSE(false,
"DXSurface::update(): Unknown/unimplemented buffer format" );
break;
}
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index 849ac3713885..a0f485befa12 100755
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -541,7 +541,7 @@ namespace dxcanvas
break;
default:
- ENSURE_OR_RETURN(false,
+ ENSURE_OR_RETURN_FALSE(false,
"DXSurface::update(): Unknown/unimplemented buffer format" );
break;
}
diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx
index 8aa21853db1a..026545d6c339 100755
--- a/canvas/source/directx/dx_canvashelper_texturefill.cxx
+++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx
@@ -342,7 +342,7 @@ namespace dxcanvas
GraphicsPathSharedPtr pGradientPath(
tools::graphicsPathFromB2DPolygon( rValues.maGradientPoly ) );
- ENSURE_OR_RETURN( pGradientPath.get(),
+ ENSURE_OR_RETURN_FALSE( pGradientPath.get(),
"ParametricPolyPolygon::fillPolygonalGradient(): Could not clone path" );
PathGradientBrushSharedPtr pGradientBrush;
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index f82ce1344a5c..a83b260d52d5 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -1387,7 +1387,7 @@ namespace vclcanvas
const ::Size& rSz,
const GraphicAttr& rAttr ) const
{
- ENSURE_OR_RETURN( rGrf,
+ ENSURE_OR_RETURN_FALSE( rGrf,
"Invalid Graphic" );
if( !mpOutDev )
diff --git a/comphelper/inc/comphelper/namedvaluecollection.hxx b/comphelper/inc/comphelper/namedvaluecollection.hxx
index 81aed9171408..72cd0e7cdfbe 100644
--- a/comphelper/inc/comphelper/namedvaluecollection.hxx
+++ b/comphelper/inc/comphelper/namedvaluecollection.hxx
@@ -61,6 +61,8 @@ namespace comphelper
NamedValueCollection( const NamedValueCollection& _rCopySource );
+ NamedValueCollection& operator=( const NamedValueCollection& i_rCopySource );
+
/** constructs a collection
@param _rElements
the wrapped elements of the collection. The <code>Any</code> might contain a sequence of
@@ -104,6 +106,11 @@ namespace comphelper
impl_assign( _rArguments );
}
+ inline void clear()
+ {
+ impl_assign( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >() );
+ }
+
/// returns the number of elements in the collection
size_t size() const;
diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx
index 570a85122c96..8bab7fa3d7c7 100644
--- a/comphelper/source/misc/namedvaluecollection.cxx
+++ b/comphelper/source/misc/namedvaluecollection.cxx
@@ -85,7 +85,14 @@ namespace comphelper
NamedValueCollection::NamedValueCollection( const NamedValueCollection& _rCopySource )
:m_pImpl( new NamedValueCollection_Impl )
{
- m_pImpl->aValues = _rCopySource.m_pImpl->aValues;
+ *this = _rCopySource;
+ }
+
+ //--------------------------------------------------------------------
+ NamedValueCollection& NamedValueCollection::operator=( const NamedValueCollection& i_rCopySource )
+ {
+ m_pImpl->aValues = i_rCopySource.m_pImpl->aValues;
+ return *this;
}
//--------------------------------------------------------------------
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 58892b73233c..e6fb12cb2003 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -2874,7 +2874,7 @@ namespace cppcanvas
aSubset.mnSubsetEnd = ::std::min( aRangeBegin->mpAction->getActionCount(),
nEndIndex - aRangeBegin->mnOrigIndex );
- ENSURE_OR_RETURN( aSubset.mnSubsetBegin >= 0 && aSubset.mnSubsetEnd >= 0,
+ ENSURE_OR_RETURN_FALSE( aSubset.mnSubsetBegin >= 0 && aSubset.mnSubsetEnd >= 0,
"ImplRenderer::forSubsetRange(): Invalid indices" );
rFunctor( *aRangeBegin, aSubset );
@@ -2890,7 +2890,7 @@ namespace cppcanvas
nStartIndex - aRangeBegin->mnOrigIndex );
aSubset.mnSubsetEnd = aRangeBegin->mpAction->getActionCount();
- ENSURE_OR_RETURN( aSubset.mnSubsetBegin >= 0 && aSubset.mnSubsetEnd >= 0,
+ ENSURE_OR_RETURN_FALSE( aSubset.mnSubsetBegin >= 0 && aSubset.mnSubsetEnd >= 0,
"ImplRenderer::forSubsetRange(): Invalid indices" );
rFunctor( *aRangeBegin, aSubset );
@@ -2919,7 +2919,7 @@ namespace cppcanvas
aSubset.mnSubsetBegin = 0;
aSubset.mnSubsetEnd = nEndIndex - aRangeEnd->mnOrigIndex;
- ENSURE_OR_RETURN( aSubset.mnSubsetBegin >= 0 && aSubset.mnSubsetEnd >= 0,
+ ENSURE_OR_RETURN_FALSE( aSubset.mnSubsetBegin >= 0 && aSubset.mnSubsetEnd >= 0,
"ImplRenderer::forSubsetRange(): Invalid indices" );
rFunctor( *aRangeEnd, aSubset );
@@ -2934,10 +2934,10 @@ namespace cppcanvas
ActionVector::const_iterator& o_rRangeBegin,
ActionVector::const_iterator& o_rRangeEnd ) const
{
- ENSURE_OR_RETURN( io_rStartIndex<=io_rEndIndex,
+ ENSURE_OR_RETURN_FALSE( io_rStartIndex<=io_rEndIndex,
"ImplRenderer::getSubsetIndices(): invalid action range" );
- ENSURE_OR_RETURN( !maActions.empty(),
+ ENSURE_OR_RETURN_FALSE( !maActions.empty(),
"ImplRenderer::getSubsetIndices(): no actions to render" );
const sal_Int32 nMinActionIndex( maActions.front().mnOrigIndex );
diff --git a/i18npool/inc/i18npool/lang.h b/i18npool/inc/i18npool/lang.h
index 36c6300b9fdc..8599ec75c634 100644
--- a/i18npool/inc/i18npool/lang.h
+++ b/i18npool/inc/i18npool/lang.h
@@ -64,9 +64,10 @@
Language Identifier Constants and Strings
http://msdn2.microsoft.com/en-us/library/ms776294.aspx
- Lists for 2003, XP and Vista, overview with URLs pointing to regional settings:
- NLS information page
- http://www.microsoft.com/globaldev/nlsweb/default.mspx
+ Hey, yet another list, maybe this one will not move around? It seems to be
+ quite complete..
+ Language Identifier Constants and Strings (Windows)
+ http://msdn.microsoft.com/en-us/library/dd318693(VS.85).aspx
List of supported locale identifiers in Word
http://support.microsoft.com/default.aspx?scid=KB;en-us;q221435
@@ -500,5 +501,16 @@ typedef unsigned short LanguageType;
#define LANGUAGE_USER_ARABIC_SUDAN 0xA001 /* makeLangID( 0x28, getPrimaryLanguage( LANGUAGE_ARABIC_SAUDI_ARABIA)) */
#define LANGUAGE_USER_ANCIENT_GREEK 0x0649
#define LANGUAGE_USER_ASTURIAN 0x064A
+#define LANGUAGE_USER_LATGALIAN 0x064B
+#define LANGUAGE_USER_MAORE 0x064C
+#define LANGUAGE_USER_BUSHI 0x064D
+#define LANGUAGE_USER_TAHITIAN 0x064E
+#define LANGUAGE_USER_MALAGASY_PLATEAU 0x064F
+#define LANGUAGE_USER_PAPIAMENTU_ARUBA 0x8079 /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_PAPIAMENTU)) */
+#define LANGUAGE_USER_SARDINIAN_CAMPIDANESE 0x0650
+#define LANGUAGE_USER_SARDINIAN_GALLURESE 0x0651
+#define LANGUAGE_USER_SARDINIAN_LOGUDORESE 0x0652
+#define LANGUAGE_USER_SARDINIAN_SASSARESE 0x0653
+#define LANGUAGE_USER_BAFIA 0x0654
#endif /* INCLUDED_I18NPOOL_LANG_H */
diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx
index 6ba1ad1b8151..28c86d39673e 100644
--- a/i18npool/source/isolang/isolang.cxx
+++ b/i18npool/source/isolang/isolang.cxx
@@ -349,6 +349,7 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] =
{ LANGUAGE_YORUBA, "yo", "NG" },
{ LANGUAGE_SOMALI, "so", "SO" },
{ LANGUAGE_PAPIAMENTU, "pap", "AN" },
+ { LANGUAGE_USER_PAPIAMENTU_ARUBA, "pap", "AW" },
{ LANGUAGE_ENGLISH_SINGAPORE, "en", "SG" },
{ LANGUAGE_YIDDISH, "yi", "IL" }, // new: old was "ji"
{ LANGUAGE_YIDDISH, "ji", "IL" }, // old: new is "yi"
@@ -401,7 +402,11 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] =
{ LANGUAGE_USER_KURDISH_SYRIA, "ku", "SY" },
{ LANGUAGE_USER_KURDISH_IRAQ, "ku", "IQ" },
{ LANGUAGE_USER_KURDISH_IRAN, "ku", "IR" },
- { LANGUAGE_USER_SARDINIAN, "sc", "IT" },
+ { LANGUAGE_USER_SARDINIAN, "sc", "IT" }, // macrolanguage code
+ { LANGUAGE_USER_SARDINIAN_CAMPIDANESE, "sro", "IT" },
+ { LANGUAGE_USER_SARDINIAN_GALLURESE, "sdn", "IT" },
+ { LANGUAGE_USER_SARDINIAN_LOGUDORESE, "src", "IT" },
+ { LANGUAGE_USER_SARDINIAN_SASSARESE, "sdc", "IT" },
{ LANGUAGE_BRETON_FRANCE, "br", "FR" },
{ LANGUAGE_OBSOLETE_USER_BRETON, "br", "FR" },
{ LANGUAGE_KALAALLISUT_GREENLAND, "kl", "GL" },
@@ -445,6 +450,12 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] =
{ LANGUAGE_USER_SHUSWAP, "shs", "CA" },
{ LANGUAGE_USER_ANCIENT_GREEK, "grc", "GR" },
{ LANGUAGE_USER_ASTURIAN, "ast", "ES" },
+ { LANGUAGE_USER_LATGALIAN, "ltg", "LV" },
+ { LANGUAGE_USER_MAORE, "swb", "YT" },
+ { LANGUAGE_USER_BUSHI, "buc", "YT" },
+ { LANGUAGE_USER_TAHITIAN, "ty", "PF" },
+ { LANGUAGE_USER_MALAGASY_PLATEAU, "plt", "MG" },
+ { LANGUAGE_USER_BAFIA, "ksf", "CM" },
{ LANGUAGE_NONE, "zxx", "" }, // added to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic information
{ LANGUAGE_DONTKNOW, "", "" } // marks end of table
};
diff --git a/i18npool/source/isolang/langid.pl b/i18npool/source/isolang/langid.pl
index 629f08901a7d..06883279345b 100755
--- a/i18npool/source/isolang/langid.pl
+++ b/i18npool/source/isolang/langid.pl
@@ -390,7 +390,7 @@ sub main()
'^\s*completelangiso\s*[= ](.{2,3}(-..)?)*' . $langcoun . '',
"$SRC_ROOT", "solenv", "inc/postset.mk",
# needs a duplicated pair of backslashes to produce a literal \\
- ('^\s*completelangiso\s*=', '^\s+' . $langcoun . '\s*\\\\*$'));
+ ('^\s*completelangiso\s*=', '^\s*' . $langcoun . '\s*\\\\*$'));
}
}
return 0;
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 081d6164e75b..4204b3636fcb 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -654,7 +654,9 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
OUString aPar1( RTL_CONSTASCII_USTRINGPARAM( "0)" ));
OUString aPar2( RTL_CONSTASCII_USTRINGPARAM( "-)" ));
OUString aPar3( RTL_CONSTASCII_USTRINGPARAM( " )" ));
- if (aCode.indexOf( aPar1 ) > 0 || aCode.indexOf( aPar2 ) > 0 || aCode.indexOf( aPar3 ) > 0)
+ OUString aPar4( RTL_CONSTASCII_USTRINGPARAM( "])" ));
+ if (aCode.indexOf( aPar1 ) > 0 || aCode.indexOf( aPar2 ) > 0 ||
+ aCode.indexOf( aPar3 ) > 0 || aCode.indexOf( aPar4 ) > 0)
fprintf( stderr, "Warning: FormatCode formatindex=\"%d\" for currency uses parentheses for negative amounts, which probably is not correct for locales not based on en_US.\n", formatindex);
}
break;
diff --git a/i18npool/source/localedata/data/en_CA.xml b/i18npool/source/localedata/data/en_CA.xml
index 31d24643b44a..121de11814a7 100644
--- a/i18npool/source/localedata/data/en_CA.xml
+++ b/i18npool/source/localedata/data/en_CA.xml
@@ -13,14 +13,14 @@
</LC_INFO>
<LC_CTYPE>
<Separators>
- <DateSeparator>/</DateSeparator>
+ <DateSeparator>-</DateSeparator>
<ThousandSeparator>,</ThousandSeparator>
<DecimalSeparator>.</DecimalSeparator>
<TimeSeparator>:</TimeSeparator>
<Time100SecSeparator>.</Time100SecSeparator>
<ListSeparator>;</ListSeparator>
<LongDateDayOfWeekSeparator>, </LongDateDayOfWeekSeparator>
- <LongDateDaySeparator>,</LongDateDaySeparator>
+ <LongDateDaySeparator>, </LongDateDaySeparator>
<LongDateMonthSeparator> </LongDateMonthSeparator>
<LongDateYearSeparator> </LongDateYearSeparator>
</Separators>
@@ -84,16 +84,16 @@
<FormatCode>[$$-1009]#,##0.--;[RED]-[$$-1009]#,##0.--</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey1" default="true" type="short" usage="DATE" formatindex="18">
- <FormatCode>DD/MM/YY</FormatCode>
+ <FormatCode>YY-M-D</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey9" default="true" type="long" usage="DATE" formatindex="19">
<FormatCode>MMMM D, YYYY</FormatCode>
</FormatElement>
- <FormatElement msgid="DateFormatskey8" default="true" type="medium" usage="DATE" formatindex="20">
- <FormatCode>DD/MM/YY</FormatCode>
+ <FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="20">
+ <FormatCode>YY-MM-DD</FormatCode>
</FormatElement>
- <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="21">
- <FormatCode>DD/MM/YYYY</FormatCode>
+ <FormatElement msgid="DateFormatskey7" default="true" type="medium" usage="DATE" formatindex="21">
+ <FormatCode>YYYY-MM-DD</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey10" default="false" type="long" usage="DATE" formatindex="22">
<FormatCode>MMM D, YY</FormatCode>
@@ -114,7 +114,7 @@
<FormatCode>NN, MMM D, YY</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="28">
- <FormatCode>NN DD/MMM YY</FormatCode>
+ <FormatCode>NN DD-MMM YY</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey14" default="false" type="long" usage="DATE" formatindex="29">
<FormatCode>NN, MMMM D, YYYY</FormatCode>
@@ -134,10 +134,10 @@
<DefaultName>ISO 8601</DefaultName>
</FormatElement>
<FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="34">
- <FormatCode>MM/YY</FormatCode>
+ <FormatCode>YY-MM</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="35">
- <FormatCode>DD/MMM</FormatCode>
+ <FormatCode>MMM DD</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="36">
<FormatCode>MMMM</FormatCode>
@@ -170,10 +170,10 @@
<FormatCode>[HH]:MM:SS.00</FormatCode>
</FormatElement>
<FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
- <FormatCode>DD/MM/YY HH:MM</FormatCode>
+ <FormatCode>YYYY-MM-DD HH:MM</FormatCode>
</FormatElement>
<FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
- <FormatCode>DD/MM/YYYY HH:MM:SS</FormatCode>
+ <FormatCode>YYYY-MM-DD HH:MM:SS</FormatCode>
</FormatElement>
</LC_FORMAT>
<LC_COLLATION ref="en_US" />
diff --git a/i18npool/source/localedata/data/fr_CA.xml b/i18npool/source/localedata/data/fr_CA.xml
index fcc99570bae9..c5976c73e741 100644
--- a/i18npool/source/localedata/data/fr_CA.xml
+++ b/i18npool/source/localedata/data/fr_CA.xml
@@ -87,15 +87,15 @@
<FormatCode># ##0,-- [$$-C0C];[RED]-# ##0,-- [$$-C0C]</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey1" default="true" type="short" usage="DATE" formatindex="18">
- <FormatCode>AA-MM-JJ</FormatCode>
+ <FormatCode>AA-M-J</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey9" default="true" type="long" usage="DATE" formatindex="19">
<FormatCode>J MMMM AAAA</FormatCode>
</FormatElement>
- <FormatElement msgid="DateFormatskey8" default="true" type="medium" usage="DATE" formatindex="20">
+ <FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="20">
<FormatCode>AA-MM-JJ</FormatCode>
</FormatElement>
- <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="21">
+ <FormatElement msgid="DateFormatskey7" default="true" type="medium" usage="DATE" formatindex="21">
<FormatCode>AAAA-MM-JJ</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey10" default="false" type="long" usage="DATE" formatindex="22">
@@ -173,7 +173,7 @@
<FormatCode>[HH]:MM:SS,00</FormatCode>
</FormatElement>
<FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
- <FormatCode>AA-MM-JJ HH:MM</FormatCode>
+ <FormatCode>AAAA-MM-JJ HH:MM</FormatCode>
</FormatElement>
<FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
<FormatCode>AAAA-MM-JJ HH:MM:SS</FormatCode>
diff --git a/i18npool/source/localedata/data/hsb_DE.xml b/i18npool/source/localedata/data/hsb_DE.xml
new file mode 100644
index 000000000000..6513dad5f57e
--- /dev/null
+++ b/i18npool/source/localedata/data/hsb_DE.xml
@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE Locale SYSTEM 'locale.dtd'>
+<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.0">
+ <LC_INFO>
+ <Language>
+ <LangID>hsb</LangID>
+ <DefaultName>Sorbian, Upper</DefaultName>
+ </Language>
+ <Country>
+ <CountryID>DE</CountryID>
+ <DefaultName>Germany</DefaultName>
+ </Country>
+ </LC_INFO>
+ <LC_CTYPE unoid="generic">
+ <Separators>
+ <DateSeparator>.</DateSeparator>
+ <ThousandSeparator>.</ThousandSeparator>
+ <DecimalSeparator>,</DecimalSeparator>
+ <TimeSeparator>:</TimeSeparator>
+ <Time100SecSeparator>,</Time100SecSeparator>
+ <ListSeparator>;</ListSeparator>
+ <LongDateDayOfWeekSeparator>, </LongDateDayOfWeekSeparator>
+ <LongDateDaySeparator>. </LongDateDaySeparator>
+ <LongDateMonthSeparator> </LongDateMonthSeparator>
+ <LongDateYearSeparator> </LongDateYearSeparator>
+ </Separators>
+ <Markers>
+ <QuotationStart>‚</QuotationStart>
+ <QuotationEnd>‘</QuotationEnd>
+ <DoubleQuotationStart>„</DoubleQuotationStart>
+ <DoubleQuotationEnd>“</DoubleQuotationEnd>
+ </Markers>
+ <TimeAM>dopołdnja</TimeAM>
+ <TimePM>popołdnju</TimePM>
+ <MeasurementSystem>metric</MeasurementSystem>
+ </LC_CTYPE>
+ <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$€-042E]">
+ <FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
+ <FormatCode>Standard</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1">
+ <FormatCode>0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2">
+ <FormatCode>0,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3">
+ <FormatCode>#.##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4">
+ <FormatCode>#.##0,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+ <FormatCode>#.###,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+ <FormatCode>0,00E+000</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7">
+ <FormatCode>0,00E+00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8">
+ <FormatCode>0%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9">
+ <FormatCode>0,00%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12">
+ <FormatCode>[CURRENCY]#.##0;-[CURRENCY]#.##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13">
+ <FormatCode>[CURRENCY]#.##0,00;-[CURRENCY]#.##0,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14">
+ <FormatCode>[CURRENCY]#.##0;[RED]-[CURRENCY]#.##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15">
+ <FormatCode>[CURRENCY]#.##0,00;[RED]-[CURRENCY]#.##0,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16">
+ <FormatCode>CCC#.##0,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17">
+ <FormatCode>[CURRENCY]#.##0,--;[RED]-[CURRENCY]#.##0,--</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey11" default="true" type="short" usage="DATE" formatindex="18">
+ <FormatCode>D.MM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey14" default="true" type="long" usage="DATE" formatindex="19">
+ <FormatCode>NNNNDD, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey6" default="true" type="medium" usage="DATE" formatindex="20">
+ <FormatCode>DD.MM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="21">
+ <FormatCode>DD.MM.YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="22">
+ <FormatCode>D, MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="23">
+ <FormatCode>D, MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey21" default="false" type="long" usage="DATE" formatindex="24">
+ <FormatCode>D, MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="25">
+ <FormatCode>D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey22" default="false" type="long" usage="DATE" formatindex="26">
+ <FormatCode>D, MMMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey10" default="false" type="medium" usage="DATE" formatindex="27">
+ <FormatCode>NN, DD.MMM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey18" default="false" type="long" usage="DATE" formatindex="28">
+ <FormatCode>NN, D, MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey19" default="false" type="long" usage="DATE" formatindex="29">
+ <FormatCode>NN, D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey20" default="false" type="long" usage="DATE" formatindex="30">
+ <FormatCode>NNNND, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey12" default="false" type="short" usage="DATE" formatindex="31">
+ <FormatCode>MM.DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="32">
+ <FormatCode>YY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="33">
+ <FormatCode>YYYY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey1" default="false" type="medium" usage="DATE" formatindex="34">
+ <FormatCode>MM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="35">
+ <FormatCode>MMM.DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="36">
+ <FormatCode>MMMM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="37">
+ <FormatCode>QQ YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey9" default="false" type="medium" usage="DATE" formatindex="38">
+ <FormatCode>WW</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey1" default="false" type="short" usage="TIME" formatindex="39">
+ <FormatCode>HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey2" default="false" type="medium" usage="TIME" formatindex="40">
+ <FormatCode>HH:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey3" default="true" type="short" usage="TIME" formatindex="41">
+ <FormatCode>HH:MM AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey4" default="true" type="medium" usage="TIME" formatindex="42">
+ <FormatCode>HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43">
+ <FormatCode>[HH]:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44">
+ <FormatCode>MM:SS,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45">
+ <FormatCode>[HH]:MM:SS,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
+ <FormatCode>DD.MM.YY HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
+ <FormatCode>DD.MM.YYYY HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ </LC_FORMAT>
+ <LC_COLLATION>
+ <Collator default="true" unoid="alphanumeric"/>
+ <CollationOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </CollationOptions>
+ </LC_COLLATION>
+ <LC_SEARCH>
+ <SearchOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </SearchOptions>
+ </LC_SEARCH>
+ <LC_INDEX>
+ <IndexKey unoid="alphanumeric" default="true" phonetic="false">A-C Č Ć D {Dź} E F-H {Ch} I-K Ł L-N Ń O Ó P {Př} Q R S Š T {Tř} U-Z Ž</IndexKey>
+ <UnicodeScript>0</UnicodeScript>
+ <UnicodeScript>1</UnicodeScript>
+ <UnicodeScript>2</UnicodeScript>
+ <FollowPageWord>sć.</FollowPageWord>
+ <FollowPageWord>sć.sć.</FollowPageWord>
+ </LC_INDEX>
+ <LC_CALENDAR>
+ <Calendar unoid="gregorian" default="true">
+ <DaysOfWeek>
+ <Day>
+ <DayID>sun</DayID>
+ <DefaultAbbrvName>nje</DefaultAbbrvName>
+ <DefaultFullName>njedźela</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>mon</DayID>
+ <DefaultAbbrvName>pón</DefaultAbbrvName>
+ <DefaultFullName>póndźela</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>tue</DayID>
+ <DefaultAbbrvName>wut</DefaultAbbrvName>
+ <DefaultFullName>wutora</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>wed</DayID>
+ <DefaultAbbrvName>srj</DefaultAbbrvName>
+ <DefaultFullName>srjeda</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>thu</DayID>
+ <DefaultAbbrvName>štw</DefaultAbbrvName>
+ <DefaultFullName>štwórtk</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>fri</DayID>
+ <DefaultAbbrvName>pja</DefaultAbbrvName>
+ <DefaultFullName>pjatk</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>sat</DayID>
+ <DefaultAbbrvName>sob</DefaultAbbrvName>
+ <DefaultFullName>sobota</DefaultFullName>
+ </Day>
+ </DaysOfWeek>
+ <MonthsOfYear>
+ <Month>
+ <MonthID>jan</MonthID>
+ <DefaultAbbrvName>jan</DefaultAbbrvName>
+ <DefaultFullName>januar</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>feb</MonthID>
+ <DefaultAbbrvName>feb</DefaultAbbrvName>
+ <DefaultFullName>februar</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>mar</MonthID>
+ <DefaultAbbrvName>měrc</DefaultAbbrvName>
+ <DefaultFullName>měrc</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>apr</MonthID>
+ <DefaultAbbrvName>apr</DefaultAbbrvName>
+ <DefaultFullName>apryl</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>may</MonthID>
+ <DefaultAbbrvName>meja</DefaultAbbrvName>
+ <DefaultFullName>meja</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jun</MonthID>
+ <DefaultAbbrvName>jun</DefaultAbbrvName>
+ <DefaultFullName>junij</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jul</MonthID>
+ <DefaultAbbrvName>jul</DefaultAbbrvName>
+ <DefaultFullName>julij</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>aug</MonthID>
+ <DefaultAbbrvName>awg</DefaultAbbrvName>
+ <DefaultFullName>awgust</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>sep</MonthID>
+ <DefaultAbbrvName>sep</DefaultAbbrvName>
+ <DefaultFullName>september</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>oct</MonthID>
+ <DefaultAbbrvName>okt</DefaultAbbrvName>
+ <DefaultFullName>oktober</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>nov</MonthID>
+ <DefaultAbbrvName>now</DefaultAbbrvName>
+ <DefaultFullName>nowember</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>dec</MonthID>
+ <DefaultAbbrvName>dec</DefaultAbbrvName>
+ <DefaultFullName>december</DefaultFullName>
+ </Month>
+ </MonthsOfYear>
+ <Eras>
+ <Era>
+ <EraID>bc</EraID>
+ <DefaultAbbrvName>př. Chr.</DefaultAbbrvName>
+ <DefaultFullName>před Chrystusom</DefaultFullName>
+ </Era>
+ <Era>
+ <EraID>ad</EraID>
+ <DefaultAbbrvName>po Chr.</DefaultAbbrvName>
+ <DefaultFullName>po Chrystusu</DefaultFullName>
+ </Era>
+ </Eras>
+ <StartDayOfWeek>
+ <DayID>mon</DayID>
+ </StartDayOfWeek>
+ <MinimalDaysInFirstWeek>4</MinimalDaysInFirstWeek>
+ </Calendar>
+ </LC_CALENDAR>
+ <LC_CURRENCY>
+ <Currency default="true" usedInCompatibleFormatCodes="true">
+ <CurrencyID>EUR</CurrencyID>
+ <CurrencySymbol>€</CurrencySymbol>
+ <BankSymbol>EUR</BankSymbol>
+ <CurrencyName>Euro</CurrencyName>
+ <DecimalPlaces>2</DecimalPlaces>
+ </Currency>
+ </LC_CURRENCY>
+ <LC_TRANSLITERATION>
+ <Transliteration unoid="LOWERCASE_UPPERCASE"/>
+ <Transliteration unoid="UPPERCASE_LOWERCASE"/>
+ <Transliteration unoid="IGNORE_CASE"/>
+ </LC_TRANSLITERATION>
+ <LC_MISC>
+ <ReservedWords>
+ <trueWord>prawje</trueWord>
+ <falseWord>wopak</falseWord>
+ <quarter1Word>prěni kwartal</quarter1Word>
+ <quarter2Word>druhi kwartal</quarter2Word>
+ <quarter3Word>třeći kwartal</quarter3Word>
+ <quarter4Word>štwórty kwartal</quarter4Word>
+ <aboveWord>horjeka</aboveWord>
+ <belowWord>deleka</belowWord>
+ <quarter1Abbreviation>K1</quarter1Abbreviation>
+ <quarter2Abbreviation>K2</quarter2Abbreviation>
+ <quarter3Abbreviation>K3</quarter3Abbreviation>
+ <quarter4Abbreviation>K4</quarter4Abbreviation>
+ </ReservedWords>
+ </LC_MISC>
+ <LC_NumberingLevel ref="en_US"/>
+ <LC_OutLineNumberingLevel ref="en_US"/>
+</Locale>
+<!--Version 1.0 -->
diff --git a/i18npool/source/localedata/data/locale.dtd b/i18npool/source/localedata/data/locale.dtd
index b9ee78f69e79..d47d4ad26edc 100644
--- a/i18npool/source/localedata/data/locale.dtd
+++ b/i18npool/source/localedata/data/locale.dtd
@@ -19,14 +19,17 @@
A second possiblity is:
- - temporarily change the DOCTYPE of your file to read (all on one line)
- <!DOCTYPE Locale SYSTEM "http://svn.services.openoffice.org/ooo/trunk/i18npool/source/localedata/data/locale.dtd">
+ - temporarily (!) change the DOCTYPE of your file to read (all on one line)
+ <!DOCTYPE Locale SYSTEM "http://hg.services.openoffice.org/DEV300/raw-file/tip/i18npool/source/localedata/data/locale.dtd">
- upload it to the form available at http://www.validome.org/
- This will validate the file against the HEAD revision of locale.dtd, for
- other revisions you'll have to specify the corresponding tags or cws branch
- instead of trunk.
+ This will validate the file against the HEAD revision of locale.dtd on the
+ DEV300 development code line, for other revisions you'll have to specify
+ the corresponding tags or cws branch instead. For example, to validate
+ against a modified locale.dtd in CWS locales33 you would use
+
+ <!DOCTYPE Locale SYSTEM "http://hg.services.openoffice.org/cws/locales33/raw-file/tip/i18npool/source/localedata/data/locale.dtd">
Please test locale data files either in a non-product (!) build, which
@@ -56,16 +59,22 @@
<!ENTITY % UNOModule
'unoid CDATA #IMPLIED'>
+
<!ENTITY % MessageID
'msgid CDATA #REQUIRED'>
+
<!ENTITY % RefLocale
'ref CDATA #IMPLIED'>
+<!-- Where given, an element can be inherited from another locale, e.g.
+ ref="en_US" -->
+
<!ENTITY % LIBModule
'module CDATA #IMPLIED'>
-<!-- The locale referred to for the sub categories -->
+<!-- The locale referred to for the sub categories, implementation detail. -->
<!ENTITY % replaceFrom 'replaceFrom CDATA #IMPLIED'>
<!ENTITY % replaceTo 'replaceTo CDATA #IMPLIED'>
+<!-- See below for the LC_FORMAT element. -->
<!ELEMENT DefaultName (#PCDATA)>
@@ -84,28 +93,35 @@
-->
<!ATTLIST Locale allowUpdateFromCLDR (yes|no) #REQUIRED>
<!-- Whether some data elements may be (automatically) updated from the Common
- Locale Data Repository, see http://www.unicode.org/cldr/
+ Locale Data Repository, see http://cldr.unicode.org/
+ Note: This mechanism currently (2010-02-21) is outdated.
-->
<!ATTLIST Locale version CDATA #REQUIRED>
<!-- Valid number, may designate versioned data -->
+
<!ELEMENT LC_INFO (Language, Country, Platform?, Variant?)>
<!ELEMENT Language (LangID, DefaultName) >
<!ELEMENT LangID (#PCDATA) >
-<!-- LangID must be valid two or three letter language identifier defined by ISO-639
- Use ISO 639-1 two letter code where available, else ISO 639-2 three letter code.
+<!-- LangID must be a valid two or three letter language identifier defined by
+ ISO 639. Use ISO 639-1 two letter code where available, else ISO 639-2 or
+ 639-3 three letter code.
-->
<!ELEMENT Country (CountryID, DefaultName) >
<!ELEMENT CountryID (#PCDATA) >
-<!-- CountryID must be valid two letter country identifier defined by ISO-3166 -->
+<!-- CountryID must be a valid two letter country identifier defined by ISO 3166. -->
<!ELEMENT Platform (PlatformID) >
<!ELEMENT PlatformID (#PCDATA) >
-<!-- can be generic|unix|win32|macos -->
+<!-- Unused, deprecated, can be generic|unix|win32|macos, best Platform element
+ be absent.
+-->
<!ELEMENT Variant (#PCDATA) >
+<!-- Reserved for future use, currently unused. -->
+
<!-- The LC_FORMAT element contains number format codes and may actually appear
twice (with the second ocurrence named LC_FORMAT_1). One section is
@@ -122,18 +138,22 @@
-->
<!ELEMENT LC_FORMAT (FormatElement*) >
+<!-- All FormatElement elements must be given if the RefLocale mechanism is not used! -->
<!ATTLIST LC_FORMAT %RefLocale;>
<!ATTLIST LC_FORMAT %replaceFrom;>
-<!-- Define placeholder for currency code -->
+<!-- Define placeholder for currency code, usually "[CURRENCY]" -->
<!ATTLIST LC_FORMAT %replaceTo;>
-<!-- Currency code to be used to replace the placeholder -->
+<!-- Currency code to be used to replace the placeholder, e.g. "[$R-1C09]".
+ Note: The brackets and the leading $ character are mandatory, the
+ hyphen-minus separates the currency symbol from the hexagesimal MS-LCID,
+ letters contained in the LCID have to be in upper case, leading zeros are
+ to be omitted. LCIDs are defined in i18npool/inc/i18npool/lang.h
+-->
<!ELEMENT LC_FORMAT_1 (FormatElement*) >
<!ATTLIST LC_FORMAT_1 %RefLocale;>
<!ATTLIST LC_FORMAT_1 %replaceFrom;>
-<!-- Define placeholder for currency code -->
<!ATTLIST LC_FORMAT_1 %replaceTo;>
-<!-- Currency code to be used to replace the placeholder -->
<!ELEMENT FormatElement ( FormatCode, DefaultName?)>
<!ATTLIST FormatElement %MessageID;>
@@ -234,34 +254,54 @@
<!ELEMENT FormatCode (#PCDATA)>
+<!-- The LC_CALENDAR element defines calendars used with a locale. -->
<!ELEMENT LC_CALENDAR (Calendar* ) >
+<!-- At least one Calendar element must be given if the RefLocale mechanism is not used! -->
<!ATTLIST LC_CALENDAR %RefLocale;>
+
<!ELEMENT Calendar (DaysOfWeek, MonthsOfYear, Eras, StartDayOfWeek, MinimalDaysInFirstWeek) >
<!ATTLIST Calendar %UNOModule;>
-<!-- the unoid of a gregorian calendar MUST be lower case "gregorian" -->
+<!-- The unoid of a gregorian calendar MUST be lower case "gregorian",
+ calendars MUST match the names defined in the OASIS OpenDocument Format
+ (ODF) 1.2 or later specification. The implementation name registered with
+ the OOo service resgistry MUST match, e.g.
+ com.sun.star.i18n.Calendar_gregorian
+-->
<!ATTLIST Calendar default (true|false) #REQUIRED >
+<!-- Exactly one Calendar element has to be the default calendar. -->
+
<!ELEMENT DaysOfWeek (Day*)>
+<!-- All Day elements of a Calendar must be given if the RefLocale mechanism is not used! -->
<!ATTLIST DaysOfWeek %RefLocale;>
-<!-- Sequence of days is important, MUST start with Sunday -->
+<!-- Sequence of days is important, MUST start with Sunday. -->
<!ELEMENT Day (DayID, DefaultAbbrvName, DefaultFullName)>
<!ELEMENT DayID (#PCDATA)>
-<!-- DayID is preferably the lower case abbreviated English name like sun for Sunday -->
+<!-- Preferably the lower case abbreviated English name like sun for Sunday. -->
<!ELEMENT DefaultAbbrvName (#PCDATA)>
+<!-- The abbreviated day name, e.g. Sun for Sunday. -->
<!ELEMENT DefaultFullName (#PCDATA)>
+<!-- The full day name, e.g. Sunday for Sunday. -->
+
<!ELEMENT MonthsOfYear (Month*)>
+<!-- All Month elements of a Calendar must be given if the RefLocale mechanism is not used! -->
<!ATTLIST MonthsOfYear %RefLocale;>
+<!-- Sequence of months is important, MUST start with the first month of a
+ year, e.g. January in a Gregorian calendar.
+ -->
<!ELEMENT Month (MonthID, DefaultAbbrvName, DefaultFullName)>
<!ELEMENT MonthID (#PCDATA)>
-<!-- preferably the lower case abbreviated English name like jan for January -->
+<!-- Preferably the lower case abbreviated English name like jan for January. -->
+
<!ELEMENT Eras (Era*)>
-<!-- The eras MUST be in chronological order, e.g. first BC then AC -->
+<!-- All Era elements of a Calendar must be given if the RefLocale mechanism is not used! -->
<!ATTLIST Eras %RefLocale;>
+<!-- The eras MUST be in chronological order, e.g. first BC then AC. -->
<!ELEMENT Era (EraID, DefaultAbbrvName, DefaultFullName)>
<!ELEMENT EraID (#PCDATA)>
<!-- If a calendar has special eras (like zh_TW ROC or ja_JP Gengou calendar)
and a date before those eras is undefined, a leading (first) dummy era
with EraID="Dummy" has to be defined to enable the number formatter to
- fall back to a gregorian calendar for those date values if the XCalendar
+ fall back to a Gregorian calendar for those date values if the XCalendar
implementation returns an era value of 0.
-->
@@ -276,10 +316,14 @@
is in the new year.
-->
+
+<!-- The LC_CURRENCY element defines currencies used with a locale. -->
<!ELEMENT LC_CURRENCY (Currency* ) >
+<!-- At least one Currency element must be given if the RefLocale mechanism is not used! -->
<!ATTLIST LC_CURRENCY %RefLocale;>
<!ELEMENT Currency (CurrencyID, CurrencySymbol, BankSymbol, CurrencyName, DecimalPlaces)>
<!ATTLIST Currency default (true|false) #REQUIRED >
+<!-- Exactly one Currency element has to be the default currency. -->
<!ATTLIST Currency usedInCompatibleFormatCodes (true|false) #REQUIRED >
<!-- If this currency is the one used in compatible number format codes with
<member>FormatElement::formatIndex</member> values in the range 12..17.
@@ -296,35 +340,49 @@
'usedInCompatibleFormatCodes' must both be "false".
-->
<!ELEMENT CurrencyID (#PCDATA)>
+<!-- The ISO 4217 three letter currency code, e.g. USD or EUR. -->
<!ELEMENT CurrencySymbol (#PCDATA)>
+<!-- The currency symbol, e.g. $ or €. -->
<!ELEMENT BankSymbol (#PCDATA)>
+<!-- The ISO 4217 three letter currency code, e.g. USD or EUR. -->
<!ELEMENT CurrencyName (#PCDATA)>
+<!-- The native currency name, e.g. Dollar or Euro. -->
<!ELEMENT DecimalPlaces (#PCDATA)>
+<!-- Number of decimal places used with the currency, usually 2 or 0, e.g. 2
+ for cents.
+-->
+
<!ELEMENT LC_CTYPE (Separators?, Markers?, TimeAM?, TimePM?, MeasurementSystem?)>
+<!-- All elements must be given if the RefLocale mechanism is not used! -->
<!ATTLIST LC_CTYPE %RefLocale;>
<!ATTLIST LC_CTYPE %UNOModule;>
+
<!ELEMENT Separators (DateSeparator, ThousandSeparator, DecimalSeparator, TimeSeparator, Time100SecSeparator, ListSeparator, LongDateDayOfWeekSeparator, LongDateDaySeparator, LongDateMonthSeparator, LongDateYearSeparator)>
-<!ELEMENT Markers (QuotationStart, QuotationEnd, DoubleQuotationStart, DoubleQuotationEnd)>
<!ELEMENT DateSeparator (#PCDATA)>
<!ELEMENT ThousandSeparator (#PCDATA)>
<!ELEMENT DecimalSeparator (#PCDATA)>
<!ELEMENT TimeSeparator (#PCDATA)>
<!ELEMENT Time100SecSeparator (#PCDATA)>
-<!ELEMENT TimeAM (#PCDATA)>
-<!ELEMENT TimePM (#PCDATA)>
<!ELEMENT ListSeparator (#PCDATA)>
+<!ELEMENT LongDateDayOfWeekSeparator (#PCDATA)>
+<!ELEMENT LongDateDaySeparator (#PCDATA)>
+<!ELEMENT LongDateMonthSeparator (#PCDATA)>
+<!ELEMENT LongDateYearSeparator (#PCDATA)>
+
+<!ELEMENT Markers (QuotationStart, QuotationEnd, DoubleQuotationStart, DoubleQuotationEnd)>
<!ELEMENT QuotationStart (#PCDATA)>
<!ELEMENT QuotationEnd (#PCDATA)>
<!ELEMENT DoubleQuotationStart (#PCDATA)>
<!ELEMENT DoubleQuotationEnd (#PCDATA)>
+
+<!ELEMENT TimeAM (#PCDATA)>
+<!ELEMENT TimePM (#PCDATA)>
<!ELEMENT MeasurementSystem (#PCDATA)>
-<!ELEMENT LongDateDayOfWeekSeparator (#PCDATA)>
-<!ELEMENT LongDateDaySeparator (#PCDATA)>
-<!ELEMENT LongDateMonthSeparator (#PCDATA)>
-<!ELEMENT LongDateYearSeparator (#PCDATA)>
+
<!ELEMENT LC_COLLATION (Collator*, CollationOptions?)>
+<!-- All elements must be given if the RefLocale mechanism is not used! -->
<!ATTLIST LC_COLLATION %RefLocale;>
<!--
Optional ICU tailoring.
@@ -345,13 +403,21 @@
<!ELEMENT CollationOptions (TransliterationModules+)>
<!ELEMENT TransliterationModules (#PCDATA)>
+
<!ELEMENT LC_SEARCH (SearchOptions?)>
+<!-- All elements must be given if the RefLocale mechanism is not used! -->
<!ATTLIST LC_SEARCH %RefLocale;>
<!ELEMENT SearchOptions (TransliterationModules+)>
+
<!ELEMENT LC_INDEX (IndexKey*, UnicodeScript*, FollowPageWord*)>
<!ATTLIST LC_INDEX %RefLocale;>
+
<!--
+ The IndexKey element is optional, but should be given if the locale
+ requires a specific sort order in Writer's index tables or entries are to
+ be combined under keys.
+
Index key for the algorithm and language, like >A-Z< for English => A, B,
C, ..., Y, Z. The letters specify under which key an entry goes and the
order the keys are sorted. Keys may be reordered or letters inserted to
@@ -391,16 +457,22 @@
<!ATTLIST IndexKey %LIBModule;>
<!ATTLIST IndexKey default (true|false) #REQUIRED >
<!ATTLIST IndexKey phonetic (true|false) #REQUIRED >
+
<!--
The Unicode script types are those of
offapi/com/sun/star/i18n/UnicodeScript.idl, they define the code range for
the language.
-->
<!ELEMENT UnicodeScript (#PCDATA)>
+
<!--
The FollowPageWord entries were originally hard-coded in
../../indexentry/indexentrysupplier.cxx, most locales used the English
``p.'' and ``pp.'', valid data should be provided by native speakers.
+ These words or abbreviations are used in the Writer's index table. The
+ first FollowPageWord element is the abbreviation for "page" (p.), the
+ second FollowPageWord element the abbreviation for "page and following
+ pages" (pp.).
-->
<!ELEMENT FollowPageWord (#PCDATA)>
diff --git a/i18npool/source/localedata/data/localedata_euro.map b/i18npool/source/localedata/data/localedata_euro.map
index 1a28eb537bd5..bc93cbfc5d89 100644
--- a/i18npool/source/localedata/data/localedata_euro.map
+++ b/i18npool/source/localedata/data/localedata_euro.map
@@ -32,6 +32,7 @@ getAllCalendars_fy_NL;
getAllCalendars_ga_IE;
getAllCalendars_gsc_FR;
getAllCalendars_hr_HR;
+getAllCalendars_hsb_DE;
getAllCalendars_is_IS;
getAllCalendars_it_CH;
getAllCalendars_it_IT;
@@ -39,6 +40,7 @@ getAllCalendars_ka_GE;
getAllCalendars_kl_GL;
getAllCalendars_la_VA;
getAllCalendars_lb_LU;
+getAllCalendars_ltg_LV;
getAllCalendars_lt_LT;
getAllCalendars_lv_LV;
getAllCalendars_mk_MK;
@@ -99,6 +101,7 @@ getAllCurrencies_fy_NL;
getAllCurrencies_ga_IE;
getAllCurrencies_gsc_FR;
getAllCurrencies_hr_HR;
+getAllCurrencies_hsb_DE;
getAllCurrencies_is_IS;
getAllCurrencies_it_CH;
getAllCurrencies_it_IT;
@@ -106,6 +109,7 @@ getAllCurrencies_ka_GE;
getAllCurrencies_kl_GL;
getAllCurrencies_la_VA;
getAllCurrencies_lb_LU;
+getAllCurrencies_ltg_LV;
getAllCurrencies_lt_LT;
getAllCurrencies_lv_LV;
getAllCurrencies_mk_MK;
@@ -166,6 +170,7 @@ getAllFormats0_fy_NL;
getAllFormats0_ga_IE;
getAllFormats0_gsc_FR;
getAllFormats0_hr_HR;
+getAllFormats0_hsb_DE;
getAllFormats0_is_IS;
getAllFormats0_it_CH;
getAllFormats0_it_IT;
@@ -173,6 +178,7 @@ getAllFormats0_ka_GE;
getAllFormats0_kl_GL;
getAllFormats0_la_VA;
getAllFormats0_lb_LU;
+getAllFormats0_ltg_LV;
getAllFormats0_lt_LT;
getAllFormats0_lv_LV;
getAllFormats0_mk_MK;
@@ -233,6 +239,7 @@ getBreakIteratorRules_fy_NL;
getBreakIteratorRules_ga_IE;
getBreakIteratorRules_gsc_FR;
getBreakIteratorRules_hr_HR;
+getBreakIteratorRules_hsb_DE;
getBreakIteratorRules_is_IS;
getBreakIteratorRules_it_CH;
getBreakIteratorRules_it_IT;
@@ -240,6 +247,7 @@ getBreakIteratorRules_ka_GE;
getBreakIteratorRules_kl_GL;
getBreakIteratorRules_la_VA;
getBreakIteratorRules_lb_LU;
+getBreakIteratorRules_ltg_LV;
getBreakIteratorRules_lt_LT;
getBreakIteratorRules_lv_LV;
getBreakIteratorRules_mk_MK;
@@ -300,6 +308,7 @@ getCollationOptions_fy_NL;
getCollationOptions_ga_IE;
getCollationOptions_gsc_FR;
getCollationOptions_hr_HR;
+getCollationOptions_hsb_DE;
getCollationOptions_is_IS;
getCollationOptions_it_CH;
getCollationOptions_it_IT;
@@ -307,6 +316,7 @@ getCollationOptions_ka_GE;
getCollationOptions_kl_GL;
getCollationOptions_la_VA;
getCollationOptions_lb_LU;
+getCollationOptions_ltg_LV;
getCollationOptions_lt_LT;
getCollationOptions_lv_LV;
getCollationOptions_mk_MK;
@@ -367,6 +377,7 @@ getCollatorImplementation_fy_NL;
getCollatorImplementation_ga_IE;
getCollatorImplementation_gsc_FR;
getCollatorImplementation_hr_HR;
+getCollatorImplementation_hsb_DE;
getCollatorImplementation_is_IS;
getCollatorImplementation_it_CH;
getCollatorImplementation_it_IT;
@@ -374,6 +385,7 @@ getCollatorImplementation_ka_GE;
getCollatorImplementation_kl_GL;
getCollatorImplementation_la_VA;
getCollatorImplementation_lb_LU;
+getCollatorImplementation_ltg_LV;
getCollatorImplementation_lt_LT;
getCollatorImplementation_lv_LV;
getCollatorImplementation_mk_MK;
@@ -434,6 +446,7 @@ getContinuousNumberingLevels_fy_NL;
getContinuousNumberingLevels_ga_IE;
getContinuousNumberingLevels_gsc_FR;
getContinuousNumberingLevels_hr_HR;
+getContinuousNumberingLevels_hsb_DE;
getContinuousNumberingLevels_is_IS;
getContinuousNumberingLevels_it_CH;
getContinuousNumberingLevels_it_IT;
@@ -441,6 +454,7 @@ getContinuousNumberingLevels_ka_GE;
getContinuousNumberingLevels_kl_GL;
getContinuousNumberingLevels_la_VA;
getContinuousNumberingLevels_lb_LU;
+getContinuousNumberingLevels_ltg_LV;
getContinuousNumberingLevels_lt_LT;
getContinuousNumberingLevels_lv_LV;
getContinuousNumberingLevels_mk_MK;
@@ -501,6 +515,7 @@ getFollowPageWords_fy_NL;
getFollowPageWords_ga_IE;
getFollowPageWords_gsc_FR;
getFollowPageWords_hr_HR;
+getFollowPageWords_hsb_DE;
getFollowPageWords_is_IS;
getFollowPageWords_it_CH;
getFollowPageWords_it_IT;
@@ -508,6 +523,7 @@ getFollowPageWords_ka_GE;
getFollowPageWords_kl_GL;
getFollowPageWords_la_VA;
getFollowPageWords_lb_LU;
+getFollowPageWords_ltg_LV;
getFollowPageWords_lt_LT;
getFollowPageWords_lv_LV;
getFollowPageWords_mk_MK;
@@ -568,6 +584,7 @@ getForbiddenCharacters_fy_NL;
getForbiddenCharacters_ga_IE;
getForbiddenCharacters_gsc_FR;
getForbiddenCharacters_hr_HR;
+getForbiddenCharacters_hsb_DE;
getForbiddenCharacters_is_IS;
getForbiddenCharacters_it_CH;
getForbiddenCharacters_it_IT;
@@ -575,6 +592,7 @@ getForbiddenCharacters_ka_GE;
getForbiddenCharacters_kl_GL;
getForbiddenCharacters_la_VA;
getForbiddenCharacters_lb_LU;
+getForbiddenCharacters_ltg_LV;
getForbiddenCharacters_lt_LT;
getForbiddenCharacters_lv_LV;
getForbiddenCharacters_mk_MK;
@@ -635,6 +653,7 @@ getIndexAlgorithm_fy_NL;
getIndexAlgorithm_ga_IE;
getIndexAlgorithm_gsc_FR;
getIndexAlgorithm_hr_HR;
+getIndexAlgorithm_hsb_DE;
getIndexAlgorithm_is_IS;
getIndexAlgorithm_it_CH;
getIndexAlgorithm_it_IT;
@@ -642,6 +661,7 @@ getIndexAlgorithm_ka_GE;
getIndexAlgorithm_kl_GL;
getIndexAlgorithm_la_VA;
getIndexAlgorithm_lb_LU;
+getIndexAlgorithm_ltg_LV;
getIndexAlgorithm_lt_LT;
getIndexAlgorithm_lv_LV;
getIndexAlgorithm_mk_MK;
@@ -702,6 +722,7 @@ getLCInfo_fy_NL;
getLCInfo_ga_IE;
getLCInfo_gsc_FR;
getLCInfo_hr_HR;
+getLCInfo_hsb_DE;
getLCInfo_is_IS;
getLCInfo_it_CH;
getLCInfo_it_IT;
@@ -709,6 +730,7 @@ getLCInfo_ka_GE;
getLCInfo_kl_GL;
getLCInfo_la_VA;
getLCInfo_lb_LU;
+getLCInfo_ltg_LV;
getLCInfo_lt_LT;
getLCInfo_lv_LV;
getLCInfo_mk_MK;
@@ -769,6 +791,7 @@ getLocaleItem_fy_NL;
getLocaleItem_ga_IE;
getLocaleItem_gsc_FR;
getLocaleItem_hr_HR;
+getLocaleItem_hsb_DE;
getLocaleItem_is_IS;
getLocaleItem_it_CH;
getLocaleItem_it_IT;
@@ -776,6 +799,7 @@ getLocaleItem_ka_GE;
getLocaleItem_kl_GL;
getLocaleItem_la_VA;
getLocaleItem_lb_LU;
+getLocaleItem_ltg_LV;
getLocaleItem_lt_LT;
getLocaleItem_lv_LV;
getLocaleItem_mk_MK;
@@ -836,6 +860,7 @@ getOutlineNumberingLevels_fy_NL;
getOutlineNumberingLevels_ga_IE;
getOutlineNumberingLevels_gsc_FR;
getOutlineNumberingLevels_hr_HR;
+getOutlineNumberingLevels_hsb_DE;
getOutlineNumberingLevels_is_IS;
getOutlineNumberingLevels_it_CH;
getOutlineNumberingLevels_it_IT;
@@ -843,6 +868,7 @@ getOutlineNumberingLevels_ka_GE;
getOutlineNumberingLevels_kl_GL;
getOutlineNumberingLevels_la_VA;
getOutlineNumberingLevels_lb_LU;
+getOutlineNumberingLevels_ltg_LV;
getOutlineNumberingLevels_lt_LT;
getOutlineNumberingLevels_lv_LV;
getOutlineNumberingLevels_mk_MK;
@@ -903,6 +929,7 @@ getReservedWords_fy_NL;
getReservedWords_ga_IE;
getReservedWords_gsc_FR;
getReservedWords_hr_HR;
+getReservedWords_hsb_DE;
getReservedWords_is_IS;
getReservedWords_it_CH;
getReservedWords_it_IT;
@@ -910,6 +937,7 @@ getReservedWords_ka_GE;
getReservedWords_kl_GL;
getReservedWords_la_VA;
getReservedWords_lb_LU;
+getReservedWords_ltg_LV;
getReservedWords_lt_LT;
getReservedWords_lv_LV;
getReservedWords_mk_MK;
@@ -970,6 +998,7 @@ getSearchOptions_fy_NL;
getSearchOptions_ga_IE;
getSearchOptions_gsc_FR;
getSearchOptions_hr_HR;
+getSearchOptions_hsb_DE;
getSearchOptions_is_IS;
getSearchOptions_it_CH;
getSearchOptions_it_IT;
@@ -977,6 +1006,7 @@ getSearchOptions_ka_GE;
getSearchOptions_kl_GL;
getSearchOptions_la_VA;
getSearchOptions_lb_LU;
+getSearchOptions_ltg_LV;
getSearchOptions_lt_LT;
getSearchOptions_lv_LV;
getSearchOptions_mk_MK;
@@ -1037,6 +1067,7 @@ getTransliterations_fy_NL;
getTransliterations_ga_IE;
getTransliterations_gsc_FR;
getTransliterations_hr_HR;
+getTransliterations_hsb_DE;
getTransliterations_is_IS;
getTransliterations_it_CH;
getTransliterations_it_IT;
@@ -1044,6 +1075,7 @@ getTransliterations_ka_GE;
getTransliterations_kl_GL;
getTransliterations_la_VA;
getTransliterations_lb_LU;
+getTransliterations_ltg_LV;
getTransliterations_lt_LT;
getTransliterations_lv_LV;
getTransliterations_mk_MK;
@@ -1104,6 +1136,7 @@ getUnicodeScripts_fy_NL;
getUnicodeScripts_ga_IE;
getUnicodeScripts_gsc_FR;
getUnicodeScripts_hr_HR;
+getUnicodeScripts_hsb_DE;
getUnicodeScripts_is_IS;
getUnicodeScripts_it_CH;
getUnicodeScripts_it_IT;
@@ -1111,6 +1144,7 @@ getUnicodeScripts_ka_GE;
getUnicodeScripts_kl_GL;
getUnicodeScripts_la_VA;
getUnicodeScripts_lb_LU;
+getUnicodeScripts_ltg_LV;
getUnicodeScripts_lt_LT;
getUnicodeScripts_lv_LV;
getUnicodeScripts_mk_MK;
diff --git a/i18npool/source/localedata/data/localedata_others.map b/i18npool/source/localedata/data/localedata_others.map
index a8212624e8e8..6857e29ce5db 100644
--- a/i18npool/source/localedata/data/localedata_others.map
+++ b/i18npool/source/localedata/data/localedata_others.map
@@ -48,6 +48,7 @@ getAllCalendars_nso_ZA;
getAllCalendars_om_ET;
getAllCalendars_or_IN;
getAllCalendars_pa_IN;
+getAllCalendars_plt_MG;
getAllCalendars_rw_RW;
getAllCalendars_sg_CF;
getAllCalendars_shs_CA;
@@ -123,6 +124,7 @@ getAllCurrencies_nso_ZA;
getAllCurrencies_om_ET;
getAllCurrencies_or_IN;
getAllCurrencies_pa_IN;
+getAllCurrencies_plt_MG;
getAllCurrencies_rw_RW;
getAllCurrencies_sg_CF;
getAllCurrencies_shs_CA;
@@ -198,6 +200,7 @@ getAllFormats0_nso_ZA;
getAllFormats0_om_ET;
getAllFormats0_or_IN;
getAllFormats0_pa_IN;
+getAllFormats0_plt_MG;
getAllFormats0_rw_RW;
getAllFormats0_sg_CF;
getAllFormats0_shs_CA;
@@ -273,6 +276,7 @@ getBreakIteratorRules_nso_ZA;
getBreakIteratorRules_om_ET;
getBreakIteratorRules_or_IN;
getBreakIteratorRules_pa_IN;
+getBreakIteratorRules_plt_MG;
getBreakIteratorRules_rw_RW;
getBreakIteratorRules_sg_CF;
getBreakIteratorRules_shs_CA;
@@ -348,6 +352,7 @@ getCollationOptions_nso_ZA;
getCollationOptions_om_ET;
getCollationOptions_or_IN;
getCollationOptions_pa_IN;
+getCollationOptions_plt_MG;
getCollationOptions_rw_RW;
getCollationOptions_sg_CF;
getCollationOptions_shs_CA;
@@ -423,6 +428,7 @@ getCollatorImplementation_nso_ZA;
getCollatorImplementation_om_ET;
getCollatorImplementation_or_IN;
getCollatorImplementation_pa_IN;
+getCollatorImplementation_plt_MG;
getCollatorImplementation_rw_RW;
getCollatorImplementation_sg_CF;
getCollatorImplementation_shs_CA;
@@ -498,6 +504,7 @@ getContinuousNumberingLevels_nso_ZA;
getContinuousNumberingLevels_om_ET;
getContinuousNumberingLevels_or_IN;
getContinuousNumberingLevels_pa_IN;
+getContinuousNumberingLevels_plt_MG;
getContinuousNumberingLevels_rw_RW;
getContinuousNumberingLevels_sg_CF;
getContinuousNumberingLevels_shs_CA;
@@ -573,6 +580,7 @@ getFollowPageWords_nso_ZA;
getFollowPageWords_om_ET;
getFollowPageWords_or_IN;
getFollowPageWords_pa_IN;
+getFollowPageWords_plt_MG;
getFollowPageWords_rw_RW;
getFollowPageWords_sg_CF;
getFollowPageWords_shs_CA;
@@ -648,6 +656,7 @@ getForbiddenCharacters_nso_ZA;
getForbiddenCharacters_om_ET;
getForbiddenCharacters_or_IN;
getForbiddenCharacters_pa_IN;
+getForbiddenCharacters_plt_MG;
getForbiddenCharacters_rw_RW;
getForbiddenCharacters_sg_CF;
getForbiddenCharacters_shs_CA;
@@ -723,6 +732,7 @@ getIndexAlgorithm_nso_ZA;
getIndexAlgorithm_om_ET;
getIndexAlgorithm_or_IN;
getIndexAlgorithm_pa_IN;
+getIndexAlgorithm_plt_MG;
getIndexAlgorithm_rw_RW;
getIndexAlgorithm_sg_CF;
getIndexAlgorithm_shs_CA;
@@ -798,6 +808,7 @@ getLCInfo_nso_ZA;
getLCInfo_om_ET;
getLCInfo_or_IN;
getLCInfo_pa_IN;
+getLCInfo_plt_MG;
getLCInfo_rw_RW;
getLCInfo_sg_CF;
getLCInfo_shs_CA;
@@ -873,6 +884,7 @@ getLocaleItem_nso_ZA;
getLocaleItem_om_ET;
getLocaleItem_or_IN;
getLocaleItem_pa_IN;
+getLocaleItem_plt_MG;
getLocaleItem_rw_RW;
getLocaleItem_sg_CF;
getLocaleItem_shs_CA;
@@ -948,6 +960,7 @@ getOutlineNumberingLevels_nso_ZA;
getOutlineNumberingLevels_om_ET;
getOutlineNumberingLevels_or_IN;
getOutlineNumberingLevels_pa_IN;
+getOutlineNumberingLevels_plt_MG;
getOutlineNumberingLevels_rw_RW;
getOutlineNumberingLevels_sg_CF;
getOutlineNumberingLevels_shs_CA;
@@ -1023,6 +1036,7 @@ getReservedWords_nso_ZA;
getReservedWords_om_ET;
getReservedWords_or_IN;
getReservedWords_pa_IN;
+getReservedWords_plt_MG;
getReservedWords_rw_RW;
getReservedWords_sg_CF;
getReservedWords_shs_CA;
@@ -1098,6 +1112,7 @@ getSearchOptions_nso_ZA;
getSearchOptions_om_ET;
getSearchOptions_or_IN;
getSearchOptions_pa_IN;
+getSearchOptions_plt_MG;
getSearchOptions_rw_RW;
getSearchOptions_sg_CF;
getSearchOptions_shs_CA;
@@ -1173,6 +1188,7 @@ getTransliterations_nso_ZA;
getTransliterations_om_ET;
getTransliterations_or_IN;
getTransliterations_pa_IN;
+getTransliterations_plt_MG;
getTransliterations_rw_RW;
getTransliterations_sg_CF;
getTransliterations_shs_CA;
@@ -1248,6 +1264,7 @@ getUnicodeScripts_nso_ZA;
getUnicodeScripts_om_ET;
getUnicodeScripts_or_IN;
getUnicodeScripts_pa_IN;
+getUnicodeScripts_plt_MG;
getUnicodeScripts_rw_RW;
getUnicodeScripts_sg_CF;
getUnicodeScripts_shs_CA;
diff --git a/i18npool/source/localedata/data/ltg_LV.xml b/i18npool/source/localedata/data/ltg_LV.xml
new file mode 100644
index 000000000000..c41c38c86b9c
--- /dev/null
+++ b/i18npool/source/localedata/data/ltg_LV.xml
@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE Locale SYSTEM 'locale.dtd'>
+<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.0">
+ <LC_INFO>
+ <Language>
+ <LangID>ltg</LangID>
+ <DefaultName>Latgalian</DefaultName>
+ </Language>
+ <Country>
+ <CountryID>LV</CountryID>
+ <DefaultName>Latvia</DefaultName>
+ </Country>
+ </LC_INFO>
+ <LC_CTYPE unoid="generic">
+ <Separators>
+ <DateSeparator>.</DateSeparator>
+ <ThousandSeparator> </ThousandSeparator>
+ <DecimalSeparator>,</DecimalSeparator>
+ <TimeSeparator>:</TimeSeparator>
+ <Time100SecSeparator>,</Time100SecSeparator>
+ <ListSeparator>;</ListSeparator>
+ <LongDateDayOfWeekSeparator>, </LongDateDayOfWeekSeparator>
+ <LongDateDaySeparator>, </LongDateDaySeparator>
+ <LongDateMonthSeparator> </LongDateMonthSeparator>
+ <LongDateYearSeparator> </LongDateYearSeparator>
+ </Separators>
+ <Markers>
+ <QuotationStart>‘</QuotationStart>
+ <QuotationEnd>’</QuotationEnd>
+ <DoubleQuotationStart>“</DoubleQuotationStart>
+ <DoubleQuotationEnd>”</DoubleQuotationEnd>
+ </Markers>
+ <TimeAM>AM</TimeAM>
+ <TimePM>PM</TimePM>
+ <MeasurementSystem>metric</MeasurementSystem>
+ </LC_CTYPE>
+ <LC_FORMAT>
+ <FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
+ <FormatCode>General</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1">
+ <FormatCode>0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2">
+ <FormatCode>0,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3">
+ <FormatCode># ##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4">
+ <FormatCode># ##0,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+ <FormatCode># ###,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+ <FormatCode>0,00E+00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7">
+ <FormatCode>0,00E+000</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8">
+ <FormatCode>0%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9">
+ <FormatCode>0,00%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12">
+ <FormatCode># ##0[$Ls-64B];-# ##0[$Ls-64B]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13">
+ <FormatCode># ##0,00[$Ls-64B];-# ##0,00[$Ls-64B]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14">
+ <FormatCode># ##0[$Ls-64B];[RED]-# ##0[$Ls-64B]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15">
+ <FormatCode># ##0,00[$Ls-64B];[RED]-# ##0,00[$Ls-64B]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16">
+ <FormatCode># ##0,00 CCC</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17">
+ <FormatCode># ##0,--[$Ls-64B];[RED]-# ##0,--[$Ls-64B]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey11" default="true" type="short" usage="DATE" formatindex="18">
+ <FormatCode>D.MM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey14" default="true" type="long" usage="DATE" formatindex="19">
+ <FormatCode>NNNNDD, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey6" default="true" type="medium" usage="DATE" formatindex="20">
+ <FormatCode>DD.MM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="21">
+ <FormatCode>DD.MM.YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="22">
+ <FormatCode>D, MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="23">
+ <FormatCode>D, MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey21" default="false" type="long" usage="DATE" formatindex="24">
+ <FormatCode>D, MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="25">
+ <FormatCode>D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey22" default="false" type="long" usage="DATE" formatindex="26">
+ <FormatCode>D, MMMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey10" default="false" type="medium" usage="DATE" formatindex="27">
+ <FormatCode>NN, DD.MMM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey18" default="false" type="long" usage="DATE" formatindex="28">
+ <FormatCode>NN, D, MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey19" default="false" type="long" usage="DATE" formatindex="29">
+ <FormatCode>NN, D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey20" default="false" type="long" usage="DATE" formatindex="30">
+ <FormatCode>NNNND, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey12" default="false" type="short" usage="DATE" formatindex="31">
+ <FormatCode>MM.DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="32">
+ <FormatCode>YY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="33">
+ <FormatCode>YYYY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey1" default="false" type="medium" usage="DATE" formatindex="34">
+ <FormatCode>MM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="35">
+ <FormatCode>MMM.DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="36">
+ <FormatCode>MMMM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="37">
+ <FormatCode>QQ YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey9" default="false" type="medium" usage="DATE" formatindex="38">
+ <FormatCode>WW</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey1" default="false" type="short" usage="TIME" formatindex="39">
+ <FormatCode>HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey2" default="false" type="medium" usage="TIME" formatindex="40">
+ <FormatCode>HH:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey3" default="true" type="short" usage="TIME" formatindex="41">
+ <FormatCode>HH:MM AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey4" default="true" type="medium" usage="TIME" formatindex="42">
+ <FormatCode>HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43">
+ <FormatCode>[HH]:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44">
+ <FormatCode>MM:SS,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45">
+ <FormatCode>[HH]:MM:SS,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
+ <FormatCode>DD.MM.YY HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
+ <FormatCode>DD.MM.YYYY HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ </LC_FORMAT>
+ <LC_COLLATION>
+ <Collator default="true" unoid="alphanumeric"/>
+ <CollationOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </CollationOptions>
+ </LC_COLLATION>
+ <LC_SEARCH>
+ <SearchOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </SearchOptions>
+ </LC_SEARCH>
+ <LC_INDEX>
+ <IndexKey phonetic="false" default="true" unoid="alphanumeric">A-Ž</IndexKey>
+ <UnicodeScript>0</UnicodeScript>
+ <UnicodeScript>1</UnicodeScript>
+ <UnicodeScript>2</UnicodeScript>
+ <FollowPageWord>lpp.</FollowPageWord>
+ <FollowPageWord>lpp.</FollowPageWord>
+ </LC_INDEX>
+ <LC_CALENDAR>
+ <Calendar unoid="gregorian" default="true">
+ <DaysOfWeek>
+ <Day>
+ <DayID>sun</DayID>
+ <DefaultAbbrvName>Sv</DefaultAbbrvName>
+ <DefaultFullName>svātdīne</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>mon</DayID>
+ <DefaultAbbrvName>P</DefaultAbbrvName>
+ <DefaultFullName>pyrmūdīne</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>tue</DayID>
+ <DefaultAbbrvName>Ū</DefaultAbbrvName>
+ <DefaultFullName>ūtardīne</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>wed</DayID>
+ <DefaultAbbrvName>T</DefaultAbbrvName>
+ <DefaultFullName>trešdīne</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>thu</DayID>
+ <DefaultAbbrvName>C</DefaultAbbrvName>
+ <DefaultFullName>catūrtdīne</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>fri</DayID>
+ <DefaultAbbrvName>Pk</DefaultAbbrvName>
+ <DefaultFullName>pīktdīne</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>sat</DayID>
+ <DefaultAbbrvName>S</DefaultAbbrvName>
+ <DefaultFullName>sastdīne</DefaultFullName>
+ </Day>
+ </DaysOfWeek>
+ <MonthsOfYear>
+ <Month>
+ <MonthID>jan</MonthID>
+ <DefaultAbbrvName>Jan</DefaultAbbrvName>
+ <DefaultFullName>janvars</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>feb</MonthID>
+ <DefaultAbbrvName>Peb</DefaultAbbrvName>
+ <DefaultFullName>pebraļs</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>mar</MonthID>
+ <DefaultAbbrvName>Mar</DefaultAbbrvName>
+ <DefaultFullName>marts</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>apr</MonthID>
+ <DefaultAbbrvName>Apr</DefaultAbbrvName>
+ <DefaultFullName>apreļs</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>may</MonthID>
+ <DefaultAbbrvName>Maj</DefaultAbbrvName>
+ <DefaultFullName>majs</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jun</MonthID>
+ <DefaultAbbrvName>Juņ</DefaultAbbrvName>
+ <DefaultFullName>juņs</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jul</MonthID>
+ <DefaultAbbrvName>Juļ</DefaultAbbrvName>
+ <DefaultFullName>juļs</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>aug</MonthID>
+ <DefaultAbbrvName>Aug</DefaultAbbrvName>
+ <DefaultFullName>augusts</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>sep</MonthID>
+ <DefaultAbbrvName>Seņ</DefaultAbbrvName>
+ <DefaultFullName>seņtebris</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>oct</MonthID>
+ <DefaultAbbrvName>Okt</DefaultAbbrvName>
+ <DefaultFullName>oktebris</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>nov</MonthID>
+ <DefaultAbbrvName>Noj</DefaultAbbrvName>
+ <DefaultFullName>nojabris</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>dec</MonthID>
+ <DefaultAbbrvName>Dek</DefaultAbbrvName>
+ <DefaultFullName>dekabris</DefaultFullName>
+ </Month>
+ </MonthsOfYear>
+ <Eras>
+ <Era>
+ <EraID>bc</EraID>
+ <DefaultAbbrvName>p.k.</DefaultAbbrvName>
+ <DefaultFullName>pyrms Kristus</DefaultFullName>
+ </Era>
+ <Era>
+ <EraID>ad</EraID>
+ <DefaultAbbrvName>AD</DefaultAbbrvName>
+ <DefaultFullName>pec Kristus</DefaultFullName>
+ </Era>
+ </Eras>
+ <StartDayOfWeek>
+ <DayID>mon</DayID>
+ </StartDayOfWeek>
+ <MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek>
+ </Calendar>
+ </LC_CALENDAR>
+ <LC_CURRENCY>
+ <Currency default="true" usedInCompatibleFormatCodes="true">
+ <CurrencyID>LVL</CurrencyID>
+ <CurrencySymbol>Ls</CurrencySymbol>
+ <BankSymbol>LVL</BankSymbol>
+ <CurrencyName>Lats</CurrencyName>
+ <DecimalPlaces>2</DecimalPlaces>
+ </Currency>
+ </LC_CURRENCY>
+ <LC_TRANSLITERATION>
+ <Transliteration unoid="LOWERCASE_UPPERCASE"/>
+ <Transliteration unoid="UPPERCASE_LOWERCASE"/>
+ <Transliteration unoid="IGNORE_CASE"/>
+ </LC_TRANSLITERATION>
+ <LC_MISC>
+ <ReservedWords>
+ <trueWord>patīss</trueWord>
+ <falseWord>oploms</falseWord>
+ <quarter1Word>1. catūrksnis</quarter1Word>
+ <quarter2Word>2. catūrksnis</quarter2Word>
+ <quarter3Word>3. catūrksnis</quarter3Word>
+ <quarter4Word>4. catūrksnis</quarter4Word>
+ <aboveWord>viers</aboveWord>
+ <belowWord>zam</belowWord>
+ <quarter1Abbreviation>C1</quarter1Abbreviation>
+ <quarter2Abbreviation>C2</quarter2Abbreviation>
+ <quarter3Abbreviation>C3</quarter3Abbreviation>
+ <quarter4Abbreviation>C4</quarter4Abbreviation>
+ </ReservedWords>
+ </LC_MISC>
+ <LC_NumberingLevel ref="lv_LV"/>
+ <LC_OutLineNumberingLevel ref="lv_LV"/>
+</Locale>
+<!--Version 1.0 -->
diff --git a/i18npool/source/localedata/data/lv_LV.xml b/i18npool/source/localedata/data/lv_LV.xml
index e29a06eaf274..27bb0f13e409 100644
--- a/i18npool/source/localedata/data/lv_LV.xml
+++ b/i18npool/source/localedata/data/lv_LV.xml
@@ -1,462 +1,415 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Locale SYSTEM 'locale.dtd'>
<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.2">
-<LC_INFO>
-<Language>
-<LangID>lv</LangID>
-<DefaultName>Latvian</DefaultName>
-</Language>
-<Country>
-<CountryID>LV</CountryID>
-<DefaultName>Latvia</DefaultName>
-</Country>
-<Platform>
-<PlatformID>generic</PlatformID>
-</Platform>
-</LC_INFO>
-<LC_CTYPE unoid="generic">
-<Separators>
-<DateSeparator>.</DateSeparator>
-<ThousandSeparator> </ThousandSeparator>
-<DecimalSeparator>,</DecimalSeparator>
-<TimeSeparator>:</TimeSeparator>
-<Time100SecSeparator>,</Time100SecSeparator>
-<ListSeparator>;</ListSeparator>
-<LongDateDayOfWeekSeparator></LongDateDayOfWeekSeparator>
-<LongDateDaySeparator> </LongDateDaySeparator>
-<LongDateMonthSeparator> </LongDateMonthSeparator>
-<LongDateYearSeparator> g.</LongDateYearSeparator>
-</Separators>
-<Markers>
-<QuotationStart>‘</QuotationStart>
-<QuotationEnd>’</QuotationEnd>
-<DoubleQuotationStart>“</DoubleQuotationStart>
-<DoubleQuotationEnd>”</DoubleQuotationEnd>
-</Markers>
-<TimeAM>AM</TimeAM>
-<TimePM>PM</TimePM>
-<MeasurementSystem>Metric</MeasurementSystem>
-</LC_CTYPE>
-<LC_FORMAT>
-<FormatElement msgid="DateFormatskey1" default="true" type="short" usage="DATE" formatindex="18">
-<FormatCode>D.M.YY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="28">
-<FormatCode>NN DD MMM YY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="34">
-<FormatCode>MM.YY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="35">
-<FormatCode>MMM DD</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="36">
-<FormatCode>MMMM</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey6" default="false" type="medium" usage="DATE" formatindex="37">
-<FormatCode>QQ YY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="21">
-<FormatCode>DD.MM.YYYY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey8" default="true" type="medium" usage="DATE" formatindex="20">
-<FormatCode>DD.MM.YY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey9" default="true" type="long" usage="DATE" formatindex="19">
-<FormatCode>DD. NNNNMMMM, YYYY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey10" default="false" type="long" usage="DATE" formatindex="22">
-<FormatCode>D. MMM, YY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey11" default="false" type="long" usage="DATE" formatindex="23">
-<FormatCode>D. MMM, YYYY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey12" default="false" type="long" usage="DATE" formatindex="25">
-<FormatCode>D. MMMM, YYYY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey13" default="false" type="long" usage="DATE" formatindex="27">
-<FormatCode>NN, D. MMMM, YY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey14" default="false" type="long" usage="DATE" formatindex="29">
-<FormatCode>NN, D. MMMM, YYYY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="30">
-<FormatCode>NNNNMMMM D, YYYY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="24">
-<FormatCode>D. MMM. YYYY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="26">
-<FormatCode>D. MMMM YYYY</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey18" default="false" type="short" usage="DATE" formatindex="31">
-<FormatCode>DD-MM</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey19" default="false" type="medium" usage="DATE" formatindex="32">
-<FormatCode>YY-MM-DD</FormatCode>
-<DefaultName>ISO 8601</DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey20" default="false" type="medium" usage="DATE" formatindex="33">
-<FormatCode>YYYY-MM-DD</FormatCode>
-<DefaultName>ISO 8601</DefaultName>
-</FormatElement>
-<FormatElement msgid="DateFormatskey21" default="false" type="medium" usage="DATE" formatindex="38">
-<FormatCode>WW</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="TimeFormatskey1" default="true" type="short" usage="TIME" formatindex="39">
-<FormatCode>HH:MM</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="TimeFormatskey2" default="true" type="medium" usage="TIME" formatindex="40">
-<FormatCode>HH:MM:SS</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="TimeFormatskey3" default="false" type="short" usage="TIME" formatindex="41">
-<FormatCode>HH:MM AM/PM</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="TimeFormatskey4" default="false" type="medium" usage="TIME" formatindex="42">
-<FormatCode>HH:MM:SS AM/PM</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43">
-<FormatCode>[HH]:MM:SS</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44">
-<FormatCode>MM:SS,00</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45">
-<FormatCode>[HH]:MM:SS,00</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
-<FormatCode>DD.MM.YY HH:MM</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
-<FormatCode>DD.MM.YYYY HH:MM:SS</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
-<FormatCode>Standard</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1">
-<FormatCode>0</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2">
-<FormatCode>0,00</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3">
-<FormatCode># ##0</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4">
-<FormatCode># ##0,00</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
-<FormatCode># ###,00</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12">
-<FormatCode># ##0[$Ls-426];-# ##0[$Ls-426]</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13">
-<FormatCode># ##0,00[$Ls-426];-# ##0,00[$Ls-426]</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14">
-<FormatCode># ##0[$Ls-426];[RED]-# ##0[$Ls-426]</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15">
-<FormatCode># ##0,00[$Ls-426];[RED]-# ##0,00[$Ls-426]</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16">
-<FormatCode># ##0,00 CCC</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17">
-<FormatCode># ##0,--[$Ls-426];[RED]-# ##0,--[$Ls-426]</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8">
-<FormatCode>0%</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9">
-<FormatCode>0,00%</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
-<FormatCode>0,00E+000</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-<FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7">
-<FormatCode>0,00E+00</FormatCode>
-<DefaultName></DefaultName>
-</FormatElement>
-</LC_FORMAT>
-<LC_COLLATION>
-<Collator unoid="alphanumeric" default="true"/>
-<CollationOptions>
-<TransliterationModules>IGNORE_CASE</TransliterationModules>
-</CollationOptions>
-</LC_COLLATION>
-<LC_SEARCH>
-<SearchOptions>
-<TransliterationModules>IGNORE_CASE</TransliterationModules>
-</SearchOptions>
-</LC_SEARCH>
-<LC_INDEX>
-<IndexKey unoid="alphanumeric" default="true" phonetic="false">A-Y Č Ģ Ķ Ļ Ņ Š Ž</IndexKey>
-<UnicodeScript>0</UnicodeScript>
-<UnicodeScript>1</UnicodeScript>
-<UnicodeScript>2</UnicodeScript>
-<FollowPageWord>p.</FollowPageWord>
-<FollowPageWord>pp.</FollowPageWord>
-</LC_INDEX>
-<LC_CALENDAR>
-<Calendar unoid="gregorian" default="true">
-<DaysOfWeek>
-<Day>
-<DayID>sun</DayID>
-<DefaultAbbrvName>Sv</DefaultAbbrvName>
-<DefaultFullName>svētdiena</DefaultFullName>
-</Day>
-<Day>
-<DayID>mon</DayID>
-<DefaultAbbrvName>P</DefaultAbbrvName>
-<DefaultFullName>pirmdiena</DefaultFullName>
-</Day>
-<Day>
-<DayID>tue</DayID>
-<DefaultAbbrvName>O</DefaultAbbrvName>
-<DefaultFullName>otrdiena</DefaultFullName>
-</Day>
-<Day>
-<DayID>wed</DayID>
-<DefaultAbbrvName>T</DefaultAbbrvName>
-<DefaultFullName>trešdiena</DefaultFullName>
-</Day>
-<Day>
-<DayID>thu</DayID>
-<DefaultAbbrvName>C</DefaultAbbrvName>
-<DefaultFullName>ceturtdiena</DefaultFullName>
-</Day>
-<Day>
-<DayID>fri</DayID>
-<DefaultAbbrvName>Pk</DefaultAbbrvName>
-<DefaultFullName>piektdiena</DefaultFullName>
-</Day>
-<Day>
-<DayID>sat</DayID>
-<DefaultAbbrvName>S</DefaultAbbrvName>
-<DefaultFullName>sestdiena</DefaultFullName>
-</Day>
-</DaysOfWeek>
-<MonthsOfYear>
-<Month>
-<MonthID>jan</MonthID>
-<DefaultAbbrvName>jan</DefaultAbbrvName>
-<DefaultFullName>janvāris</DefaultFullName>
-</Month>
-<Month>
-<MonthID>feb</MonthID>
-<DefaultAbbrvName>feb</DefaultAbbrvName>
-<DefaultFullName>februāris</DefaultFullName>
-</Month>
-<Month>
-<MonthID>mar</MonthID>
-<DefaultAbbrvName>mar</DefaultAbbrvName>
-<DefaultFullName>marts</DefaultFullName>
-</Month>
-<Month>
-<MonthID>apr</MonthID>
-<DefaultAbbrvName>apr</DefaultAbbrvName>
-<DefaultFullName>aprīlis</DefaultFullName>
-</Month>
-<Month>
-<MonthID>may</MonthID>
-<DefaultAbbrvName>mai</DefaultAbbrvName>
-<DefaultFullName>maijs</DefaultFullName>
-</Month>
-<Month>
-<MonthID>jun</MonthID>
-<DefaultAbbrvName>jūn</DefaultAbbrvName>
-<DefaultFullName>jūnijs</DefaultFullName>
-</Month>
-<Month>
-<MonthID>jul</MonthID>
-<DefaultAbbrvName>jūl</DefaultAbbrvName>
-<DefaultFullName>jūlijs</DefaultFullName>
-</Month>
-<Month>
-<MonthID>aug</MonthID>
-<DefaultAbbrvName>aug</DefaultAbbrvName>
-<DefaultFullName>augusts</DefaultFullName>
-</Month>
-<Month>
-<MonthID>sep</MonthID>
-<DefaultAbbrvName>sep</DefaultAbbrvName>
-<DefaultFullName>septembris</DefaultFullName>
-</Month>
-<Month>
-<MonthID>oct</MonthID>
-<DefaultAbbrvName>okt</DefaultAbbrvName>
-<DefaultFullName>oktobris</DefaultFullName>
-</Month>
-<Month>
-<MonthID>nov</MonthID>
-<DefaultAbbrvName>nov</DefaultAbbrvName>
-<DefaultFullName>novembris</DefaultFullName>
-</Month>
-<Month>
-<MonthID>dec</MonthID>
-<DefaultAbbrvName>dec</DefaultAbbrvName>
-<DefaultFullName>decembris</DefaultFullName>
-</Month>
-</MonthsOfYear>
-<Eras>
-<Era>
-<EraID>bc</EraID>
-<DefaultAbbrvName>pmē</DefaultAbbrvName>
-<DefaultFullName>pirms mūsu ēras</DefaultFullName>
-</Era>
-<Era>
-<EraID>ad</EraID>
-<DefaultAbbrvName>mē</DefaultAbbrvName>
-<DefaultFullName>mūsu ērā</DefaultFullName>
-</Era>
-</Eras>
-<StartDayOfWeek>
-<DayID>mon</DayID>
-</StartDayOfWeek>
-<MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek>
-</Calendar>
-</LC_CALENDAR>
-<LC_CURRENCY>
-<Currency default="true" usedInCompatibleFormatCodes="true">
-<CurrencyID>LVL</CurrencyID>
-<CurrencySymbol>Ls</CurrencySymbol>
-<BankSymbol>LVL</BankSymbol>
-<CurrencyName>Lats</CurrencyName>
-<DecimalPlaces>2</DecimalPlaces>
-</Currency>
-</LC_CURRENCY>
-<LC_TRANSLITERATION>
-<Transliteration unoid="UPPERCASE_LOWERCASE"/>
-<Transliteration unoid="IGNORE_CASE"/>
-<Transliteration unoid="LOWERCASE_UPPERCASE" />
-</LC_TRANSLITERATION>
-<LC_MISC>
-<ReservedWords>
-<trueWord>patiess</trueWord>
-<falseWord>aplams</falseWord>
-<quarter1Word>1. ceturksnis</quarter1Word>
-<quarter2Word>2. ceturksnis</quarter2Word>
-<quarter3Word>3. ceturksnis</quarter3Word>
-<quarter4Word>4. ceturksnis</quarter4Word>
-<aboveWord>augstāk</aboveWord>
-<belowWord>zemāk</belowWord>
-<quarter1Abbreviation>C1</quarter1Abbreviation>
-<quarter2Abbreviation>C2</quarter2Abbreviation>
-<quarter3Abbreviation>C3</quarter3Abbreviation>
-<quarter4Abbreviation>C4</quarter4Abbreviation>
-</ReservedWords>
-</LC_MISC>
-<LC_NumberingLevel>
-<NumberingLevel Prefix=" " NumType="4" Suffix=")" />
-<NumberingLevel Prefix=" " NumType="4" Suffix="." />
-<NumberingLevel Prefix="(" NumType="4" Suffix="." />
-<NumberingLevel Prefix=" " NumType="2" Suffix="." />
-<NumberingLevel Prefix=" " NumType="0" Suffix=")" />
-<NumberingLevel Prefix=" " NumType="1" Suffix=")" />
-<NumberingLevel Prefix="(" NumType="1" Suffix=")" />
-<NumberingLevel Prefix=" " NumType="3" Suffix="." />
-</LC_NumberingLevel>
-<LC_OutLineNumberingLevel>
-<OutlineStyle>
-<OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="1" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="1" Suffix=")" BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
-</OutlineStyle>
-<OutlineStyle>
-<OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="1" Suffix=")" BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
-</OutlineStyle>
-<OutlineStyle>
-<OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix="(" NumType="1" Suffix=")" BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="3" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="0" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="6" Suffix="." BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
-</OutlineStyle>
-<OutlineStyle>
-<OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
-</OutlineStyle>
-<OutlineStyle>
-<OutLineNumberingLevel Prefix=" " NumType="2" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="0" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="3" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="1" Suffix=")" BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
-</OutlineStyle>
-<OutlineStyle>
-<OutLineNumberingLevel Prefix=" " NumType="0" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="2" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="1" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="3" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
-</OutlineStyle>
-<OutlineStyle>
-<OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="1" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="2" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="3" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="4" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
-</OutlineStyle>
-<OutlineStyle>
-<OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="27A2" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="E006" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="6" Suffix=")" BulletChar="E004" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
-<OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
-</OutlineStyle>
-</LC_OutLineNumberingLevel>
+ <LC_INFO>
+ <Language>
+ <LangID>lv</LangID>
+ <DefaultName>Latvian</DefaultName>
+ </Language>
+ <Country>
+ <CountryID>LV</CountryID>
+ <DefaultName>Latvia</DefaultName>
+ </Country>
+ </LC_INFO>
+ <LC_CTYPE unoid="generic">
+ <Separators>
+ <DateSeparator>.</DateSeparator>
+ <ThousandSeparator> </ThousandSeparator>
+ <DecimalSeparator>,</DecimalSeparator>
+ <TimeSeparator>:</TimeSeparator>
+ <Time100SecSeparator>,</Time100SecSeparator>
+ <ListSeparator>;</ListSeparator>
+ <LongDateDayOfWeekSeparator></LongDateDayOfWeekSeparator>
+ <LongDateDaySeparator> </LongDateDaySeparator>
+ <LongDateMonthSeparator> </LongDateMonthSeparator>
+ <LongDateYearSeparator> g.</LongDateYearSeparator>
+ </Separators>
+ <Markers>
+ <QuotationStart>‘</QuotationStart>
+ <QuotationEnd>’</QuotationEnd>
+ <DoubleQuotationStart>“</DoubleQuotationStart>
+ <DoubleQuotationEnd>”</DoubleQuotationEnd>
+ </Markers>
+ <TimeAM>AM</TimeAM>
+ <TimePM>PM</TimePM>
+ <MeasurementSystem>metric</MeasurementSystem>
+ </LC_CTYPE>
+ <LC_FORMAT>
+ <FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
+ <FormatCode>Standard</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1">
+ <FormatCode>0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2">
+ <FormatCode>0,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3">
+ <FormatCode># ##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4">
+ <FormatCode># ##0,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+ <FormatCode># ###,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+ <FormatCode>0,00E+000</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7">
+ <FormatCode>0,00E+00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8">
+ <FormatCode>0%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9">
+ <FormatCode>0,00%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12">
+ <FormatCode># ##0[$Ls-426];-# ##0[$Ls-426]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13">
+ <FormatCode># ##0,00[$Ls-426];-# ##0,00[$Ls-426]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14">
+ <FormatCode># ##0[$Ls-426];[RED]-# ##0[$Ls-426]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15">
+ <FormatCode># ##0,00[$Ls-426];[RED]-# ##0,00[$Ls-426]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16">
+ <FormatCode># ##0,00 CCC</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17">
+ <FormatCode># ##0,--[$Ls-426];[RED]-# ##0,--[$Ls-426]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey1" default="true" type="short" usage="DATE" formatindex="18">
+ <FormatCode>D.M.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey9" default="true" type="long" usage="DATE" formatindex="19">
+ <FormatCode>DD. NNNNMMMM, YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey8" default="true" type="medium" usage="DATE" formatindex="20">
+ <FormatCode>DD.MM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="21">
+ <FormatCode>DD.MM.YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey10" default="false" type="long" usage="DATE" formatindex="22">
+ <FormatCode>D. MMM, YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey11" default="false" type="long" usage="DATE" formatindex="23">
+ <FormatCode>D. MMM, YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="24">
+ <FormatCode>D. MMM. YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey12" default="false" type="long" usage="DATE" formatindex="25">
+ <FormatCode>D. MMMM, YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="26">
+ <FormatCode>D. MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey13" default="false" type="long" usage="DATE" formatindex="27">
+ <FormatCode>NN, D. MMMM, YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="28">
+ <FormatCode>NN DD MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey14" default="false" type="long" usage="DATE" formatindex="29">
+ <FormatCode>NN, D. MMMM, YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="30">
+ <FormatCode>NNNNMMMM D, YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey18" default="false" type="short" usage="DATE" formatindex="31">
+ <FormatCode>DD-MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey19" default="false" type="medium" usage="DATE" formatindex="32">
+ <FormatCode>YY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey20" default="false" type="medium" usage="DATE" formatindex="33">
+ <FormatCode>YYYY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="34">
+ <FormatCode>MM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="35">
+ <FormatCode>MMM DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="36">
+ <FormatCode>MMMM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey6" default="false" type="medium" usage="DATE" formatindex="37">
+ <FormatCode>QQ YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey21" default="false" type="medium" usage="DATE" formatindex="38">
+ <FormatCode>WW</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey1" default="true" type="short" usage="TIME" formatindex="39">
+ <FormatCode>HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey2" default="true" type="medium" usage="TIME" formatindex="40">
+ <FormatCode>HH:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey3" default="false" type="short" usage="TIME" formatindex="41">
+ <FormatCode>HH:MM AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey4" default="false" type="medium" usage="TIME" formatindex="42">
+ <FormatCode>HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43">
+ <FormatCode>[HH]:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44">
+ <FormatCode>MM:SS,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45">
+ <FormatCode>[HH]:MM:SS,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
+ <FormatCode>DD.MM.YY HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
+ <FormatCode>DD.MM.YYYY HH:MM:SS</FormatCode>
+ </FormatElement>
+ </LC_FORMAT>
+ <LC_COLLATION>
+ <Collator unoid="alphanumeric" default="true"/>
+ <CollationOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </CollationOptions>
+ </LC_COLLATION>
+ <LC_SEARCH>
+ <SearchOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </SearchOptions>
+ </LC_SEARCH>
+ <LC_INDEX>
+ <IndexKey unoid="alphanumeric" default="true" phonetic="false">A-Y Č Ģ Ķ Ļ Ņ Š Ž</IndexKey>
+ <UnicodeScript>0</UnicodeScript>
+ <UnicodeScript>1</UnicodeScript>
+ <UnicodeScript>2</UnicodeScript>
+ <FollowPageWord>p.</FollowPageWord>
+ <FollowPageWord>pp.</FollowPageWord>
+ </LC_INDEX>
+ <LC_CALENDAR>
+ <Calendar unoid="gregorian" default="true">
+ <DaysOfWeek>
+ <Day>
+ <DayID>sun</DayID>
+ <DefaultAbbrvName>Sv</DefaultAbbrvName>
+ <DefaultFullName>svētdiena</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>mon</DayID>
+ <DefaultAbbrvName>P</DefaultAbbrvName>
+ <DefaultFullName>pirmdiena</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>tue</DayID>
+ <DefaultAbbrvName>O</DefaultAbbrvName>
+ <DefaultFullName>otrdiena</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>wed</DayID>
+ <DefaultAbbrvName>T</DefaultAbbrvName>
+ <DefaultFullName>trešdiena</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>thu</DayID>
+ <DefaultAbbrvName>C</DefaultAbbrvName>
+ <DefaultFullName>ceturtdiena</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>fri</DayID>
+ <DefaultAbbrvName>Pk</DefaultAbbrvName>
+ <DefaultFullName>piektdiena</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>sat</DayID>
+ <DefaultAbbrvName>S</DefaultAbbrvName>
+ <DefaultFullName>sestdiena</DefaultFullName>
+ </Day>
+ </DaysOfWeek>
+ <MonthsOfYear>
+ <Month>
+ <MonthID>jan</MonthID>
+ <DefaultAbbrvName>jan</DefaultAbbrvName>
+ <DefaultFullName>janvāris</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>feb</MonthID>
+ <DefaultAbbrvName>feb</DefaultAbbrvName>
+ <DefaultFullName>februāris</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>mar</MonthID>
+ <DefaultAbbrvName>mar</DefaultAbbrvName>
+ <DefaultFullName>marts</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>apr</MonthID>
+ <DefaultAbbrvName>apr</DefaultAbbrvName>
+ <DefaultFullName>aprīlis</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>may</MonthID>
+ <DefaultAbbrvName>mai</DefaultAbbrvName>
+ <DefaultFullName>maijs</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jun</MonthID>
+ <DefaultAbbrvName>jūn</DefaultAbbrvName>
+ <DefaultFullName>jūnijs</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jul</MonthID>
+ <DefaultAbbrvName>jūl</DefaultAbbrvName>
+ <DefaultFullName>jūlijs</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>aug</MonthID>
+ <DefaultAbbrvName>aug</DefaultAbbrvName>
+ <DefaultFullName>augusts</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>sep</MonthID>
+ <DefaultAbbrvName>sep</DefaultAbbrvName>
+ <DefaultFullName>septembris</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>oct</MonthID>
+ <DefaultAbbrvName>okt</DefaultAbbrvName>
+ <DefaultFullName>oktobris</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>nov</MonthID>
+ <DefaultAbbrvName>nov</DefaultAbbrvName>
+ <DefaultFullName>novembris</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>dec</MonthID>
+ <DefaultAbbrvName>dec</DefaultAbbrvName>
+ <DefaultFullName>decembris</DefaultFullName>
+ </Month>
+ </MonthsOfYear>
+ <Eras>
+ <Era>
+ <EraID>bc</EraID>
+ <DefaultAbbrvName>pmē</DefaultAbbrvName>
+ <DefaultFullName>pirms mūsu ēras</DefaultFullName>
+ </Era>
+ <Era>
+ <EraID>ad</EraID>
+ <DefaultAbbrvName>mē</DefaultAbbrvName>
+ <DefaultFullName>mūsu ērā</DefaultFullName>
+ </Era>
+ </Eras>
+ <StartDayOfWeek>
+ <DayID>mon</DayID>
+ </StartDayOfWeek>
+ <MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek>
+ </Calendar>
+ </LC_CALENDAR>
+ <LC_CURRENCY>
+ <Currency default="true" usedInCompatibleFormatCodes="true">
+ <CurrencyID>LVL</CurrencyID>
+ <CurrencySymbol>Ls</CurrencySymbol>
+ <BankSymbol>LVL</BankSymbol>
+ <CurrencyName>Lats</CurrencyName>
+ <DecimalPlaces>2</DecimalPlaces>
+ </Currency>
+ </LC_CURRENCY>
+ <LC_TRANSLITERATION>
+ <Transliteration unoid="UPPERCASE_LOWERCASE"/>
+ <Transliteration unoid="IGNORE_CASE"/>
+ <Transliteration unoid="LOWERCASE_UPPERCASE" />
+ </LC_TRANSLITERATION>
+ <LC_MISC>
+ <ReservedWords>
+ <trueWord>patiess</trueWord>
+ <falseWord>aplams</falseWord>
+ <quarter1Word>1. ceturksnis</quarter1Word>
+ <quarter2Word>2. ceturksnis</quarter2Word>
+ <quarter3Word>3. ceturksnis</quarter3Word>
+ <quarter4Word>4. ceturksnis</quarter4Word>
+ <aboveWord>augstāk</aboveWord>
+ <belowWord>zemāk</belowWord>
+ <quarter1Abbreviation>C1</quarter1Abbreviation>
+ <quarter2Abbreviation>C2</quarter2Abbreviation>
+ <quarter3Abbreviation>C3</quarter3Abbreviation>
+ <quarter4Abbreviation>C4</quarter4Abbreviation>
+ </ReservedWords>
+ </LC_MISC>
+ <LC_NumberingLevel>
+ <NumberingLevel Prefix=" " NumType="4" Suffix=")" />
+ <NumberingLevel Prefix=" " NumType="4" Suffix="." />
+ <NumberingLevel Prefix="(" NumType="4" Suffix="." />
+ <NumberingLevel Prefix=" " NumType="2" Suffix="." />
+ <NumberingLevel Prefix=" " NumType="0" Suffix=")" />
+ <NumberingLevel Prefix=" " NumType="1" Suffix=")" />
+ <NumberingLevel Prefix="(" NumType="1" Suffix=")" />
+ <NumberingLevel Prefix=" " NumType="3" Suffix="." />
+ </LC_NumberingLevel>
+ <LC_OutLineNumberingLevel>
+ <OutlineStyle>
+ <OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="1" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="1" Suffix=")" BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
+ </OutlineStyle>
+ <OutlineStyle>
+ <OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="1" Suffix=")" BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
+ </OutlineStyle>
+ <OutlineStyle>
+ <OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix="(" NumType="1" Suffix=")" BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="3" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="0" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="6" Suffix="." BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
+ </OutlineStyle>
+ <OutlineStyle>
+ <OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="4" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
+ </OutlineStyle>
+ <OutlineStyle>
+ <OutLineNumberingLevel Prefix=" " NumType="2" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="0" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="3" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="1" Suffix=")" BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
+ </OutlineStyle>
+ <OutlineStyle>
+ <OutLineNumberingLevel Prefix=" " NumType="0" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="2" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="1" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="3" Suffix="." BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
+ </OutlineStyle>
+ <OutlineStyle>
+ <OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="1" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="2" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="3" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="4" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
+ </OutlineStyle>
+ <OutlineStyle>
+ <OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="27A2" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="E006" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="6" Suffix=")" BulletChar="E004" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" />
+ <OutLineNumberingLevel Prefix=" " NumType="6" Suffix=" " BulletChar="2022" BulletFontName="StarSymbol" ParentNumbering="0" LeftMargin="200" SymbolTextDistance="50" FirstLineOffset="0" />
+ </OutlineStyle>
+ </LC_OutLineNumberingLevel>
</Locale>
diff --git a/i18npool/source/localedata/data/makefile.mk b/i18npool/source/localedata/data/makefile.mk
index fe31d176f682..2591b70fb63d 100644
--- a/i18npool/source/localedata/data/makefile.mk
+++ b/i18npool/source/localedata/data/makefile.mk
@@ -151,6 +151,7 @@ MY_MISC_CXXFILES = \
$(MISC)$/localedata_hi_IN.cxx \
$(MISC)$/localedata_hil_PH.cxx \
$(MISC)$/localedata_hr_HR.cxx \
+ $(MISC)$/localedata_hsb_DE.cxx \
$(MISC)$/localedata_hu_HU.cxx \
$(MISC)$/localedata_hy_AM.cxx \
$(MISC)$/localedata_ia.cxx \
@@ -173,6 +174,7 @@ MY_MISC_CXXFILES = \
$(MISC)$/localedata_ln_CD.cxx \
$(MISC)$/localedata_lo_LA.cxx \
$(MISC)$/localedata_lt_LT.cxx \
+ $(MISC)$/localedata_ltg_LV.cxx \
$(MISC)$/localedata_lv_LV.cxx \
$(MISC)$/localedata_mk_MK.cxx \
$(MISC)$/localedata_ml_IN.cxx \
@@ -194,6 +196,7 @@ MY_MISC_CXXFILES = \
$(MISC)$/localedata_or_IN.cxx \
$(MISC)$/localedata_pa_IN.cxx \
$(MISC)$/localedata_pl_PL.cxx \
+ $(MISC)$/localedata_plt_MG.cxx \
$(MISC)$/localedata_pt_BR.cxx \
$(MISC)$/localedata_pt_PT.cxx \
$(MISC)$/localedata_ro_RO.cxx \
@@ -353,6 +356,7 @@ SHL3OBJS= \
$(SLO)$/localedata_ga_IE.obj \
$(SLO)$/localedata_gsc_FR.obj \
$(SLO)$/localedata_hr_HR.obj \
+ $(SLO)$/localedata_hsb_DE.obj \
$(SLO)$/localedata_is_IS.obj \
$(SLO)$/localedata_it_CH.obj \
$(SLO)$/localedata_it_IT.obj \
@@ -361,6 +365,7 @@ SHL3OBJS= \
$(SLO)$/localedata_la_VA.obj \
$(SLO)$/localedata_lb_LU.obj \
$(SLO)$/localedata_lt_LT.obj \
+ $(SLO)$/localedata_ltg_LV.obj \
$(SLO)$/localedata_lv_LV.obj \
$(SLO)$/localedata_mk_MK.obj \
$(SLO)$/localedata_mt_MT.obj \
@@ -455,6 +460,7 @@ SHL4OBJS= \
$(SLO)$/localedata_om_ET.obj \
$(SLO)$/localedata_or_IN.obj \
$(SLO)$/localedata_pa_IN.obj \
+ $(SLO)$/localedata_plt_MG.obj \
$(SLO)$/localedata_rw_RW.obj \
$(SLO)$/localedata_sg_CF.obj \
$(SLO)$/localedata_shs_CA.obj \
diff --git a/i18npool/source/localedata/data/plt_MG.xml b/i18npool/source/localedata/data/plt_MG.xml
new file mode 100644
index 000000000000..63906044f6e3
--- /dev/null
+++ b/i18npool/source/localedata/data/plt_MG.xml
@@ -0,0 +1,358 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE Locale SYSTEM 'locale.dtd'>
+<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.0">
+ <LC_INFO>
+ <Language>
+ <LangID>plt</LangID>
+ <DefaultName>Malagasy, Plateau</DefaultName>
+ </Language>
+ <Country>
+ <CountryID>MG</CountryID>
+ <DefaultName>Madagascar</DefaultName>
+ </Country>
+ </LC_INFO>
+ <LC_CTYPE unoid="generic">
+ <Separators>
+ <DateSeparator>.</DateSeparator>
+ <ThousandSeparator>.</ThousandSeparator>
+ <DecimalSeparator>,</DecimalSeparator>
+ <TimeSeparator>:</TimeSeparator>
+ <Time100SecSeparator>.</Time100SecSeparator>
+ <ListSeparator>;</ListSeparator>
+ <LongDateDayOfWeekSeparator>, </LongDateDayOfWeekSeparator>
+ <LongDateDaySeparator>, </LongDateDaySeparator>
+ <LongDateMonthSeparator> </LongDateMonthSeparator>
+ <LongDateYearSeparator> </LongDateYearSeparator>
+ </Separators>
+ <Markers>
+ <QuotationStart>“</QuotationStart>
+ <QuotationEnd>”</QuotationEnd>
+ <DoubleQuotationStart>‘</DoubleQuotationStart>
+ <DoubleQuotationEnd>’</DoubleQuotationEnd>
+ </Markers>
+ <TimeAM>AM</TimeAM>
+ <TimePM>PM</TimePM>
+ <MeasurementSystem>metric</MeasurementSystem>
+ </LC_CTYPE>
+ <LC_FORMAT replaceFrom="[CURRENCY]" replaceTo="[$Ar.-64F]">
+ <FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0">
+ <FormatCode>General</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1">
+ <FormatCode>0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2">
+ <FormatCode>0,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3">
+ <FormatCode>#.##0</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4">
+ <FormatCode>#.##0,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5">
+ <FormatCode>#.###,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6">
+ <FormatCode>0,00E+00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7">
+ <FormatCode>0,00E+000</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8">
+ <FormatCode>0%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9">
+ <FormatCode>0,00%</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12">
+ <FormatCode>#.##0 [CURRENCY];- #.##0 [CURRENCY]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13">
+ <FormatCode>#.##0,00 [CURRENCY];- #.##0,00 [CURRENCY]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14">
+ <FormatCode>#.##0 [CURRENCY];[RED]- #.##0 [CURRENCY]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15">
+ <FormatCode>#.##0,00 [CURRENCY];[RED]- #.##0,00 [CURRENCY]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16">
+ <FormatCode>CCC#.##0,00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17">
+ <FormatCode>#.##0,-- [CURRENCY];[RED]- #.##0,-- [CURRENCY]</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey11" default="true" type="short" usage="DATE" formatindex="18">
+ <FormatCode>D.MM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey14" default="true" type="long" usage="DATE" formatindex="19">
+ <FormatCode>NNNNDD, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey6" default="true" type="medium" usage="DATE" formatindex="20">
+ <FormatCode>DD.MM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="21">
+ <FormatCode>DD.MM.YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="22">
+ <FormatCode>D, MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="23">
+ <FormatCode>D, MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey21" default="false" type="long" usage="DATE" formatindex="24">
+ <FormatCode>D, MMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="25">
+ <FormatCode>D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey22" default="false" type="long" usage="DATE" formatindex="26">
+ <FormatCode>D, MMMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey10" default="false" type="medium" usage="DATE" formatindex="27">
+ <FormatCode>NN, DD.MMM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey18" default="false" type="long" usage="DATE" formatindex="28">
+ <FormatCode>NN, D, MMM YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey19" default="false" type="long" usage="DATE" formatindex="29">
+ <FormatCode>NN, D, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey20" default="false" type="long" usage="DATE" formatindex="30">
+ <FormatCode>NNNND, MMMM YYYY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey12" default="false" type="short" usage="DATE" formatindex="31">
+ <FormatCode>MM.DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="32">
+ <FormatCode>YY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="33">
+ <FormatCode>YYYY-MM-DD</FormatCode>
+ <DefaultName>ISO 8601</DefaultName>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey1" default="false" type="medium" usage="DATE" formatindex="34">
+ <FormatCode>MM.YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="35">
+ <FormatCode>MMM.DD</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="36">
+ <FormatCode>MMMM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="37">
+ <FormatCode>QQ YY</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateFormatskey9" default="false" type="medium" usage="DATE" formatindex="38">
+ <FormatCode>WW</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey1" default="false" type="short" usage="TIME" formatindex="39">
+ <FormatCode>HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey2" default="false" type="medium" usage="TIME" formatindex="40">
+ <FormatCode>HH:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey3" default="true" type="short" usage="TIME" formatindex="41">
+ <FormatCode>HH:MM AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey4" default="true" type="medium" usage="TIME" formatindex="42">
+ <FormatCode>HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43">
+ <FormatCode>[HH]:MM:SS</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44">
+ <FormatCode>MM:SS.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45">
+ <FormatCode>[HH]:MM:SS.00</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
+ <FormatCode>DD.MM.YY HH:MM</FormatCode>
+ </FormatElement>
+ <FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
+ <FormatCode>DD.MM.YYYY HH:MM:SS AM/PM</FormatCode>
+ </FormatElement>
+ </LC_FORMAT>
+ <LC_COLLATION>
+ <Collator default="true" unoid="alphanumeric"/>
+ <CollationOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </CollationOptions>
+ </LC_COLLATION>
+ <LC_SEARCH>
+ <SearchOptions>
+ <TransliterationModules>IGNORE_CASE</TransliterationModules>
+ </SearchOptions>
+ </LC_SEARCH>
+ <LC_INDEX>
+ <IndexKey phonetic="false" default="true" unoid="alphanumeric">A-Z</IndexKey>
+ <UnicodeScript>0</UnicodeScript>
+ <UnicodeScript>1</UnicodeScript>
+ <FollowPageWord>p</FollowPageWord>
+ <FollowPageWord>pp</FollowPageWord>
+ </LC_INDEX>
+ <LC_CALENDAR>
+ <Calendar unoid="gregorian" default="true">
+ <DaysOfWeek>
+ <Day>
+ <DayID>sun</DayID>
+ <DefaultAbbrvName>Alah</DefaultAbbrvName>
+ <DefaultFullName>Alahady</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>mon</DayID>
+ <DefaultAbbrvName>Alat</DefaultAbbrvName>
+ <DefaultFullName>Alatsinainy</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>tue</DayID>
+ <DefaultAbbrvName>Tal</DefaultAbbrvName>
+ <DefaultFullName>Talata</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>wed</DayID>
+ <DefaultAbbrvName>Alar</DefaultAbbrvName>
+ <DefaultFullName>Alarobia</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>thu</DayID>
+ <DefaultAbbrvName>Alak</DefaultAbbrvName>
+ <DefaultFullName>Alakamisy</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>fri</DayID>
+ <DefaultAbbrvName>Zom</DefaultAbbrvName>
+ <DefaultFullName>Zoma</DefaultFullName>
+ </Day>
+ <Day>
+ <DayID>sat</DayID>
+ <DefaultAbbrvName>Asab</DefaultAbbrvName>
+ <DefaultFullName>Asabotsy</DefaultFullName>
+ </Day>
+ </DaysOfWeek>
+ <MonthsOfYear>
+ <Month>
+ <MonthID>jan</MonthID>
+ <DefaultAbbrvName>Jan</DefaultAbbrvName>
+ <DefaultFullName>Janoary</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>feb</MonthID>
+ <DefaultAbbrvName>Feb</DefaultAbbrvName>
+ <DefaultFullName>Febroary</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>mar</MonthID>
+ <DefaultAbbrvName>Mar</DefaultAbbrvName>
+ <DefaultFullName>Marsa</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>apr</MonthID>
+ <DefaultAbbrvName>Apr</DefaultAbbrvName>
+ <DefaultFullName>Aprily</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>may</MonthID>
+ <DefaultAbbrvName>May</DefaultAbbrvName>
+ <DefaultFullName>May</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jun</MonthID>
+ <DefaultAbbrvName>Jon</DefaultAbbrvName>
+ <DefaultFullName>Jona</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>jul</MonthID>
+ <DefaultAbbrvName>Jol</DefaultAbbrvName>
+ <DefaultFullName>Jolay</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>aug</MonthID>
+ <DefaultAbbrvName>Aog</DefaultAbbrvName>
+ <DefaultFullName>Aogosta</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>sep</MonthID>
+ <DefaultAbbrvName>Sep</DefaultAbbrvName>
+ <DefaultFullName>Septambra</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>oct</MonthID>
+ <DefaultAbbrvName>Okt</DefaultAbbrvName>
+ <DefaultFullName>Oktobra</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>nov</MonthID>
+ <DefaultAbbrvName>Nov</DefaultAbbrvName>
+ <DefaultFullName>Novambra</DefaultFullName>
+ </Month>
+ <Month>
+ <MonthID>dec</MonthID>
+ <DefaultAbbrvName>Des</DefaultAbbrvName>
+ <DefaultFullName>Desambra</DefaultFullName>
+ </Month>
+ </MonthsOfYear>
+ <Eras>
+ <Era>
+ <EraID>bc</EraID>
+ <DefaultAbbrvName>BC</DefaultAbbrvName>
+ <DefaultFullName>BC</DefaultFullName>
+ </Era>
+ <Era>
+ <EraID>ad</EraID>
+ <DefaultAbbrvName>AD</DefaultAbbrvName>
+ <DefaultFullName>Anno Domini</DefaultFullName>
+ </Era>
+ </Eras>
+ <StartDayOfWeek>
+ <DayID>mon</DayID>
+ </StartDayOfWeek>
+ <MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek>
+ </Calendar>
+ </LC_CALENDAR>
+ <LC_CURRENCY>
+ <Currency default="true" usedInCompatibleFormatCodes="true">
+ <CurrencyID>MGA</CurrencyID>
+ <CurrencySymbol>Ar.</CurrencySymbol>
+ <BankSymbol>MGA</BankSymbol>
+ <CurrencyName>Ariary</CurrencyName>
+ <DecimalPlaces>2</DecimalPlaces>
+ </Currency>
+ </LC_CURRENCY>
+ <LC_TRANSLITERATION>
+ <Transliteration unoid="LOWERCASE_UPPERCASE"/>
+ <Transliteration unoid="UPPERCASE_LOWERCASE"/>
+ <Transliteration unoid="IGNORE_CASE"/>
+ </LC_TRANSLITERATION>
+ <LC_MISC>
+ <ReservedWords>
+ <trueWord>Marina</trueWord>
+ <falseWord>Diso</falseWord>
+ <quarter1Word>Quarter 1</quarter1Word>
+ <quarter2Word>Quarter 2</quarter2Word>
+ <quarter3Word>Quarter 3</quarter3Word>
+ <quarter4Word>Quarter 4</quarter4Word>
+ <aboveWord>Ambony</aboveWord>
+ <belowWord>Ambany</belowWord>
+ <quarter1Abbreviation>Q1</quarter1Abbreviation>
+ <quarter2Abbreviation>Q2</quarter2Abbreviation>
+ <quarter3Abbreviation>Q3</quarter3Abbreviation>
+ <quarter4Abbreviation>Q4</quarter4Abbreviation>
+ </ReservedWords>
+ </LC_MISC>
+ <LC_NumberingLevel>
+ <NumberingLevel NumType="4" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="4" Prefix=" " Suffix="."/>
+ <NumberingLevel NumType="4" Prefix="(" Suffix=")"/>
+ <NumberingLevel NumType="2" Prefix=" " Suffix="."/>
+ <NumberingLevel NumType="0" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="1" Prefix=" " Suffix=")"/>
+ <NumberingLevel NumType="1" Prefix="(" Suffix=")"/>
+ <NumberingLevel NumType="3" Prefix=" " Suffix="."/>
+ </LC_NumberingLevel>
+ <LC_OutLineNumberingLevel ref="en_US"/>
+</Locale>
+<!--Version 1.0 -->
diff --git a/i18npool/source/localedata/data/ro_RO.xml b/i18npool/source/localedata/data/ro_RO.xml
index ed92d9243cb6..c03ebd990f88 100644
--- a/i18npool/source/localedata/data/ro_RO.xml
+++ b/i18npool/source/localedata/data/ro_RO.xml
@@ -223,10 +223,11 @@
<LC_COLLATION ref="en_US"/>
<LC_SEARCH ref="en_US"/>
<LC_INDEX>
- <IndexKey unoid="alphanumeric" default="true" phonetic="false">A Ă Â B-I Î J-S Ş T Ţ U-Z</IndexKey>
+ <IndexKey unoid="alphanumeric" default="true" phonetic="false">A Ă Â B-I Î J-S Ș Ş T Ț Ţ U-Z</IndexKey>
<UnicodeScript>0</UnicodeScript>
<UnicodeScript>1</UnicodeScript>
<UnicodeScript>2</UnicodeScript>
+ <UnicodeScript>3</UnicodeScript>
<FollowPageWord>p.</FollowPageWord>
<FollowPageWord>pp.</FollowPageWord>
</LC_INDEX>
diff --git a/i18npool/source/localedata/data/shs_CA.xml b/i18npool/source/localedata/data/shs_CA.xml
index 4060d002bbe2..c7e46fa3453d 100644
--- a/i18npool/source/localedata/data/shs_CA.xml
+++ b/i18npool/source/localedata/data/shs_CA.xml
@@ -13,7 +13,7 @@
</LC_INFO>
<LC_CTYPE>
<Separators>
- <DateSeparator>/</DateSeparator>
+ <DateSeparator>-</DateSeparator>
<ThousandSeparator>,</ThousandSeparator>
<DecimalSeparator>.</DecimalSeparator>
<TimeSeparator>:</TimeSeparator>
@@ -84,16 +84,16 @@
<FormatCode>[CURRENCY]#,##0.--;[RED]-[CURRENCY]#,##0.--</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey1" default="true" type="short" usage="DATE" formatindex="18">
- <FormatCode>M/D/YY</FormatCode>
+ <FormatCode>YY-M-D</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey9" default="true" type="long" usage="DATE" formatindex="19">
<FormatCode>NNNNMMMM DD, YYYY</FormatCode>
</FormatElement>
- <FormatElement msgid="DateFormatskey8" default="true" type="medium" usage="DATE" formatindex="20">
- <FormatCode>MM/DD/YY</FormatCode>
+ <FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="20">
+ <FormatCode>YY-MM-DD</FormatCode>
</FormatElement>
- <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="21">
- <FormatCode>MM/DD/YYYY</FormatCode>
+ <FormatElement msgid="DateFormatskey7" default="true" type="medium" usage="DATE" formatindex="21">
+ <FormatCode>YYYY-MM-DD</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey10" default="false" type="long" usage="DATE" formatindex="22">
<FormatCode>MMM D, YY</FormatCode>
@@ -114,7 +114,7 @@
<FormatCode>NN, MMM D, YY</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="28">
- <FormatCode>NN DD/MMM YY</FormatCode>
+ <FormatCode>NN DD-MMM YY</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey14" default="false" type="long" usage="DATE" formatindex="29">
<FormatCode>NN, MMMM D, YYYY</FormatCode>
@@ -134,7 +134,7 @@
<DefaultName>ISO 8601</DefaultName>
</FormatElement>
<FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="34">
- <FormatCode>MM/YY</FormatCode>
+ <FormatCode>YY-MM</FormatCode>
</FormatElement>
<FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="35">
<FormatCode>MMM DD</FormatCode>
@@ -170,10 +170,10 @@
<FormatCode>[HH]:MM:SS.00</FormatCode>
</FormatElement>
<FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46">
- <FormatCode>MM/DD/YY HH:MM AM/PM</FormatCode>
+ <FormatCode>YYYY-MM-DD HH:MM</FormatCode>
</FormatElement>
<FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47">
- <FormatCode>MM/DD/YYYY HH:MM:SS</FormatCode>
+ <FormatCode>YYYY-MM-DD HH:MM:SS</FormatCode>
</FormatElement>
</LC_FORMAT>
<LC_COLLATION>
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index eeb9955c35bc..920a63fe149a 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -167,6 +167,8 @@ static const struct {
{ "mt_MT", lcl_DATA_EURO },
{ "sc_IT", lcl_DATA_EURO },
{ "ast_ES", lcl_DATA_EURO },
+ { "ltg_LV", lcl_DATA_EURO },
+ { "hsb_DE", lcl_DATA_EURO },
{ "ja_JP", lcl_DATA_OTHERS },
{ "ko_KR", lcl_DATA_OTHERS },
@@ -245,6 +247,7 @@ static const struct {
{ "ar_OM", lcl_DATA_OTHERS },
{ "ug_CN", lcl_DATA_OTHERS },
{ "om_ET", lcl_DATA_OTHERS },
+ { "plt_MG", lcl_DATA_OTHERS },
};
static const sal_Unicode under = sal_Unicode('_');
diff --git a/i18npool/source/textconversion/data/stc_char.dic b/i18npool/source/textconversion/data/stc_char.dic
index 27560f3bc34f..32c2b3c66502 100644
--- a/i18npool/source/textconversion/data/stc_char.dic
+++ b/i18npool/source/textconversion/data/stc_char.dic
@@ -59,11 +59,11 @@
丰:丰豐
临:臨
丸:丸汍
-为:為
+为:為爲
丽:麗
举:舉
乃:乃迺
-么:么麼
+么:么麼麽
义:義
乌:烏
乐:樂
@@ -76,15 +76,17 @@
了:了暸瞭
争:爭
亍:亍豖
+于:於
亏:虧
云:云雲
井:井丼
亘:亙
亚:亞
-产:產
+产:產産
亩:畝
亲:親
亵:褻
+亸:嚲
亿:億
仂:仂扐
仄:仄庂
@@ -99,7 +101,7 @@
们:們
价:價价
仿:仿倣髣
-众:眾
+众:眾衆
优:優优
伙:伙夥
会:會
@@ -107,11 +109,12 @@
伞:傘
伟:偉
传:傳
+伣:俔
伤:傷
伥:倀
伦:倫
伧:傖
-伪:偽
+伪:偽僞
伫:佇
佑:佑祐
体:體体
@@ -136,6 +139,7 @@
俨:儼
俩:倆
俪:儷
+俫:倈
俭:儉
修:修脩
俯:俯頫
@@ -188,7 +192,7 @@
凛:凜
几:几幾
凤:鳳
-凫:鳧
+凫:鳧鳬
凭:憑
凯:凱
凶:凶兇
@@ -196,7 +200,7 @@
击:擊
凿:鑿
刍:芻
-划:划劃
+划:划劃畫
刘:劉
则:則
刚:剛
@@ -204,6 +208,7 @@
删:刪
刨:刨鉋鑤
别:別彆
+刬:剗
刭:剄
刮:刮颳
制:制製
@@ -232,6 +237,7 @@
勋:勛勳
勖:勗勖
勤:勤懃
+勚:勩
匀:勻
匡:匡劻
匦:匭
@@ -262,7 +268,8 @@
压:壓
厌:厭
厍:厙
-厕:廁
+厐:龎
+厕:廁厠
厘:釐厘
厢:廂
厣:厴
@@ -271,6 +278,7 @@
厩:廄
厮:廝
县:縣
+叁:叄
参:參
双:雙
发:發髮醱
@@ -287,14 +295,16 @@
吃:吃喫
合:合閤
吊:弔吊
+同:衕
后:后後
向:向嚮曏
吓:嚇
吕:呂
吗:嗎
+吣:唚
吨:噸吨
听:聽听
-启:啟
+启:啟啓
吴:吳
呆:呆獃騃
呐:吶
@@ -315,6 +325,8 @@
咛:嚀
咯:咯詻
咱:咱偺
+咝:噝
+咤:吒
咸:咸鹹
咽:咽嚥
哄:哄鬨
@@ -333,7 +345,9 @@
唇:唇脣
唉:唉欸
唛:嘜
+唝:嗊
唠:嘮
+唡:啢
唢:嗩
唤:喚
啕:啕咷
@@ -342,6 +356,7 @@
啬:嗇
啭:囀
啮:齧嚙囓
+啴:嘽
啸:嘯
喂:喂餵
喧:喧諠
@@ -374,6 +389,7 @@
圹:壙
场:場
址:址阯
+坂:阪
坏:壞坏
坑:坑阬
块:塊
@@ -385,17 +401,21 @@
坟:墳
坠:墜
垄:壟
+垅:壠
垆:壚
垒:壘
垦:墾
垩:堊
垫:墊
垭:埡
+垱:壋
垲:塏
+垴:堖
埘:塒
埙:壎塤
埚:堝
堇:堇菫
+埯:垵
堑:塹
堕:墮
堤:堤隄
@@ -403,11 +423,12 @@
墙:牆墻
壮:壯
声:聲
-壳:殼
+壳:殼殻
壶:壺
+壸:壼
处:處
备:備
-复:復複复
+复:復複复覆
够:夠
夫:夫伕
夭:夭殀
@@ -418,7 +439,7 @@
奁:奩
奂:奐
奋:奮
-奖:獎
+奖:獎奬
奥:奧
奶:奶嬭
奸:奸姦
@@ -428,9 +449,10 @@
妙:妙玅
妩:嫵
妪:嫗
-妫:媯
+妫:媯嬀
姗:姍
姜:姜薑
+姹:奼
娄:婁
娅:婭
娆:嬈
@@ -480,6 +502,7 @@
尽:盡儘
局:局侷跼挶
层:層
+屃:屓
屉:屜
届:屆
属:屬
@@ -491,12 +514,13 @@
岖:嶇
岗:崗
岘:峴
+岙:嶴
岚:嵐
岛:島
岩:岩巖嵒
岭:嶺岭
岳:岳嶽
-岽:崠
+岽:崠崬
岿:巋
峄:嶧
峡:峽
@@ -561,11 +585,13 @@
强:強彊
归:歸
当:當儅噹
-录:錄
+录:錄録
+彝:彞
彗:彗篲
彦:彥
彩:彩綵
彻:徹
+征:徵
径:徑
徇:徇侚
徊:徊佪
@@ -600,7 +626,7 @@
恼:惱
恽:惲
悦:悅
-悫:愨
+悫:愨慤
悬:懸
悭:慳
悯:憫
@@ -630,6 +656,7 @@
战:戰
戚:戚慼
戬:戩
+戯:戱
户:戶
扁:扁稨
扉:屝扉
@@ -669,6 +696,7 @@
拨:撥
择:擇
挂:掛挂
+挜:掗
挚:摯
挛:攣
挝:撾
@@ -680,6 +708,7 @@
挣:掙
挤:擠
挥:揮
+挦:撏
挽:挽輓
捂:捂摀
捆:捆梱綑
@@ -701,6 +730,7 @@
掼:摜
插:插扱
揽:攬
+揾:搵
揿:撳
搀:攙
搁:擱
@@ -745,9 +775,11 @@
旷:曠
昂:昂卬
昆:昆崑
+旸:暘
昙:曇
昵:暱昵
昼:晝
+昽:曨
显:顯
晋:晉
晒:曬晒
@@ -788,6 +820,7 @@
枢:樞
枣:棗
枥:櫪
+枧:梘
枨:棖
枪:槍鎗
枫:楓
@@ -824,6 +857,9 @@
桩:樁
梁:梁樑
梦:夢
+梼:檮
+梾:棶
+梿:槤
检:檢
棂:櫺欞
棋:棋碁
@@ -837,10 +873,12 @@
椭:橢
楼:樓
榄:欖
+榅:榲
榇:櫬
榈:櫚
榉:櫸
榨:搾榨
+槚:檟
槛:檻
槟:檳
槠:櫧
@@ -896,7 +934,7 @@
沥:瀝
沦:淪
沧:滄
-沩:溈
+沩:溈潙
沪:滬
沾:沾霑
泄:泄洩
@@ -925,6 +963,7 @@
浍:澮
济:濟
浏:瀏
+浐:滻
浑:渾
浒:滸
浓:濃
@@ -970,7 +1009,7 @@
滗:潷
滚:滾
滞:滯
-滟:灩
+滟:灩灧
滠:灄
满:滿
滢:瀅
@@ -979,9 +1018,11 @@
滦:灤
滨:濱
滩:灘
+滪:澦
漓:漓灕
演:演縯
漾:漾瀁
+漤:灠
潆:瀠
潇:瀟
潋:瀲
@@ -996,6 +1037,7 @@
灭:滅
灯:燈
灵:靈
+灶:竈
灾:災
灿:燦
炀:煬
@@ -1032,12 +1074,13 @@
爱:愛
爷:爺
牍:牘
-牦:犛
+牦:犛氂
牵:牽
牺:犧
犊:犢
状:狀
犷:獷
+犸:獁
犹:猶
狈:狽
狞:獰
@@ -1059,14 +1102,17 @@
献:獻
獭:獺
玑:璣
+玚:瑒
玛:瑪
玮:瑋
环:環鐶
现:現
+玱:瑲
玺:璽
珏:玨
珐:琺
珑:瓏
+珰:璫
珲:琿
球:球毬
琅:琅瑯
@@ -1091,6 +1137,8 @@
疟:瘧
疠:癘
疡:瘍
+疬:癧
+疭:瘲
疮:瘡
疯:瘋
疱:皰
@@ -1099,6 +1147,7 @@
痈:廱癰
痉:痙
痒:癢痒
+痖:瘂
痨:癆
痪:瘓
痫:癇
@@ -1107,7 +1156,7 @@
痹:痺痹
瘅:癉
瘗:瘞
-瘘:瘺
+瘘:瘺瘻
瘪:癟
瘫:癱
瘾:癮
@@ -1125,14 +1174,18 @@
盖:蓋
盗:盜
盘:槃盤
+眍:瞘
眦:眥
眯:瞇眯
眺:眺覜
+眬:矓
+着:著
睁:睜
睐:睞
睑:瞼
睾:睪睾
睿:睿叡
+瞆:瞶
瞒:瞞
瞩:矚
矫:矯
@@ -1145,15 +1198,18 @@
砗:硨
砚:硯
砧:砧碪
+砜:碸
砺:礪
砻:礱
砾:礫
础:礎
+硁:硜
硕:碩
硖:硤
硗:磽
+硙:磑
确:確确
-硷:鹼
+硷:鹼礆
碍:礙
碛:磧
碜:磣
@@ -1164,6 +1220,8 @@
礼:禮
祆:祆祅
祛:祛袪
+祃:禡
+祎:禕
祢:禰
祯:禎
祷:禱
@@ -1180,6 +1238,8 @@
积:積
称:稱
秽:穢
+秾:穠
+稆:穭
税:稅
稣:穌
稳:穩
@@ -1187,13 +1247,14 @@
穷:窮
窃:竊
窍:竅
+窎:窵
窑:窯
窜:竄
窝:窩
窥:窺
窦:竇
窭:窶
-竖:豎
+竖:豎竪
竞:競
端:端耑
笃:篤
@@ -1210,9 +1271,11 @@
策:策筴
筚:篳
筛:篩
+筜:簹
筝:箏
筱:筱篠
筹:籌
+筼:篔
签:簽籤
简:簡
箅:箄箅
@@ -1246,6 +1309,7 @@
紧:緊
累:累櫐纍
絷:縶
+纟:糹
纠:糾
纡:紆
红:紅
@@ -1260,20 +1324,24 @@
纫:紉
纬:緯
纭:紜
+纮:紘
纯:純
纰:紕
纱:紗
纲:綱
纳:納
+纴:紝
纵:縱
纶:綸
纷:紛
纸:紙
纹:紋
纺:紡
+纻:紵
+纼:紖
纽:紐
纾:紓
-线:線
+线:線綫
绀:紺
绁:紲
绂:紱
@@ -1294,44 +1362,50 @@
绑:綁
绒:絨
结:結
+绔:絝
绕:繞
+绖:絰
绗:絎
绘:繪
给:給
绚:絢
绛:絳
络:絡
-绝:絕
+绝:絕絶
绞:絞
统:統
绠:綆
绡:綃
绢:絹
-绣:繡
+绣:繡綉
+绤:綌
绥:綏
-绦:絛縚
+绦:絛縚縧
继:繼
绨:綈
绩:績勣
绪:緒
绫:綾
+绬:緓
续:續
绮:綺
绯:緋
绰:綽
+绱:緔鞝
绲:緄
绳:繩
维:維
绵:綿
绶:綬
-绷:繃
+绷:繃綳
绸:綢
+绹:綯
绺:綹
绻:綣
综:綜
绽:綻
绾:綰
-绿:綠
+绿:綠緑
缀:綴
缁:緇
缂:緙
@@ -1342,6 +1416,7 @@
缇:緹
缈:緲
缉:緝
+缊:縕
缋:繢
缌:緦
缍:綞
@@ -1360,6 +1435,7 @@
缛:縟
缜:縝
缝:縫
+缞:縗
缟:縞
缠:纏
缡:縭
@@ -1377,7 +1453,7 @@
缭:繚
缮:繕
缯:繒
-缰:韁
+缰:韁繮
缱:繾
缲:繰
缳:繯
@@ -1400,6 +1476,7 @@
耀:耀燿
考:考攷
耗:耗秏
+耢:耮
耧:耬
耸:聳
耻:恥
@@ -1426,6 +1503,7 @@
胜:勝胜
胡:胡鬍楜衚
胧:朧矓
+胨:腖
胪:臚
胫:脛
胭:胭臙
@@ -1452,6 +1530,7 @@
膑:臏
膘:膘臕
膻:羶膻
+臜:臢
致:致緻
舄:舄潟
舆:輿
@@ -1478,6 +1557,7 @@
苍:蒼
苎:苧
苏:蘇甦囌
+苧:薴
苟:苟茍
苹:蘋苹
茂:茂楙
@@ -1490,6 +1570,7 @@
茧:繭茧
荆:荊
荐:荐薦
+荙:薘
荚:莢
荛:蕘
荜:蓽
@@ -1506,8 +1587,9 @@
荩:藎
荪:蓀
荫:蔭
-荬:藚
+荬:藚蕒
荭:葒
+荮:葤
药:藥葯
莅:蒞
莓:莓苺
@@ -1520,7 +1602,7 @@
莸:蕕
莹:瑩
莺:鶯
-莼:蓴
+莼:蓴蒓
菱:菱蔆
萝:蘿
萤:螢
@@ -1542,10 +1624,12 @@
蓥:鎣
蓦:驀
蔑:蔑衊
+蔂:虆
蔷:薔
蔹:蘞
蔺:藺
蔼:藹
+蕰:薀
蕲:蘄
蕴:蘊
薮:藪
@@ -1553,7 +1637,7 @@
藉:藉耤
藓:蘚
藤:藤籐
-蘖:蘗
+蘖:蘗櫱
虏:虜
虑:慮
虚:虛
@@ -1590,8 +1674,11 @@
蝼:螻
蝾:蠑
蟮:蟺
+螀:螿
+螨:蟎
蠢:蠢惷
蠼:蠷蠼
+蟏:蠨
衅:釁舋
衔:銜啣
补:補
@@ -1601,14 +1688,17 @@
袄:襖
袅:裊嬝嫋
袖:袖褎
+袆:褘
袜:襪
袭:襲
+袯:襏
装:裝
裆:襠
+裈:褌
裢:褳
裣:襝
裤:褲
-裥:襉
+裥:襉襇
裸:裸祼
褛:褸
褴:襤
@@ -1625,6 +1715,7 @@
觊:覬
觋:覡
觌:覿
+觍:覥
觎:覦
觏:覯
觐:覲
@@ -1633,8 +1724,10 @@
觞:觴
触:觸触
觯:觶
+訚:誾
誉:譽
誊:謄
+讠:訁
计:計
订:訂
讣:訃
@@ -1646,10 +1739,12 @@
让:讓
讪:訕
讫:訖
+讬:託
训:訓
议:議
讯:訊
记:記
+讱:訒
讲:講
讳:諱
讴:謳
@@ -1659,6 +1754,7 @@
许:許
讹:訛
论:論
+讻:訩
讼:訟
讽:諷
设:設
@@ -1670,6 +1766,7 @@
评:評
诅:詛
识:識
+诇:詗
诈:詐
诉:訴
诊:診
@@ -1678,6 +1775,7 @@
词:詞
诎:詘
诏:詔
+诐:詖
译:譯
诒:詒
诓:誆
@@ -1703,6 +1801,7 @@
诧:詫
诨:諢
诩:詡
+诪:譸
诫:誡
诬:誣
语:語
@@ -1712,7 +1811,7 @@
诱:誘
诲:誨
诳:誑
-说:說
+说:說説
诵:誦
诶:誒
请:請
@@ -1753,11 +1852,12 @@
谛:諦
谜:謎
谝:諞
+谞:諝
谟:謨
谠:讜
谡:謖
谢:謝
-谣:謠
+谣:謠謡
谤:謗
谥:謚
谦:謙
@@ -1765,7 +1865,7 @@
谨:謹
谩:謾
谪:謫
-谫:譾
+谫:譾謭
谬:謬
谭:譚
谮:譖
@@ -1780,9 +1880,11 @@
谷:谷穀
豆:豆荳
豚:豚魨
+豮:豶
贝:貝
贞:貞
负:負
+贠:貟
贡:貢
财:財
责:責
@@ -1817,7 +1919,7 @@
赀:貲
赁:賃
赂:賂
-赃:贓
+赃:贓贜
资:資
赅:賅
赆:贐
@@ -1827,25 +1929,30 @@
赊:賒
赋:賦
赌:賭
-赍:齎
+赍:齎賫
赎:贖
赏:賞
赐:賜
+赑:贔
+赒:賙
赓:賡
赔:賠
赕:賧
赖:賴
+赗:賵
赘:贅
赙:賻
赚:賺
赛:賽
赜:賾
-赝:贗
+赝:贗贋
赞:贊讚
+赟:贇
赠:贈
赡:贍
赢:贏
赣:贛
+赪:赬
赵:趙
赶:趕赶
趋:趨
@@ -1856,6 +1963,7 @@
跖:跖蹠
跞:躒
践:踐
+跶:躂
跷:蹺
跸:蹕
跹:躚
@@ -1876,17 +1984,20 @@
轧:軋
轨:軌
轩:軒
+轪:軑
轫:軔
转:轉
轭:軛
轮:輪
软:軟
轰:轟
+轱:軲
轲:軻
轳:轤
轴:軸
轵:軹
轶:軼
+轷:軤
轸:軫
轹:轢
轺:軺
@@ -1895,6 +2006,7 @@
载:載
轾:輊
轿:轎
+辀:輈
辁:輇
辂:輅
较:較
@@ -1906,11 +2018,13 @@
辉:輝
辊:輥
辋:輞
+辌:輬
辍:輟
辎:輜
辏:輳
辐:輻
辑:輯
+辒:轀
输:輸
辔:轡
辕:轅
@@ -1966,20 +2080,23 @@
郦:酈
郧:鄖
郸:鄲
+酂:酇
酝:醞
酬:酬詶
+酦:醱
酱:醬
酸:酸痠
酽:釅
酾:釃
酿:釀
-采:釆采採
+采:釆采採埰
释:釋
里:里浬裡裏
野:野埜
鉴:鑒鋻鑑
銮:鑾
錾:鏨
+钅:釒
钆:釓
钇:釔
针:針鍼
@@ -1988,16 +2105,21 @@
钋:釙
钌:釕
钍:釷
-钎:釬
+钎:釬釺
钏:釧
钐:釤
+钑:鈒
钒:釩
钓:釣
钔:鍆
钕:釹
+钖:鍚
钗:釵
+钘:鈃
钙:鈣
+钚:鈈
钛:鈦
+钜:鉅
钝:鈍
钞:鈔
钟:鐘鍾
@@ -2010,7 +2132,7 @@
钦:欽
钧:鈞
钨:鎢
-钩:鉤
+钩:鈎鉤
钪:鈧
钫:鈁
钬:鈥
@@ -2022,8 +2144,9 @@
钲:鉦
钳:鉗拑
钴:鈷
-钵:缽
+钵:缽鉢
钶:鈳
+钷:鉕
钸:鈽
钹:鈸
钺:鉞戉
@@ -2039,6 +2162,7 @@
铄:鑠
铅:鉛
铆:鉚
+铇:鉋
铈:鈰
铉:鉉
铊:鉈
@@ -2046,16 +2170,22 @@
铌:鈮
铍:鈹
铎:鐸
+铏:鉶
铐:銬
铑:銠
铒:鉺
+铓:鋩
+铔:錏
铕:銪
铖:鋮
铗:鋏
+铘:鋣
铙:鐃
+铚:銍
铛:鐺
铜:銅
铝:鋁
+铞:銱
铟:銦
铠:鎧
铡:鍘
@@ -2063,6 +2193,7 @@
铣:銑鐉
铤:鋌
铥:銩
+铦:銛
铧:鏵
铨:銓
铩:鎩
@@ -2083,6 +2214,7 @@
铸:鑄
铹:鐒
铺:鋪舖
+铻:鋙
铼:錸
铽:鋱
链:鏈
@@ -2090,6 +2222,7 @@
销:銷
锁:鎖
锂:鋰
+锃:鋥
锄:鋤
锅:鍋
锆:鋯
@@ -2099,7 +2232,10 @@
锊:鋝
锋:鋒
锌:鋅
-锐:銳
+锍:鋶
+锎:鐦
+锏:鐧
+锐:銳鋭
锑:銻
锒:鋃
锓:鋟
@@ -2107,18 +2243,26 @@
锕:錒
锖:錆
锗:鍺
+锘:鍩
错:錯
锚:錨
锛:錛
+锜:錡
+锝:鍀
锞:錁
锟:錕
+锠:錩
锡:錫
锢:錮
锣:鑼
锤:錘鎚
锥:錐
锦:錦
+锧:鑕
+锨:杴鍁
锩:錈
+锪:鍃
+锫:錇
锬:錟
锭:錠
键:鍵
@@ -2126,6 +2270,7 @@
锰:錳
锱:錙
锲:鍥
+锳:鍈
锴:鍇
锵:鏘
锶:鍶
@@ -2134,52 +2279,70 @@
锹:鍬
锻:鍛
锼:鎪
+锽:鍠
锾:鍰
+锿:鎄
镀:鍍
镁:鎂
镂:鏤
+镃:鎡
镄:鐨
+镅:鎇
镆:鏌
镇:鎮
+镈:鎛
镉:鎘
镊:鑷
-镌:鐫
+镋:鎲
+镌:鐫鎸
镍:鎳
+镎:鎿
镏:鎦
镐:鎬
镑:鎊
镒:鎰
镓:鎵
镔:鑌
+镕:鎔
镖:鏢
镗:鏜
镘:鏝
镙:鏍
+镚:鏰
镛:鏞
镜:鏡
镝:鏑
镞:鏃
镟:鏇
+镠:鏐
镡:鐔
+镢:鐝钁
镣:鐐
镤:鏷
+镥:鑥
镦:鐓
镧:鑭
镨:鐠
+镩:鑹
镪:鏹
镫:鐙
镬:鑊
镭:鐳
+镮:鐶
镯:鐲
镰:鐮鎌
镱:鐿
+镲:鑔
镳:鑣
+镴:鑞
+镵:鑱
镶:鑲瓖
长:長
门:門
闩:閂
闪:閃
闫:閆
+闬:閈
闭:閉
问:問
闯:闖
@@ -2198,13 +2361,15 @@
闼:闥
闽:閩
闾:閭
+闿:闓
阀:閥
阁:閣
阂:閡
阃:閫
阄:鬮
-阅:閱
+阅:閱閲
阆:閬
+阇:闍
阈:閾
阉:閹
阊:閶
@@ -2216,12 +2381,15 @@
阐:闡
阑:闌
阒:闃
+阓:闠
阔:闊
阕:闋
阖:闔
阗:闐
+阘:闒
阙:闕
阚:闞
+阛:闤
队:隊
阳:陽暘
阴:陰
@@ -2253,15 +2421,18 @@
霁:霽
霉:霉黴
霓:霓蜺
+霡:霢
霭:靄
靓:靚
静:靜
面:面麵
靥:靨
鞑:韃
+鞒:鞽
鞯:韉
韦:韋
韧:韌
+韨:韍
韩:韓
韪:韙
韫:韞
@@ -2289,19 +2460,23 @@
颈:頸
颉:頡
颊:頰
+颋:頲
颌:頜
颍:潁
+颎:熲
颏:頦
颐:頤
频:頻
-颓:頹隤穨
+颓:頹隤穨頽
颔:頷
+颕:頴
颖:穎
颗:顆
题:題
+颙:顒
颚:顎
颛:顓
-颜:顏
+颜:顏顔
额:額
颞:顳
颟:顢
@@ -2309,19 +2484,29 @@
颡:顙
颢:顥
颤:顫
+颥:顬
颦:顰
颧:顴
风:風
+飏:颺
+飐:颭
飑:颮
飒:颯
飓:颶
+飔:颸
飕:颼
+飖:颻
+飗:飀
飘:飄
飙:飆
+飚:飈
飞:飛
飨:饗
餍:饜
+饣:飠
+饤:飣
饥:飢饑
+饦:飥
饧:餳
饨:飩
饩:餼
@@ -2338,29 +2523,41 @@
饵:餌
饶:饒
饷:餉饟
+饹:餎
饺:餃
+饻:餏
饼:餅
饽:餑
+饾:餖
饿:餓
+馀:余
馁:餒
+馂:餕
+馃:餜
馄:餛
馅:餡
馆:館
+馇:餷
馈:饋餽
馊:餿
馋:饞
+馌:饁
馍:饃糢
+馎:餺
馏:餾
馐:饈
馑:饉
馒:饅
+馓:饊
馔:饌
+馕:饢
马:馬
驭:馭
驮:馱
驯:馴
驰:馳
驱:驅
+驲:馹
驳:駁駮
驴:驢
驵:駔
@@ -2376,23 +2573,30 @@
驿:驛
骀:駘
骁:驍
-骂:罵
+骂:罵駡
+骃:駰
骄:驕
骅:驊
骆:駱
骇:駭
骈:駢
+骉:驫
骊:驪
骋:騁
验:驗
+骍:騂
+骎:駸
骏:駿
骐:騏
骑:騎
骒:騍
骓:騅
+骔:騌
+骕:驌
骖:驂
骗:騙
骘:騭
+骙:騤
骚:騷
骛:騖
骜:驁
@@ -2405,6 +2609,7 @@
骣:驏
骤:驟
骥:驥
+骦:驦
骧:驤
髅:髏
髋:髖
@@ -2414,23 +2619,37 @@
魇:魘
魉:魎
鱼:魚
+鱽:魛
鱿:魷
+鲀:魨
鲁:魯
鲂:魴
-鲇:鯰
+鲃:䰾
+鲄:魺
+鲅:鮁
+鲆:鮃
+鲇:鯰鮎
鲈:鱸
+鲉:鮋
+鲊:鮓
鲋:鮒
+鲌:鮊
鲍:鮑
鲎:鱟
+鲏:鮍
鲐:鮐
鲑:鮭
鲒:鮚
鲔:鮪
鲕:鮞
+鲖:鮦
+鲗:鰂
+鲘:鮜
+鲙:鱠
鲚:鱭
鲛:鮫
鲜:鮮
-鲞:鯗
+鲞:鯗鮝
鲟:鱘
鲠:鯁
鲡:鱺
@@ -2442,64 +2661,92 @@
鲧:鯀
鲨:鯊
鲩:鯇
+鲪:鮶
鲫:鯽
+鲬:鯒
鲭:鯖
鲮:鯪
+鲯:鯕
鲰:鯫
鲱:鯡
鲲:鯤
鲳:鯧
+鲴:鯝
鲵:鯢
鲷:鯛
鲸:鯨
+鲹:鰺
+鲺:鯴
鲻:鯔
+鲼:鱝
鲽:鰈
+鲾:鰏
+鲿:鱨
+鳀:鯷
+鳁:鰮
鳃:鰓
-鳄:鱷
+鳄:鱷鰐
鳅:鰍
鳆:鰒
鳇:鰉
+鳊:鯿
+鳋:鰠
鳌:鰲鼇
鳍:鰭
鳎:鰨
鳏:鰥
鳐:鰩
+鳑:鰟
+鳒:鰜
鳓:鰳
鳔:鰾
鳕:鱈
鳖:鱉
鳗:鰻
+鳘:鰵
+鳙:鱅
+鳚:䲁
+鳛:鰼
鳜:鱖
鳝:鱔
鳞:鱗
鳟:鱒
鳢:鱧
+鳣:鱣
鸟:鳥
鸠:鳩
-鸡:雞
+鸡:雞鷄
鸢:鳶
鸣:鳴
+鸤:鳲
鸥:鷗
鸦:鴉
+鸧:鶬
鸨:鴇
鸩:鴆酖
鸪:鴣
鸫:鶇
鸬:鸕
鸭:鴨
+鸮:鴞
鸯:鴦
+鸰:鴒
鸱:鴟
鸲:鴝
鸳:鴛
+鸴:鷽
鸵:鴕
鸶:鷥
鸷:鷙
鸸:鴯
鸹:鴰
鸺:鵂
+鸻:鴴
+鸼:鵃
鸽:鴿
鸾:鸞
鸿:鴻
+鹀:鵐
鹁:鵓
鹂:鸝
鹃:鵑
@@ -2510,18 +2757,33 @@
鹈:鵜
鹉:鵡
鹊:鵲
+鹋:鶓
鹌:鵪
+鹍:鵾
鹎:鵯
鹏:鵬
+鹐:鵮
鹑:鶉
+鹒:鶊
+鹓:鵷
+鹔:鷫
鹕:鶘
+鹖:鶡
鹗:鶚
鹘:鶻
-鹚:鶿
+鹙:鶖
+鹚:鶿鷀
+鹛:鶥
鹜:鶩
+鹝:鷊
鹞:鷂
+鹟:鶲
+鹠:鶹
+鹡:鶺
+鹢:鷁
鹣:鶼
鹤:鶴
+鹥:鷖
鹦:鸚
鹧:鷓
鹨:鷚
@@ -2530,24 +2792,32 @@
鹫:鷲
鹬:鷸
鹭:鷺
+鹯:鸇
鹰:鷹
+鹱:鸌
+鹲:鸏
鹳:鸛
+鹴:鸘
鹾:鹺
麦:麥
麸:麩
麻:麻痲痳
黄:黃
黉:黌
+黡:黶
黩:黷
黪:黲
黾:黽
鼋:黿
鼍:鼉
+鼗:鞀
鼹:鼴
齐:齊
齑:齏
齿:齒
龀:齔
+龁:齕
+龂:齗
龃:齟
龄:齡
龅:齙
diff --git a/i18npool/source/textconversion/data/stc_word.dic b/i18npool/source/textconversion/data/stc_word.dic
index 314c6223cc70..4ae42366888d 100644
--- a/i18npool/source/textconversion/data/stc_word.dic
+++ b/i18npool/source/textconversion/data/stc_word.dic
@@ -1147,3 +1147,4 @@
音频文件<音頻檔
模拟信号<類比信號
驱动程序<驅動程式
+什么<甚麼
diff --git a/padmin/source/fontentry.cxx b/padmin/source/fontentry.cxx
index 608a240b9866..f67d2c0d18d6 100644
--- a/padmin/source/fontentry.cxx
+++ b/padmin/source/fontentry.cxx
@@ -555,7 +555,7 @@ IMPL_LINK( FontImportDialog, RefreshTimeoutHdl, void*, EMPTYARG )
std::list< String > aFiles;
m_aNewFonts.clear();
OUString aDirectory( m_aFromDirEdt.GetText() );
- FindFiles( aDirectory, aFiles, String( RTL_CONSTASCII_USTRINGPARAM( "PFA;PFB;TTF;TTC" ) ), m_aSubDirsBox.IsChecked() );
+ FindFiles( aDirectory, aFiles, String( RTL_CONSTASCII_USTRINGPARAM( "PFA;PFB;TTF;TTC;OTF" ) ), m_aSubDirsBox.IsChecked() );
OString aDir( OUStringToOString( aDirectory, aEncoding ) );
aDir += "/";
while( aFiles.begin() != aFiles.end() )
diff --git a/rsc/source/parser/makefile.mk b/rsc/source/parser/makefile.mk
index 1254bee932f6..a46c60aae213 100644
--- a/rsc/source/parser/makefile.mk
+++ b/rsc/source/parser/makefile.mk
@@ -45,17 +45,6 @@ ENABLE_EXCEPTIONS=true
YACCTARGET= $(INCCOM)$/yyrscyacc.cxx
YACCFILES= rscyacc.y
-CXXFILES= rscpar.cxx \
- rscyacc.cxx \
- rsclex.cxx \
- erscerr.cxx \
- rsckey.cxx \
- rscinit.cxx \
- rscibas.cxx \
- rscdb.cxx \
- rscicpx.cxx \
- parser.cxx
-
OBJFILES= $(OBJ)$/rscpar.obj \
$(OBJ)$/rscyacc.obj \
$(OBJ)$/rsclex.obj \
diff --git a/rsc/source/parser/parser.cxx b/rsc/source/parser/parser.cxx
deleted file mode 100644
index 1ba974a4778d..000000000000
--- a/rsc/source/parser/parser.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_rsc.hxx"
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <string.h>
-#include <ctype.h>
-
-#include <tools/solar.h>
-#define RSC_COMPILER
-
-#include <rscall.h>
-#include <rsctools.hxx>
-#include <rschash.hxx>
-#include <rsckey.hxx>
-#include <rsctree.hxx>
-#include <rscerror.h>
-#include <rscdef.hxx>
-
-#include <rsctop.hxx>
-#include <rscmgr.hxx>
-#include <rscconst.hxx>
-#include <rscarray.hxx>
-#include <rscclass.hxx>
-#include <rsccont.hxx>
-#include <rscrange.hxx>
-#include <rscflag.hxx>
-#include <rscstr.hxx>
-
-#include <rscdb.hxx>
-#include <rscpar.hxx>
-
diff --git a/rsc/source/parser/parser.hxx b/rsc/source/parser/parser.hxx
deleted file mode 100644
index 274b720b1e2d..000000000000
--- a/rsc/source/parser/parser.hxx
+++ /dev/null
@@ -1,26 +0,0 @@
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx
index b36614cec8c4..8b952acb75f9 100644
--- a/rsc/source/prj/start.cxx
+++ b/rsc/source/prj/start.cxx
@@ -176,7 +176,7 @@ static BOOL CallPrePro( const ByteString& rPrePro,
#if ((defined OS2 || defined WNT) && (defined TCPP || defined tcpp)) || defined UNX || defined OS2
nExit = spawnvp( P_WAIT, rPrePro.GetBuffer(), (char* const*)pCmdL->GetBlock() );
#elif defined CSET
- nExit = spawnvp( P_WAIT, (char*)rPrePro.GetBuffer(), char **) (const char**)pCmdL->GetBlock() );
+ nExit = spawnvp( P_WAIT, (char*)rPrePro.GetBuffer(), (const char**)pCmdL->GetBlock() );
#elif defined WTC
nExit = spawnvp( P_WAIT, (char*)rPrePro.GetBuffer(), (const char* const*)pCmdL->GetBlock() );
#elif defined MTW
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index ddc585ae38a4..92d53700aa86 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -700,6 +700,8 @@ inline void SaxWriterHelper::clearBuffer() throw( SAXException )
m_Sequence.realloc(nCurrentPos);
nCurrentPos = writeSequence();
m_Sequence.realloc(SEQUENCESIZE);
+ // Be sure to update the array pointer after the reallocation.
+ mp_Sequence = m_Sequence.getArray();
}
}
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 9bdd91f4b5e4..35bfba29c904 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -909,10 +909,10 @@ void Converter::convertDuration(::rtl::OUStringBuffer& rBuffer,
rBuffer.append(static_cast<sal_Int32>(rDuration.Days));
rBuffer.append(sal_Unicode('D'));
}
- const sal_Int32 nHSecs(static_cast<sal_Int32>(rDuration.Seconds)
- + static_cast<sal_Int32>(rDuration.HundredthSeconds));
+ const sal_Int32 nMSecs(static_cast<sal_Int32>(rDuration.Seconds)
+ + static_cast<sal_Int32>(rDuration.MilliSeconds));
if (static_cast<sal_Int32>(rDuration.Hours) +
- static_cast<sal_Int32>(rDuration.Minutes) + nHSecs)
+ static_cast<sal_Int32>(rDuration.Minutes) + nMSecs)
{
rBuffer.append(sal_Unicode('T')); // time separator
if (rDuration.Hours)
@@ -925,20 +925,37 @@ void Converter::convertDuration(::rtl::OUStringBuffer& rBuffer,
rBuffer.append(static_cast<sal_Int32>(rDuration.Minutes));
rBuffer.append(sal_Unicode('M'));
}
- if (nHSecs)
+ if (nMSecs)
{
// seconds must not be omitted (i.e. ".42S" is not valid)
rBuffer.append(static_cast<sal_Int32>(rDuration.Seconds));
- if (rDuration.HundredthSeconds)
+ if (rDuration.MilliSeconds)
{
rBuffer.append(sal_Unicode('.'));
- const sal_Int32 nHundredthSeconds(
- rDuration.HundredthSeconds % 100);
- if (nHundredthSeconds < 10)
+ const sal_Int32 nMilliSeconds(rDuration.MilliSeconds % 1000);
+ if (nMilliSeconds < 100)
{
rBuffer.append(sal_Unicode('0'));
}
- rBuffer.append(nHundredthSeconds);
+ if (nMilliSeconds < 10)
+ {
+ rBuffer.append(sal_Unicode('0'));
+ }
+ if (0 == (nMilliSeconds % 10))
+ {
+ if (0 == (nMilliSeconds % 100))
+ {
+ rBuffer.append(nMilliSeconds / 100);
+ }
+ else
+ {
+ rBuffer.append(nMilliSeconds / 10);
+ }
+ }
+ else
+ {
+ rBuffer.append(nMilliSeconds);
+ }
}
rBuffer.append(sal_Unicode('S'));
}
@@ -959,8 +976,9 @@ readUnsignedNumber(const ::rtl::OUString & rString,
{
bool bOverflow(false);
sal_Int32 nTemp(0);
+ sal_Int32 nPos(io_rnPos);
- for (sal_Int32 nPos = io_rnPos; (nPos < rString.getLength()); ++nPos)
+ while (nPos < rString.getLength())
{
const sal_Unicode c = rString[nPos];
if ((sal_Unicode('0') <= c) && (c <= sal_Unicode('9')))
@@ -974,25 +992,20 @@ readUnsignedNumber(const ::rtl::OUString & rString,
}
else
{
- if (io_rnPos != nPos) // read something?
- {
- io_rnPos = nPos;
- if (bOverflow)
- {
- return R_OVERFLOW;
- }
- else
- {
- o_rNumber = nTemp;
- return R_SUCCESS;
- }
- }
- else break;
+ break;
}
+ ++nPos;
+ }
+
+ if (io_rnPos == nPos) // read something?
+ {
+ o_rNumber = -1;
+ return R_NOTHING;
}
- o_rNumber = -1;
- return R_NOTHING;
+ io_rnPos = nPos;
+ o_rNumber = nTemp;
+ return (bOverflow) ? R_OVERFLOW : R_SUCCESS;
}
static bool
@@ -1069,7 +1082,7 @@ bool Converter::convertDuration(util::Duration& rDuration,
sal_Int32 nHours(0);
sal_Int32 nMinutes(0);
sal_Int32 nSeconds(0);
- sal_Int32 nHundredthSeconds(0);
+ sal_Int32 nMilliSeconds(0);
bTimePart = readDurationT(string, nPos);
bSuccess = (R_SUCCESS == readUnsignedNumber(string, nPos, nTemp));
@@ -1123,30 +1136,39 @@ bool Converter::convertDuration(util::Duration& rDuration,
nTemp = -1;
const sal_Int32 nStart(nPos);
bSuccess =
- (R_SUCCESS == readUnsignedNumber(string, nPos, nTemp));
+ (R_NOTHING != readUnsignedNumber(string, nPos, nTemp));
if ((nPos < string.getLength()) && bSuccess)
{
- if (sal_Unicode('S') == string[nPos])
+ if (-1 != nTemp)
{
- ++nPos;
- if (-1 != nTemp)
+ nTemp = -1;
+ const sal_Int32 nDigits = nPos - nStart;
+ OSL_ENSURE(nDigits > 0, "bad code monkey");
+ const sal_Unicode cZero('0');
+ nMilliSeconds = 100 * (string[nStart] - cZero);
+ if (nDigits >= 2)
{
- nTemp = -1;
- const sal_Int32 nDigits = nPos - nStart;
- OSL_ENSURE(nDigits > 0, "bad code monkey");
- nHundredthSeconds = 10 *
- (string[nStart] - sal_Unicode('0'));
- if (nDigits >= 2)
+ nMilliSeconds += 10 *
+ (string[nStart+1] - cZero);
+ if (nDigits >= 3)
{
- nHundredthSeconds +=
- (string[nStart+1] - sal_Unicode('0'));
+ nMilliSeconds += (string[nStart+2] - cZero);
}
}
+
+ if (sal_Unicode('S') == string[nPos])
+ {
+ ++nPos;
+ }
else
{
bSuccess = false;
}
}
+ else
+ {
+ bSuccess = false;
+ }
}
}
else
@@ -1182,14 +1204,14 @@ bool Converter::convertDuration(util::Duration& rDuration,
if (bSuccess)
{
- rDuration.Negative = bIsNegativeDuration;
- rDuration.Years = static_cast<sal_Int16>(nYears);
- rDuration.Months = static_cast<sal_Int16>(nMonths);
- rDuration.Days = static_cast<sal_Int16>(nDays);
- rDuration.Hours = static_cast<sal_Int16>(nHours);
- rDuration.Minutes = static_cast<sal_Int16>(nMinutes);
- rDuration.Seconds = static_cast<sal_Int16>(nSeconds);
- rDuration.HundredthSeconds = static_cast<sal_Int16>(nHundredthSeconds);
+ rDuration.Negative = bIsNegativeDuration;
+ rDuration.Years = static_cast<sal_Int16>(nYears);
+ rDuration.Months = static_cast<sal_Int16>(nMonths);
+ rDuration.Days = static_cast<sal_Int16>(nDays);
+ rDuration.Hours = static_cast<sal_Int16>(nHours);
+ rDuration.Minutes = static_cast<sal_Int16>(nMinutes);
+ rDuration.Seconds = static_cast<sal_Int16>(nSeconds);
+ rDuration.MilliSeconds = static_cast<sal_Int16>(nMilliSeconds);
}
return bSuccess;
@@ -1202,24 +1224,26 @@ struct Test {
return a.Years == b.Years && a.Months == b.Months && a.Days == b.Days
&& a.Hours == b.Hours && a.Minutes == b.Minutes
&& a.Seconds == b.Seconds
- && a.HundredthSeconds == b.HundredthSeconds
+ && a.MilliSeconds == b.MilliSeconds
&& a.Negative == b.Negative;
}
- static void doTest(util::Duration const & rid, const char * pis)
+ static void doTest(util::Duration const & rid, char const*const pis,
+ char const*const i_pos = 0)
{
- bool bSuccess(false);
- ::rtl::OUStringBuffer buf;
- Converter::convertDuration(buf, rid);
- ::rtl::OUString os(buf.makeStringAndClear());
- OSL_TRACE(::rtl::OUStringToOString(os.getStr(), RTL_TEXTENCODING_UTF8));
- OSL_ASSERT(os.equalsAscii(pis));
+ char const*const pos((i_pos) ? i_pos : pis);
util::Duration od;
- bSuccess = Converter::convertDuration(od, os);
- OSL_TRACE("%d %dY %dM %dD %dH %dM %dS %dH",
+ ::rtl::OUString is(::rtl::OUString::createFromAscii(pis));
+ bool bSuccess = Converter::convertDuration(od, is);
+ OSL_TRACE("%d %dY %dM %dD %dH %dM %dS %dm",
od.Negative, od.Years, od.Months, od.Days,
- od.Hours, od.Minutes, od.Seconds, od.HundredthSeconds);
+ od.Hours, od.Minutes, od.Seconds, od.MilliSeconds);
OSL_ASSERT(bSuccess);
OSL_ASSERT(eqDuration(rid, od));
+ ::rtl::OUStringBuffer buf;
+ Converter::convertDuration(buf, od);
+ OSL_TRACE(
+ ::rtl::OUStringToOString(buf.getStr(), RTL_TEXTENCODING_UTF8));
+ OSL_ASSERT(buf.makeStringAndClear().equalsAscii(pos));
}
static void doTestF(const char * pis)
{
@@ -1228,7 +1252,7 @@ struct Test {
::rtl::OUString::createFromAscii(pis));
OSL_TRACE("%d %dY %dM %dD %dH %dM %dS %dH",
od.Negative, od.Years, od.Months, od.Days,
- od.Hours, od.Minutes, od.Seconds, od.HundredthSeconds);
+ od.Hours, od.Minutes, od.Seconds, od.MilliSeconds);
OSL_ASSERT(!bSuccess);
}
Test() {
@@ -1239,24 +1263,27 @@ struct Test {
doTest( util::Duration(false, 0, 0, 0, 52, 0, 0, 0), "PT52H" );
doTest( util::Duration(false, 0, 0, 0, 0, 717, 0, 0), "PT717M" );
doTest( util::Duration(false, 0, 0, 0, 0, 0, 121, 0), "PT121S" );
- doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 19), "PT0.19S" );
- doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 9), "PT0.09S" );
+ doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 190), "PT0.19S" );
+ doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 90), "PT0.09S" );
+ doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 9), "PT0.009S" );
+ doTest( util::Duration(false, 0, 0, 0, 0, 0, 9, 999),
+ "PT9.999999999999999999999999999999S", "PT9.999S" );
doTest( util::Duration(true , 0, 0, 9999, 0, 0, 0, 0), "-P9999D" );
- doTest( util::Duration(true , 7, 6, 5, 4, 3, 2, 1),
+ doTest( util::Duration(true , 7, 6, 5, 4, 3, 2, 10),
"-P7Y6M5DT4H3M2.01S" );
doTest( util::Duration(false, 0, 6, 0, 0, 3, 0, 0), "P6MT3M" );
doTest( util::Duration(false, 0, 0, 0, 0, 0, 0, 0), "P0D" );
- doTestF("1Y1M");
- doTestF("P-1Y1M");
- doTestF("P1M1Y");
- doTestF("PT1Y");
- doTestF("P1Y1M1M");
- doTestF("P1YT1MT1M");
- doTestF("P1YT");
- doTestF("P99999999999Y");
- doTestF("PT.1S");
- doTestF("PT5M.134S");
- doTestF("PT1.S");
+ doTestF("1Y1M"); // invalid: no ^P
+ doTestF("P-1Y1M"); // invalid: - after P
+ doTestF("P1M1Y"); // invalid: Y after M
+ doTestF("PT1Y"); // invalid: Y after T
+ doTestF("P1Y1M1M"); // invalid: M twice, no T
+ doTestF("P1YT1MT1M"); // invalid: T twice
+ doTestF("P1YT"); // invalid: T but no H,M,S
+ doTestF("P99999999999Y"); // cannot parse so many Ys
+ doTestF("PT.1S"); // invalid: no 0 preceding .
+ doTestF("PT5M.134S"); // invalid: no 0 preceding .
+ doTestF("PT1.S"); // invalid: no digit following .
OSL_TRACE("\nSAX CONVERTER TEST END\n");
}
};
@@ -1285,6 +1312,15 @@ void Converter::convertDateTime(
const sal_Unicode zero('0');
const sal_Unicode tee ('T');
+ if (i_rDateTime.Year < 1000) {
+ i_rBuffer.append(zero);
+ }
+ if (i_rDateTime.Year < 100) {
+ i_rBuffer.append(zero);
+ }
+ if (i_rDateTime.Year < 10) {
+ i_rBuffer.append(zero);
+ }
i_rBuffer.append( static_cast<sal_Int32>(i_rDateTime.Year) ).append(dash);
if( i_rDateTime.Month < 10 ) {
i_rBuffer.append(zero);
@@ -1352,6 +1388,46 @@ bool Converter::convertDateTime( util::DateTime& rDateTime,
}
}
+static bool
+readDateTimeComponent(const ::rtl::OUString & rString,
+ sal_Int32 & io_rnPos, sal_Int32 & o_rnTarget,
+ const sal_Int32 nMinLength, const bool bExactLength)
+{
+ const sal_Int32 nOldPos(io_rnPos);
+ sal_Int32 nTemp(0);
+ if (R_SUCCESS != readUnsignedNumber(rString, io_rnPos, nTemp))
+ {
+ return false;
+ }
+ const sal_Int32 nTokenLength(io_rnPos - nOldPos);
+ if ((nTokenLength < nMinLength) ||
+ (bExactLength && (nTokenLength > nMinLength)))
+ {
+ return false; // bad length
+ }
+ o_rnTarget = nTemp;
+ return true;
+}
+
+static bool lcl_isLeapYear(const sal_uInt32 nYear)
+{
+ return ((nYear % 4) == 0)
+ && !(((nYear % 100) == 0) || ((nYear % 400) == 0));
+}
+
+static sal_uInt16
+lcl_MaxDaysPerMonth(const sal_Int32 nMonth, const sal_Int32 nYear)
+{
+ static sal_uInt16 s_MaxDaysPerMonth[12] =
+ { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
+ OSL_ASSERT(0 < nMonth && nMonth <= 12);
+ if ((2 == nMonth) && lcl_isLeapYear(nYear))
+ {
+ return 29;
+ }
+ return s_MaxDaysPerMonth[nMonth - 1];
+}
+
/** convert ISO "date" or "dateTime" string to util::DateTime or util::Date */
bool Converter::convertDateOrDateTime(
util::Date & rDate, util::DateTime & rDateTime,
@@ -1359,97 +1435,233 @@ bool Converter::convertDateOrDateTime(
{
bool bSuccess = true;
- rtl::OUString aDateStr, aTimeStr, sDoubleStr;
- sal_Int32 nPos = rString.indexOf( (sal_Unicode) 'T' );
- sal_Int32 nPos2 = rString.indexOf( (sal_Unicode) ',' );
- if (nPos2 < 0)
- nPos2 = rString.indexOf( (sal_Unicode) '.' );
- if ( nPos >= 0 )
+ const ::rtl::OUString string = rString.trim().toAsciiUpperCase();
+ sal_Int32 nPos(0);
+ bool bNegative(false);
+ if ((string.getLength() > nPos) && (sal_Unicode('-') == string[nPos]))
{
- aDateStr = rString.copy( 0, nPos );
- if ( nPos2 >= 0 )
- {
- aTimeStr = rString.copy( nPos + 1, nPos2 - nPos - 1 );
- sDoubleStr = OUString(RTL_CONSTASCII_USTRINGPARAM("0."));
- sDoubleStr += rString.copy( nPos2 + 1 );
- }
- else
- {
- aTimeStr = rString.copy(nPos + 1);
- sDoubleStr = OUString(RTL_CONSTASCII_USTRINGPARAM("0.0"));
- }
+ ++nPos;
+ bNegative = true;
}
- else
- aDateStr = rString; // no separator: only date part
- sal_Int32 nYear = 1899;
- sal_Int32 nMonth = 12;
- sal_Int32 nDay = 30;
- sal_Int32 nHour = 0;
- sal_Int32 nMin = 0;
- sal_Int32 nSec = 0;
+ sal_Int32 nYear(0);
+ {
+ bSuccess = readDateTimeComponent(string, nPos, nYear, 4, false);
+ bSuccess &= (0 < nYear);
+ bSuccess &= (nPos < string.getLength()); // not last token
+ }
+ if (bSuccess && (sal_Unicode('-') != string[nPos])) // separator
+ {
+ bSuccess = false;
+ }
+ if (bSuccess)
+ {
+ ++nPos;
+ }
- const sal_Unicode* pStr = aDateStr.getStr();
- sal_Int32 nDateTokens = 1;
- while ( *pStr )
+ sal_Int32 nMonth(0);
+ if (bSuccess)
{
- if ( *pStr == '-' )
- nDateTokens++;
- pStr++;
+ bSuccess = readDateTimeComponent(string, nPos, nMonth, 2, true);
+ bSuccess &= (0 < nMonth) && (nMonth <= 12);
+ bSuccess &= (nPos < string.getLength()); // not last token
}
- if ( nDateTokens > 3 || aDateStr.getLength() == 0 )
+ if (bSuccess && (sal_Unicode('-') != string[nPos])) // separator
+ {
bSuccess = false;
- else
+ }
+ if (bSuccess)
+ {
+ ++nPos;
+ }
+
+ sal_Int32 nDay(0);
+ if (bSuccess)
+ {
+ bSuccess = readDateTimeComponent(string, nPos, nDay, 2, true);
+ bSuccess &= (0 < nDay) && (nDay <= lcl_MaxDaysPerMonth(nMonth, nYear));
+ }
+
+ bool bHaveTime(false);
+ if (bSuccess && (nPos < string.getLength()))
{
- sal_Int32 n = 0;
- if ( !convertNumber( nYear, aDateStr.getToken( 0, '-', n ), 0, 9999 ) )
+ if (sal_Unicode('T') == string[nPos]) // time separator
+ {
+ bHaveTime = true;
+ ++nPos;
+ }
+ }
+
+ sal_Int32 nHours(0);
+ sal_Int32 nMinutes(0);
+ sal_Int32 nSeconds(0);
+ sal_Int32 nMilliSeconds(0);
+ if (bSuccess && bHaveTime)
+ {
+ {
+ bSuccess = readDateTimeComponent(string, nPos, nHours, 2, true);
+ bSuccess &= (0 <= nHours) && (nHours <= 24);
+ bSuccess &= (nPos < string.getLength()); // not last token
+ }
+ if (bSuccess && (sal_Unicode(':') != string[nPos])) // separator
+ {
bSuccess = false;
- if ( nDateTokens >= 2 )
- if ( !convertNumber( nMonth, aDateStr.getToken( 0, '-', n ), 0, 12 ) )
- bSuccess = false;
- if ( nDateTokens >= 3 )
- if ( !convertNumber( nDay, aDateStr.getToken( 0, '-', n ), 0, 31 ) )
+ }
+ if (bSuccess)
+ {
+ ++nPos;
+ }
+
+ if (bSuccess)
+ {
+ bSuccess = readDateTimeComponent(string, nPos, nMinutes, 2, true);
+ bSuccess &= (0 <= nMinutes) && (nMinutes < 60);
+ bSuccess &= (nPos < string.getLength()); // not last token
+ }
+ if (bSuccess && (sal_Unicode(':') != string[nPos])) // separator
+ {
+ bSuccess = false;
+ }
+ if (bSuccess)
+ {
+ ++nPos;
+ }
+
+ if (bSuccess)
+ {
+ bSuccess = readDateTimeComponent(string, nPos, nSeconds, 2, true);
+ bSuccess &= (0 <= nSeconds) && (nSeconds < 60);
+ }
+ if (bSuccess && (nPos < string.getLength()) &&
+ (sal_Unicode('.') == string[nPos])) // fraction separator
+ {
+ ++nPos;
+ const sal_Int32 nStart(nPos);
+ sal_Int32 nTemp(0);
+ if (R_NOTHING == readUnsignedNumber(string, nPos, nTemp))
+ {
bSuccess = false;
+ }
+ if (bSuccess)
+ {
+ // cannot use nTemp because of possible leading zeros
+ // and possible overflow => read digits directly
+ const sal_Int32 nDigits(nPos - nStart);
+ OSL_ENSURE(nDigits > 0, "bad code monkey");
+ const sal_Unicode cZero('0');
+ nMilliSeconds = 100 * (string[nStart] - cZero);
+ if (nDigits >= 2)
+ {
+ nMilliSeconds += 10 * (string[nStart+1] - cZero);
+ if (nDigits >= 3)
+ {
+ nMilliSeconds += (string[nStart+2] - cZero);
+ }
+ }
+ }
+ }
+
+ if (bSuccess && (nHours == 24))
+ {
+ if (!((0 == nMinutes) && (0 == nSeconds) && (0 == nMilliSeconds)))
+ {
+ bSuccess = false; // only 24:00:00 is valid
+ }
+#if 0
+ else
+ {
+ nHours = 0; // normalize 24:00:00 to 00:00:00 of next day
+ lcl_addDay(bNegative, nYear, nMonth, nDay, 1);
+ }
+#endif
+ }
}
- if ( aTimeStr.getLength() > 0 ) // time is optional
+ bool bHaveTimezone(false);
+ bool bHaveTimezonePlus(false);
+ bool bHaveTimezoneMinus(false);
+ if (bSuccess && (nPos < string.getLength()))
{
- pStr = aTimeStr.getStr();
- sal_Int32 nTimeTokens = 1;
- while ( *pStr )
+ const sal_Unicode c(string[nPos]);
+ if (sal_Unicode('+') == c)
{
- if ( *pStr == ':' )
- nTimeTokens++;
- pStr++;
+ bHaveTimezone = true;
+ bHaveTimezonePlus = true;
+ ++nPos;
+ }
+ else if (sal_Unicode('-') == c)
+ {
+ bHaveTimezone = true;
+ bHaveTimezoneMinus = true;
+ ++nPos;
+ }
+ else if (sal_Unicode('Z') == c)
+ {
+ bHaveTimezone = true;
+ ++nPos;
}
- if ( nTimeTokens > 3 )
- bSuccess = false;
else
{
- sal_Int32 n = 0;
- if ( !convertNumber( nHour, aTimeStr.getToken( 0, ':', n ), 0, 23 ) )
- bSuccess = false;
- if ( nTimeTokens >= 2 )
- if ( !convertNumber( nMin, aTimeStr.getToken( 0, ':', n ), 0, 59 ) )
- bSuccess = false;
- if ( nTimeTokens >= 3 )
- if ( !convertNumber( nSec, aTimeStr.getToken( 0, ':', n ), 0, 59 ) )
- bSuccess = false;
+ bSuccess = false;
+ }
+ }
+ sal_Int32 nTimezoneHours(0);
+ sal_Int32 nTimezoneMinutes(0);
+ if (bSuccess && (bHaveTimezonePlus || bHaveTimezoneMinus))
+ {
+ bSuccess = readDateTimeComponent(
+ string, nPos, nTimezoneHours, 2, true);
+ bSuccess &= (0 <= nTimezoneHours) && (nTimezoneHours <= 14);
+ bSuccess &= (nPos < string.getLength()); // not last token
+ if (bSuccess && (sal_Unicode(':') != string[nPos])) // separator
+ {
+ bSuccess = false;
+ }
+ if (bSuccess)
+ {
+ ++nPos;
+ }
+ if (bSuccess)
+ {
+ bSuccess = readDateTimeComponent(
+ string, nPos, nTimezoneMinutes, 2, true);
+ bSuccess &= (0 <= nTimezoneMinutes) && (nTimezoneMinutes < 60);
+ }
+ if (bSuccess && (nTimezoneHours == 14))
+ {
+ if (0 != nTimezoneMinutes)
+ {
+ bSuccess = false; // only +-14:00 is valid
+ }
}
}
+ bSuccess &= (nPos == string.getLength()); // trailing junk?
+
+ if (bSuccess && bHaveTimezone)
+ {
+ // util::DateTime does not support timezones!
+#if 0
+ // do not add timezone, just strip it (as suggested by er)
+ lcl_addTimezone(bNegative, nYear, nMonth, nDay, nHours, nMinutes,
+ !bHaveTimezoneMinus, nTimezoneHours, nTimezoneMinutes);
+#endif
+ }
+
if (bSuccess)
{
- if ( aTimeStr.getLength() > 0 ) // time is optional
+ if (bHaveTime) // time is optional
{
+ // util::DateTime does not support negative years!
rDateTime.Year = static_cast<sal_uInt16>(nYear);
rDateTime.Month = static_cast<sal_uInt16>(nMonth);
rDateTime.Day = static_cast<sal_uInt16>(nDay);
- rDateTime.Hours = static_cast<sal_uInt16>(nHour);
- rDateTime.Minutes = static_cast<sal_uInt16>(nMin);
- rDateTime.Seconds = static_cast<sal_uInt16>(nSec);
+ rDateTime.Hours = static_cast<sal_uInt16>(nHours);
+ rDateTime.Minutes = static_cast<sal_uInt16>(nMinutes);
+ rDateTime.Seconds = static_cast<sal_uInt16>(nSeconds);
+ // util::DateTime does not support 3 decimal digits of precision!
rDateTime.HundredthSeconds =
- static_cast<sal_uInt16>((sDoubleStr).toDouble() * 100);
+ static_cast<sal_uInt16>(nMilliSeconds / 10);
rbDateTime = true;
}
else
@@ -1463,6 +1675,100 @@ bool Converter::convertDateOrDateTime(
return bSuccess;
}
+#if 0
+struct Test {
+ static bool eqDateTime(util::DateTime a, util::DateTime b) {
+ return a.Year == b.Year && a.Month == b.Month && a.Day == b.Day
+ && a.Hours == b.Hours && a.Minutes == b.Minutes
+ && a.Seconds == b.Seconds
+ && a.HundredthSeconds == b.HundredthSeconds;
+ }
+ static void doTest(util::DateTime const & rdt, char const*const pis,
+ char const*const i_pos = 0)
+ {
+ char const*const pos((i_pos) ? i_pos : pis);
+ ::rtl::OUString is(::rtl::OUString::createFromAscii(pis));
+ util::DateTime odt;
+ bool bSuccess( Converter::convertDateTime(odt, is) );
+ OSL_TRACE("Y:%d M:%d D:%d H:%d M:%d S:%d H:%d",
+ odt.Year, odt.Month, odt.Day,
+ odt.Hours, odt.Minutes, odt.Seconds, odt.HundredthSeconds);
+ OSL_ASSERT(bSuccess);
+ OSL_ASSERT(eqDateTime(rdt, odt));
+ ::rtl::OUStringBuffer buf;
+ Converter::convertDateTime(buf, odt, true);
+ OSL_TRACE(
+ ::rtl::OUStringToOString(buf.getStr(), RTL_TEXTENCODING_UTF8));
+ OSL_ASSERT(buf.makeStringAndClear().equalsAscii(pos));
+ }
+ static void doTestF(const char * pis)
+ {
+ util::DateTime odt;
+ bool bSuccess = Converter::convertDateTime(odt,
+ ::rtl::OUString::createFromAscii(pis));
+ OSL_TRACE("Y:%d M:%d D:%d H:%dH M:%d S:%d H:%d",
+ odt.Year, odt.Month, odt.Day,
+ odt.Hours, odt.Minutes, odt.Seconds, odt.HundredthSeconds);
+ OSL_ASSERT(!bSuccess);
+ }
+ Test() {
+ OSL_TRACE("\nSAX CONVERTER TEST BEGIN\n");
+ doTest( util::DateTime(0, 0, 0, 0, 1, 1, 1), "0001-01-01T00:00:00" );
+ doTest( util::DateTime(0, 0, 0, 0, 1, 1, 1),
+ "0001-01-01T00:00:00Z", "0001-01-01T00:00:00" );
+// doTest( util::DateTime(0, 0, 0, 0, 1, 1, -1), "-0001-01-01T00:00:00" );
+// doTest( util::DateTime(0, 0, 0, 0, 1, 1, -1), "-0001-01-01T00:00:00Z" );
+ doTest( util::DateTime(0, 0, 0, 0, 1, 1, 1),
+ "0001-01-01T00:00:00-00:00", "0001-01-01T00:00:00" );
+ doTest( util::DateTime(0, 0, 0, 0, 1, 1, 1),
+ "0001-01-01T00:00:00+00:00", "0001-01-01T00:00:00" );
+ doTest( util::DateTime(0, 0, 0, 0, 2, 1, 1)/*(0, 0, 12, 0, 2, 1, 1)*/,
+ "0001-01-02T00:00:00-12:00", "0001-01-02T00:00:00" );
+// "0001-02-01T12:00:00" );
+ doTest( util::DateTime(0, 0, 0, 0, 2, 1, 1)/*(0, 0, 12, 0, 1, 1, 1)*/,
+ "0001-01-02T00:00:00+12:00", "0001-01-02T00:00:00" );
+// "0001-01-01T12:00:00" );
+ doTest( util::DateTime(99, 59, 59, 23, 31, 12, 9999),
+ "9999-12-31T23:59:59.99" );
+ doTest( util::DateTime(99, 59, 59, 23, 31, 12, 9999),
+ "9999-12-31T23:59:59.99Z", "9999-12-31T23:59:59.99" );
+ doTest( util::DateTime(99, 59, 59, 23, 31, 12, 9999),
+ "9999-12-31T23:59:59.9999999999999999999999999999999999999",
+ "9999-12-31T23:59:59.99" );
+ doTest( util::DateTime(99, 59, 59, 23, 31, 12, 9999),
+ "9999-12-31T23:59:59.9999999999999999999999999999999999999Z",
+ "9999-12-31T23:59:59.99" );
+ doTest( util::DateTime(0, 0, 0, 24, 1, 1, 333)
+ /*(0, 0, 0, 0, 2, 1, 333)*/,
+ "0333-01-01T24:00:00"/*, "0333-01-02T00:00:00"*/ );
+ doTestF( "+0001-01-01T00:00:00" ); // invalid: ^+
+ doTestF( "1-01-01T00:00:00" ); // invalid: < 4 Y
+ doTestF( "0001-1-01T00:00:00" ); // invalid: < 2 M
+ doTestF( "0001-01-1T00:00:00" ); // invalid: < 2 D
+ doTestF( "0001-01-01T0:00:00" ); // invalid: < 2 H
+ doTestF( "0001-01-01T00:0:00" ); // invalid: < 2 M
+ doTestF( "0001-01-01T00:00:0" ); // invalid: < 2 S
+ doTestF( "0001-01-01T00:00:00." ); // invalid: .$
+ doTestF( "0001-01-01T00:00:00+1:00" ); // invalid: < 2 TZ H
+ doTestF( "0001-01-01T00:00:00+00:1" ); // invalid: < 2 TZ M
+ doTestF( "0001-13-01T00:00:00" ); // invalid: M > 12
+ doTestF( "0001-01-32T00:00:00" ); // invalid: D > 31
+ doTestF( "0001-01-01T25:00:00" ); // invalid: H > 24
+ doTestF( "0001-01-01T00:60:00" ); // invalid: H > 59
+ doTestF( "0001-01-01T00:00:60" ); // invalid: S > 59
+ doTestF( "0001-01-01T24:01:00" ); // invalid: H=24, but M != 0
+ doTestF( "0001-01-01T24:00:01" ); // invalid: H=24, but S != 0
+ doTestF( "0001-01-01T24:00:00.1" ); // invalid: H=24, but H != 0
+ doTestF( "0001-01-02T00:00:00+15:00" ); // invalid: TZ > +14:00
+ doTestF( "0001-01-02T00:00:00+14:01" ); // invalid: TZ > +14:00
+ doTestF( "0001-01-02T00:00:00-15:00" ); // invalid: TZ < -14:00
+ doTestF( "0001-01-02T00:00:00-14:01" ); // invalid: TZ < -14:00
+ OSL_TRACE("\nSAX CONVERTER TEST END\n");
+ }
+};
+static Test test;
+#endif
+
/** gets the position of the first comma after npos in the string
rStr. Commas inside '"' pairs are not matched */
sal_Int32 Converter::indexOfComma( const OUString& rStr,
diff --git a/svl/inc/svl/smplhint.hxx b/svl/inc/svl/smplhint.hxx
index baf3c85222b4..cf705b41c5ae 100644
--- a/svl/inc/svl/smplhint.hxx
+++ b/svl/inc/svl/smplhint.hxx
@@ -39,14 +39,14 @@
#define SFX_HINT_UPDATEDONE 0x00000020
#define SFX_HINT_DEINITIALIZING 0x00000040
#define SFX_HINT_MODECHANGED 0x00000080
-#define SFX_HINT_CANCELLABLE 0x00000100
-#define SFX_HINT_DATAAVAILABLE 0x00000200
-#define SFX_HINT_SAVECOMPLETED 0x00000400
-#define SFX_HINT_RELEASEREF 0x00000800
+ // unused, formerly SFX_HINT_CANCELLABLE
+ // unused, formerly SFX_HINT_DATAAVAILABLE
+ // unused, formerly SFX_HINT_SAVECOMPLETED
+ // unused, formerly SFX_HINT_RELEASEREF
#define SFX_HINT_COLORS_CHANGED 0x00001000
#define SFX_HINT_CTL_SETTINGS_CHANGED 0x00002000
#define SFX_HINT_ACCESSIBILITY_CHANGED 0x00004000
-#define SFX_HINT_VIEWCREATED 0x00008000
+ // unused, formerly SFX_HINT_VIEWCREATED
#define SFX_HINT_USER00 0x00010000
#define SFX_HINT_USER01 0x00020000
#define SFX_HINT_USER02 0x00040000
diff --git a/svl/source/notify/makefile.mk b/svl/source/notify/makefile.mk
index bfccd06de853..c2e6648907e5 100644
--- a/svl/source/notify/makefile.mk
+++ b/svl/source/notify/makefile.mk
@@ -42,7 +42,6 @@ SLOFILES = \
$(SLO)$/hint.obj \
$(SLO)$/lstner.obj \
$(SLO)$/isethint.obj \
- $(SLO)$/cancel.obj \
$(SLO)$/brdcst.obj \
$(SLO)$/listener.obj \
$(SLO)$/listenerbase.obj \
diff --git a/svtools/inc/svtools/grfmgr.hxx b/svtools/inc/svtools/grfmgr.hxx
index 06f75394c8bb..3ed608c1525d 100644
--- a/svtools/inc/svtools/grfmgr.hxx
+++ b/svtools/inc/svtools/grfmgr.hxx
@@ -422,6 +422,11 @@ public:
BOOL Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
const GraphicAttr* pAttr = NULL, ULONG nFlags = GRFMGR_DRAW_STANDARD );
+ BOOL DrawWithPDFHandling( OutputDevice& rOutDev,
+ const Point& rPt, const Size& rSz,
+ const GraphicAttr* pGrfAttr = NULL,
+ const ULONG nFlags = GRFMGR_DRAW_STANDARD );
+
/** Draw the graphic repeatedly into the given output rectangle
@param pOut
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index ab4bda64a652..47b5ab9aa4b9 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -1840,26 +1840,7 @@ sal_Bool SvtDocumentTemplateDialog::CanEnableEditBtn() const
if ( pImpl->pWin->IsFileSelected() && aFolderURL.getLength() )
{
::rtl::OUString aFileTargetURL = pImpl->pWin->GetSelectedFile();
- ::rtl::OUString aFolderTargetURL;
-
- ::ucbhelper::Content aFolderContent;
- Reference< XCommandEnvironment > xEnv;
- if ( ::ucbhelper::Content::create( aFolderURL, xEnv, aFolderContent ) )
- try
- {
- ::rtl::OUString aTmpURL;
- uno::Any aValue = aFolderContent.getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TargetDirURL") ) );
- aValue >>= aTmpURL;
-
- uno::Reference< util::XOfficeInstallationDirectories > xOffInstDirs = pImpl->getOfficeInstDirs();
- if ( xOffInstDirs.is() )
- aFolderTargetURL = xOffInstDirs->makeAbsoluteURL( aTmpURL );
- }
- catch( uno::Exception& )
- {}
-
- if ( aFolderTargetURL.getLength() && ::utl::UCBContentHelper::IsSubPath( aFolderTargetURL, aFileTargetURL ) )
- bEnable = sal_True;
+ bEnable = aFileTargetURL.getLength() > 0;
}
return bEnable;
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 8aadbb9028b0..02a578629039 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -66,7 +66,6 @@
#include <unotools/historyoptions.hxx>
#include <svl/eitem.hxx>
#include <svl/stritem.hxx>
-#include <svl/cancel.hxx>
#include <svl/itemset.hxx>
#include "svl/urihelper.hxx"
#include <unotools/pathoptions.hxx>
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index 6647b9eee608..2849ddb71d10 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -854,7 +854,7 @@ void AssignmentPersistentData::Commit()
m_aDatasource.SaveValue();
// create an interaction handler (may be needed for connecting)
- const String sInteractionHandlerServiceName = String::CreateFromAscii("com.sun.star.sdb.InteractionHandler");
+ const String sInteractionHandlerServiceName = String::CreateFromAscii("com.sun.star.task.InteractionHandler");
Reference< XInteractionHandler > xHandler;
try
{
diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx
index bac18a2932dc..6a09f85036fd 100644
--- a/svtools/source/dialogs/wizardmachine.cxx
+++ b/svtools/source/dialogs/wizardmachine.cxx
@@ -90,7 +90,6 @@ namespace svt
void OWizardPage::updateDialogTravelUI()
{
OWizardMachine* pWizardMachine = dynamic_cast< OWizardMachine* >( GetParent() );
- OSL_ENSURE( pWizardMachine, "OWizardPage::updateDialogTravelUI: where am I?" );
if ( pWizardMachine )
pWizardMachine->updateTravelUI();
}
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 53f4a3ed2515..221354cc6665 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -44,6 +44,10 @@
#include <unotools/cacheoptions.hxx>
#include <svtools/grfmgr.hxx>
+// --> OD 2010-01-04 #i105243#
+#include <vcl/pdfextoutdevdata.hxx>
+// <--
+
// -----------
// - Defines -
// -----------
@@ -738,6 +742,68 @@ BOOL GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
return bRet;
}
+// --> OD 2010-01-04 #i105243#
+BOOL GraphicObject::DrawWithPDFHandling( OutputDevice& rOutDev,
+ const Point& rPt, const Size& rSz,
+ const GraphicAttr* pGrfAttr,
+ const ULONG nFlags )
+{
+ const GraphicAttr aGrfAttr( pGrfAttr ? *pGrfAttr : GetAttr() );
+
+ // Notify PDF writer about linked graphic (if any)
+ bool bWritingPdfLinkedGraphic( false );
+ Point aPt( rPt );
+ Size aSz( rSz );
+ Rectangle aCropRect;
+ vcl::PDFExtOutDevData* pPDFExtOutDevData =
+ dynamic_cast<vcl::PDFExtOutDevData*>(rOutDev.GetExtOutDevData());
+ if( pPDFExtOutDevData )
+ {
+ // only delegate image handling to PDF, if no special treatment is necessary
+ if( GetGraphic().IsLink() &&
+ rSz.Width() > 0L &&
+ rSz.Height() > 0L &&
+ !aGrfAttr.IsSpecialDrawMode() &&
+ !aGrfAttr.IsMirrored() &&
+ !aGrfAttr.IsRotated() &&
+ !aGrfAttr.IsAdjusted() )
+ {
+ bWritingPdfLinkedGraphic = true;
+
+ if( aGrfAttr.IsCropped() )
+ {
+ PolyPolygon aClipPolyPoly;
+ BOOL bRectClip;
+ const BOOL bCrop = ImplGetCropParams( &rOutDev,
+ aPt, aSz,
+ &aGrfAttr,
+ aClipPolyPoly,
+ bRectClip );
+ if ( bCrop && bRectClip )
+ {
+ aCropRect = aClipPolyPoly.GetBoundRect();
+ }
+ }
+
+ pPDFExtOutDevData->BeginGroup();
+ }
+ }
+
+ BOOL bRet = Draw( &rOutDev, rPt, rSz, &aGrfAttr, nFlags );
+
+ // Notify PDF writer about linked graphic (if any)
+ if( bWritingPdfLinkedGraphic )
+ {
+ pPDFExtOutDevData->EndGroup( const_cast< Graphic& >(GetGraphic()),
+ aGrfAttr.GetTransparency(),
+ Rectangle( aPt, aSz ),
+ aCropRect );
+ }
+
+ return bRet;
+}
+// <--
+
// -----------------------------------------------------------------------------
BOOL GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize,
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index e57c0d21d98a..391ad02e6aa1 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -73,33 +73,35 @@ struct SvtExtensionResIdMapping_Impl
static SvtExtensionResIdMapping_Impl __READONLY_DATA ExtensionMap_Impl[] =
{
- { "awk", TRUE, STR_DESCRIPTION_SOURCEFILE, IMG_TEXTFILE },
- { "bas", TRUE, STR_DESCRIPTION_SOURCEFILE, IMG_TEXTFILE },
- { "bat", TRUE, STR_DESCRIPTION_BATCHFILE, IMG_APP },
+ { "awk", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "bas", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "bat", TRUE, STR_DESCRIPTION_BATCHFILE, 0 },
{ "bmk", FALSE, STR_DESCRIPTION_BOOKMARKFILE, 0 },
{ "bmp", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_BITMAP },
- { "c", TRUE, STR_DESCRIPTION_SOURCEFILE, IMG_TEXTFILE },
+ { "c", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
{ "cfg", FALSE, STR_DESCRIPTION_CFGFILE, 0 },
- { "cmd", TRUE, STR_DESCRIPTION_BATCHFILE, IMG_APP },
- { "cob", TRUE, STR_DESCRIPTION_SOURCEFILE, IMG_TEXTFILE },
- { "com", TRUE, STR_DESCRIPTION_APPLICATION, IMG_APP },
- { "cxx", TRUE, STR_DESCRIPTION_SOURCEFILE, IMG_TEXTFILE },
+ { "cmd", TRUE, STR_DESCRIPTION_BATCHFILE, 0 },
+ { "cob", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "com", TRUE, STR_DESCRIPTION_APPLICATION, 0 },
+ { "cxx", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
{ "dbf", TRUE, STR_DESCRIPTION_DATABASE_TABLE, IMG_TABLE },
- { "def", TRUE, STR_DESCRIPTION_SOURCEFILE, IMG_TEXTFILE },
+ { "def", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
{ "dll", TRUE, STR_DESCRIPTION_SYSFILE, 0 },
- { "doc", FALSE, STR_DESCRIPTION_WORD_DOC, IMG_WORD },
+ { "doc", FALSE, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
+ { "dot", FALSE, STR_DESCRIPTION_WORD_DOC, IMG_WRITERTEMPLATE },
+ { "docx", FALSE, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
{ "dxf", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_DXF },
- { "exe", TRUE, STR_DESCRIPTION_APPLICATION, IMG_APP },
+ { "exe", TRUE, STR_DESCRIPTION_APPLICATION, 0 },
{ "gif", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_GIF },
- { "h", TRUE, STR_DESCRIPTION_SOURCEFILE, IMG_TEXTFILE },
- { "hlp", FALSE, STR_DESCRIPTION_HELP_DOC, IMG_HELP },
- { "hrc", TRUE, STR_DESCRIPTION_SOURCEFILE, IMG_TEXTFILE },
+ { "h", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "hlp", FALSE, STR_DESCRIPTION_HELP_DOC, 0 },
+ { "hrc", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
{ "htm", FALSE, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
{ "html", FALSE, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
{ "asp", FALSE, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
- { "hxx", TRUE, STR_DESCRIPTION_SOURCEFILE, IMG_TEXTFILE },
+ { "hxx", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
{ "ini", FALSE, STR_DESCRIPTION_CFGFILE, 0 },
- { "java", TRUE, STR_DESCRIPTION_SOURCEFILE, IMG_TEXTFILE },
+ { "java", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
{ "jpeg", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG },
{ "jpg", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_JPG },
{ "lha", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
@@ -110,7 +112,7 @@ static SvtExtensionResIdMapping_Impl __READONLY_DATA ExtensionMap_Impl[] =
{ "lst", TRUE, STR_DESCRIPTION_LOGFILE, 0 },
{ "met", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_MET },
{ "mml", FALSE, STR_DESCRIPTION_MATHML_DOC, IMG_MATH },
- { "mod", TRUE, STR_DESCRIPTION_SOURCEFILE, IMG_TEXTFILE },
+ { "mod", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
{ "odb", FALSE, STR_DESCRIPTION_OO_DATABASE_DOC, IMG_OO_DATABASE_DOC },
{ "odg", FALSE, STR_DESCRIPTION_OO_DRAW_DOC, IMG_OO_DRAW_DOC },
{ "odf", FALSE, STR_DESCRIPTION_OO_MATH_DOC, IMG_OO_MATH_DOC },
@@ -122,31 +124,32 @@ static SvtExtensionResIdMapping_Impl __READONLY_DATA ExtensionMap_Impl[] =
{ "otp", FALSE, STR_DESCRIPTION_OO_IMPRESS_TEMPLATE, IMG_OO_IMPRESS_TEMPLATE },
{ "ots", FALSE, STR_DESCRIPTION_OO_CALC_TEMPLATE, IMG_OO_CALC_TEMPLATE },
{ "ott", FALSE, STR_DESCRIPTION_OO_WRITER_TEMPLATE, IMG_OO_WRITER_TEMPLATE },
- { "pas", TRUE, STR_DESCRIPTION_SOURCEFILE, IMG_TEXTFILE },
+ { "pas", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
{ "pcd", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCD },
{ "pct", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCT },
{ "pcx", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PCX },
- { "pl", TRUE, STR_DESCRIPTION_SOURCEFILE, IMG_TEXTFILE },
+ { "pl", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
{ "png", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_PNG },
{ "rar", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "sbl", FALSE, 0, IMG_MACROLIB },
+ { "rtf", FALSE, STR_DESCRIPTION_WORD_DOC, IMG_WRITER },
+ { "sbl", FALSE, 0, 0 },
{ "sch", FALSE, 0, 0 },
{ "sda", FALSE, STR_DESCRIPTION_SDRAW_DOC, IMG_DRAW },
{ "sdb", FALSE, STR_DESCRIPTION_SDATABASE_DOC, IMG_DATABASE },
{ "sdc", FALSE, STR_DESCRIPTION_SCALC_DOC, IMG_CALC },
{ "sdd", FALSE, STR_DESCRIPTION_SIMPRESS_DOC, IMG_IMPRESS },
- { "sdp", FALSE, STR_DESCRIPTION_SIMPRESS_DOC, IMG_IMPRESSPACKED },
- { "sds", FALSE, STR_DESCRIPTION_SCHART_DOC, IMG_CHART },
+ { "sdp", FALSE, STR_DESCRIPTION_SIMPRESS_DOC, 0 },
+ { "sds", FALSE, STR_DESCRIPTION_SCHART_DOC, 0 },
{ "sdw", FALSE, STR_DESCRIPTION_SWRITER_DOC, IMG_WRITER },
- { "sga", FALSE, 0, IMG_GALLERY },
+ { "sga", FALSE, 0, 0 },
{ "sgf", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SGF },
{ "sgl", FALSE, STR_DESCRIPTION_GLOBALDOC, IMG_GLOBAL_DOC },
{ "sgv", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SGV },
{ "shtml", FALSE, STR_DESCRIPTION_HTMLFILE, IMG_HTML },
{ "sim", FALSE, STR_DESCRIPTION_SIMAGE_DOC, IMG_SIM },
{ "smf", FALSE, STR_DESCRIPTION_SMATH_DOC, IMG_MATH },
- { "src", TRUE, STR_DESCRIPTION_SOURCEFILE, IMG_TEXTFILE },
- { "svh", FALSE, STR_DESCRIPTION_HELP_DOC, IMG_SVHELP },
+ { "src", TRUE, STR_DESCRIPTION_SOURCEFILE, 0 },
+ { "svh", FALSE, STR_DESCRIPTION_HELP_DOC, 0 },
{ "svm", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_SVM },
{ "stc", FALSE, STR_DESCRIPTION_CALC_TEMPLATE, IMG_CALCTEMPLATE },
{ "std", FALSE, STR_DESCRIPTION_DRAW_TEMPLATE, IMG_DRAWTEMPLATE },
@@ -157,27 +160,29 @@ static SvtExtensionResIdMapping_Impl __READONLY_DATA ExtensionMap_Impl[] =
{ "sxg", FALSE, STR_DESCRIPTION_SXGLOBAL_DOC, IMG_GLOBAL_DOC },
{ "sxi", FALSE, STR_DESCRIPTION_SXIMPRESS_DOC, IMG_IMPRESS },
{ "sxm", FALSE, STR_DESCRIPTION_SXMATH_DOC, IMG_MATH },
- { "sxs", FALSE, STR_DESCRIPTION_SXCHART_DOC, IMG_CHART },
+ { "sxs", FALSE, STR_DESCRIPTION_SXCHART_DOC, 0 },
{ "sxw", FALSE, STR_DESCRIPTION_SXWRITER_DOC, IMG_WRITER },
{ "sys", TRUE, STR_DESCRIPTION_SYSFILE, 0 },
{ "tif", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_TIFF },
{ "tiff", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_TIFF },
{ "txt", FALSE, STR_DESCRIPTION_TEXTFILE, IMG_TEXTFILE },
- { "url", FALSE, STR_DESCRIPTION_LINK, IMG_HTML },
+ { "url", FALSE, STR_DESCRIPTION_LINK, 0 },
{ "vor", FALSE, STR_DESCRIPTION_SOFFICE_TEMPLATE_DOC, IMG_WRITERTEMPLATE },
{ "vxd", TRUE, STR_DESCRIPTION_SYSFILE, 0 },
{ "wmf", TRUE, STR_DESCRIPTION_GRAPHIC_DOC, IMG_WMF },
- { "xls", FALSE, STR_DESCRIPTION_EXCEL_DOC, IMG_EXCEL },
- { "xlt", FALSE, STR_DESCRIPTION_EXCEL_TEMPLATE_DOC, IMG_EXCELTEMPLATE },
+ { "xls", FALSE, STR_DESCRIPTION_EXCEL_DOC, IMG_CALC },
+ { "xlt", FALSE, STR_DESCRIPTION_EXCEL_TEMPLATE_DOC, IMG_CALCTEMPLATE },
+ { "xlsx", FALSE, STR_DESCRIPTION_EXCEL_DOC, IMG_CALC },
{ "uu", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
{ "uue", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
{ "z", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
{ "zip", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
{ "zoo", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
{ "gz", TRUE, STR_DESCRIPTION_ARCHIVFILE, 0 },
- { "ppt", FALSE, STR_DESCRIPTION_POWERPOINT, IMG_POWERPOINT },
- { "pot", FALSE, STR_DESCRIPTION_POWERPOINT_TEMPLATE, IMG_POWERPOINTTEMPLATE },
- { "pps", FALSE, STR_DESCRIPTION_POWERPOINT_SHOW, IMG_POWERPOINT },
+ { "ppt", FALSE, STR_DESCRIPTION_POWERPOINT, IMG_IMPRESS },
+ { "pot", FALSE, STR_DESCRIPTION_POWERPOINT_TEMPLATE, IMG_IMPRESSTEMPLATE },
+ { "pps", FALSE, STR_DESCRIPTION_POWERPOINT_SHOW, IMG_IMPRESS },
+ { "pptx", FALSE, STR_DESCRIPTION_POWERPOINT, IMG_IMPRESS },
{ "oxt", FALSE, STR_DESCRIPTION_EXTENSION, IMG_EXTENSION },
{ 0, FALSE, 0, 0 }
};
diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src
index 929276cfbdb5..39f9362e3940 100644
--- a/svtools/source/misc/langtab.src
+++ b/svtools/source/misc/langtab.src
@@ -307,6 +307,18 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE
< "Asturian" ; LANGUAGE_USER_ASTURIAN ; > ;
< "Sorbian, Upper" ; LANGUAGE_UPPER_SORBIAN_GERMANY ; > ;
< "Sorbian, Lower" ; LANGUAGE_LOWER_SORBIAN_GERMANY ; > ;
+ < "Latgalian" ; LANGUAGE_USER_LATGALIAN ; > ;
+ < "Maore" ; LANGUAGE_USER_MAORE ; > ;
+ < "Bushi" ; LANGUAGE_USER_BUSHI ; > ;
+ < "Tahitian" ; LANGUAGE_USER_TAHITIAN ; > ;
+ < "Malagasy, Plateau" ; LANGUAGE_USER_MALAGASY_PLATEAU ; > ;
+ < "Papiamentu (Netherlands Antilles)" ; LANGUAGE_PAPIAMENTU ; > ;
+ < "Papiamento (Aruba)" ; LANGUAGE_USER_PAPIAMENTU_ARUBA ; > ;
+ < "Sardinian, Campidanese" ; LANGUAGE_USER_SARDINIAN_CAMPIDANESE ; > ;
+ < "Sardinian, Gallurese" ; LANGUAGE_USER_SARDINIAN_GALLURESE ; > ;
+ < "Sardinian, Logudorese" ; LANGUAGE_USER_SARDINIAN_LOGUDORESE ; > ;
+ < "Sardinian, Sassarese" ; LANGUAGE_USER_SARDINIAN_SASSARESE ; > ;
+ < "Bafia" ; LANGUAGE_USER_BAFIA ; > ;
};
};
diff --git a/toolkit/inc/toolkit/helper/property.hxx b/toolkit/inc/toolkit/helper/property.hxx
index b6d4fee27e00..d9adc182f4d7 100644
--- a/toolkit/inc/toolkit/helper/property.hxx
+++ b/toolkit/inc/toolkit/helper/property.hxx
@@ -195,6 +195,7 @@ namespace rtl {
#define BASEPROPERTY_GRID_SELECTIONMODE 144
#define BASEPROPERTY_ENABLEVISIBLE 145 // sal_Bool
#define BASEPROPERTY_REFERENCE_DEVICE 146
+#define BASEPROPERTY_HIGHCONTRASTMODE 147
// Keine gebundenen Properties, werden immer aus der Property BASEPROPERTY_FONTDESCRIPTOR entnommen.
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index 7a3b9ff5b2ec..175289d1ac84 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -490,10 +490,18 @@ void VCLXAccessibleComponent::FillAccessibleStateSet( utl::AccessibleStateSetHel
getAccessibleRole() == accessibility::AccessibleRole::DIALOG ) ) // #i18891#
rStateSet.AddState( accessibility::AccessibleStateType::ACTIVE );
+ // #104290# MT: This way, a ComboBox doesn't get state FOCUSED.
+ // I also don't understand
+ // a) why WINDOW_FIRSTCHILD is used here (which btw is a border window in the case of a combo box)
+ // b) why HasFocus() is nout "enough" for a compound control
+ /*
Window* pChild = pWindow->GetWindow( WINDOW_FIRSTCHILD );
if ( ( !pWindow->IsCompoundControl() && pWindow->HasFocus() ) ||
( pWindow->IsCompoundControl() && pChild && pChild->HasFocus() ) )
rStateSet.AddState( accessibility::AccessibleStateType::FOCUSED );
+ */
+ if ( pWindow->HasFocus() || ( pWindow->IsCompoundControl() && pWindow->HasChildPathFocus() ) )
+ rStateSet.AddState( accessibility::AccessibleStateType::FOCUSED );
if ( pWindow->IsWait() )
rStateSet.AddState( accessibility::AccessibleStateType::BUSY );
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 045a46729961..248571819067 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -2163,6 +2163,10 @@ void VCLXWindow::setProperty( const ::rtl::OUString& PropertyName, const ::com::
aProp <<= (sal_Bool) mpImpl->isEnableVisible();
break;
+ case BASEPROPERTY_HIGHCONTRASTMODE:
+ aProp <<= (sal_Bool) GetWindow()->GetSettings().GetStyleSettings().GetHighContrastMode();
+ break;
+
case BASEPROPERTY_TEXT:
case BASEPROPERTY_LABEL:
case BASEPROPERTY_TITLE:
diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx
index dd22ea331830..7ede81d485d7 100644
--- a/toolkit/source/helper/property.cxx
+++ b/toolkit/source/helper/property.cxx
@@ -185,6 +185,7 @@ ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount )
DECL_PROP_2 ( "HelpText", HELPTEXT, ::rtl::OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HelpURL", HELPURL, ::rtl::OUString, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HideInactiveSelection", HIDEINACTIVESELECTION, bool, BOUND, MAYBEDEFAULT ),
+ DECL_PROP_2 ( "HighContrastMode", HIGHCONTRASTMODE, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HScroll", HSCROLL, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "HardLineBreaks", HARDLINEBREAKS, bool, BOUND, MAYBEDEFAULT ),
DECL_PROP_2 ( "ImageAlign", IMAGEALIGN, sal_Int16, BOUND, MAYBEDEFAULT),
diff --git a/tools/inc/tools/diagnose_ex.h b/tools/inc/tools/diagnose_ex.h
index 73b7bd9f96a5..fac739b32583 100644
--- a/tools/inc/tools/diagnose_ex.h
+++ b/tools/inc/tools/diagnose_ex.h
@@ -118,11 +118,28 @@
ifc ); }
/** This macro asserts the given condition (in debug mode), and
- returns false afterwards.
+ returns the given value afterwards.
*/
-#define ENSURE_OR_RETURN(c, m) if( !(c) ) { \
+#define ENSURE_OR_RETURN(c, m, r) if( !(c) ) { \
OSL_ENSURE(c, m); \
- return false; }
+ return r; }
+
+/** This macro asserts the given condition (in debug mode), and
+ returns false afterwards.
+ */
+#define ENSURE_OR_RETURN_FALSE(c, m) \
+ ENSURE_OR_RETURN(c, m, false)
+
+
+/** This macro asserts the given condition (in debug mode), and
+ returns afterwards, without return value "void".
+ */
+#define ENSURE_OR_RETURN_VOID( c, m ) \
+ if( !(c) ) \
+ { \
+ OSL_ENSURE( c, m ); \
+ return; \
+ }
diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx
index c909ca3e37b0..8f13af8fd842 100644
--- a/tools/inc/tools/wintypes.hxx
+++ b/tools/inc/tools/wintypes.hxx
@@ -178,10 +178,11 @@ typedef sal_Int64 WinBits;
#define WB_NOLABEL ((WinBits)0x02000000)
#define WB_SORT ((WinBits)0x04000000)
#define WB_DROPDOWN ((WinBits)0x08000000)
+#define WB_HIDE ((WinBits)SAL_CONST_INT64(0x80000000))
#define WB_AUTOHSCROLL ((WinBits)SAL_CONST_INT64(0x10000000))
#define WB_DOCKABLE ((WinBits)SAL_CONST_INT64(0x20000000))
#define WB_AUTOVSCROLL ((WinBits)SAL_CONST_INT64(0x40000000))
-#define WB_HYPHENATION (((WinBits)SAL_CONST_INT64(0x80000000)) | WB_WORDBREAK)
+#define WB_HYPHENATION (((WinBits)SAL_CONST_INT64(0x800000000)) | WB_WORDBREAK)
#define WB_CHILDDLGCTRL ((WinBits)SAL_CONST_INT64(0x100000000000))
// system floating window
@@ -193,7 +194,6 @@ typedef sal_Int64 WinBits;
#define WB_DEFAULTWIN ((WinBits)SAL_CONST_INT64(0x4000000000))
#define WB_NEEDSFOCUS ((WinBits)SAL_CONST_INT64(0x1000000000))
-#define WB_HIDE ((WinBits)SAL_CONST_INT64(0x80000000))
#define WB_HSCROLL WB_HORZ
#define WB_VSCROLL WB_VERT
#define WB_TOPIMAGE WB_TOP
@@ -205,6 +205,7 @@ typedef sal_Int64 WinBits;
#define WB_SMALLSTYLE ((WinBits)0x04000000)
#define WB_TOGGLE ((WinBits)SAL_CONST_INT64(0x1000000000))
#define WB_BEVELBUTTON ((WinBits)SAL_CONST_INT64(0x2000000000))
+#define WB_FLATBUTTON ((WinBits)SAL_CONST_INT64(0x4000000000))
// Window-Bits for FixedText
#define WB_PATHELLIPSIS ((WinBits)0x00100000)
diff --git a/unotools/inc/unotools/saveopt.hxx b/unotools/inc/unotools/saveopt.hxx
index dad0cd742323..22cf75c5be3d 100644
--- a/unotools/inc/unotools/saveopt.hxx
+++ b/unotools/inc/unotools/saveopt.hxx
@@ -46,7 +46,6 @@ public:
E_AUTOSAVEPROMPT,
E_DOCINFSAVE,
E_SAVEWORKINGSET,
- E_SAVEDOCWINS,
E_SAVEDOCVIEW,
E_SAVERELINET,
E_SAVERELFSYS,
@@ -93,9 +92,6 @@ public:
void SetSaveWorkingSet( sal_Bool b );
sal_Bool IsSaveWorkingSet() const;
- void SetSaveDocWins( sal_Bool b );
- sal_Bool IsSaveDocWins() const;
-
void SetSaveDocView( sal_Bool b );
sal_Bool IsSaveDocView() const;
diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx
index 2b739316a3f9..cbb7e763b38a 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -73,7 +73,6 @@ class SvtSaveOptions_Impl : public utl::ConfigItem
bAutoSavePrompt,
bDocInfSave,
bSaveWorkingSet,
- bSaveDocWins,
bSaveDocView,
bSaveRelINet,
bSaveRelFSys,
@@ -89,7 +88,6 @@ class SvtSaveOptions_Impl : public utl::ConfigItem
bROAutoSavePrompt,
bRODocInfSave,
bROSaveWorkingSet,
- bROSaveDocWins,
bROSaveDocView,
bROSaveRelINet,
bROSaveRelFSys,
@@ -115,7 +113,6 @@ public:
BOOL IsAutoSavePrompt() const { return bAutoSavePrompt; }
BOOL IsDocInfoSave() const { return bDocInfSave; }
BOOL IsSaveWorkingSet() const { return bSaveWorkingSet; }
- BOOL IsSaveDocWins() const { return bSaveDocWins; }
BOOL IsSaveDocView() const { return bSaveDocView; }
BOOL IsSaveRelINet() const { return bSaveRelINet; }
BOOL IsSaveRelFSys() const { return bSaveRelFSys; }
@@ -133,7 +130,6 @@ public:
void SetAutoSavePrompt( BOOL b );
void SetDocInfoSave( BOOL b );
void SetSaveWorkingSet( BOOL b );
- void SetSaveDocWins( BOOL b );
void SetSaveDocView( BOOL b );
void SetSaveRelINet( BOOL b );
void SetSaveRelFSys( BOOL b );
@@ -211,15 +207,6 @@ void SvtSaveOptions_Impl::SetSaveWorkingSet( BOOL b )
}
}
-void SvtSaveOptions_Impl::SetSaveDocWins( BOOL b )
-{
- if (!bROSaveDocWins && bSaveDocWins!=b)
- {
- bSaveDocWins = b;
- SetModified();
- }
-}
-
void SvtSaveOptions_Impl::SetSaveDocView( BOOL b )
{
if (!bROSaveDocView && bSaveDocView!=b)
@@ -318,9 +305,6 @@ sal_Bool SvtSaveOptions_Impl::IsReadOnly( SvtSaveOptions::EOption eOption ) cons
case SvtSaveOptions::E_SAVEWORKINGSET :
bReadOnly = bROSaveWorkingSet;
break;
- case SvtSaveOptions::E_SAVEDOCWINS :
- bReadOnly = bROSaveDocWins;
- break;
case SvtSaveOptions::E_SAVEDOCVIEW :
bReadOnly = bROSaveDocView;
break;
@@ -356,16 +340,15 @@ sal_Bool SvtSaveOptions_Impl::IsReadOnly( SvtSaveOptions::EOption eOption ) cons
#define AUTOSAVE 4
#define PROMPT 5
#define EDITPROPERTY 6
-#define SAVEDOCWINS 7
-#define SAVEVIEWINFO 8
-#define UNPACKED 9
-#define PRETTYPRINTING 10
-#define WARNALIENFORMAT 11
-#define LOADDOCPRINTER 12
-#define FILESYSTEM 13
-#define INTERNET 14
-#define SAVEWORKINGSET 15
-#define ODFDEFAULTVERSION 16
+#define SAVEVIEWINFO 7
+#define UNPACKED 8
+#define PRETTYPRINTING 9
+#define WARNALIENFORMAT 10
+#define LOADDOCPRINTER 11
+#define FILESYSTEM 12
+#define INTERNET 13
+#define SAVEWORKINGSET 14
+#define ODFDEFAULTVERSION 15
Sequence< OUString > GetPropertyNames()
{
@@ -378,7 +361,6 @@ Sequence< OUString > GetPropertyNames()
"Document/AutoSave",
"Document/AutoSavePrompt",
"Document/EditProperty",
- "Document/DocumentWindows",
"Document/ViewInfo",
"Document/Unpacked",
"Document/PrettyPrinting",
@@ -410,7 +392,6 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl()
, bAutoSavePrompt( sal_False )
, bDocInfSave( sal_False )
, bSaveWorkingSet( sal_False )
- , bSaveDocWins( sal_False )
, bSaveDocView( sal_False )
, bSaveRelINet( sal_False )
, bSaveRelFSys( sal_False )
@@ -425,7 +406,6 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl()
, bROAutoSavePrompt( CFG_READONLY_DEFAULT )
, bRODocInfSave( CFG_READONLY_DEFAULT )
, bROSaveWorkingSet( CFG_READONLY_DEFAULT )
- , bROSaveDocWins( CFG_READONLY_DEFAULT )
, bROSaveDocView( CFG_READONLY_DEFAULT )
, bROSaveRelINet( CFG_READONLY_DEFAULT )
, bROSaveRelFSys( CFG_READONLY_DEFAULT )
@@ -515,10 +495,6 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl()
bSaveWorkingSet = bTemp;
bROSaveWorkingSet = pROStates[nProp];
break;
- case SAVEDOCWINS :
- bSaveDocWins = bTemp;
- bROSaveDocWins = pROStates[nProp];
- break;
case SAVEVIEWINFO :
bSaveDocView = bTemp;
bROSaveDocView = pROStates[nProp];
@@ -664,14 +640,6 @@ void SvtSaveOptions_Impl::Commit()
++nRealCount;
}
break;
- case SAVEDOCWINS :
- if (!bROSaveDocWins)
- {
- pValues[nRealCount] <<= bSaveDocWins;
- pNames[nRealCount] = pOrgNames[i];
- ++nRealCount;
- }
- break;
case SAVEVIEWINFO :
if (!bROSaveDocView)
{
@@ -937,16 +905,6 @@ sal_Bool SvtSaveOptions::IsSaveWorkingSet() const
return pImp->pSaveOpt->IsSaveWorkingSet();
}
-void SvtSaveOptions::SetSaveDocWins( sal_Bool b )
-{
- pImp->pSaveOpt->SetSaveDocWins( b );
-}
-
-sal_Bool SvtSaveOptions::IsSaveDocWins() const
-{
- return pImp->pSaveOpt->IsSaveDocWins();
-}
-
void SvtSaveOptions::SetSaveDocView( sal_Bool b )
{
pImp->pSaveOpt->SetSaveDocView( b );
diff --git a/vcl/aqua/inc/salbmp.h b/vcl/aqua/inc/salbmp.h
index a4ea1bcaee49..1c427cce0cd5 100644
--- a/vcl/aqua/inc/salbmp.h
+++ b/vcl/aqua/inc/salbmp.h
@@ -36,7 +36,6 @@
#include "salconst.h"
#include "vcl/salvd.hxx"
#include "salcolorutils.hxx"
-#include "salpixmaputils.hxx"
#include "vcl/salbmp.hxx"
#include "salgdi.h"
#include "basebmp/bitmapdevice.hxx"
diff --git a/vcl/aqua/inc/salpixmaputils.hxx b/vcl/aqua/inc/salpixmaputils.hxx
deleted file mode 100755
index 18d00b9856a0..000000000000
--- a/vcl/aqua/inc/salpixmaputils.hxx
+++ /dev/null
@@ -1,47 +0,0 @@
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-#ifndef _SV_SALPIXMAPUTILS_HXX
-#define _SV_SALPIXMAPUTILS_HXX
-
-#include "premac.h"
-#include <ApplicationServices/ApplicationServices.h>
-#include "postmac.h"
-
-#include "tools/gen.hxx"
-#include "vcl/salbtype.hxx"
-#include "vcl/salgtype.hxx"
-#include "salconst.h"
-#include "salcolorutils.hxx"
-
-// ------------------------------------------------------------------
-
-// Empty. Do we need this?
-
-// ------------------------------------------------------------------
-
-#endif // _SV_SALPIXMAPUTILS_HXX
diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
index 9c88a88e7b6b..e0a95a532bf8 100644
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
@@ -42,7 +42,7 @@
#include <stdio.h>
#include <premac.h>
-#include <QuickTime/QuickTime.h>
+#include <Cocoa/Cocoa.h>
#include <postmac.h>
using namespace ::com::sun::star::datatransfer;
@@ -129,6 +129,7 @@ namespace // private
{
{ NSStringPboardType, "text/plain;charset=utf-16", "Unicode Text (UTF-16)", CPPUTYPE_OUSTRING },
{ NSRTFPboardType, "text/richtext", "Rich Text Format", CPPUTYPE_SEQINT8 },
+ { NSTIFFPboardType, "image/bmp", "Windows Bitmap", CPPUTYPE_SEQINT8 },
{ NSPICTPboardType, "image/bmp", "Windows Bitmap", CPPUTYPE_SEQINT8 },
{ NSHTMLPboardType, "text/html", "Plain Html", CPPUTYPE_SEQINT8 },
{ NSFilenamesPboardType, "application/x-openoffice-filelist;windows_formatname=\"FileList\"", "FileList", CPPUTYPE_SEQINT8 },
@@ -143,9 +144,6 @@ namespace // private
{ PBTYPE_EMF, FLAVOR_EMF, "Windows Enhanced MetaFile", CPPUTYPE_SEQINT8 },
{ PBTYPE_SODX, FLAVOR_SODX, "Star Object Descriptor (XML)", CPPUTYPE_SEQINT8 },
{ PBTYPE_DUMMY_INTERNAL, FLAVOR_DUMMY_INTERNAL, "internal data",CPPUTYPE_SEQINT8 }
- // { PBTYPE_UT16, "text/plain;charset=utf-16", "Unicode Text (UTF-16)", CPPUTYPE_OUSTRING }
- // { kUTTypePICT, @"PICT", "image/x-macpict;windows_formatname=\"Mac Pict\"", "Mac Pict", CPPUTYPE_SEQINT8 }
- // { kUTTypeHTML, @"HTML", "text/html", "Plain Html", CPPUTYPE_SEQINT8 }
};
@@ -379,23 +377,26 @@ Any HTMLFormatDataProvider::getOOoData()
class BMPDataProvider : public DataProviderBaseImpl
{
+ NSBitmapImageFileType meImageType;
public:
- BMPDataProvider(const Any& data);
+ BMPDataProvider(const Any& data, NSBitmapImageFileType eImageType );
- BMPDataProvider(NSData* data);
+ BMPDataProvider(NSData* data, NSBitmapImageFileType eImageType);
virtual NSData* getSystemData();
virtual Any getOOoData();
};
-BMPDataProvider::BMPDataProvider(const Any& data) :
- DataProviderBaseImpl(data)
+BMPDataProvider::BMPDataProvider(const Any& data, NSBitmapImageFileType eImageType) :
+ DataProviderBaseImpl(data),
+ meImageType( eImageType )
{
}
-BMPDataProvider::BMPDataProvider(NSData* data) :
- DataProviderBaseImpl(data)
+BMPDataProvider::BMPDataProvider(NSData* data, NSBitmapImageFileType eImageType) :
+ DataProviderBaseImpl(data),
+ meImageType( eImageType )
{
}
@@ -407,7 +408,7 @@ NSData* BMPDataProvider::getSystemData()
Sequence<sal_Int8> pictData;
NSData* sysData = NULL;
- if (BMPtoPICT(bmpData, pictData))
+ if (BMPToImage(bmpData, pictData, meImageType))
{
sysData = [NSData dataWithBytes: pictData.getArray() length: pictData.getLength()];
}
@@ -433,7 +434,7 @@ Any BMPDataProvider::getOOoData()
Sequence<sal_Int8> bmpData;
- if (PICTtoBMP(pictData, bmpData))
+ if (ImageToBMP(pictData, bmpData, meImageType))
{
oOOData = makeAny(bmpData);
}
@@ -555,6 +556,13 @@ NSString* DataFlavorMapper::openOfficeToSystemFlavor(const DataFlavor& oOOFlavor
return sysFlavor;
}
+NSString* DataFlavorMapper::openOfficeImageToSystemFlavor(NSPasteboard* pPasteboard) const
+{
+ NSArray *supportedTypes = [NSArray arrayWithObjects: NSTIFFPboardType, NSPICTPboardType, nil];
+ NSString *sysFlavor = [pPasteboard availableTypeFromArray:supportedTypes];
+ return sysFlavor;
+}
+
DataProviderPtr_t DataFlavorMapper::getDataProvider(NSString* systemFlavor, Reference<XTransferable> rTransferable) const
{
DataProviderPtr_t dp;
@@ -573,7 +581,11 @@ DataProviderPtr_t DataFlavorMapper::getDataProvider(NSString* systemFlavor, Refe
}
else if ([systemFlavor caseInsensitiveCompare: NSPICTPboardType] == NSOrderedSame)
{
- dp = DataProviderPtr_t(new BMPDataProvider(data));
+ dp = DataProviderPtr_t(new BMPDataProvider(data, PICTImageFileType));
+ }
+ else if ([systemFlavor caseInsensitiveCompare: NSTIFFPboardType] == NSOrderedSame)
+ {
+ dp = DataProviderPtr_t(new BMPDataProvider(data, NSTIFFFileType));
}
else if ([systemFlavor caseInsensitiveCompare: NSFilenamesPboardType] == NSOrderedSame)
{
@@ -618,7 +630,11 @@ DataProviderPtr_t DataFlavorMapper::getDataProvider(const NSString* systemFlavor
}
else if ([systemFlavor caseInsensitiveCompare: NSPICTPboardType] == NSOrderedSame)
{
- dp = DataProviderPtr_t(new BMPDataProvider(systemData));
+ dp = DataProviderPtr_t(new BMPDataProvider(systemData, PICTImageFileType));
+ }
+ else if ([systemFlavor caseInsensitiveCompare: NSTIFFPboardType] == NSOrderedSame)
+ {
+ dp = DataProviderPtr_t(new BMPDataProvider(systemData, NSTIFFFileType));
}
else if ([systemFlavor caseInsensitiveCompare: NSFilenamesPboardType] == NSOrderedSame)
{
@@ -655,11 +671,19 @@ NSArray* DataFlavorMapper::flavorSequenceToTypesArray(const com::sun::star::uno:
for (sal_uInt32 i = 0; i < nFlavors; i++)
{
- NSString* str = openOfficeToSystemFlavor(flavors[i]);
-
- if (str != NULL)
+ if( flavors[i].MimeType.compareToAscii( "image/bmp", 9 ) == 0 )
{
- [array addObject: str];
+ [array addObject: NSTIFFPboardType];
+ [array addObject: NSPICTPboardType];
+ }
+ else
+ {
+ NSString* str = openOfficeToSystemFlavor(flavors[i]);
+
+ if (str != NULL)
+ {
+ [array addObject: str];
+ }
}
}
diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.hxx b/vcl/aqua/source/dtrans/DataFlavorMapping.hxx
index a1ebac6ab4a9..9847fcbd3987 100644
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.hxx
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.hxx
@@ -89,6 +89,11 @@ public:
*/
NSString* openOfficeToSystemFlavor(const com::sun::star::datatransfer::DataFlavor& oooDataFlavor) const;
+ /* Select the best available image data type
+ If there is no suiteable mapping available NULL will
+ be returned.
+ */
+ NSString* openOfficeImageToSystemFlavor(NSPasteboard* pPasteboard) const;
/* Get a data provider which is able to provide the data 'rTransferable' offers in a format that can
be put on to the system clipboard.
diff --git a/vcl/aqua/source/dtrans/OSXTransferable.cxx b/vcl/aqua/source/dtrans/OSXTransferable.cxx
index 7b596768d061..2e6b327de446 100644
--- a/vcl/aqua/source/dtrans/OSXTransferable.cxx
+++ b/vcl/aqua/source/dtrans/OSXTransferable.cxx
@@ -88,7 +88,10 @@ Any SAL_CALL OSXTransferable::getTransferData( const DataFlavor& aFlavor )
static_cast<XTransferable*>(this));
}
- NSString* sysFormat = (NSString*)mDataFlavorMapper->openOfficeToSystemFlavor(aFlavor);
+ NSString* sysFormat =
+ (aFlavor.MimeType.compareToAscii( "image/bmp", 9 ) == 0)
+ ? mDataFlavorMapper->openOfficeImageToSystemFlavor( mPasteboard )
+ : mDataFlavorMapper->openOfficeToSystemFlavor(aFlavor);
DataProviderPtr_t dp;
if ([sysFormat caseInsensitiveCompare: NSFilenamesPboardType] == NSOrderedSame)
diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
index 0643efae33ca..1410fc2bd66d 100644
--- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
+++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
@@ -1,22 +1,52 @@
-#include "PictToBmpFlt.hxx"
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: OSXTransferable.hxx,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
/* This is a work-around to prevent 'deprecated' warning for 'KillPicture' API
Hopefully we can get rid of this whole code again when the OOo PICT filter
are good enough to be used see #i78953 thus this hack would vanish to again.
*/
+#include <premac.h>
#include <AvailabilityMacros.h>
#undef DEPRECATED_ATTRIBUTE
#define DEPRECATED_ATTRIBUTE
-#include <premac.h>
#include <Carbon/Carbon.h>
#include <QuickTime/QuickTime.h>
#include <postmac.h>
+#include "PictToBmpFlt.hxx"
bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
com::sun::star::uno::Sequence<sal_Int8>& aBmp)
{
+
bool result = false;
ComponentInstance bmpExporter;
@@ -112,3 +142,60 @@ bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
return result;
}
+
+bool ImageToBMP( com::sun::star::uno::Sequence<sal_Int8>& aPict,
+ com::sun::star::uno::Sequence<sal_Int8>& aBmp,
+ NSBitmapImageFileType eInFormat)
+{
+ if( eInFormat == PICTImageFileType )
+ return PICTtoBMP( aPict, aBmp );
+
+ bool bResult = false;
+
+ NSData* pData = [NSData dataWithBytesNoCopy: (void*)aPict.getConstArray() length: aPict.getLength() freeWhenDone: 0];
+ if( pData )
+ {
+ NSBitmapImageRep* pRep = [NSBitmapImageRep imageRepWithData: pData];
+ if( pRep )
+ {
+ NSData* pOut = [pRep representationUsingType: NSBMPFileType properties: nil];
+ if( pOut )
+ {
+ aBmp.realloc( [pOut length] );
+ [pOut getBytes: aBmp.getArray() length: aBmp.getLength()];
+ bResult = (aBmp.getLength() != 0);
+ }
+ }
+ }
+
+ return bResult;
+}
+
+bool BMPToImage( com::sun::star::uno::Sequence<sal_Int8>& aBmp,
+ com::sun::star::uno::Sequence<sal_Int8>& aPict,
+ NSBitmapImageFileType eOutFormat
+ )
+{
+ if( eOutFormat == PICTImageFileType )
+ return BMPtoPICT( aBmp, aPict );
+
+ bool bResult = false;
+
+ NSData* pData = [NSData dataWithBytesNoCopy: const_cast<sal_Int8*>(aBmp.getConstArray()) length: aBmp.getLength() freeWhenDone: 0];
+ if( pData )
+ {
+ NSBitmapImageRep* pRep = [NSBitmapImageRep imageRepWithData: pData];
+ if( pRep )
+ {
+ NSData* pOut = [pRep representationUsingType: eOutFormat properties: nil];
+ if( pOut )
+ {
+ aPict.realloc( [pOut length] );
+ [pOut getBytes: aPict.getArray() length: aPict.getLength()];
+ bResult = (aPict.getLength() != 0);
+ }
+ }
+ }
+
+ return bResult;
+}
diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.hxx b/vcl/aqua/source/dtrans/PictToBmpFlt.hxx
index 29e9c535546f..12a73452ad7b 100644
--- a/vcl/aqua/source/dtrans/PictToBmpFlt.hxx
+++ b/vcl/aqua/source/dtrans/PictToBmpFlt.hxx
@@ -3,6 +3,10 @@
#include <com/sun/star/uno/Sequence.hxx>
+#include <premac.h>
+#include <Cocoa/Cocoa.h>
+#include <postmac.h>
+
/* Transform PICT into the a Window BMP.
Returns true if the conversion was successful false
@@ -19,4 +23,15 @@ bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
com::sun::star::uno::Sequence<sal_Int8>& aPict);
+#define PICTImageFileType ((NSBitmapImageFileType)~0)
+
+bool ImageToBMP( com::sun::star::uno::Sequence<sal_Int8>& aPict,
+ com::sun::star::uno::Sequence<sal_Int8>& aBmp,
+ NSBitmapImageFileType eInFormat);
+
+bool BMPToImage( com::sun::star::uno::Sequence<sal_Int8>& aBmp,
+ com::sun::star::uno::Sequence<sal_Int8>& aPict,
+ NSBitmapImageFileType eOutFormat
+ );
+
#endif
diff --git a/vcl/aqua/source/gdi/makefile.mk b/vcl/aqua/source/gdi/makefile.mk
index 6cf1d498cce2..2aea58e49250 100644
--- a/vcl/aqua/source/gdi/makefile.mk
+++ b/vcl/aqua/source/gdi/makefile.mk
@@ -49,7 +49,6 @@ dummy:
SLOFILES= $(SLO)$/salmathutils.obj \
$(SLO)$/salcolorutils.obj \
- $(SLO)$/salpixmaputils.obj \
$(SLO)$/salgdiutils.obj \
$(SLO)$/salnativewidgets.obj \
$(SLO)$/salatsuifontutils.obj \
diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx
index 3baa38320075..b4b843eaca58 100644
--- a/vcl/aqua/source/gdi/salnativewidgets.cxx
+++ b/vcl/aqua/source/gdi/salnativewidgets.cxx
@@ -267,6 +267,11 @@ BOOL AquaSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart n
return true;
break;
+ case CTRL_SLIDER:
+ if( nPart == PART_TRACK_HORZ_AREA || nPart == PART_TRACK_VERT_AREA )
+ return true;
+ break;
+
case CTRL_EDITBOX:
if( nPart == PART_ENTIRE_CONTROL ||
nPart == HAS_BACKGROUND_TEXTURE )
@@ -561,7 +566,7 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
// the Aqua grey theme when the item is selected is drawn here.
aMenuItemDrawInfo.itemType = kThemeMenuItemPlain;
- if ((nPart == PART_MENU_ITEM ))
+ if ((nPart == PART_MENU_ITEM ) && (nState & CTRL_STATE_SELECTED))
{
// the blue theme when the item is selected is drawn here.
aMenuItemDrawInfo.state = kThemeMenuSelected;
@@ -785,6 +790,36 @@ BOOL AquaSalGraphics::drawNativeControl(ControlType nType,
}
break;
+ case CTRL_SLIDER:
+ {
+ SliderValue* pSLVal = (SliderValue*)aValue.getOptionalVal();
+
+ HIThemeTrackDrawInfo aTrackDraw;
+ aTrackDraw.kind = kThemeSliderMedium;
+ if( nPart == PART_TRACK_HORZ_AREA || nPart == PART_TRACK_VERT_AREA )
+ {
+ aTrackDraw.bounds = rc;
+ aTrackDraw.min = pSLVal->mnMin;
+ aTrackDraw.max = pSLVal->mnMax;;
+ aTrackDraw.value = pSLVal->mnCur;
+ aTrackDraw.reserved = 0;
+ aTrackDraw.attributes = kThemeTrackShowThumb;
+ if( nPart == PART_TRACK_HORZ_AREA )
+ aTrackDraw.attributes |= kThemeTrackHorizontal;
+ aTrackDraw.enableState = (nState & CTRL_STATE_ENABLED)
+ ? kThemeTrackActive : kThemeTrackInactive;
+
+ SliderTrackInfo aSlideInfo;
+ aSlideInfo.thumbDir = kThemeThumbUpward;
+ aSlideInfo.pressState = 0;
+ aTrackDraw.trackInfo.slider = aSlideInfo;
+
+ HIThemeDrawTrack( &aTrackDraw, NULL, mrContext, kHIThemeOrientationNormal );
+ bOK = true;
+ }
+ }
+ break;
+
case CTRL_SCROLLBAR:
{
ScrollbarValue* pScrollbarVal = (ScrollbarValue *)(aValue.getOptionalVal());
@@ -1223,18 +1258,38 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
{
BOOL toReturn = FALSE;
- short x = rControlRegion.GetBoundRect().Left();
- short y = rControlRegion.GetBoundRect().Top();
+ Rectangle aCtrlBoundRect( rControlRegion.GetBoundRect() );
+ short x = aCtrlBoundRect.Left();
+ short y = aCtrlBoundRect.Top();
short w, h;
sal_uInt8 nBorderCleanup = 0;
switch (nType)
{
+ case CTRL_SLIDER:
+ {
+ if( nPart == PART_THUMB_HORZ )
+ {
+ w = 19; // taken from HIG
+ h = aCtrlBoundRect.GetHeight();
+ rNativeBoundingRegion = rNativeContentRegion = Region( Rectangle( Point( x, y ), Size( w, h ) ) );
+ toReturn = true;
+ }
+ else if( nPart == PART_THUMB_VERT )
+ {
+ w = aCtrlBoundRect.GetWidth();
+ h = 18; // taken from HIG
+ rNativeBoundingRegion = rNativeContentRegion = Region( Rectangle( Point( x, y ), Size( w, h ) ) );
+ toReturn = true;
+ }
+ }
+ break;
+
case CTRL_SCROLLBAR:
{
Rectangle aRect;
- if( AquaGetScrollRect( /* m_nScreen */ nPart, rControlRegion.GetBoundRect(), aRect ) )
+ if( AquaGetScrollRect( /* m_nScreen */ nPart, aCtrlBoundRect, aRect ) )
{
toReturn = TRUE;
rNativeBoundingRegion = aRect;
@@ -1249,8 +1304,8 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
{
if ( nType == CTRL_PUSHBUTTON )
{
- w = rControlRegion.GetBoundRect().GetWidth();
- h = rControlRegion.GetBoundRect().GetHeight();
+ w = aCtrlBoundRect.GetWidth();
+ h = aCtrlBoundRect.GetHeight();
}
else
{
@@ -1271,7 +1326,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
break;
case CTRL_PROGRESS:
{
- Rectangle aRect( rControlRegion.GetBoundRect() );
+ Rectangle aRect( aCtrlBoundRect );
if( aRect.GetHeight() < 16 )
aRect.Bottom() = aRect.Top() + 9; // values taken from HIG for medium progress
else
@@ -1284,7 +1339,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
case CTRL_INTROPROGRESS:
{
- Rectangle aRect( rControlRegion.GetBoundRect() );
+ Rectangle aRect( aCtrlBoundRect );
aRect.Bottom() = aRect.Top() + INTRO_PROGRESS_HEIGHT; // values taken from HIG for medium progress
rNativeBoundingRegion = aRect;
rNativeContentRegion = aRect;
@@ -1294,7 +1349,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
case CTRL_TAB_ITEM:
- w = rControlRegion.GetBoundRect().GetWidth() + 2*TAB_TEXT_OFFSET - 2*VCL_TAB_TEXT_OFFSET;
+ w = aCtrlBoundRect.GetWidth() + 2*TAB_TEXT_OFFSET - 2*VCL_TAB_TEXT_OFFSET;
#ifdef OLD_TAB_STYLE
h = TAB_HEIGHT_NORMAL;
@@ -1310,7 +1365,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
case CTRL_EDITBOX:
{
- w = rControlRegion.GetBoundRect().GetWidth();
+ w = aCtrlBoundRect.GetWidth();
if( w < 3+2*FOCUS_RING_WIDTH )
w = 3+2*FOCUS_RING_WIDTH;
h = TEXT_EDIT_HEIGHT_NORMAL;
@@ -1326,7 +1381,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
{
if( nPart == PART_ENTIRE_CONTROL )
{
- w = rControlRegion.GetBoundRect().GetWidth();
+ w = aCtrlBoundRect.GetWidth();
h = COMBOBOX_HEIGHT_NORMAL;//listboxes and comboxes have the same height
rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*FOCUS_RING_WIDTH, h ) );
@@ -1336,7 +1391,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
}
else if( nPart == PART_BUTTON_DOWN )
{
- w = rControlRegion.GetBoundRect().GetWidth();
+ w = aCtrlBoundRect.GetWidth();
if( w < 3+2*FOCUS_RING_WIDTH )
w = 3+2*FOCUS_RING_WIDTH;
h = COMBOBOX_HEIGHT_NORMAL;//listboxes and comboxes have the same height
@@ -1352,7 +1407,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
}
else if( nPart == PART_SUB_EDIT )
{
- w = rControlRegion.GetBoundRect().GetWidth();
+ w = aCtrlBoundRect.GetWidth();
h = COMBOBOX_HEIGHT_NORMAL;//listboxes and comboxes have the same height
x += FOCUS_RING_WIDTH;
@@ -1373,7 +1428,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
break;
case CTRL_SPINBOX:
if( nPart == PART_ENTIRE_CONTROL ) {
- w = rControlRegion.GetBoundRect().GetWidth();
+ w = aCtrlBoundRect.GetWidth();
if( w < 3+2*FOCUS_RING_WIDTH+SPIN_BUTTON_SPACE+SPIN_BUTTON_WIDTH )
w = 3+2*FOCUS_RING_WIDTH+SPIN_BUTTON_SPACE+SPIN_BUTTON_WIDTH;
h = TEXT_EDIT_HEIGHT_NORMAL;
@@ -1384,7 +1439,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
toReturn = TRUE;
}
else if( nPart == PART_SUB_EDIT ) {
- w = rControlRegion.GetBoundRect().GetWidth() - SPIN_BUTTON_SPACE - SPIN_BUTTON_WIDTH;
+ w = aCtrlBoundRect.GetWidth() - SPIN_BUTTON_SPACE - SPIN_BUTTON_WIDTH;
h = TEXT_EDIT_HEIGHT_NORMAL;
x += 4; // add an offset for rounded borders
y += 2; // don't draw into upper border
@@ -1397,10 +1452,10 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
toReturn = TRUE;
}
else if( nPart == PART_BUTTON_UP ) {
- //rControlRegion.GetBoundRect().GetWidth() contains the width of the full control
+ //aCtrlBoundRect.GetWidth() contains the width of the full control
//ie the width of the textfield + button
//x is the position of the left corner of the full control
- x += rControlRegion.GetBoundRect().GetWidth() - SPIN_BUTTON_WIDTH - SPIN_BUTTON_SPACE - CLIP_FUZZ;
+ x += aCtrlBoundRect.GetWidth() - SPIN_BUTTON_WIDTH - SPIN_BUTTON_SPACE - CLIP_FUZZ;
y += FOCUS_RING_WIDTH - CLIP_FUZZ;
w = SPIN_BUTTON_WIDTH + 2*CLIP_FUZZ;
h = SPIN_UPPER_BUTTON_HEIGHT + 2*CLIP_FUZZ;
@@ -1411,7 +1466,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
toReturn = TRUE;
}
else if( nPart == PART_BUTTON_DOWN ) {
- x += rControlRegion.GetBoundRect().GetWidth() - SPIN_BUTTON_WIDTH - SPIN_BUTTON_SPACE - CLIP_FUZZ;
+ x += aCtrlBoundRect.GetWidth() - SPIN_BUTTON_WIDTH - SPIN_BUTTON_SPACE - CLIP_FUZZ;
y += SPIN_UPPER_BUTTON_HEIGHT + FOCUS_RING_WIDTH - CLIP_FUZZ;
w = SPIN_BUTTON_WIDTH + 2*CLIP_FUZZ;
h = SPIN_LOWER_BUTTON_HEIGHT + 2*CLIP_FUZZ;
@@ -1428,7 +1483,7 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
if( ( nPart == PART_BORDER ) &&
!( nStyle & (FRAME_DRAW_MENU | FRAME_DRAW_WINDOWBORDER | FRAME_DRAW_BORDERWINDOWBORDER) ) )
{
- Rectangle aRect = rControlRegion.GetBoundRect();
+ Rectangle aRect(aCtrlBoundRect);
if( nStyle & FRAME_DRAW_DOUBLEIN )
{
aRect.Left() += 1;
diff --git a/vcl/aqua/source/gdi/salpixmaputils.cxx b/vcl/aqua/source/gdi/salpixmaputils.cxx
deleted file mode 100755
index b39120080b88..000000000000
--- a/vcl/aqua/source/gdi/salpixmaputils.cxx
+++ /dev/null
@@ -1,36 +0,0 @@
-/*************************************************************************
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_vcl.hxx"
-
-#include "salpixmaputils.hxx"
-
-// =======================================================================
-
-// =======================================================================
-
diff --git a/vcl/inc/vcl/decoview.hxx b/vcl/inc/vcl/decoview.hxx
index a30f209c69fc..2412ceda8431 100644
--- a/vcl/inc/vcl/decoview.hxx
+++ b/vcl/inc/vcl/decoview.hxx
@@ -33,6 +33,7 @@
#include <vcl/symbol.hxx>
class Rectangle;
+class Point;
class Color;
class OutputDevice;
@@ -103,6 +104,7 @@ public:
USHORT nStyle = FRAME_HIGHLIGHT_OUT );
Rectangle DrawFrame( const Rectangle& rRect, USHORT nStyle = FRAME_DRAW_OUT );
Rectangle DrawButton( const Rectangle& rRect, USHORT nStyle );
+ void DrawSeparator( const Point& rStart, const Point& rStop, bool bVertical = true );
};
#endif // _SV_DECOVIEW_HXX
diff --git a/vcl/inc/vcl/fontmanager.hxx b/vcl/inc/vcl/fontmanager.hxx
index 6ebd777f1c61..33fece8d88e1 100644
--- a/vcl/inc/vcl/fontmanager.hxx
+++ b/vcl/inc/vcl/fontmanager.hxx
@@ -437,7 +437,7 @@ class VCL_DLLPUBLIC PrintFontManager
false else (e.g. no libfontconfig found)
*/
bool initFontconfig();
- int countFontconfigFonts();
+ int countFontconfigFonts( std::hash_map<rtl::OString, int, rtl::OStringHash>& o_rVisitedPaths );
/* deinitialize fontconfig
*/
void deinitFontconfig();
diff --git a/vcl/inc/vcl/introwin.hxx b/vcl/inc/vcl/introwin.hxx
index 5ffefe0950f8..40644019bc15 100644
--- a/vcl/inc/vcl/introwin.hxx
+++ b/vcl/inc/vcl/introwin.hxx
@@ -31,6 +31,7 @@
#include <vcl/sv.h>
#include <vcl/dllapi.h>
#include <vcl/wrkwin.hxx>
+#include <vcl/bitmapex.hxx>
// --------------
// - IntroWindow -
@@ -46,6 +47,7 @@ public:
~IntroWindow();
void SetBackgroundBitmap( const Bitmap& rBitmap );
+ void SetBackgroundBitmap( const BitmapEx& rBitmapEx );
};
#endif // _SV_INTROWIN_HXX
diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx
index be5c0a880ed7..70c1e6aa624d 100644
--- a/vcl/inc/vcl/outdev.hxx
+++ b/vcl/inc/vcl/outdev.hxx
@@ -931,6 +931,10 @@ public:
basegfx::B2DHomMatrix GetViewTransformation() const;
basegfx::B2DHomMatrix GetInverseViewTransformation() const;
+ basegfx::B2DHomMatrix GetViewTransformation( const MapMode& rMapMode ) const;
+ basegfx::B2DHomMatrix GetInverseViewTransformation( const MapMode& rMapMode ) const;
+
+
/** Set an offset in pixel
This method offsets every drawing operation that converts its
@@ -967,7 +971,9 @@ public:
Size LogicToPixel( const Size& rLogicSize ) const;
Rectangle LogicToPixel( const Rectangle& rLogicRect ) const;
Polygon LogicToPixel( const Polygon& rLogicPoly ) const;
+ basegfx::B2DPolygon LogicToPixel( const basegfx::B2DPolygon& rLogicPolyPoly ) const;
PolyPolygon LogicToPixel( const PolyPolygon& rLogicPolyPoly ) const;
+ basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly ) const;
Region LogicToPixel( const Region& rLogicRegion )const;
Point LogicToPixel( const Point& rLogicPt,
const MapMode& rMapMode ) const;
@@ -977,15 +983,21 @@ public:
const MapMode& rMapMode ) const;
Polygon LogicToPixel( const Polygon& rLogicPoly,
const MapMode& rMapMode ) const;
+ basegfx::B2DPolygon LogicToPixel( const basegfx::B2DPolygon& rLogicPoly,
+ const MapMode& rMapMode ) const;
PolyPolygon LogicToPixel( const PolyPolygon& rLogicPolyPoly,
const MapMode& rMapMode ) const;
+ basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly,
+ const MapMode& rMapMode ) const;
Region LogicToPixel( const Region& rLogicRegion,
const MapMode& rMapMode ) const;
Point PixelToLogic( const Point& rDevicePt ) const;
Size PixelToLogic( const Size& rDeviceSize ) const;
Rectangle PixelToLogic( const Rectangle& rDeviceRect ) const;
Polygon PixelToLogic( const Polygon& rDevicePoly ) const;
+ basegfx::B2DPolygon PixelToLogic( const basegfx::B2DPolygon& rDevicePoly ) const;
PolyPolygon PixelToLogic( const PolyPolygon& rDevicePolyPoly ) const;
+ basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly ) const;
Region PixelToLogic( const Region& rDeviceRegion ) const;
Point PixelToLogic( const Point& rDevicePt,
const MapMode& rMapMode ) const;
@@ -995,8 +1007,12 @@ public:
const MapMode& rMapMode ) const;
Polygon PixelToLogic( const Polygon& rDevicePoly,
const MapMode& rMapMode ) const;
+ basegfx::B2DPolygon PixelToLogic( const basegfx::B2DPolygon& rDevicePoly,
+ const MapMode& rMapMode ) const;
PolyPolygon PixelToLogic( const PolyPolygon& rDevicePolyPoly,
const MapMode& rMapMode ) const;
+ basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly,
+ const MapMode& rMapMode ) const;
Region PixelToLogic( const Region& rDeviceRegion,
const MapMode& rMapMode ) const;
@@ -1026,6 +1042,13 @@ public:
MapUnit eUnitSource,
MapUnit eUnitDest );
+ static basegfx::B2DPolygon LogicToLogic( const basegfx::B2DPolygon& rPoly,
+ const MapMode& rMapModeSource,
+ const MapMode& rMapModeDest );
+ static basegfx::B2DPolyPolygon LogicToLogic( const basegfx::B2DPolyPolygon& rPolyPoly,
+ const MapMode& rMapModeSource,
+ const MapMode& rMapModeDest );
+
Size GetOutputSizePixel() const
{ return Size( mnOutWidth, mnOutHeight ); }
long GetOutputWidthPixel() const { return mnOutWidth; }
diff --git a/vcl/inc/vcl/pdfwriter.hxx b/vcl/inc/vcl/pdfwriter.hxx
index b4bdcce5c1b8..419814e5ce97 100644
--- a/vcl/inc/vcl/pdfwriter.hxx
+++ b/vcl/inc/vcl/pdfwriter.hxx
@@ -47,7 +47,6 @@
class Font;
class Point;
class OutputDevice;
-class Region;
class MapMode;
class Polygon;
class LineInfo;
@@ -199,7 +198,7 @@ public:
enum WidgetType
{
- PushButton, RadioButton, CheckBox, Edit, ListBox, ComboBox
+ PushButton, RadioButton, CheckBox, Edit, ListBox, ComboBox, Hierarchy
};
enum WidgetState
@@ -671,10 +670,10 @@ The following structure describes the permissions used in PDF security
void Pop();
void SetClipRegion();
- void SetClipRegion( const Region& rRegion );
+ void SetClipRegion( const basegfx::B2DPolyPolygon& rRegion );
void MoveClipRegion( long nHorzMove, long nVertMove );
void IntersectClipRegion( const Rectangle& rRect );
- void IntersectClipRegion( const Region& rRegion );
+ void IntersectClipRegion( const basegfx::B2DPolyPolygon& rRegion );
void SetAntialiasing( USHORT nMode = 0 );
diff --git a/vcl/inc/vcl/region.hxx b/vcl/inc/vcl/region.hxx
index d4fe05ebe8a3..ddfba57ffdcf 100644
--- a/vcl/inc/vcl/region.hxx
+++ b/vcl/inc/vcl/region.hxx
@@ -113,7 +113,11 @@ public:
BOOL HasPolyPolygon() const;
PolyPolygon GetPolyPolygon() const;
+ // returns an empty polypolygon in case HasPolyPolygon is FALSE
const basegfx::B2DPolyPolygon GetB2DPolyPolygon() const;
+ // returns a PolyPolygon either copied from the set PolyPolygon region
+ // or created from the constituent rectangles
+ basegfx::B2DPolyPolygon ConvertToB2DPolyPolygon();
ULONG GetRectCount() const;
RegionHandle BeginEnumRects();
diff --git a/vcl/inc/vcl/salnativewidgets.hxx b/vcl/inc/vcl/salnativewidgets.hxx
index 8ce4c5c20615..8e98791d9f78 100644
--- a/vcl/inc/vcl/salnativewidgets.hxx
+++ b/vcl/inc/vcl/salnativewidgets.hxx
@@ -95,6 +95,8 @@ typedef sal_uInt32 ControlType;
// all parts like slider, buttons
#define CTRL_SCROLLBAR 60
+#define CTRL_SLIDER 65
+
// Border around a group of related
// items, perhaps also displaying
// a label of identification
@@ -289,6 +291,20 @@ class VCL_DLLPUBLIC ScrollbarValue
inline ~ScrollbarValue() {};
};
+class VCL_DLLPUBLIC SliderValue
+{
+ public:
+ long mnMin;
+ long mnMax;
+ long mnCur;
+ Rectangle maThumbRect;
+ ControlState mnThumbState;
+
+ SliderValue() : mnMin( 0 ), mnMax( 0 ), mnCur( 0 ), mnThumbState( 0 )
+ {}
+ ~SliderValue() {}
+};
+
/* TabitemValue:
*
* Value container for tabitems.
diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx
index 4d41ee450dd7..810ecf230960 100644
--- a/vcl/inc/vcl/status.hxx
+++ b/vcl/inc/vcl/status.hxx
@@ -116,6 +116,7 @@ private:
USHORT nOldPerc, USHORT nNewPerc );
SAL_DLLPRIVATE void ImplCalcProgressRect();
SAL_DLLPRIVATE Rectangle ImplGetItemRectPos( USHORT nPos ) const;
+ SAL_DLLPRIVATE USHORT ImplGetFirstVisiblePos() const;
SAL_DLLPRIVATE void ImplCalcBorder();
public:
diff --git a/vcl/inc/vcl/tabctrl.hxx b/vcl/inc/vcl/tabctrl.hxx
index e7b87ff448d1..4c63b12f15fe 100644
--- a/vcl/inc/vcl/tabctrl.hxx
+++ b/vcl/inc/vcl/tabctrl.hxx
@@ -92,12 +92,12 @@ private:
SAL_DLLPRIVATE void ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bool bLayout = false, bool bFirstInGroup = false, bool bLastInGroup = false, bool bIsCurrentItem = false );
SAL_DLLPRIVATE void ImplPaint( const Rectangle& rRect, bool bLayout = false );
SAL_DLLPRIVATE void ImplFreeLayoutData();
+ SAL_DLLPRIVATE long ImplHandleKeyEvent( const KeyEvent& rKeyEvent );
+
DECL_DLLPRIVATE_LINK( ImplScrollBtnHdl, PushButton* pBtn );
DECL_DLLPRIVATE_LINK( ImplListBoxSelectHdl, ListBox* );
+ DECL_DLLPRIVATE_LINK( ImplWindowEventListener, VclSimpleEvent* );
-public:
- // just for dialog control
- SAL_DLLPRIVATE bool ImplHandleNotifyEvent( NotifyEvent& rEvt );
protected:
using Window::ImplInit;
diff --git a/vcl/inc/vcl/tabdlg.hxx b/vcl/inc/vcl/tabdlg.hxx
index b5f1dc14de5d..35543bb6aac0 100644
--- a/vcl/inc/vcl/tabdlg.hxx
+++ b/vcl/inc/vcl/tabdlg.hxx
@@ -59,8 +59,6 @@ public:
virtual void Resize();
virtual void StateChanged( StateChangedType nStateChange );
- SAL_DLLPRIVATE TabControl* ImplGetFirstTabControl() const;
-
void AdjustLayout();
void SetViewWindow( Window* pWindow ) { mpViewWindow = pWindow; }
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 1cda2308aa9c..1f45b5902381 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1191,7 +1191,10 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, ULONG nDrawFlags
else
{
Rectangle aSymbolRect;
- ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, 1, nDrawFlags,
+ ULONG nImageSep = 1 + (pDev->GetTextHeight()-10)/2;
+ if( nImageSep < 1 )
+ nImageSep = 1;
+ ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, nImageSep, nDrawFlags,
nTextStyle, IsSymbol() ? &aSymbolRect : NULL );
if ( IsSymbol() && ! bLayout )
@@ -1320,6 +1323,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
if( bNativeOK )
return;
+ bool bRollOver = (IsMouseOver() && aInRect.IsInside( GetPointerPosPixel() ));
if ( (bNativeOK=IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == TRUE )
{
PushButtonValue aPBVal;
@@ -1334,7 +1338,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
if ( ImplGetButtonState() & BUTTON_DRAW_DEFAULT ) nState |= CTRL_STATE_DEFAULT;
if ( Window::IsEnabled() ) nState |= CTRL_STATE_ENABLED;
- if ( IsMouseOver() && aInRect.IsInside( GetPointerPosPixel() ) )
+ if ( bRollOver )
nState |= CTRL_STATE_ROLLOVER;
if( GetStyle() & WB_BEVELBUTTON )
@@ -1359,8 +1363,15 @@ void PushButton::ImplDrawPushButton( bool bLayout )
Size aInRectSize( LogicToPixel( Size( aInRect.GetWidth(), aInRect.GetHeight() ) ) );
aPBVal.mbSingleLine = (aInRectSize.Height() < 2 * aFontSize.Height() );
- bNativeOK = DrawNativeControl( CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL, aCtrlRegion, nState,
- aControlValue, rtl::OUString()/*PushButton::GetText()*/ );
+ if( ((nState & CTRL_STATE_ROLLOVER) || HasFocus()) || ! (GetStyle() & WB_FLATBUTTON) )
+ {
+ bNativeOK = DrawNativeControl( CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL, aCtrlRegion, nState,
+ aControlValue, rtl::OUString()/*PushButton::GetText()*/ );
+ }
+ else
+ {
+ bNativeOK = true;
+ }
// draw content using the same aInRect as non-native VCL would do
ImplDrawPushButtonContent( this,
@@ -1374,8 +1385,21 @@ void PushButton::ImplDrawPushButton( bool bLayout )
if ( bNativeOK == FALSE )
{
// draw PushButtonFrame, aInRect has content size afterwards
- if( ! bLayout )
- ImplDrawPushButtonFrame( this, aInRect, nButtonStyle );
+ if( (GetStyle() & WB_FLATBUTTON) )
+ {
+ Rectangle aTempRect( aInRect );
+ if( ! bLayout && (bRollOver || HasFocus()) )
+ ImplDrawPushButtonFrame( this, aTempRect, nButtonStyle );
+ aInRect.Left() += 2;
+ aInRect.Top() += 2;
+ aInRect.Right() -= 2;
+ aInRect.Bottom() -= 2;
+ }
+ else
+ {
+ if( ! bLayout )
+ ImplDrawPushButtonFrame( this, aInRect, nButtonStyle );
+ }
// draw content
ImplDrawPushButtonContent( this, 0, aInRect, bLayout );
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 4b83540c1aa1..37406293d7cf 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -496,16 +496,11 @@ void FixedLine::ImplDraw( bool bLayout )
{
Size aOutSize = GetOutputSizePixel();
String aText = GetText();
- const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
WinBits nWinStyle = GetStyle();
MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
String* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
- if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
- SetLineColor( Color( COL_BLACK ) );
- else
- SetLineColor( rStyleSettings.GetShadowColor() );
-
+ DecorationView aDecoView( this );
if ( !aText.Len() || (nWinStyle & WB_VERT) )
{
if( !pVector )
@@ -516,21 +511,12 @@ void FixedLine::ImplDraw( bool bLayout )
if ( nWinStyle & WB_VERT )
{
nX = (aOutSize.Width()-1)/2;
- DrawLine( Point( nX, 0 ), Point( nX, aOutSize.Height()-1 ) );
+ aDecoView.DrawSeparator( Point( nX, 0 ), Point( nX, aOutSize.Height()-1 ) );
}
else
{
nY = (aOutSize.Height()-1)/2;
- DrawLine( Point( 0, nY ), Point( aOutSize.Width()-1, nY ) );
- }
-
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
- {
- SetLineColor( rStyleSettings.GetLightColor() );
- if ( nWinStyle & WB_VERT )
- DrawLine( Point( nX+1, 0 ), Point( nX+1, aOutSize.Height()-1 ) );
- else
- DrawLine( Point( 0, nY+1 ), Point( aOutSize.Width()-1, nY+1 ) );
+ aDecoView.DrawSeparator( Point( 0, nY ), Point( aOutSize.Width()-1, nY ), false );
}
}
}
@@ -538,6 +524,7 @@ void FixedLine::ImplDraw( bool bLayout )
{
USHORT nStyle = TEXT_DRAW_MNEMONIC | TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER | TEXT_DRAW_ENDELLIPSIS;
Rectangle aRect( 0, 0, aOutSize.Width(), aOutSize.Height() );
+ const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
if ( !IsEnabled() )
nStyle |= TEXT_DRAW_DISABLE;
@@ -551,12 +538,7 @@ void FixedLine::ImplDraw( bool bLayout )
if( !pVector )
{
long nTop = aRect.Top() + ((aRect.GetHeight()-1)/2);
- DrawLine( Point( aRect.Right()+FIXEDLINE_TEXT_BORDER, nTop ), Point( aOutSize.Width()-1, nTop ) );
- if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
- {
- SetLineColor( rStyleSettings.GetLightColor() );
- DrawLine( Point( aRect.Right()+FIXEDLINE_TEXT_BORDER, nTop+1 ), Point( aOutSize.Width()-1, nTop+1 ) );
- }
+ aDecoView.DrawSeparator( Point( aRect.Right()+FIXEDLINE_TEXT_BORDER, nTop ), Point( aOutSize.Width()-1, nTop ), false );
}
}
}
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index 5e7e9709607f..2390a8e3e9a6 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -168,6 +168,7 @@ void Slider::ImplInitSettings()
void Slider::ImplUpdateRects( BOOL bUpdate )
{
Rectangle aOldThumbRect = maThumbRect;
+ bool bInvalidateAll = false;
if ( mnThumbPixRange )
{
@@ -193,6 +194,18 @@ void Slider::ImplUpdateRects( BOOL bUpdate )
}
else
maChannel2Rect.SetEmpty();
+
+ const Region aControlRegion( Rectangle( Point(0,0), Size( SLIDER_THUMB_SIZE, 10 ) ) );
+ Region aThumbBounds, aThumbContent;
+ if ( GetNativeControlRegion( CTRL_SLIDER, PART_THUMB_HORZ,
+ aControlRegion, 0, ImplControlValue(), rtl::OUString(),
+ aThumbBounds, aThumbContent ) )
+ {
+ Rectangle aRect( aThumbBounds.GetBoundRect() );
+ maThumbRect.Left() = mnThumbPixPos - aRect.GetWidth()/2;
+ maThumbRect.Right() = maThumbRect.Left() + aRect.GetWidth() - 1;
+ bInvalidateAll = true;
+ }
}
else
{
@@ -216,6 +229,18 @@ void Slider::ImplUpdateRects( BOOL bUpdate )
}
else
maChannel2Rect.SetEmpty();
+
+ const Region aControlRegion( Rectangle( Point(0,0), Size( 10, SLIDER_THUMB_SIZE ) ) );
+ Region aThumbBounds, aThumbContent;
+ if ( GetNativeControlRegion( CTRL_SLIDER, PART_THUMB_VERT,
+ aControlRegion, 0, ImplControlValue(), rtl::OUString(),
+ aThumbBounds, aThumbContent ) )
+ {
+ Rectangle aRect( aThumbBounds.GetBoundRect() );
+ maThumbRect.Top() = mnThumbPixPos - aRect.GetHeight()/2;
+ maThumbRect.Bottom() = maThumbRect.Top() + aRect.GetHeight() - 1;
+ bInvalidateAll = true;
+ }
}
}
else
@@ -229,17 +254,22 @@ void Slider::ImplUpdateRects( BOOL bUpdate )
{
if ( aOldThumbRect != maThumbRect )
{
- Region aInvalidRegion( aOldThumbRect );
- aInvalidRegion.Union( maThumbRect );
-
- if( !IsBackground() && GetParent() )
+ if( bInvalidateAll )
+ Invalidate();
+ else
{
- const Point aPos( GetPosPixel() );
- aInvalidRegion.Move( aPos.X(), aPos.Y() );
- GetParent()->Invalidate( aInvalidRegion, INVALIDATE_TRANSPARENT | INVALIDATE_UPDATE );
+ Region aInvalidRegion( aOldThumbRect );
+ aInvalidRegion.Union( maThumbRect );
+
+ if( !IsBackground() && GetParent() )
+ {
+ const Point aPos( GetPosPixel() );
+ aInvalidRegion.Move( aPos.X(), aPos.Y() );
+ GetParent()->Invalidate( aInvalidRegion, INVALIDATE_TRANSPARENT | INVALIDATE_UPDATE );
+ }
+ else
+ Invalidate( aInvalidRegion );
}
- else
- Invalidate( aInvalidRegion );
}
}
}
@@ -357,6 +387,29 @@ void Slider::ImplDraw( USHORT nDrawFlags )
if ( mbCalcSize )
ImplCalc( FALSE );
+ ControlPart nPart = (GetStyle() & WB_HORZ) ? PART_TRACK_HORZ_AREA : PART_TRACK_VERT_AREA;
+ ImplControlValue aControlValue( BUTTONVALUE_DONTKNOW, rtl::OUString(), 0 );
+ ControlState nState = ( IsEnabled() ? CTRL_STATE_ENABLED : 0 ) | ( HasFocus() ? CTRL_STATE_FOCUSED : 0 );
+ SliderValue sldValue;
+
+ sldValue.mnMin = mnMinRange;
+ sldValue.mnMax = mnMaxRange;
+ sldValue.mnCur = mnThumbPos;
+ sldValue.maThumbRect = maThumbRect;
+
+ if( IsMouseOver() )
+ {
+ if( maThumbRect.IsInside( GetPointerPosPixel() ) )
+ sldValue.mnThumbState |= CTRL_STATE_ROLLOVER;
+ }
+ aControlValue.setOptionalVal( (void *)(&sldValue) );
+
+ const Region aCtrlRegion( Rectangle( Point(0,0), GetOutputSizePixel() ) );
+ bool bNativeOK = DrawNativeControl( CTRL_SLIDER, nPart,
+ aCtrlRegion, nState, aControlValue, rtl::OUString() );
+ if( bNativeOK )
+ return;
+
if ( (nDrawFlags & SLIDER_DRAW_CHANNEL1) && !maChannel1Rect.IsEmpty() )
{
long nRectSize;
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 5c08cdb8a36b..741267044829 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -174,6 +174,9 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle )
// otherwise they will paint with a wrong background
if( IsNativeControlSupported(CTRL_TAB_PANE, PART_ENTIRE_CONTROL) )
EnableChildTransparentMode( TRUE );
+
+ if ( pParent->IsDialog() )
+ pParent->AddChildEventListener( LINK( this, TabControl, ImplWindowEventListener ) );
}
// -----------------------------------------------------------------
@@ -288,6 +291,9 @@ void TabControl::ImplLoadRes( const ResId& rResId )
TabControl::~TabControl()
{
+ if ( GetParent()->IsDialog() )
+ GetParent()->RemoveChildEventListener( LINK( this, TabControl, ImplWindowEventListener ) );
+
ImplFreeLayoutData();
// TabCtrl-Daten loeschen
@@ -1070,6 +1076,42 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo
// -----------------------------------------------------------------------
+long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
+{
+ long nRet = 0;
+
+ if ( GetPageCount() > 1 )
+ {
+ KeyCode aKeyCode = rKeyEvent.GetKeyCode();
+ USHORT nKeyCode = aKeyCode.GetCode();
+
+ if ( aKeyCode.IsMod1() )
+ {
+ if ( aKeyCode.IsShift() || (nKeyCode == KEY_PAGEUP) )
+ {
+ if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEUP) )
+ {
+ ImplActivateTabPage( FALSE );
+ nRet = 1;
+ }
+ }
+ else
+ {
+ if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEDOWN) )
+ {
+ ImplActivateTabPage( TRUE );
+ nRet = 1;
+ }
+ }
+ }
+ }
+
+ return nRet;
+}
+
+
+// -----------------------------------------------------------------------
+
IMPL_LINK( TabControl, ImplScrollBtnHdl, PushButton*, EMPTYARG )
{
ImplSetScrollBtnsState();
@@ -1086,6 +1128,24 @@ IMPL_LINK( TabControl, ImplListBoxSelectHdl, ListBox*, EMPTYARG )
// -----------------------------------------------------------------------
+IMPL_LINK( TabControl, ImplWindowEventListener, VclSimpleEvent*, pEvent )
+{
+ if ( pEvent && pEvent->ISA( VclWindowEvent ) && (pEvent->GetId() == VCLEVENT_WINDOW_KEYINPUT) )
+ {
+ VclWindowEvent* pWindowEvent = static_cast< VclWindowEvent* >(pEvent);
+ // Do not handle events from TabControl or it's children, which is done in Notify(), where the events can be consumed.
+ if ( !IsWindowOrChild( pWindowEvent->GetWindow() ) )
+ {
+ KeyEvent* pKeyEvent = static_cast< KeyEvent* >(pWindowEvent->GetData());
+ ImplHandleKeyEvent( *pKeyEvent );
+ }
+ }
+ return 0;
+}
+
+
+// -----------------------------------------------------------------------
+
void TabControl::MouseButtonDown( const MouseEvent& rMEvt )
{
if( mpTabCtrlData->mpListBox == NULL )
@@ -1655,44 +1715,14 @@ long TabControl::PreNotify( NotifyEvent& rNEvt )
// -----------------------------------------------------------------------
-bool TabControl::ImplHandleNotifyEvent( NotifyEvent& rNEvt )
-{
- if ( (rNEvt.GetType() == EVENT_KEYINPUT) && (GetPageCount() > 1) )
- {
- const KeyEvent* pKEvt = rNEvt.GetKeyEvent();
- KeyCode aKeyCode = pKEvt->GetKeyCode();
- USHORT nKeyCode = aKeyCode.GetCode();
-
- if ( aKeyCode.IsMod1() )
- {
- if ( aKeyCode.IsShift() || (nKeyCode == KEY_PAGEUP) )
- {
- if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEUP) )
- {
- ImplActivateTabPage( FALSE );
- return TRUE;
- }
- }
- else
- {
- if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEDOWN) )
- {
- ImplActivateTabPage( TRUE );
- return TRUE;
- }
- }
- }
- }
- return false;
-}
-
-
-// -----------------------------------------------------------------------
-
long TabControl::Notify( NotifyEvent& rNEvt )
{
+ long nRet = 0;
+
+ if ( rNEvt.GetType() == EVENT_KEYINPUT )
+ nRet = ImplHandleKeyEvent( *rNEvt.GetKeyEvent() );
- return ImplHandleNotifyEvent( rNEvt ) ? TRUE : Control::Notify( rNEvt );
+ return nRet ? nRet : Control::Notify( rNEvt );
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 39964f635c9c..9884e7016fee 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -391,11 +391,9 @@ public:
// used by charstring converter
void setCharStringType( int);
void fakeLocalSubrCount( int nLocalSubrs ) { maCffLocal[0].mnLocalSubrCount=nLocalSubrs;}
- void readCharString( const U8* pTypeOps, int nTypeLen);
protected:
int convert2Type1Ops( CffLocal*, const U8* pType2Ops, int nType2Len, U8* pType1Ops);
private:
- void readTypeOp( CffSubsetterContext&);
void convertOneTypeOp( void);
void convertOneTypeEsc( void);
void callType2Subr( bool bGlobal, int nSubrNumber);
@@ -431,7 +429,6 @@ private:
int getGlyphSID( int nGlyphIndex) const;
const char* getGlyphName( int nGlyphIndex);
- void readTypeOp( void);
void read2push( void);
void pop2write( void);
void writeType1Val( ValType);
@@ -611,25 +608,6 @@ void CffSubsetterContext::setCharStringType( int nVal)
// --------------------------------------------------------------------
-void CffSubsetterContext::readCharString( const U8* pTypeOps, int nTypeLen)
-{
- mnStackIdx = 0;
- mnHintSize = 0;
- mnHorzHintSize = 0;
- maCharWidth = -1;
-
- assert( nTypeLen >= 0);
-// assert( nEnd <= getLength());
- mpReadPtr = pTypeOps;
- mpReadEnd = mpReadPtr + nTypeLen;
- // reset the execution context
- while( mpReadPtr < mpReadEnd)
- readTypeOp();
-//### assert( tellRel() == nEnd);
-}
-
-// --------------------------------------------------------------------
-
void CffSubsetterContext::readDictOp( void)
{
ValType nVal = 0;
@@ -765,112 +743,6 @@ void CffSubsetterContext::readDictOp( void)
// --------------------------------------------------------------------
-void CffSubsetterContext::readTypeOp( void)
-{
- int nVal = 0;
- const U8 c = *mpReadPtr;
- if( (c <= 31) && (c != 28) ) {
- const int nOpId = *(mpReadPtr++);
- const char* pCmdName;
- if( nOpId != 12)
- pCmdName = mpCharStringOps[ nOpId];
- else {
- const int nExtId = *(mpReadPtr++);
- pCmdName = mpCharStringEscs[ nExtId];
- }
-
- if( !pCmdName )
- pCmdName = ".NULL";
- // handle typeop parameters
- int nMinStack = -1, nMaxStack = -1;
- switch( *pCmdName) {
- default: fprintf( stderr, "unsupported TypeOp.type=\'%c\'\n", *pCmdName); break;
- case '.': nMinStack = 0; nMaxStack = 999; break;
- case '0': nMinStack = nMaxStack = 0; break;
- case '1': nMinStack = nMaxStack = 1; break;
- case '2': nMinStack = nMaxStack = 2; break;
- case '4': nMinStack = nMaxStack = 4; break;
- case '5': nMinStack = nMaxStack = 5; break; // not used for Type2 ops
- case '6': nMinStack = nMaxStack = 6; break;
- case '7': nMinStack = nMaxStack = 7; break;
- case '9': nMinStack = nMaxStack = 9; break;
- case 'f': nMinStack = nMaxStack = 11; break;
- case 'F': nMinStack = nMaxStack = 13; break;
- case 'A': nMinStack = 2; nMaxStack = 999; break;
- case 'C': nMinStack = 6; nMaxStack = 999; break;
- case 'E': nMinStack = 1; nMaxStack = 999; break;
- case 'G': nMinStack = 1; nMaxStack = 999; // global subr
- nVal = peekInt();
- // TODO global subr
- break;
- case 'L': // local subr
- nMinStack = 1; nMaxStack = 999;
- nVal = peekInt();
- // TODO local subr
- break;
- case 'I': // operands for "index"
-#if 0
- nMinStack = nValStack[ nStackIdx-1];
- if( nMinStack < 0) nMinStack = 0;
- nMinStack += 1;
-#else
- fprintf( stderr, "TODO: Iindex op\n");
-#endif
- break;
- case 'R': // operands for "rol"
-#if 0
- nMinStack = nValStack[ nStackIdx-2];
-#else
- fprintf( stderr, "TODO: Rrol op\n");
-#endif
- case 'X': // operands for "return"
- nMinStack = 0;
- nMaxStack = /*### (!bInSubrs)? 0 :###*/999;
- break;
- case 'H': // "hstemhm"
- case 'h': // "hstem"
- addHints( false);
- nMinStack = nMaxStack = 0;
- break;
- case 'V': // "vstemhm"
- case 'v': // "vstem"
- addHints( true);
- nMinStack = nMaxStack = 0;
- break;
- case 'K': // "hintmask" or "cntrmask"
- addHints( true); // implicit vstemhm
- nMinStack = nMaxStack = 0;
- break;
- case 'e': // endchar
- updateWidth( (size() >= 1) && (size() != 4));
- nMinStack = nMaxStack = 0;
- if( size() == 4)
- fprintf( stderr,"Deprecated SEAC-like endchar is not supported for CFF subsetting!\n"); // TODO: handle deprecated op
- break;
- case 'm': // hmoveto or vmoveto
- updateWidth( size() > 1);
- nMinStack = 1;
- nMaxStack = nMinStack;
- break;
- case 'M': // rmoveto
- updateWidth( size() > 2);
- nMinStack = 2;
- nMaxStack = nMinStack;
- break;
- }
-
- clear();
- return;
- }
-
- if( (c >= 32) || (c == 28)) {
-// --mpReadPtr;
- read2push();
- }
-}
-
-// --------------------------------------------------------------------
-
void CffSubsetterContext::read2push()
{
ValType aVal = 0;
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index a5b274bfd8e8..38402af626c2 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -811,7 +811,7 @@ sal_uInt8 BitmapEx::GetTransparency(sal_Int32 nX, sal_Int32 nY) const
}
else
{
- if(0x00 != aBitmapColor.GetIndex())
+ if(0x00 == aBitmapColor.GetIndex())
{
nTransparency = 0x00;
}
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 6ca90540d8ee..e13ae6cbe64a 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -1337,6 +1337,7 @@ void ImplDevFontList::InitGenericGlyphFallback( void ) const
"muktinarrow", "",
"phetsarathot", "",
"padauk", "pinlonmyanmar", "",
+ "iskoolapota", "lklug", "",
0
};
@@ -5908,15 +5909,16 @@ SalLayout* OutputDevice::ImplLayout( const String& rOrigStr,
ImplInitFont();
// check string index and length
- String aStr = rOrigStr;
- if( (ULONG)nMinIndex + nLen >= aStr.Len() )
+ if( (unsigned)nMinIndex + nLen > rOrigStr.Len() )
{
- if( nMinIndex < aStr.Len() )
- nLen = aStr.Len() - nMinIndex;
- else
+ const int nNewLen = (int)rOrigStr.Len() - nMinIndex;
+ if( nNewLen <= 0 )
return NULL;
+ nLen = static_cast<xub_StrLen>(nNewLen);
}
+ String aStr = rOrigStr;
+
// filter out special markers
if( bFilter )
{
diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx
index 568e8d836045..189ba4c29e59 100644
--- a/vcl/source/gdi/outmap.cxx
+++ b/vcl/source/gdi/outmap.cxx
@@ -50,6 +50,7 @@
#include <vcl/outdev.h>
#include <vcl/salgdi.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#define USE_64BIT_INTS
@@ -1097,6 +1098,41 @@ basegfx::B2DHomMatrix OutputDevice::GetInverseViewTransformation() const
// -----------------------------------------------------------------------
+// #i75163#
+basegfx::B2DHomMatrix OutputDevice::GetViewTransformation( const MapMode& rMapMode ) const
+{
+ // #i82615#
+ ImplMapRes aMapRes;
+ ImplThresholdRes aThresRes;
+ ImplCalcMapResolution( rMapMode, mnDPIX, mnDPIY, aMapRes, aThresRes );
+
+ basegfx::B2DHomMatrix aTransform;
+
+ const double fScaleFactorX((double)mnDPIX * (double)aMapRes.mnMapScNumX / (double)aMapRes.mnMapScDenomX);
+ const double fScaleFactorY((double)mnDPIY * (double)aMapRes.mnMapScNumY / (double)aMapRes.mnMapScDenomY);
+ const double fZeroPointX(((double)aMapRes.mnMapOfsX * fScaleFactorX) + (double)mnOutOffOrigX);
+ const double fZeroPointY(((double)aMapRes.mnMapOfsY * fScaleFactorY) + (double)mnOutOffOrigY);
+
+ aTransform.set(0, 0, fScaleFactorX);
+ aTransform.set(1, 1, fScaleFactorY);
+ aTransform.set(0, 2, fZeroPointX);
+ aTransform.set(1, 2, fZeroPointY);
+
+ return aTransform;
+}
+
+// -----------------------------------------------------------------------
+
+// #i75163#
+basegfx::B2DHomMatrix OutputDevice::GetInverseViewTransformation( const MapMode& rMapMode ) const
+{
+ basegfx::B2DHomMatrix aMatrix( GetViewTransformation( rMapMode ) );
+ aMatrix.invert();
+ return aMatrix;
+}
+
+// -----------------------------------------------------------------------
+
basegfx::B2DHomMatrix OutputDevice::ImplGetDeviceTransformation() const
{
basegfx::B2DHomMatrix aTransformation = GetViewTransformation();
@@ -1218,6 +1254,26 @@ PolyPolygon OutputDevice::LogicToPixel( const PolyPolygon& rLogicPolyPoly ) cons
// -----------------------------------------------------------------------
+basegfx::B2DPolygon OutputDevice::LogicToPixel( const basegfx::B2DPolygon& rLogicPoly ) const
+{
+ basegfx::B2DPolygon aTransformedPoly = rLogicPoly;
+ const ::basegfx::B2DHomMatrix& rTransformationMatrix = GetViewTransformation();
+ aTransformedPoly.transform( rTransformationMatrix );
+ return aTransformedPoly;
+}
+
+// -----------------------------------------------------------------------
+
+basegfx::B2DPolyPolygon OutputDevice::LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly ) const
+{
+ basegfx::B2DPolyPolygon aTransformedPoly = rLogicPolyPoly;
+ const ::basegfx::B2DHomMatrix& rTransformationMatrix = GetViewTransformation();
+ aTransformedPoly.transform( rTransformationMatrix );
+ return aTransformedPoly;
+}
+
+// -----------------------------------------------------------------------
+
Region OutputDevice::LogicToPixel( const Region& rLogicRegion ) const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -1402,6 +1458,28 @@ PolyPolygon OutputDevice::LogicToPixel( const PolyPolygon& rLogicPolyPoly,
// -----------------------------------------------------------------------
+basegfx::B2DPolyPolygon OutputDevice::LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly,
+ const MapMode& rMapMode ) const
+{
+ basegfx::B2DPolyPolygon aTransformedPoly = rLogicPolyPoly;
+ const ::basegfx::B2DHomMatrix& rTransformationMatrix = GetViewTransformation( rMapMode );
+ aTransformedPoly.transform( rTransformationMatrix );
+ return aTransformedPoly;
+}
+
+// -----------------------------------------------------------------------
+
+basegfx::B2DPolygon OutputDevice::LogicToPixel( const basegfx::B2DPolygon& rLogicPoly,
+ const MapMode& rMapMode ) const
+{
+ basegfx::B2DPolygon aTransformedPoly = rLogicPoly;
+ const ::basegfx::B2DHomMatrix& rTransformationMatrix = GetViewTransformation( rMapMode );
+ aTransformedPoly.transform( rTransformationMatrix );
+ return aTransformedPoly;
+}
+
+// -----------------------------------------------------------------------
+
Region OutputDevice::LogicToPixel( const Region& rLogicRegion,
const MapMode& rMapMode ) const
{
@@ -1553,6 +1631,26 @@ PolyPolygon OutputDevice::PixelToLogic( const PolyPolygon& rDevicePolyPoly ) con
// -----------------------------------------------------------------------
+basegfx::B2DPolygon OutputDevice::PixelToLogic( const basegfx::B2DPolygon& rPixelPoly ) const
+{
+ basegfx::B2DPolygon aTransformedPoly = rPixelPoly;
+ const ::basegfx::B2DHomMatrix& rTransformationMatrix = GetInverseViewTransformation();
+ aTransformedPoly.transform( rTransformationMatrix );
+ return aTransformedPoly;
+}
+
+// -----------------------------------------------------------------------
+
+basegfx::B2DPolyPolygon OutputDevice::PixelToLogic( const basegfx::B2DPolyPolygon& rPixelPolyPoly ) const
+{
+ basegfx::B2DPolyPolygon aTransformedPoly = rPixelPolyPoly;
+ const ::basegfx::B2DHomMatrix& rTransformationMatrix = GetInverseViewTransformation();
+ aTransformedPoly.transform( rTransformationMatrix );
+ return aTransformedPoly;
+}
+
+// -----------------------------------------------------------------------
+
Region OutputDevice::PixelToLogic( const Region& rDeviceRegion ) const
{
DBG_CHKTHIS( OutputDevice, ImplDbgCheckOutputDevice );
@@ -1732,6 +1830,28 @@ PolyPolygon OutputDevice::PixelToLogic( const PolyPolygon& rDevicePolyPoly,
// -----------------------------------------------------------------------
+basegfx::B2DPolygon OutputDevice::PixelToLogic( const basegfx::B2DPolygon& rPixelPoly,
+ const MapMode& rMapMode ) const
+{
+ basegfx::B2DPolygon aTransformedPoly = rPixelPoly;
+ const ::basegfx::B2DHomMatrix& rTransformationMatrix = GetInverseViewTransformation( rMapMode );
+ aTransformedPoly.transform( rTransformationMatrix );
+ return aTransformedPoly;
+}
+
+// -----------------------------------------------------------------------
+
+basegfx::B2DPolyPolygon OutputDevice::PixelToLogic( const basegfx::B2DPolyPolygon& rPixelPolyPoly,
+ const MapMode& rMapMode ) const
+{
+ basegfx::B2DPolyPolygon aTransformedPoly = rPixelPolyPoly;
+ const ::basegfx::B2DHomMatrix& rTransformationMatrix = GetInverseViewTransformation( rMapMode );
+ aTransformedPoly.transform( rTransformationMatrix );
+ return aTransformedPoly;
+}
+
+// -----------------------------------------------------------------------
+
Region OutputDevice::PixelToLogic( const Region& rDeviceRegion,
const MapMode& rMapMode ) const
{
@@ -2159,6 +2279,96 @@ Size OutputDevice::LogicToLogic( const Size& rSzSource,
// -----------------------------------------------------------------------
+basegfx::B2DPolygon OutputDevice::LogicToLogic( const basegfx::B2DPolygon& rPolySource,
+ const MapMode& rMapModeSource,
+ const MapMode& rMapModeDest )
+{
+ if ( rMapModeSource == rMapModeDest )
+ return rPolySource;
+
+ MapUnit eUnitSource = rMapModeSource.GetMapUnit();
+ MapUnit eUnitDest = rMapModeDest.GetMapUnit();
+ ENTER2( eUnitSource, eUnitDest );
+
+ basegfx::B2DHomMatrix aTransform;
+
+ if ( rMapModeSource.mpImplMapMode->mbSimple &&
+ rMapModeDest.mpImplMapMode->mbSimple )
+ {
+ ENTER3( eUnitSource, eUnitDest );
+
+ const double fScaleFactor((double)nNumerator / (double)nDenominator);
+ aTransform.set(0, 0, fScaleFactor);
+ aTransform.set(1, 1, fScaleFactor);
+ }
+ else
+ {
+ ENTER4( rMapModeSource, rMapModeDest );
+
+ const double fScaleFactorX( (double(aMapResSource.mnMapScNumX) * double(aMapResDest.mnMapScDenomX))
+ / (double(aMapResSource.mnMapScDenomX) * double(aMapResDest.mnMapScNumX)) );
+ const double fScaleFactorY( (double(aMapResSource.mnMapScNumY) * double(aMapResDest.mnMapScDenomY))
+ / (double(aMapResSource.mnMapScDenomY) * double(aMapResDest.mnMapScNumY)) );
+ const double fZeroPointX(double(aMapResSource.mnMapOfsX) * fScaleFactorX - double(aMapResDest.mnMapOfsX));
+ const double fZeroPointY(double(aMapResSource.mnMapOfsY) * fScaleFactorY - double(aMapResDest.mnMapOfsY));
+
+ aTransform.set(0, 0, fScaleFactorX);
+ aTransform.set(1, 1, fScaleFactorY);
+ aTransform.set(0, 2, fZeroPointX);
+ aTransform.set(1, 2, fZeroPointY);
+ }
+ basegfx::B2DPolygon aPoly( rPolySource );
+ aPoly.transform( aTransform );
+ return aPoly;
+}
+
+// -----------------------------------------------------------------------
+
+basegfx::B2DPolyPolygon OutputDevice::LogicToLogic( const basegfx::B2DPolyPolygon& rPolySource,
+ const MapMode& rMapModeSource,
+ const MapMode& rMapModeDest )
+{
+ if ( rMapModeSource == rMapModeDest )
+ return rPolySource;
+
+ MapUnit eUnitSource = rMapModeSource.GetMapUnit();
+ MapUnit eUnitDest = rMapModeDest.GetMapUnit();
+ ENTER2( eUnitSource, eUnitDest );
+
+ basegfx::B2DHomMatrix aTransform;
+
+ if ( rMapModeSource.mpImplMapMode->mbSimple &&
+ rMapModeDest.mpImplMapMode->mbSimple )
+ {
+ ENTER3( eUnitSource, eUnitDest );
+
+ const double fScaleFactor((double)nNumerator / (double)nDenominator);
+ aTransform.set(0, 0, fScaleFactor);
+ aTransform.set(1, 1, fScaleFactor);
+ }
+ else
+ {
+ ENTER4( rMapModeSource, rMapModeDest );
+
+ const double fScaleFactorX( (double(aMapResSource.mnMapScNumX) * double(aMapResDest.mnMapScDenomX))
+ / (double(aMapResSource.mnMapScDenomX) * double(aMapResDest.mnMapScNumX)) );
+ const double fScaleFactorY( (double(aMapResSource.mnMapScNumY) * double(aMapResDest.mnMapScDenomY))
+ / (double(aMapResSource.mnMapScDenomY) * double(aMapResDest.mnMapScNumY)) );
+ const double fZeroPointX(double(aMapResSource.mnMapOfsX) * fScaleFactorX - double(aMapResDest.mnMapOfsX));
+ const double fZeroPointY(double(aMapResSource.mnMapOfsY) * fScaleFactorY - double(aMapResDest.mnMapOfsY));
+
+ aTransform.set(0, 0, fScaleFactorX);
+ aTransform.set(1, 1, fScaleFactorY);
+ aTransform.set(0, 2, fZeroPointX);
+ aTransform.set(1, 2, fZeroPointY);
+ }
+ basegfx::B2DPolyPolygon aPoly( rPolySource );
+ aPoly.transform( aTransform );
+ return aPoly;
+}
+
+// -----------------------------------------------------------------------
+
Rectangle OutputDevice::LogicToLogic( const Rectangle& rRectSource,
const MapMode& rMapModeSource,
const MapMode& rMapModeDest )
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index fefe904e371a..046bc4a8951d 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -27,10 +27,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
-#include <vcl/pdfextoutdevdata.hxx>
-#include <vcl/graph.hxx>
-#include <vcl/outdev.hxx>
-#include <vcl/gfxlink.hxx>
+#include "vcl/pdfextoutdevdata.hxx"
+#include "vcl/graph.hxx"
+#include "vcl/outdev.hxx"
+#include "vcl/gfxlink.hxx"
+#include "basegfx/polygon/b2dpolygon.hxx"
+#include "basegfx/polygon/b2dpolygontools.hxx"
#include <boost/shared_ptr.hpp>
@@ -430,7 +432,10 @@ sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIM
if ( bClippingNeeded )
{
rWriter.Push();
- rWriter.SetClipRegion( aVisibleOutputRect );
+ basegfx::B2DPolyPolygon aRect( basegfx::tools::createPolygonFromRect(
+ basegfx::B2DRectangle( aVisibleOutputRect.Left(), aVisibleOutputRect.Top(),
+ aVisibleOutputRect.Right(), aVisibleOutputRect.Bottom() ) ) );
+ rWriter.SetClipRegion( aRect);
}
Bitmap aMask;
SvMemoryStream aTmp;
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 040d38f538c9..5dcce25a0315 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -346,7 +346,7 @@ void PDFWriter::SetClipRegion()
((PDFWriterImpl*)pImplementation)->clearClipRegion();
}
-void PDFWriter::SetClipRegion( const Region& rRegion )
+void PDFWriter::SetClipRegion( const basegfx::B2DPolyPolygon& rRegion )
{
((PDFWriterImpl*)pImplementation)->setClipRegion( rRegion );
}
@@ -356,7 +356,7 @@ void PDFWriter::MoveClipRegion( long nHorzMove, long nVertMove )
((PDFWriterImpl*)pImplementation)->moveClipRegion( nHorzMove, nVertMove );
}
-void PDFWriter::IntersectClipRegion( const Region& rRegion )
+void PDFWriter::IntersectClipRegion( const basegfx::B2DPolyPolygon& rRegion )
{
((PDFWriterImpl*)pImplementation)->intersectClipRegion( rRegion );
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 4371feb8ee37..6a24775219d9 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -37,6 +37,8 @@
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
#include <rtl/ustrbuf.hxx>
#include <tools/debug.hxx>
#include <tools/zcodec.hxx>
@@ -115,7 +117,7 @@ void doTestCode()
aDocInfo.Title = OUString( RTL_CONSTASCII_USTRINGPARAM( "PDF export test document" ) );
aDocInfo.Producer = OUString( RTL_CONSTASCII_USTRINGPARAM( "VCL" ) );
aWriter.SetDocInfo( aDocInfo );
- aWriter.NewPage();
+ aWriter.NewPage( 595, 842 );
aWriter.BeginStructureElement( PDFWriter::Document );
// set duration of 3 sec for first page
aWriter.SetAutoAdvanceTime( 3 );
@@ -166,7 +168,7 @@ void doTestCode()
TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK
);
- aWriter.NewPage();
+ aWriter.NewPage( 595, 842 );
// test AddStream interface
aWriter.AddStream( String( RTL_CONSTASCII_USTRINGPARAM( "text/plain" ) ), new PDFTestOutputStream(), true );
// set transitional mode
@@ -208,7 +210,25 @@ void doTestCode()
aWriter.BeginStructureElement( PDFWriter::Caption );
aWriter.DrawText( Point( 4500, 9000 ), String( RTL_CONSTASCII_USTRINGPARAM( "Some drawing stuff inside the structure" ) ) );
aWriter.EndStructureElement();
+
+ // test clipping
+ basegfx::B2DPolyPolygon aClip;
+ basegfx::B2DPolygon aClipPoly;
+ aClipPoly.append( basegfx::B2DPoint( 8250, 9600 ) );
+ aClipPoly.append( basegfx::B2DPoint( 16500, 11100 ) );
+ aClipPoly.append( basegfx::B2DPoint( 8250, 12600 ) );
+ aClipPoly.append( basegfx::B2DPoint( 4500, 11100 ) );
+ aClipPoly.setClosed( true );
+ //aClipPoly.flip();
+ aClip.append( aClipPoly );
+
+ aWriter.Push( PUSH_CLIPREGION | PUSH_FILLCOLOR );
+ aWriter.SetClipRegion( aClip );
+ aWriter.DrawEllipse( Rectangle( Point( 4500, 9600 ), Size( 12000, 3000 ) ) );
+ aWriter.MoveClipRegion( 1000, 500 );
+ aWriter.SetFillColor( Color( COL_RED ) );
aWriter.DrawEllipse( Rectangle( Point( 4500, 9600 ), Size( 12000, 3000 ) ) );
+ aWriter.Pop();
// test transparency
// draw background
Rectangle aTranspRect( Point( 7500, 13500 ), Size( 9000, 6000 ) );
@@ -288,7 +308,7 @@ void doTestCode()
aLIPoly.Move( 1000, 1000 );
aWriter.DrawPolyLine( aLIPoly, aLI );
- aWriter.NewPage();
+ aWriter.NewPage( 595, 842 );
aWriter.SetMapMode( MapMode( MAP_100TH_MM ) );
Wallpaper aWall( aTransMask );
aWall.SetStyle( WALLPAPER_TILE );
@@ -312,7 +332,7 @@ void doTestCode()
aWriter.SetLineColor( Color( COL_LIGHTBLUE ) );
aWriter.DrawRect( aPolyRect );
- aWriter.NewPage();
+ aWriter.NewPage( 595, 842 );
aWriter.SetMapMode( MapMode( MAP_100TH_MM ) );
aWriter.SetFont( Font( String( RTL_CONSTASCII_USTRINGPARAM( "Times" ) ), Size( 0, 500 ) ) );
aWriter.SetTextColor( Color( COL_BLACK ) );
@@ -632,30 +652,25 @@ static void appendUnicodeTextString( const rtl::OUString& rString, OStringBuffer
}
}
-OString PDFWriterImpl::convertWidgetFieldName( const rtl::OUString& rString )
+void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWriter::AnyWidget& i_rControl )
{
- OStringBuffer aBuffer( rString.getLength()+64 );
-
/* #i80258# previously we use appendName here
however we need a slightly different coding scheme than the normal
name encoding for field names
-
- also replace all '.' by '_' as '.' indicates a hierarchy level which
- we do not have here
*/
-
- OString aStr( OUStringToOString( rString, RTL_TEXTENCODING_UTF8 ) );
+ const OUString& rName = (m_aContext.Version > PDFWriter::PDF_1_2) ? i_rControl.Name : i_rControl.Text;
+ OString aStr( OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ) );
const sal_Char* pStr = aStr.getStr();
int nLen = aStr.getLength();
+
+ OStringBuffer aBuffer( rName.getLength()+64 );
for( int i = 0; i < nLen; i++ )
{
/* #i16920# PDF recommendation: output UTF8, any byte
- * outside the interval [33(=ASCII'!');126(=ASCII'~')]
+ * outside the interval [32(=ASCII' ');126(=ASCII'~')]
* should be escaped hexadecimal
*/
- if( pStr[i] == '.' )
- aBuffer.append( '_' );
- else if( (pStr[i] >= 33 && pStr[i] <= 126 ) )
+ if( (pStr[i] >= 32 && pStr[i] <= 126 ) )
aBuffer.append( pStr[i] );
else
{
@@ -664,31 +679,135 @@ OString PDFWriterImpl::convertWidgetFieldName( const rtl::OUString& rString )
}
}
- OString aRet = aBuffer.makeStringAndClear();
+ OString aFullName( aBuffer.makeStringAndClear() );
+
+ /* #i82785# create hierarchical fields down to the for each dot in i_rName */
+ sal_Int32 nTokenIndex = 0, nLastTokenIndex = 0;
+ OString aPartialName;
+ OString aDomain;
+ do
+ {
+ nLastTokenIndex = nTokenIndex;
+ aPartialName = aFullName.getToken( 0, '.', nTokenIndex );
+ if( nTokenIndex != -1 )
+ {
+ // find or create a hierarchical field
+ // first find the fully qualified name up to this field
+ aDomain = aFullName.copy( 0, nTokenIndex-1 );
+ std::hash_map< rtl::OString, sal_Int32, rtl::OStringHash >::const_iterator it = m_aFieldNameMap.find( aDomain );
+ if( it == m_aFieldNameMap.end() )
+ {
+ // create new hierarchy field
+ sal_Int32 nNewWidget = m_aWidgets.size();
+ m_aWidgets.push_back( PDFWidget() );
+ m_aWidgets[nNewWidget].m_nObject = createObject();
+ m_aWidgets[nNewWidget].m_eType = PDFWriter::Hierarchy;
+ m_aWidgets[nNewWidget].m_aName = aPartialName;
+ m_aWidgets[i_nWidgetIndex].m_nParent = m_aWidgets[nNewWidget].m_nObject;
+ m_aFieldNameMap[aDomain] = nNewWidget;
+ m_aWidgets[i_nWidgetIndex].m_nParent = m_aWidgets[nNewWidget].m_nObject;
+ if( nLastTokenIndex > 0 )
+ {
+ // this field is not a root field and
+ // needs to be inserted to its parent
+ OString aParentDomain( aDomain.copy( 0, nLastTokenIndex-1 ) );
+ it = m_aFieldNameMap.find( aParentDomain );
+ OSL_ENSURE( it != m_aFieldNameMap.end(), "field name not found" );
+ if( it != m_aFieldNameMap.end() )
+ {
+ OSL_ENSURE( it->second < sal_Int32(m_aWidgets.size()), "invalid field number entry" );
+ if( it->second < sal_Int32(m_aWidgets.size()) )
+ {
+ PDFWidget& rParentField( m_aWidgets[it->second] );
+ rParentField.m_aKids.push_back( m_aWidgets[nNewWidget].m_nObject );
+ rParentField.m_aKidsIndex.push_back( nNewWidget );
+ m_aWidgets[nNewWidget].m_nParent = rParentField.m_nObject;
+ }
+ }
+ }
+ }
+ else if( m_aWidgets[it->second].m_eType != PDFWriter::Hierarchy )
+ {
+ // this is invalid, someone tries to have a terminal field as parent
+ // example: a button with the name foo.bar exists and
+ // another button is named foo.bar.no
+ // workaround: put the second terminal field as much up in the hierarchy as
+ // necessary to have a non-terminal field as parent (or none at all)
+ // since it->second already is terminal, we just need to use its parent
+ aDomain = OString();
+ aPartialName = aFullName.copy( aFullName.lastIndexOf( '.' )+1 );
+ if( nLastTokenIndex > 0 )
+ {
+ aDomain = aFullName.copy( 0, nLastTokenIndex-1 );
+ OStringBuffer aBuf( aDomain.getLength() + 1 + aPartialName.getLength() );
+ aBuf.append( aDomain );
+ aBuf.append( '.' );
+ aBuf.append( aPartialName );
+ aFullName = aBuf.makeStringAndClear();
+ }
+ else
+ aFullName = aPartialName;
+ break;
+ }
+ }
+ } while( nTokenIndex != -1 );
+
+ // insert widget into its hierarchy field
+ if( aDomain.getLength() )
+ {
+ std::hash_map< rtl::OString, sal_Int32, rtl::OStringHash >::const_iterator it = m_aFieldNameMap.find( aDomain );
+ if( it != m_aFieldNameMap.end() )
+ {
+ OSL_ENSURE( it->second >= 0 && it->second < sal_Int32( m_aWidgets.size() ), "invalid field index" );
+ if( it->second >= 0 && it->second < sal_Int32(m_aWidgets.size()) )
+ {
+ m_aWidgets[i_nWidgetIndex].m_nParent = m_aWidgets[it->second].m_nObject;
+ m_aWidgets[it->second].m_aKids.push_back( m_aWidgets[i_nWidgetIndex].m_nObject);
+ m_aWidgets[it->second].m_aKidsIndex.push_back( i_nWidgetIndex );
+ }
+ }
+ }
+
+ if( aPartialName.getLength() == 0 )
+ {
+ // how funny, an empty field name
+ if( i_rControl.getType() == PDFWriter::RadioButton )
+ {
+ aPartialName = "RadioGroup";
+ aPartialName += OString::valueOf( static_cast<const PDFWriter::RadioButtonWidget&>(i_rControl).RadioGroup );
+ }
+ else
+ aPartialName = OString( "Widget" );
+ }
+
if( ! m_aContext.AllowDuplicateFieldNames )
{
- std::hash_map<OString, sal_Int32, OStringHash>::iterator it = m_aFieldNameMap.find( aRet );
+ std::hash_map<OString, sal_Int32, OStringHash>::iterator it = m_aFieldNameMap.find( aFullName );
if( it != m_aFieldNameMap.end() ) // not unique
{
std::hash_map< OString, sal_Int32, OStringHash >::const_iterator check_it;
OString aTry;
+ sal_Int32 nTry = 2;
do
{
- OStringBuffer aUnique( aRet.getLength() + 16 );
- aUnique.append( aRet );
+ OStringBuffer aUnique( aFullName.getLength() + 16 );
+ aUnique.append( aFullName );
aUnique.append( '_' );
- aUnique.append( it->second );
- it->second++;
+ aUnique.append( nTry++ );
aTry = aUnique.makeStringAndClear();
check_it = m_aFieldNameMap.find( aTry );
} while( check_it != m_aFieldNameMap.end() );
- aRet = aTry;
+ aFullName = aTry;
+ m_aFieldNameMap[ aFullName ] = i_nWidgetIndex;
+ aPartialName = aFullName.copy( aFullName.lastIndexOf( '.' )+1 );
}
else
- m_aFieldNameMap[ aRet ] = 2;
+ m_aFieldNameMap[ aFullName ] = i_nWidgetIndex;
}
- return aRet;
+
+ // finally
+ m_aWidgets[i_nWidgetIndex].m_aName = aPartialName;
}
static void appendFixedInt( sal_Int32 nValue, OStringBuffer& rBuffer, sal_Int32 nPrecision = nLog10Divisor )
@@ -720,7 +839,7 @@ static void appendFixedInt( sal_Int32 nValue, OStringBuffer& rBuffer, sal_Int32
// appends a double. PDF does not accept exponential format, only fixed point
-static void appendDouble( double fValue, OStringBuffer& rBuffer, int nPrecision = 5 )
+static void appendDouble( double fValue, OStringBuffer& rBuffer, sal_Int32 nPrecision = 5 )
{
bool bNeg = false;
if( fValue < 0.0 )
@@ -1273,6 +1392,19 @@ void PDFWriterImpl::PDFPage::appendPoint( const Point& rPoint, OStringBuffer& rB
appendFixedInt( nValue, rBuffer );
}
+void PDFWriterImpl::PDFPage::appendPixelPoint( const basegfx::B2DPoint& rPoint, OStringBuffer& rBuffer ) const
+{
+ double fValue = pixelToPoint(rPoint.getX());
+
+ appendDouble( fValue, rBuffer, nLog10Divisor );
+
+ rBuffer.append( ' ' );
+
+ fValue = double(getHeight()) - pixelToPoint(rPoint.getY());
+
+ appendDouble( fValue, rBuffer, nLog10Divisor );
+}
+
void PDFWriterImpl::PDFPage::appendRect( const Rectangle& rRect, OStringBuffer& rBuffer ) const
{
appendPoint( rRect.BottomLeft() + Point( 0, 1 ), rBuffer );
@@ -1345,6 +1477,82 @@ void PDFWriterImpl::PDFPage::appendPolygon( const Polygon& rPoly, OStringBuffer&
}
}
+void PDFWriterImpl::PDFPage::appendPolygon( const basegfx::B2DPolygon& rPoly, OStringBuffer& rBuffer, bool bClose ) const
+{
+ basegfx::B2DPolygon aPoly( lcl_convert( m_pWriter->m_aGraphicsStack.front().m_aMapMode,
+ m_pWriter->m_aMapMode,
+ m_pWriter->getReferenceDevice(),
+ rPoly ) );
+
+ if( basegfx::tools::isRectangle( aPoly ) )
+ {
+ basegfx::B2DRange aRange( aPoly.getB2DRange() );
+ basegfx::B2DPoint aBL( aRange.getMinX(), aRange.getMaxY() );
+ appendPixelPoint( aBL, rBuffer );
+ rBuffer.append( ' ' );
+ appendMappedLength( aRange.getWidth(), rBuffer, false, NULL, nLog10Divisor );
+ rBuffer.append( ' ' );
+ appendMappedLength( aRange.getHeight(), rBuffer, true, NULL, nLog10Divisor );
+ rBuffer.append( " re\n" );
+ return;
+ }
+ sal_uInt32 nPoints = aPoly.count();
+ if( nPoints > 0 )
+ {
+ sal_uInt32 nBufLen = rBuffer.getLength();
+ basegfx::B2DPoint aLastPoint( aPoly.getB2DPoint( 0 ) );
+ appendPixelPoint( aLastPoint, rBuffer );
+ rBuffer.append( " m\n" );
+ for( sal_uInt32 i = 1; i <= nPoints; i++ )
+ {
+ if( i != nPoints || aPoly.isClosed() )
+ {
+ sal_uInt32 nCurPoint = i % nPoints;
+ sal_uInt32 nLastPoint = i-1;
+ basegfx::B2DPoint aPoint( aPoly.getB2DPoint( nCurPoint ) );
+ if( aPoly.isNextControlPointUsed( nLastPoint ) &&
+ aPoly.isPrevControlPointUsed( nCurPoint ) )
+ {
+ appendPixelPoint( aPoly.getNextControlPoint( nLastPoint ), rBuffer );
+ rBuffer.append( ' ' );
+ appendPixelPoint( aPoly.getPrevControlPoint( nCurPoint ), rBuffer );
+ rBuffer.append( ' ' );
+ appendPixelPoint( aPoint, rBuffer );
+ rBuffer.append( " c" );
+ }
+ else if( aPoly.isNextControlPointUsed( nLastPoint ) )
+ {
+ appendPixelPoint( aPoly.getNextControlPoint( nLastPoint ), rBuffer );
+ rBuffer.append( ' ' );
+ appendPixelPoint( aPoint, rBuffer );
+ rBuffer.append( " y" );
+ }
+ else if( aPoly.isPrevControlPointUsed( nCurPoint ) )
+ {
+ appendPixelPoint( aPoly.getPrevControlPoint( nCurPoint ), rBuffer );
+ rBuffer.append( ' ' );
+ appendPixelPoint( aPoint, rBuffer );
+ rBuffer.append( " v" );
+ }
+ else
+ {
+ appendPixelPoint( aPoint, rBuffer );
+ rBuffer.append( " l" );
+ }
+ if( (rBuffer.getLength() - nBufLen) > 65 )
+ {
+ rBuffer.append( "\n" );
+ nBufLen = rBuffer.getLength();
+ }
+ else
+ rBuffer.append( " " );
+ }
+ }
+ if( bClose )
+ rBuffer.append( "h\n" );
+ }
+}
+
void PDFWriterImpl::PDFPage::appendPolyPolygon( const PolyPolygon& rPolyPoly, OStringBuffer& rBuffer, bool bClose ) const
{
USHORT nPolygons = rPolyPoly.Count();
@@ -1352,6 +1560,13 @@ void PDFWriterImpl::PDFPage::appendPolyPolygon( const PolyPolygon& rPolyPoly, OS
appendPolygon( rPolyPoly[n], rBuffer, bClose );
}
+void PDFWriterImpl::PDFPage::appendPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPoly, OStringBuffer& rBuffer, bool bClose ) const
+{
+ sal_uInt32 nPolygons = rPolyPoly.count();
+ for( sal_uInt32 n = 0; n < nPolygons; n++ )
+ appendPolygon( rPolyPoly.getB2DPolygon( n ), rBuffer, bClose );
+}
+
void PDFWriterImpl::PDFPage::appendMappedLength( sal_Int32 nLength, OStringBuffer& rBuffer, bool bVertical, sal_Int32* pOutLength ) const
{
sal_Int32 nValue = nLength;
@@ -1371,7 +1586,7 @@ void PDFWriterImpl::PDFPage::appendMappedLength( sal_Int32 nLength, OStringBuffe
appendFixedInt( nValue, rBuffer, 1 );
}
-void PDFWriterImpl::PDFPage::appendMappedLength( double fLength, OStringBuffer& rBuffer, bool bVertical, sal_Int32* pOutLength ) const
+void PDFWriterImpl::PDFPage::appendMappedLength( double fLength, OStringBuffer& rBuffer, bool bVertical, sal_Int32* pOutLength, sal_Int32 nPrecision ) const
{
Size aSize( lcl_convert( m_pWriter->m_aGraphicsStack.front().m_aMapMode,
m_pWriter->m_aMapMode,
@@ -1380,7 +1595,7 @@ void PDFWriterImpl::PDFPage::appendMappedLength( double fLength, OStringBuffer&
if( pOutLength )
*pOutLength = (sal_Int32)(fLength*(double)(bVertical ? aSize.Height() : aSize.Width())/1000.0);
fLength *= pixelToPoint((double)(bVertical ? aSize.Height() : aSize.Width()) / 1000.0);
- appendDouble( fLength, rBuffer );
+ appendDouble( fLength, rBuffer, nPrecision );
}
bool PDFWriterImpl::PDFPage::appendLineInfo( const LineInfo& rInfo, OStringBuffer& rBuffer ) const
@@ -5189,78 +5404,82 @@ bool PDFWriterImpl::emitWidgetAnnotations()
aLine.append( rWidget.m_nObject );
aLine.append( " 0 obj\n"
"<<" );
- // emit widget annotation only for terminal fields
- if( rWidget.m_aKids.empty() )
- {
- aLine.append( "/Type/Annot/Subtype/Widget/F 4\n"
- "/Rect[" );
- appendFixedInt( rWidget.m_aRect.Left()-1, aLine );
- aLine.append( ' ' );
- appendFixedInt( rWidget.m_aRect.Top()+1, aLine );
- aLine.append( ' ' );
- appendFixedInt( rWidget.m_aRect.Right()+1, aLine );
- aLine.append( ' ' );
- appendFixedInt( rWidget.m_aRect.Bottom()-1, aLine );
- aLine.append( "]\n" );
- }
- aLine.append( "/FT/" );
- switch( rWidget.m_eType )
+ if( rWidget.m_eType != PDFWriter::Hierarchy )
{
- case PDFWriter::RadioButton:
- case PDFWriter::CheckBox:
- // for radio buttons only the RadioButton field, not the
- // CheckBox children should have a value, else acrobat reader
- // does not always check the right button
- // of course real check boxes (not belonging to a readio group)
- // need their values, too
- if( rWidget.m_eType == PDFWriter::RadioButton || rWidget.m_nRadioGroup < 0 )
- {
- aValue.append( "/" );
- // check for radio group with all buttons unpressed
- if( rWidget.m_aValue.getLength() == 0 )
- aValue.append( "Off" );
- else
- appendName( rWidget.m_aValue, aValue );
- }
- case PDFWriter::PushButton:
- aLine.append( "Btn" );
- break;
- case PDFWriter::ListBox:
- if( rWidget.m_nFlags & 0x200000 ) // multiselect
- {
- aValue.append( "[" );
- for( unsigned int i = 0; i < rWidget.m_aSelectedEntries.size(); i++ )
+ // emit widget annotation only for terminal fields
+ if( rWidget.m_aKids.empty() )
+ {
+ aLine.append( "/Type/Annot/Subtype/Widget/F 4\n"
+ "/Rect[" );
+ appendFixedInt( rWidget.m_aRect.Left()-1, aLine );
+ aLine.append( ' ' );
+ appendFixedInt( rWidget.m_aRect.Top()+1, aLine );
+ aLine.append( ' ' );
+ appendFixedInt( rWidget.m_aRect.Right()+1, aLine );
+ aLine.append( ' ' );
+ appendFixedInt( rWidget.m_aRect.Bottom()-1, aLine );
+ aLine.append( "]\n" );
+ }
+ aLine.append( "/FT/" );
+ switch( rWidget.m_eType )
+ {
+ case PDFWriter::RadioButton:
+ case PDFWriter::CheckBox:
+ // for radio buttons only the RadioButton field, not the
+ // CheckBox children should have a value, else acrobat reader
+ // does not always check the right button
+ // of course real check boxes (not belonging to a readio group)
+ // need their values, too
+ if( rWidget.m_eType == PDFWriter::RadioButton || rWidget.m_nRadioGroup < 0 )
{
- sal_Int32 nEntry = rWidget.m_aSelectedEntries[i];
- if( nEntry >= 0 && nEntry < sal_Int32(rWidget.m_aListEntries.size()) )
- appendUnicodeTextStringEncrypt( rWidget.m_aListEntries[ nEntry ], rWidget.m_nObject, aValue );
+ aValue.append( "/" );
+ // check for radio group with all buttons unpressed
+ if( rWidget.m_aValue.getLength() == 0 )
+ aValue.append( "Off" );
+ else
+ appendName( rWidget.m_aValue, aValue );
}
- aValue.append( "]" );
- }
- else if( rWidget.m_aSelectedEntries.size() > 0 &&
- rWidget.m_aSelectedEntries[0] >= 0 &&
- rWidget.m_aSelectedEntries[0] < sal_Int32(rWidget.m_aListEntries.size()) )
- {
- appendUnicodeTextStringEncrypt( rWidget.m_aListEntries[ rWidget.m_aSelectedEntries[0] ], rWidget.m_nObject, aValue );
- }
- else
- appendUnicodeTextStringEncrypt( rtl::OUString(), rWidget.m_nObject, aValue );
- aLine.append( "Ch" );
- break;
- case PDFWriter::ComboBox:
- appendUnicodeTextStringEncrypt( rWidget.m_aValue, rWidget.m_nObject, aValue );
- aLine.append( "Ch" );
- break;
- case PDFWriter::Edit:
- aLine.append( "Tx" );
- appendUnicodeTextStringEncrypt( rWidget.m_aValue, rWidget.m_nObject, aValue );
- break;
+ case PDFWriter::PushButton:
+ aLine.append( "Btn" );
+ break;
+ case PDFWriter::ListBox:
+ if( rWidget.m_nFlags & 0x200000 ) // multiselect
+ {
+ aValue.append( "[" );
+ for( unsigned int i = 0; i < rWidget.m_aSelectedEntries.size(); i++ )
+ {
+ sal_Int32 nEntry = rWidget.m_aSelectedEntries[i];
+ if( nEntry >= 0 && nEntry < sal_Int32(rWidget.m_aListEntries.size()) )
+ appendUnicodeTextStringEncrypt( rWidget.m_aListEntries[ nEntry ], rWidget.m_nObject, aValue );
+ }
+ aValue.append( "]" );
+ }
+ else if( rWidget.m_aSelectedEntries.size() > 0 &&
+ rWidget.m_aSelectedEntries[0] >= 0 &&
+ rWidget.m_aSelectedEntries[0] < sal_Int32(rWidget.m_aListEntries.size()) )
+ {
+ appendUnicodeTextStringEncrypt( rWidget.m_aListEntries[ rWidget.m_aSelectedEntries[0] ], rWidget.m_nObject, aValue );
+ }
+ else
+ appendUnicodeTextStringEncrypt( rtl::OUString(), rWidget.m_nObject, aValue );
+ aLine.append( "Ch" );
+ break;
+ case PDFWriter::ComboBox:
+ appendUnicodeTextStringEncrypt( rWidget.m_aValue, rWidget.m_nObject, aValue );
+ aLine.append( "Ch" );
+ break;
+ case PDFWriter::Edit:
+ aLine.append( "Tx" );
+ appendUnicodeTextStringEncrypt( rWidget.m_aValue, rWidget.m_nObject, aValue );
+ break;
+ case PDFWriter::Hierarchy: // make the compiler happy
+ break;
+ }
+ aLine.append( "\n" );
+ aLine.append( "/P " );
+ aLine.append( m_aPages[ rWidget.m_nPage ].m_nPageObject );
+ aLine.append( " 0 R\n" );
}
- aLine.append( "\n" );
- aLine.append( "/P " );
- aLine.append( m_aPages[ rWidget.m_nPage ].m_nPageObject );
- aLine.append( " 0 R\n" );
-
if( rWidget.m_nParent )
{
aLine.append( "/Parent " );
@@ -5284,7 +5503,7 @@ bool PDFWriterImpl::emitWidgetAnnotations()
appendLiteralStringEncrypt( rWidget.m_aName, rWidget.m_nObject, aLine );
aLine.append( "\n" );
}
- if( m_aContext.Version > PDFWriter::PDF_1_2 )
+ if( m_aContext.Version > PDFWriter::PDF_1_2 && rWidget.m_aDescription.getLength() )
{
// the alternate field name should be unicode able since it is
// supposed to be used in UI
@@ -5346,7 +5565,7 @@ bool PDFWriterImpl::emitWidgetAnnotations()
if(!m_bIsPDF_A1)
{
OStringBuffer aDest;
- if( appendDest( rWidget.m_nDest, aDest ) )
+ if( rWidget.m_nDest != -1 && appendDest( rWidget.m_nDest, aDest ) )
{
aLine.append( "/AA<</D<</Type/Action/S/GoTo/D " );
aLine.append( aDest.makeStringAndClear() );
@@ -6379,16 +6598,19 @@ void PDFWriterImpl::sortWidgets()
for( int nW = 0; nW < nWidgets; nW++ )
{
const PDFWidget& rWidget = m_aWidgets[nW];
- AnnotSortContainer& rCont = sorted[ rWidget.m_nPage ];
- // optimize vector allocation
- if( rCont.aSortedAnnots.empty() )
- rCont.aSortedAnnots.reserve( m_aPages[ rWidget.m_nPage ].m_aAnnotations.size() );
- // insert widget to tab sorter
- // RadioButtons are not page annotations, only their individual check boxes are
- if( rWidget.m_eType != PDFWriter::RadioButton )
- {
- rCont.aObjects.insert( rWidget.m_nObject );
- rCont.aSortedAnnots.push_back( AnnotationSortEntry( rWidget.m_nTabOrder, rWidget.m_nObject, nW ) );
+ if( rWidget.m_nPage >= 0 )
+ {
+ AnnotSortContainer& rCont = sorted[ rWidget.m_nPage ];
+ // optimize vector allocation
+ if( rCont.aSortedAnnots.empty() )
+ rCont.aSortedAnnots.reserve( m_aPages[ rWidget.m_nPage ].m_aAnnotations.size() );
+ // insert widget to tab sorter
+ // RadioButtons are not page annotations, only their individual check boxes are
+ if( rWidget.m_eType != PDFWriter::RadioButton )
+ {
+ rCont.aObjects.insert( rWidget.m_nObject );
+ rCont.aSortedAnnots.push_back( AnnotationSortEntry( rWidget.m_nTabOrder, rWidget.m_nObject, nW ) );
+ }
}
}
for( std::hash_map< sal_Int32, AnnotSortContainer >::iterator it = sorted.begin(); it != sorted.end(); ++it )
@@ -8278,7 +8500,7 @@ void PDFWriterImpl::beginRedirect( SvStream* pStream, const Rectangle& rTargetRe
{
push( PUSH_ALL );
- setClipRegion( Region() );
+ clearClipRegion();
updateGraphicsState();
m_aOutputStreams.push_front( StreamRedirect() );
@@ -10214,25 +10436,17 @@ void PDFWriterImpl::updateGraphicsState()
{
rNewState.m_nUpdateFlags &= ~GraphicsState::updateClipRegion;
- Region& rNewClip = rNewState.m_aClipRegion;
-
- /* #103137# equality operator is not implemented
- * const as API promises but may change Region
- * from Polygon to rectangles. Arrrgghh !!!!
- */
- Region aLeft = m_aCurrentPDFState.m_aClipRegion;
- Region aRight = rNewClip;
- if( aLeft != aRight )
+ if( m_aCurrentPDFState.m_bClipRegion != rNewState.m_bClipRegion ||
+ ( rNewState.m_bClipRegion && m_aCurrentPDFState.m_aClipRegion != rNewState.m_aClipRegion ) )
{
- if( ! m_aCurrentPDFState.m_aClipRegion.IsEmpty() &&
- ! m_aCurrentPDFState.m_aClipRegion.IsNull() )
+ if( m_aCurrentPDFState.m_bClipRegion && m_aCurrentPDFState.m_aClipRegion.count() )
{
aLine.append( "Q " );
// invalidate everything but the clip region
m_aCurrentPDFState = GraphicsState();
rNewState.m_nUpdateFlags = sal::static_int_cast<sal_uInt16>(~GraphicsState::updateClipRegion);
}
- if( ! rNewClip.IsEmpty() && ! rNewClip.IsNull() )
+ if( rNewState.m_bClipRegion && rNewState.m_aClipRegion.count() )
{
// clip region is always stored in private PDF mapmode
MapMode aNewMapMode = rNewState.m_aMapMode;
@@ -10241,32 +10455,8 @@ void PDFWriterImpl::updateGraphicsState()
m_aCurrentPDFState.m_aMapMode = rNewState.m_aMapMode;
aLine.append( "q " );
- if( rNewClip.HasPolyPolygon() )
- {
- m_aPages.back().appendPolyPolygon( rNewClip.GetPolyPolygon(), aLine );
- aLine.append( "W* n\n" );
- }
- else
- {
- // need to clip all rectangles
- RegionHandle aHandle = rNewClip.BeginEnumRects();
- Rectangle aRect;
- while( rNewClip.GetNextEnumRect( aHandle, aRect ) )
- {
- m_aPages.back().appendRect( aRect, aLine );
- if( aLine.getLength() > 80 )
- {
- aLine.append( "\n" );
- writeBuffer( aLine.getStr(), aLine.getLength() );
- aLine.setLength( 0 );
- }
- else
- aLine.append( ' ' );
- }
- rNewClip.EndEnumRects( aHandle );
- aLine.append( "W* n\n" );
- }
-
+ m_aPages.back().appendPolyPolygon( rNewState.m_aClipRegion, aLine );
+ aLine.append( "W* n\n" );
rNewState.m_aMapMode = aNewMapMode;
getReferenceDevice()->SetMapMode( rNewState.m_aMapMode );
m_aCurrentPDFState.m_aMapMode = rNewState.m_aMapMode;
@@ -10380,9 +10570,12 @@ void PDFWriterImpl::pop()
if( ! (aState.m_nFlags & PUSH_MAPMODE) )
setMapMode( aState.m_aMapMode );
if( ! (aState.m_nFlags & PUSH_CLIPREGION) )
+ {
// do not use setClipRegion here
// it would convert again assuming the current mapmode
rOld.m_aClipRegion = aState.m_aClipRegion;
+ rOld.m_bClipRegion = aState.m_bClipRegion;
+ }
if( ! (aState.m_nFlags & PUSH_TEXTLINECOLOR ) )
setTextLineColor( aState.m_aTextLineColor );
if( ! (aState.m_nFlags & PUSH_OVERLINECOLOR ) )
@@ -10406,45 +10599,59 @@ void PDFWriterImpl::setMapMode( const MapMode& rMapMode )
m_aCurrentPDFState.m_aMapMode = rMapMode;
}
-void PDFWriterImpl::setClipRegion( const Region& rRegion )
+void PDFWriterImpl::setClipRegion( const basegfx::B2DPolyPolygon& rRegion )
{
- Region aRegion = getReferenceDevice()->LogicToPixel( rRegion, m_aGraphicsStack.front().m_aMapMode );
+ basegfx::B2DPolyPolygon aRegion = getReferenceDevice()->LogicToPixel( rRegion, m_aGraphicsStack.front().m_aMapMode );
aRegion = getReferenceDevice()->PixelToLogic( aRegion, m_aMapMode );
m_aGraphicsStack.front().m_aClipRegion = aRegion;
+ m_aGraphicsStack.front().m_bClipRegion = true;
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateClipRegion;
}
void PDFWriterImpl::moveClipRegion( sal_Int32 nX, sal_Int32 nY )
{
- Point aPoint( lcl_convert( m_aGraphicsStack.front().m_aMapMode,
+ if( m_aGraphicsStack.front().m_bClipRegion && m_aGraphicsStack.front().m_aClipRegion.count() )
+ {
+ Point aPoint( lcl_convert( m_aGraphicsStack.front().m_aMapMode,
+ m_aMapMode,
+ getReferenceDevice(),
+ Point( nX, nY ) ) );
+ aPoint -= lcl_convert( m_aGraphicsStack.front().m_aMapMode,
m_aMapMode,
getReferenceDevice(),
- Point( nX, nY ) ) );
- aPoint -= lcl_convert( m_aGraphicsStack.front().m_aMapMode,
- m_aMapMode,
- getReferenceDevice(),
- Point() );
- m_aGraphicsStack.front().m_aClipRegion.Move( aPoint.X(), aPoint.Y() );
- m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateClipRegion;
+ Point() );
+ basegfx::B2DHomMatrix aMat;
+ aMat.translate( aPoint.X(), aPoint.Y() );
+ m_aGraphicsStack.front().m_aClipRegion.transform( aMat );
+ m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateClipRegion;
+ }
}
bool PDFWriterImpl::intersectClipRegion( const Rectangle& rRect )
{
- Rectangle aRect( lcl_convert( m_aGraphicsStack.front().m_aMapMode,
- m_aMapMode,
- getReferenceDevice(),
- rRect ) );
- m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateClipRegion;
- return m_aGraphicsStack.front().m_aClipRegion.Intersect( aRect );
+ basegfx::B2DPolyPolygon aRect( basegfx::tools::createPolygonFromRect(
+ basegfx::B2DRectangle( rRect.Left(), rRect.Top(), rRect.Right(), rRect.Bottom() ) ) );
+ return intersectClipRegion( aRect );
}
-bool PDFWriterImpl::intersectClipRegion( const Region& rRegion )
+bool PDFWriterImpl::intersectClipRegion( const basegfx::B2DPolyPolygon& rRegion )
{
- Region aRegion = getReferenceDevice()->LogicToPixel( rRegion, m_aGraphicsStack.front().m_aMapMode );
+ basegfx::B2DPolyPolygon aRegion( getReferenceDevice()->LogicToPixel( rRegion, m_aGraphicsStack.front().m_aMapMode ) );
aRegion = getReferenceDevice()->PixelToLogic( aRegion, m_aMapMode );
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateClipRegion;
- return m_aGraphicsStack.front().m_aClipRegion.Intersect( aRegion );
+ if( m_aGraphicsStack.front().m_bClipRegion )
+ {
+ basegfx::B2DPolyPolygon aOld( basegfx::tools::prepareForPolygonOperation( m_aGraphicsStack.front().m_aClipRegion ) );
+ aRegion = basegfx::tools::prepareForPolygonOperation( aRegion );
+ m_aGraphicsStack.front().m_aClipRegion = basegfx::tools::solvePolygonOperationAnd( aOld, aRegion );
+ }
+ else
+ {
+ m_aGraphicsStack.front().m_aClipRegion = aRegion;
+ m_aGraphicsStack.front().m_bClipRegion = true;
+ }
+ return true;
}
void PDFWriterImpl::createNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr )
@@ -11528,18 +11735,7 @@ sal_Int32 PDFWriterImpl::findRadioGroupWidget( const PDFWriter::RadioButtonWidge
m_aWidgets.back().m_nRadioGroup = rBtn.RadioGroup;
m_aWidgets.back().m_nFlags |= 0x00008000;
- // create radio button field name
- const rtl::OUString& rName = (m_aContext.Version > PDFWriter::PDF_1_2) ?
- rBtn.Name : rBtn.Text;
- if( rName.getLength() )
- {
- m_aWidgets.back().m_aName = convertWidgetFieldName( rName );
- }
- else
- {
- m_aWidgets.back().m_aName = "RadioGroup";
- m_aWidgets.back().m_aName += OString::valueOf( rBtn.RadioGroup );
- }
+ createWidgetFieldName( sal_Int32(m_aWidgets.size()-1), rBtn );
}
else
nRadioGroupWidget = it->second;
@@ -11555,44 +11751,27 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
if( nPageNr < 0 || nPageNr >= (sal_Int32)m_aPages.size() )
return -1;
+ sal_Int32 nNewWidget = m_aWidgets.size();
m_aWidgets.push_back( PDFWidget() );
- sal_Int32 nNewWidget = m_aWidgets.size()-1;
-
- // create eventual radio button before getting any references
- // from m_aWidgets as the push_back operation potentially assigns new
- // memory to the vector and thereby invalidates the reference
- int nRadioGroupWidget = -1;
- if( rControl.getType() == PDFWriter::RadioButton )
- nRadioGroupWidget = findRadioGroupWidget( static_cast<const PDFWriter::RadioButtonWidget&>(rControl) );
- PDFWidget& rNewWidget = m_aWidgets[nNewWidget];
- rNewWidget.m_nObject = createObject();
- rNewWidget.m_aRect = rControl.Location;
- rNewWidget.m_nPage = nPageNr;
- rNewWidget.m_eType = rControl.getType();
+ m_aWidgets.back().m_nObject = createObject();
+ m_aWidgets.back().m_aRect = rControl.Location;
+ m_aWidgets.back().m_nPage = nPageNr;
+ m_aWidgets.back().m_eType = rControl.getType();
+ sal_Int32 nRadioGroupWidget = -1;
// for unknown reasons the radio buttons of a radio group must not have a
// field name, else the buttons are in fact check boxes -
// that is multiple buttons of the radio group can be selected
- if( rControl.getType() != PDFWriter::RadioButton )
+ if( rControl.getType() == PDFWriter::RadioButton )
+ nRadioGroupWidget = findRadioGroupWidget( static_cast<const PDFWriter::RadioButtonWidget&>(rControl) );
+ else
{
- // acrobat reader since 3.0 does not support unicode text
- // strings for the field name; so we need to encode unicodes
- // larger than 255
-
- rNewWidget.m_aName =
- convertWidgetFieldName( (m_aContext.Version > PDFWriter::PDF_1_2) ?
- rControl.Name : rControl.Text );
- // #i88040# acrobat reader crashes on empty field names,
- // so always create one
- if( rNewWidget.m_aName.getLength() == 0 )
- {
- OUStringBuffer aBuf( 32 );
- aBuf.appendAscii( "Widget" );
- aBuf.append( nNewWidget );
- rNewWidget.m_aName = convertWidgetFieldName( aBuf.makeStringAndClear() );
- }
+ createWidgetFieldName( nNewWidget, rControl );
}
+
+ // caution: m_aWidgets must not be changed after here or rNewWidget may be invalid
+ PDFWidget& rNewWidget = m_aWidgets[nNewWidget];
rNewWidget.m_aDescription = rControl.Description;
rNewWidget.m_aText = rControl.Text;
rNewWidget.m_nTextStyle = rControl.TextStyle &
@@ -11823,6 +12002,7 @@ bool PDFWriterImpl::endControlAppearance( PDFWriter::WidgetState eState )
break;
case PDFWriter::ListBox:
case PDFWriter::ComboBox:
+ case PDFWriter::Hierarchy:
break;
}
if( aState.getLength() && aStyle.getLength() )
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 4adf54ea98a3..2eacdc215dd8 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -146,14 +146,20 @@ public:
// if pOutPoint is set it will be updated to the emitted point
// (in PDF map mode, that is 10th of point)
void appendPoint( const Point& rPoint, rtl::OStringBuffer& rBuffer, bool bNeg = false, Point* pOutPoint = NULL ) const;
+ // appends a B2DPoint without further transformation
+ void appendPixelPoint( const basegfx::B2DPoint& rPoint, rtl::OStringBuffer& rBuffer ) const;
// appends a rectangle
void appendRect( const Rectangle& rRect, rtl::OStringBuffer& rBuffer ) const;
// converts a rectangle to 10th points page space
void convertRect( Rectangle& rRect ) const;
// appends a polygon optionally closing it
void appendPolygon( const Polygon& rPoly, rtl::OStringBuffer& rBuffer, bool bClose = true ) const;
+ // appends a polygon optionally closing it
+ void appendPolygon( const basegfx::B2DPolygon& rPoly, rtl::OStringBuffer& rBuffer, bool bClose = true ) const;
// appends a polypolygon optionally closing the subpaths
void appendPolyPolygon( const PolyPolygon& rPolyPoly, rtl::OStringBuffer& rBuffer, bool bClose = true ) const;
+ // appends a polypolygon optionally closing the subpaths
+ void appendPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPoly, rtl::OStringBuffer& rBuffer, bool bClose = true ) const;
// converts a length (either vertical or horizontal; this
// can be important if the source MapMode is not
// symmetrical) to page length and appends it to the buffer
@@ -161,7 +167,7 @@ public:
// (in PDF map mode, that is 10th of point)
void appendMappedLength( sal_Int32 nLength, rtl::OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = NULL ) const;
// the same for double values
- void appendMappedLength( double fLength, rtl::OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = NULL ) const;
+ void appendMappedLength( double fLength, rtl::OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = NULL, sal_Int32 nPrecision = 5 ) const;
// appends LineInfo
// returns false if too many dash array entry were created for
// the implementation limits of some PDF readers
@@ -695,19 +701,20 @@ private:
// graphics state
struct GraphicsState
{
- Font m_aFont;
- MapMode m_aMapMode;
- Color m_aLineColor;
- Color m_aFillColor;
- Color m_aTextLineColor;
- Color m_aOverlineColor;
- Region m_aClipRegion;
- sal_Int32 m_nAntiAlias;
- sal_Int32 m_nLayoutMode;
- LanguageType m_aDigitLanguage;
- sal_Int32 m_nTransparentPercent;
- sal_uInt16 m_nFlags;
- sal_uInt16 m_nUpdateFlags;
+ Font m_aFont;
+ MapMode m_aMapMode;
+ Color m_aLineColor;
+ Color m_aFillColor;
+ Color m_aTextLineColor;
+ Color m_aOverlineColor;
+ basegfx::B2DPolyPolygon m_aClipRegion;
+ bool m_bClipRegion;
+ sal_Int32 m_nAntiAlias;
+ sal_Int32 m_nLayoutMode;
+ LanguageType m_aDigitLanguage;
+ sal_Int32 m_nTransparentPercent;
+ sal_uInt16 m_nFlags;
+ sal_uInt16 m_nUpdateFlags;
static const sal_uInt16 updateFont = 0x0001;
static const sal_uInt16 updateMapMode = 0x0002;
@@ -726,6 +733,7 @@ private:
m_aFillColor( COL_TRANSPARENT ),
m_aTextLineColor( COL_TRANSPARENT ),
m_aOverlineColor( COL_TRANSPARENT ),
+ m_bClipRegion( false ),
m_nAntiAlias( 1 ),
m_nLayoutMode( 0 ),
m_aDigitLanguage( 0 ),
@@ -741,6 +749,7 @@ private:
m_aTextLineColor( rState.m_aTextLineColor ),
m_aOverlineColor( rState.m_aOverlineColor ),
m_aClipRegion( rState.m_aClipRegion ),
+ m_bClipRegion( rState.m_bClipRegion ),
m_nAntiAlias( rState.m_nAntiAlias ),
m_nLayoutMode( rState.m_nLayoutMode ),
m_aDigitLanguage( rState.m_aDigitLanguage ),
@@ -759,6 +768,7 @@ private:
m_aTextLineColor = rState.m_aTextLineColor;
m_aOverlineColor = rState.m_aOverlineColor;
m_aClipRegion = rState.m_aClipRegion;
+ m_bClipRegion = rState.m_bClipRegion;
m_nAntiAlias = rState.m_nAntiAlias;
m_nLayoutMode = rState.m_nLayoutMode;
m_aDigitLanguage = rState.m_aDigitLanguage;
@@ -1049,7 +1059,7 @@ i12626
void createDefaultListBoxAppearance( PDFWidget&, const PDFWriter::ListBoxWidget& rWidget );
/* ensure proper escapement and uniqueness of field names */
- rtl::OString convertWidgetFieldName( const rtl::OUString& rString );
+ void createWidgetFieldName( sal_Int32 i_nWidgetsIndex, const PDFWriter::AnyWidget& i_rInWidget );
/* adds an entry to m_aObjects and returns its index+1,
* sets the offset to ~0
*/
@@ -1209,17 +1219,18 @@ public:
void clearClipRegion()
{
- m_aGraphicsStack.front().m_aClipRegion.SetNull();
+ m_aGraphicsStack.front().m_aClipRegion.clear();
+ m_aGraphicsStack.front().m_bClipRegion = false;
m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateClipRegion;
}
- void setClipRegion( const Region& rRegion );
+ void setClipRegion( const basegfx::B2DPolyPolygon& rRegion );
void moveClipRegion( sal_Int32 nX, sal_Int32 nY );
bool intersectClipRegion( const Rectangle& rRect );
- bool intersectClipRegion( const Region& rRegion );
+ bool intersectClipRegion( const basegfx::B2DPolyPolygon& rRegion );
void setLayoutMode( sal_Int32 nLayoutMode )
{
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index bd28135ca498..47152ea6ac11 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -131,6 +131,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
mpAccess ( NULL ),
mpMaskAccess ( NULL ),
mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ),
+ mnCRC(0UL),
mnLastPercent ( 0UL )
{
if ( !rBmpEx.IsEmpty() )
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 07351e1c0fce..4931ee66e93f 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -45,6 +45,7 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/range/b2drange.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
@@ -2004,6 +2005,32 @@ const basegfx::B2DPolyPolygon Region::GetB2DPolyPolygon() const
// -----------------------------------------------------------------------
+basegfx::B2DPolyPolygon Region::ConvertToB2DPolyPolygon()
+{
+ DBG_CHKTHIS( Region, ImplDbgTestRegion );
+
+ basegfx::B2DPolyPolygon aRet;
+
+ if( HasPolyPolygon() )
+ aRet = GetB2DPolyPolygon();
+ else
+ {
+ RegionHandle aHdl = BeginEnumRects();
+ Rectangle aSubRect;
+ while( GetNextEnumRect( aHdl, aSubRect ) )
+ {
+ basegfx::B2DPolygon aPoly( basegfx::tools::createPolygonFromRect(
+ basegfx::B2DRectangle( aSubRect.Left(), aSubRect.Top(), aSubRect.Right(), aSubRect.Bottom() ) ) );
+ aRet.append( aPoly );
+ }
+ EndEnumRects( aHdl );
+ }
+
+ return aRet;
+}
+
+// -----------------------------------------------------------------------
+
BOOL Region::ImplGetFirstRect( ImplRegionInfo& rImplRegionInfo,
long& rX, long& rY,
long& rWidth, long& rHeight ) const
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 9354b0f72130..55d6f7bdd892 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -689,6 +689,12 @@ void SalGraphics::mirror( ControlType nType, const ImplControlValue& rVal, const
{
switch( nType )
{
+ case CTRL_SLIDER:
+ {
+ SliderValue* pSlVal = reinterpret_cast<SliderValue*>(rVal.getOptionalVal());
+ mirror(pSlVal->maThumbRect,pOutDev,bBack);
+ }
+ break;
case CTRL_SCROLLBAR:
{
ScrollbarValue* pScVal = reinterpret_cast<ScrollbarValue*>(rVal.getOptionalVal());
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 344867ebb0b0..bf462d1d8add 100755
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -133,13 +133,13 @@ int GetVerticalFlags( sal_UCS4 nChar )
/* #i52932# remember:
nChar == 0x2010 || nChar == 0x2015
nChar == 0x2016 || nChar == 0x2026
-
are GF_NONE also, but already handled in the first if
*/
if((nChar >= 0x3008 && nChar <= 0x301C && nChar != 0x3012)
- || nChar == 0xFF3B || nChar == 0xFF3D
+ || (nChar == 0xFF3B || nChar == 0xFF3D)
|| (nChar >= 0xFF5B && nChar <= 0xFF9F) // halfwidth forms
- || nChar == 0xFFE3 )
+ || (nChar == 0xFFE3)
+ || (nChar >= 0x02F800 && nChar <= 0x02FFFF) )
return GF_NONE; // not rotated
else if( nChar == 0x30fc )
return GF_ROTR; // right
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 03675ccf69ca..a32790cfb0d4 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -1353,3 +1353,36 @@ Rectangle DecorationView::DrawButton( const Rectangle& rRect, USHORT nStyle )
return aRect;
}
+
+// -----------------------------------------------------------------------
+
+void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, bool bVertical )
+{
+ Point aStart( rStart ), aStop( rStop );
+ const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
+
+ mpOutDev->Push( PUSH_LINECOLOR );
+ if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
+ mpOutDev->SetLineColor( Color( COL_BLACK ) );
+ else
+ mpOutDev->SetLineColor( rStyleSettings.GetShadowColor() );
+
+ mpOutDev->DrawLine( aStart, aStop );
+ if ( !(rStyleSettings.GetOptions() & STYLE_OPTION_MONO) )
+ {
+ mpOutDev->SetLineColor( rStyleSettings.GetLightColor() );
+ if( bVertical )
+ {
+ aStart.X()++;
+ aStop.X()++;
+ }
+ else
+ {
+ aStart.Y()++;
+ aStop.Y()++;
+ }
+ mpOutDev->DrawLine( aStart, aStop );
+ }
+ mpOutDev->Pop();
+}
+
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index daa26e2c7782..64f2b7e0d2a1 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -886,20 +886,6 @@ BOOL Window::ImplDlgCtrl( const KeyEvent& rKEvt, BOOL bKeyInput )
return TRUE;
}
- // if we have come here (and therefore the strange "formular" logic above
- // turned up no result, then let's try to find a customer for Ctrl-TAB
- if ( nKeyCode == KEY_TAB && aKeyCode.IsMod1() && ! aKeyCode.IsMod2() )
- {
- TabDialog* pDlg = dynamic_cast<TabDialog*>(this);
- if( pDlg )
- {
- TabControl* pTabCtrl = pDlg->ImplGetFirstTabControl();
- NotifyEvent aEvt( bKeyInput ? EVENT_KEYINPUT : EVENT_KEYUP,
- pTabCtrl, &rKEvt );
- return pTabCtrl->ImplHandleNotifyEvent( aEvt );
- }
- }
-
return FALSE;
}
@@ -1093,10 +1079,15 @@ Window* Window::GetLabelFor() const
return pWindow;
sal_Unicode nAccel = getAccel( GetText() );
- if( GetType() == WINDOW_FIXEDTEXT ||
- GetType() == WINDOW_FIXEDLINE ||
- GetType() == WINDOW_GROUPBOX )
+
+ WindowType nMyType = GetType();
+ if( nMyType == WINDOW_FIXEDTEXT ||
+ nMyType == WINDOW_FIXEDLINE ||
+ nMyType == WINDOW_GROUPBOX )
{
+ // #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text.
+ // See tools/options/print for example.
+ BOOL bThisIsAGroupControl = (nMyType == WINDOW_GROUPBOX) || (nMyType == WINDOW_FIXEDLINE);
Window* pSWindow = NULL;
// get index, form start and form end
USHORT nIndex=0, nFormStart=0, nFormEnd=0;
@@ -1128,9 +1119,14 @@ Window* Window::GetLabelFor() const
FALSE );
if( pSWindow && pSWindow->IsVisible() && ! (pSWindow->GetStyle() & WB_NOLABEL) )
{
- if( pSWindow->GetType() != WINDOW_FIXEDTEXT &&
- pSWindow->GetType() != WINDOW_FIXEDLINE &&
- pSWindow->GetType() != WINDOW_GROUPBOX )
+ WindowType nType = pSWindow->GetType();
+ if( nType != WINDOW_FIXEDTEXT &&
+ nType != WINDOW_FIXEDLINE &&
+ nType != WINDOW_GROUPBOX )
+ {
+ pWindow = pSWindow;
+ }
+ else if( bThisIsAGroupControl && ( nType == WINDOW_FIXEDTEXT ) )
{
pWindow = pSWindow;
}
@@ -1163,9 +1159,13 @@ Window* Window::GetLabeledBy() const
if( GetType() == WINDOW_CHECKBOX || GetType() == WINDOW_RADIOBUTTON )
return NULL;
- if( ! ( GetType() == WINDOW_FIXEDTEXT ||
- GetType() == WINDOW_FIXEDLINE ||
- GetType() == WINDOW_GROUPBOX ) )
+// if( ! ( GetType() == WINDOW_FIXEDTEXT ||
+// GetType() == WINDOW_FIXEDLINE ||
+// GetType() == WINDOW_GROUPBOX ) )
+ // #i100833# MT 2010/02: Group box and fixed lines can also lable a fixed text.
+ // See tools/options/print for example.
+ WindowType nMyType = GetType();
+ if ( (nMyType != WINDOW_GROUPBOX) && (nMyType != WINDOW_FIXEDLINE) )
{
// search for a control that labels this window
// a label is considered the last fixed text, fixed line or group box
@@ -1196,14 +1196,18 @@ Window* Window::GetLabeledBy() const
nSearchIndex,
nFoundIndex,
FALSE );
- if( pSWindow && pSWindow->IsVisible() &&
- ! (pSWindow->GetStyle() & WB_NOLABEL) &&
- ( pSWindow->GetType() == WINDOW_FIXEDTEXT ||
- pSWindow->GetType() == WINDOW_FIXEDLINE ||
- pSWindow->GetType() == WINDOW_GROUPBOX ) )
+ if( pSWindow && pSWindow->IsVisible() && !(pSWindow->GetStyle() & WB_NOLABEL) )
{
- pWindow = pSWindow;
- break;
+ WindowType nType = pSWindow->GetType();
+ if ( ( nType == WINDOW_FIXEDTEXT ||
+ nType == WINDOW_FIXEDLINE ||
+ nType == WINDOW_GROUPBOX ) )
+ {
+ // a fixed text can't be labeld by a fixed text.
+ if ( ( nMyType != WINDOW_FIXEDTEXT ) || ( nType != WINDOW_FIXEDTEXT ) )
+ pWindow = pSWindow;
+ break;
+ }
}
if( nFoundIndex > nSearchIndex || nSearchIndex == 0 )
break;
diff --git a/vcl/source/window/introwin.cxx b/vcl/source/window/introwin.cxx
index 02ccc2282a42..03f88adc3566 100644
--- a/vcl/source/window/introwin.cxx
+++ b/vcl/source/window/introwin.cxx
@@ -77,3 +77,12 @@ void IntroWindow::SetBackgroundBitmap( const Bitmap& rBitmap )
ImplGetFrame()->SetBackgroundBitmap( pBmp );
}
}
+
+void IntroWindow::SetBackgroundBitmap( const BitmapEx& rBitmapEx )
+{
+ if( ! rBitmapEx.IsEmpty() )
+ {
+ SalBitmap* pBmp = rBitmapEx.ImplGetBitmapImpBitmap()->ImplGetSalBitmap();
+ ImplGetFrame()->SetBackgroundBitmap( pBmp );
+ }
+}
diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx
index 74926ad3de4b..c2c6c18135f2 100644
--- a/vcl/source/window/mnemonic.cxx
+++ b/vcl/source/window/mnemonic.cxx
@@ -332,39 +332,41 @@ BOOL MnemonicGenerator::CreateMnemonic( XubString& rKey )
}
}
- if( ! bChanged )
- {
- /*
- * #97809# if all else fails use the first character of a word
- * anyway and live with duplicate mnemonics
- */
- nIndex = 0;
- do
- {
- c = aKey.GetChar( nIndex );
-
- nMnemonicIndex = ImplGetMnemonicIndex( c );
- if ( nMnemonicIndex != MNEMONIC_INDEX_NOTFOUND )
- {
- maMnemonics[nMnemonicIndex] = 0;
- rKey.Insert( MNEMONIC_CHAR, nIndex );
- bChanged = TRUE;
- break;
- }
-
- // Search for next word
- do
- {
- nIndex++;
- c = aKey.GetChar( nIndex );
- if ( c == ' ' )
- break;
- }
- while ( nIndex < nLen );
- nIndex++;
- }
- while ( nIndex < nLen );
- }
+// #i87415# Duplicates mnemonics are bad for consistent keyboard accessibility
+// It's probably better to not have mnemonics for some widgets, than to have ambiguous ones.
+// if( ! bChanged )
+// {
+// /*
+// * #97809# if all else fails use the first character of a word
+// * anyway and live with duplicate mnemonics
+// */
+// nIndex = 0;
+// do
+// {
+// c = aKey.GetChar( nIndex );
+//
+// nMnemonicIndex = ImplGetMnemonicIndex( c );
+// if ( nMnemonicIndex != MNEMONIC_INDEX_NOTFOUND )
+// {
+// maMnemonics[nMnemonicIndex] = 0;
+// rKey.Insert( MNEMONIC_CHAR, nIndex );
+// bChanged = TRUE;
+// break;
+// }
+//
+// // Search for next word
+// do
+// {
+// nIndex++;
+// c = aKey.GetChar( nIndex );
+// if ( c == ' ' )
+// break;
+// }
+// while ( nIndex < nLen );
+// nIndex++;
+// }
+// while ( nIndex < nLen );
+// }
return bChanged;
}
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 9987dae32dbb..c139ae1ffb30 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -61,13 +61,17 @@ public:
~ImplData();
VirtualDevice* mpVirDev;
- BOOL mbTopBorder:1;
+ long mnItemBorderWidth;
+ bool mbTopBorder:1;
+ bool mbDrawItemFrames:1;
};
StatusBar::ImplData::ImplData()
{
mpVirDev = NULL;
- mbTopBorder = FALSE;
+ mbTopBorder = false;
+ mbDrawItemFrames = false;
+ mnItemBorderWidth = 0;
}
StatusBar::ImplData::~ImplData()
@@ -351,9 +355,7 @@ Rectangle StatusBar::ImplGetItemRectPos( USHORT nPos ) const
{
Rectangle aRect;
ImplStatusItem* pItem;
-
pItem = mpItemList->GetObject( nPos );
-
if ( pItem )
{
if ( pItem->mbVisible )
@@ -372,6 +374,25 @@ Rectangle StatusBar::ImplGetItemRectPos( USHORT nPos ) const
// -----------------------------------------------------------------------
+USHORT StatusBar::ImplGetFirstVisiblePos() const
+{
+ ImplStatusItem* pItem;
+
+ for( USHORT nPos = 0; nPos < mpItemList->Count(); nPos++ )
+ {
+ pItem = mpItemList->GetObject( nPos );
+ if ( pItem )
+ {
+ if ( pItem->mbVisible )
+ return nPos;
+ }
+ }
+
+ return ~0;
+}
+
+// -----------------------------------------------------------------------
+
void StatusBar::ImplDrawText( BOOL bOffScreen, long nOldTextWidth )
{
// Das ueberschreiben der Item-Box verhindern
@@ -418,8 +439,9 @@ void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL
// Ausgabebereich berechnen
ImplStatusItem* pItem = mpItemList->GetObject( nPos );
- Rectangle aTextRect( aRect.Left()+1, aRect.Top()+1,
- aRect.Right()-1, aRect.Bottom()-1 );
+ long nW = mpImplData->mnItemBorderWidth + 1;
+ Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
+ aRect.Right()-nW, aRect.Bottom()-nW );
Size aTextRectSize( aTextRect.GetSize() );
if ( bOffScreen )
@@ -470,17 +492,36 @@ void StatusBar::ImplDrawItem( BOOL bOffScreen, USHORT nPos, BOOL bDrawText, BOOL
SetClipRegion();
// Frame ausgeben
- if ( bDrawFrame && !(pItem->mnBits & SIB_FLAT) )
+ if ( bDrawFrame )
{
- USHORT nStyle;
+ if( mpImplData->mbDrawItemFrames )
+ {
+ if( !(pItem->mnBits & SIB_FLAT) )
+ {
+ USHORT nStyle;
- if ( pItem->mnBits & SIB_IN )
- nStyle = FRAME_DRAW_IN;
- else
- nStyle = FRAME_DRAW_OUT;
+ if ( pItem->mnBits & SIB_IN )
+ nStyle = FRAME_DRAW_IN;
+ else
+ nStyle = FRAME_DRAW_OUT;
+
+ DecorationView aDecoView( this );
+ aDecoView.DrawFrame( aRect, nStyle );
+ }
+ }
+ else if( nPos != ImplGetFirstVisiblePos() )
+ {
+ // draw separator
+ Point aFrom( aRect.TopLeft() );
+ aFrom.X()--;
+ aFrom.Y()++;
+ Point aTo( aRect.BottomLeft() );
+ aTo.X()--;
+ aTo.Y()--;
- DecorationView aDecoView( this );
- aDecoView.DrawFrame( aRect, nStyle );
+ DecorationView aDecoView( this );
+ aDecoView.DrawSeparator( aFrom, aTo );
+ }
}
if ( !ImplIsRecordLayout() )
@@ -688,8 +729,6 @@ void StatusBar::ImplCalcProgressRect()
}
if( ! bNativeOK )
maPrgsTxtPos.Y() = mnTextY;
-
-
}
// -----------------------------------------------------------------------
@@ -1227,8 +1266,11 @@ Rectangle StatusBar::GetItemRect( USHORT nItemId ) const
{
// Rechteck holen und Rahmen abziehen
aRect = ImplGetItemRectPos( nPos );
- aRect.Left()++;
- aRect.Right()--;
+ long nW = mpImplData->mnItemBorderWidth+1;
+ aRect.Top() += nW-1;
+ aRect.Bottom() -= nW-1;
+ aRect.Left() += nW;
+ aRect.Right() -= nW;
return aRect;
}
}
@@ -1248,8 +1290,9 @@ Point StatusBar::GetItemTextPos( USHORT nItemId ) const
// Rechteck holen
ImplStatusItem* pItem = mpItemList->GetObject( nPos );
Rectangle aRect = ImplGetItemRectPos( nPos );
- Rectangle aTextRect( aRect.Left()+1, aRect.Top()+1,
- aRect.Right()-1, aRect.Bottom()-1 );
+ long nW = mpImplData->mnItemBorderWidth + 1;
+ Rectangle aTextRect( aRect.Left()+nW, aRect.Top()+nW,
+ aRect.Right()-nW, aRect.Bottom()-nW );
Point aPos = ImplGetItemTextPos( aTextRect.GetSize(),
Size( GetTextWidth( pItem->maText ), GetTextHeight() ),
pItem->mnBits );
@@ -1524,9 +1567,9 @@ void StatusBar::SetBottomBorder( BOOL bBottomBorder )
void StatusBar::SetTopBorder( BOOL bTopBorder )
{
- if ( mpImplData->mbTopBorder != bTopBorder )
+ if ( mpImplData->mbTopBorder != static_cast<bool>(bTopBorder) )
{
- mpImplData->mbTopBorder = bTopBorder;
+ mpImplData->mbTopBorder = static_cast<bool>(bTopBorder);
ImplCalcBorder();
}
}
@@ -1690,7 +1733,22 @@ Size StatusBar::CalcWindowSizePixel() const
}
}
- nCalcHeight = nMinHeight+nBarTextOffset;
+ if( mpImplData->mbDrawItemFrames &&
+ pThis->IsNativeControlSupported( CTRL_FRAME, PART_BORDER ) )
+ {
+ ImplControlValue aControlValue( FRAME_DRAW_NODRAW );
+ Region aBound, aContent;
+ Region aNatRgn( Rectangle( Point( 0, 0 ), Size( 150, 50 ) ) );
+ if( pThis->GetNativeControlRegion(CTRL_FRAME, PART_BORDER,
+ aNatRgn, 0, aControlValue, rtl::OUString(), aBound, aContent) )
+ {
+ mpImplData->mnItemBorderWidth =
+ ( aBound.GetBoundRect().GetHeight() -
+ aContent.GetBoundRect().GetHeight() ) / 2;
+ }
+ }
+
+ nCalcHeight = nMinHeight+nBarTextOffset + 2*mpImplData->mnItemBorderWidth;
if( nCalcHeight < nProgressHeight+2 )
nCalcHeight = nProgressHeight+2;
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index 02a8b6a5b717..874881c0c5ef 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -274,20 +274,3 @@ void TabDialog::AdjustLayout()
ImplPosControls();
}
-// -----------------------------------------------------------------------
-
-TabControl* TabDialog::ImplGetFirstTabControl() const
-{
- Window* pChild = GetWindow( WINDOW_FIRSTCHILD );
- while ( pChild )
- {
- if ( pChild->IsVisible() && (pChild != mpViewWindow) )
- {
- if ( pChild->GetType() == WINDOW_TABCONTROL )
- return (TabControl*)pChild;
- }
- pChild = pChild->GetWindow( WINDOW_NEXT );
- }
- return NULL;
-}
-
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 516bc53d8920..8906edaa5046 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -502,6 +502,13 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, BOOL bCallHdl )
}
}
+ static const char* pEnvHC = getenv( "SAL_FORCE_HC" );
+ if( pEnvHC && *pEnvHC )
+ {
+ aStyleSettings.SetHighContrastMode( TRUE );
+ rSettings.SetStyleSettings( aStyleSettings );
+ }
+
#ifdef DBG_UTIL
// Evt. AppFont auf Fett schalten, damit man feststellen kann,
// ob fuer die Texte auf anderen Systemen genuegend Platz
diff --git a/vcl/source/window/window3.cxx b/vcl/source/window/window3.cxx
index 9c10c5f131bf..aecbc9c3ef0c 100644
--- a/vcl/source/window/window3.cxx
+++ b/vcl/source/window/window3.cxx
@@ -104,6 +104,12 @@ void Window::ImplMoveControlValue( ControlType nType, const ImplControlValue& aV
{
switch( nType )
{
+ case CTRL_SLIDER:
+ {
+ SliderValue* pSlVal = reinterpret_cast<SliderValue*>(aValue.getOptionalVal());
+ pSlVal->maThumbRect.Move( rDelta.X(), rDelta.Y() );
+ }
+ break;
case CTRL_SCROLLBAR:
{
ScrollbarValue* pScVal = reinterpret_cast<ScrollbarValue*>(aValue.getOptionalVal());
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 93e1b0837429..95ac5940b6d2 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -295,7 +295,7 @@ static BOOL ImplCallCommand( Window* pChild, USHORT nEvt, void* pData = NULL,
else
{
// simulate mouseposition at center of window
- Size aSize = pChild->GetOutputSize();
+ Size aSize( pChild->GetOutputSizePixel() );
aPos = Point( aSize.getWidth()/2, aSize.getHeight()/2 );
}
}
diff --git a/vcl/unx/gtk/a11y/atkbridge.cxx b/vcl/unx/gtk/a11y/atkbridge.cxx
index 9498c4570ae0..47efde7d3dfd 100644
--- a/vcl/unx/gtk/a11y/atkbridge.cxx
+++ b/vcl/unx/gtk/a11y/atkbridge.cxx
@@ -41,7 +41,7 @@ bool InitAtkBridge(void)
const char* pVersion = atk_get_toolkit_version();
if( ! pVersion )
{
- g_warning( "unable to get gail version number" );
+ // g_warning( "unable to get gail version number" );
return false;
}
@@ -50,7 +50,7 @@ bool InitAtkBridge(void)
/* check gail minimum version requirements */
if( sscanf( pVersion, "%u.%u.%u", &major, &minor, &micro) < 3 )
{
- g_warning( "unable to parse gail version number" );
+ // g_warning( "unable to parse gail version number" );
return false;
}
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index 6ed99d0cf3a3..13492f3d4a5c 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -500,6 +500,7 @@ static void handle_toolbox_buttonchange(VclWindowEvent const *pEvent)
/*****************************************************************************/
+/* currently not needed anymore...
static void create_wrapper_for_children(Window *pWindow)
{
if( pWindow && pWindow->IsReallyVisible() )
@@ -517,6 +518,7 @@ static void create_wrapper_for_children(Window *pWindow)
}
}
}
+*/
/*****************************************************************************/
@@ -695,7 +697,11 @@ long WindowEventHandler(void *, ::VclSimpleEvent const * pEvent)
break;
case VCLEVENT_COMBOBOX_SETTEXT:
- create_wrapper_for_children(static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow());
+ // MT 2010/02: This looks quite strange to me. Stumbled over this when fixing #i104290#.
+ // This kicked in when leaving the combobox in the toolbar, after that the events worked.
+ // I guess this was a try to work around missing combobox events, which didn't do the full job, and shouldn't be necessary anymore.
+ // Fix for #i104290# was done in toolkit/source/awt/vclxaccessiblecomponent, FOCUSED state for compound controls in general.
+ // create_wrapper_for_children(static_cast< ::VclWindowEvent const * >(pEvent)->GetWindow());
break;
default:
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index b1529e060270..d1e5c5954352 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -221,8 +221,7 @@ void GtkSalDisplay::monitorsChanged( GdkScreen* pScreen )
{
GdkRectangle dest;
gdk_screen_get_monitor_geometry(pScreen, i, &dest);
- m_aXineramaScreens.push_back( Rectangle( Point(dest.x,
- dest.y ), Size( dest.width, dest.height ) ) );
+ addXineramaScreenUnique( dest.x, dest.y, dest.width, dest.height );
}
m_bXinerama = m_aXineramaScreens.size() > 1;
if( ! m_aFrames.empty() )
@@ -663,7 +662,8 @@ void GtkXLib::Init()
if( pScreen )
{
g_signal_connect( G_OBJECT(pScreen), "size-changed", G_CALLBACK(signalScreenSizeChanged), m_pGtkSalDisplay );
- g_signal_connect( G_OBJECT(pScreen), "monitors-changed", G_CALLBACK(signalMonitorsChanged), m_pGtkSalDisplay );
+ if( ! gtk_check_version( 2, 14, 0 ) ) // monitors-changed came in with 2.14, avoid an assertion
+ g_signal_connect( G_OBJECT(pScreen), "monitors-changed", G_CALLBACK(signalMonitorsChanged), m_pGtkSalDisplay );
}
}
}
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 869189fb1415..de4d55b0230a 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -99,6 +99,8 @@ struct NWFWidgetData
GtkWidget * gTooltipPopup;
GtkWidget * gProgressBar;
GtkWidget * gTreeView;
+ GtkWidget * gHScale;
+ GtkWidget * gVScale;
NWPixmapCacheList* gNWPixmapCacheList;
NWPixmapCache* gCacheTabItems;
@@ -131,10 +133,12 @@ struct NWFWidgetData
gMenuItemMenuWidget( NULL ),
gMenuItemCheckMenuWidget( NULL ),
gMenuItemRadioMenuWidget( NULL ),
- gImageMenuItem( NULL ),
+ gImageMenuItem( NULL ),
gTooltipPopup( NULL ),
gProgressBar( NULL ),
gTreeView( NULL ),
+ gHScale( NULL ),
+ gVScale( NULL ),
gNWPixmapCacheList( NULL ),
gCacheTabItems( NULL ),
gCacheTabPages( NULL )
@@ -172,6 +176,7 @@ static void NWEnsureGTKMenu ( int nScreen );
static void NWEnsureGTKTooltip ( int nScreen );
static void NWEnsureGTKProgressBar ( int nScreen );
static void NWEnsureGTKTreeView ( int nScreen );
+static void NWEnsureGTKSlider ( int nScreen );
static void NWConvertVCLStateToGTKState( ControlState nVCLState, GtkStateType* nGTKState, GtkShadowType* nGTKShadow );
static void NWAddWidgetToCacheWindow( GtkWidget* widget, int nScreen );
@@ -589,8 +594,13 @@ BOOL GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
) ||
((nType == CTRL_LISTNODE || nType == CTRL_LISTNET) &&
( (nPart == PART_ENTIRE_CONTROL) )
+ ) ||
+ ((nType == CTRL_SLIDER) &&
+ ( (nPart == PART_TRACK_HORZ_AREA)
+ || (nPart == PART_TRACK_VERT_AREA)
)
)
+ )
return( TRUE );
return( FALSE );
@@ -875,6 +885,10 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
// don't actually draw anything; gtk treeviews do not draw lines
returnVal = true;
}
+ else if( (nType == CTRL_SLIDER) )
+ {
+ returnVal = NWPaintGTKSlider( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rControlHandle, rCaption );
+ }
if( pixmap )
{
@@ -1103,6 +1117,30 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
rNativeContentRegion = rNativeBoundingRegion;
returnVal = TRUE;
}
+ if( (nType == CTRL_SLIDER) && (nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT) )
+ {
+ NWEnsureGTKSlider( m_nScreen );
+ GtkWidget* widget = (nPart == PART_THUMB_HORZ) ? gWidgetData[m_nScreen].gHScale : gWidgetData[m_nScreen].gVScale;
+ gint slider_length = 10;
+ gint slider_width = 10;
+ gtk_widget_style_get( widget,
+ "slider-width", &slider_width,
+ "slider-length", &slider_length,
+ (char *)NULL);
+ Rectangle aRect( rControlRegion.GetBoundRect() );
+ if( nPart == PART_THUMB_HORZ )
+ {
+ aRect.Right() = aRect.Left() + slider_length - 1;
+ aRect.Bottom() = aRect.Top() + slider_width - 1;
+ }
+ else
+ {
+ aRect.Bottom() = aRect.Top() + slider_length - 1;
+ aRect.Right() = aRect.Left() + slider_width - 1;
+ }
+ rNativeBoundingRegion = rNativeContentRegion = Region( aRect );
+ returnVal = TRUE;
+ }
return( returnVal );
}
@@ -3012,6 +3050,133 @@ BOOL GtkSalGraphics::NWPaintGTKProgress(
return bRet;
}
+BOOL GtkSalGraphics::NWPaintGTKSlider(
+ GdkDrawable*,
+ ControlType, ControlPart nPart,
+ const Rectangle& rControlRectangle,
+ const clipList&,
+ ControlState nState, const ImplControlValue& rValue,
+ SalControlHandle&, const OUString& )
+{
+ NWEnsureGTKSlider( m_nScreen );
+
+ gint w, h;
+ w = rControlRectangle.GetWidth();
+ h = rControlRectangle.GetHeight();
+
+ SliderValue* pVal = (SliderValue*)rValue.getOptionalVal();
+
+ GdkPixmap* pixmap = NWGetPixmapFromScreen( rControlRectangle );
+ if( ! pixmap )
+ return FALSE;
+
+ (void)pVal;
+
+ GdkDrawable* const &pixDrawable = GDK_DRAWABLE( pixmap );
+ GtkWidget* pWidget = (nPart == PART_TRACK_HORZ_AREA)
+ ? GTK_WIDGET(gWidgetData[m_nScreen].gHScale)
+ : GTK_WIDGET(gWidgetData[m_nScreen].gVScale);
+ const gchar* pDetail = (nPart == PART_TRACK_HORZ_AREA) ? "hscale" : "vscale";
+ GtkOrientation eOri = (nPart == PART_TRACK_HORZ_AREA) ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL;
+ GtkStateType eState = (nState & CTRL_STATE_ENABLED) ? GTK_STATE_ACTIVE : GTK_STATE_INSENSITIVE;
+ gint slider_width = 10;
+ gint slider_length = 10;
+ gint trough_border = 0;
+ gtk_widget_style_get( pWidget,
+ "slider-width", &slider_width,
+ "slider-length", &slider_length,
+ "trough-border", &trough_border,
+ NULL);
+
+ eState = (nState & CTRL_STATE_ENABLED) ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE;
+ if( nPart == PART_TRACK_HORZ_AREA )
+ {
+ gtk_paint_box( pWidget->style,
+ pixDrawable,
+ eState,
+ GTK_SHADOW_IN,
+ NULL,
+ pWidget,
+ "trough",
+ 0, (h-slider_width-2*trough_border)/2, w, slider_width + 2*trough_border);
+ gint x = (w - slider_length + 1) * (pVal->mnCur - pVal->mnMin) / (pVal->mnMax - pVal->mnMin);
+ gtk_paint_slider( pWidget->style,
+ pixDrawable,
+ eState,
+ GTK_SHADOW_OUT,
+ NULL,
+ pWidget,
+ pDetail,
+ x, (h-slider_width)/2,
+ slider_length, slider_width,
+ eOri );
+ }
+ else
+ {
+ gtk_paint_box( pWidget->style,
+ pixDrawable,
+ eState,
+ GTK_SHADOW_IN,
+ NULL,
+ pWidget,
+ "trough",
+ (w-slider_width-2*trough_border)/2, 0, slider_width + 2*trough_border, h);
+ gint y = (h - slider_length + 1) * (pVal->mnCur - pVal->mnMin) / (pVal->mnMax - pVal->mnMin);
+ gtk_paint_slider( pWidget->style,
+ pixDrawable,
+ eState,
+ GTK_SHADOW_OUT,
+ NULL,
+ pWidget,
+ pDetail,
+ (w-slider_width)/2, y,
+ slider_width, slider_length,
+ eOri );
+ }
+ #if 0
+ // paint background
+ gtk_paint_flat_box( gWidgetData[m_nScreen].gProgressBar->style,
+ pixDrawable,
+ GTK_STATE_NORMAL,
+ GTK_SHADOW_NONE,
+ NULL,
+ gWidgetData[m_nScreen].gProgressBar,
+ "trough",
+ 0, 0, w, h );
+ if( nProgressWidth > 0 )
+ {
+ // paint progress
+ if( Application::GetSettings().GetLayoutRTL() )
+ {
+ gtk_paint_box( gWidgetData[m_nScreen].gProgressBar->style,
+ pixDrawable,
+ GTK_STATE_PRELIGHT, GTK_SHADOW_OUT,
+ NULL,
+ gWidgetData[m_nScreen].gProgressBar,
+ "bar",
+ w-nProgressWidth, 0, nProgressWidth, h
+ );
+ }
+ else
+ {
+ gtk_paint_box( gWidgetData[m_nScreen].gProgressBar->style,
+ pixDrawable,
+ GTK_STATE_PRELIGHT, GTK_SHADOW_OUT,
+ NULL,
+ gWidgetData[m_nScreen].gProgressBar,
+ "bar",
+ 0, 0, nProgressWidth, h
+ );
+ }
+ }
+ #endif
+
+ BOOL bRet = NWRenderPixmapToScreen( pixmap, rControlRectangle );
+ g_object_unref( pixmap );
+
+ return bRet;
+}
+
//----
static Rectangle NWGetListBoxButtonRect( int nScreen,
@@ -3271,20 +3436,23 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetHighlightColor( aHighlightColor );
aStyleSet.SetHighlightTextColor( aHighlightTextColor );
- // hyperlink colors
- GdkColor *link_color = NULL;
- gtk_widget_style_get (m_pWindow, "link-color", &link_color, NULL);
- if (link_color)
- {
- aStyleSet.SetLinkColor(getColor(*link_color));
- gdk_color_free (link_color);
- link_color = NULL;
- }
- gtk_widget_style_get (m_pWindow, "visited-link-color", &link_color, NULL);
- if (link_color)
+ if( ! gtk_check_version( 2, 10, 0 ) ) // link colors came in with 2.10, avoid an assertion
{
- aStyleSet.SetVisitedLinkColor(getColor(*link_color));
- gdk_color_free (link_color);
+ // hyperlink colors
+ GdkColor *link_color = NULL;
+ gtk_widget_style_get (m_pWindow, "link-color", &link_color, NULL);
+ if (link_color)
+ {
+ aStyleSet.SetLinkColor(getColor(*link_color));
+ gdk_color_free (link_color);
+ link_color = NULL;
+ }
+ gtk_widget_style_get (m_pWindow, "visited-link-color", &link_color, NULL);
+ if (link_color)
+ {
+ aStyleSet.SetVisitedLinkColor(getColor(*link_color));
+ gdk_color_free (link_color);
+ }
}
// Tab colors
@@ -3962,3 +4130,17 @@ static void NWEnsureGTKTreeView( int nScreen )
NWAddWidgetToCacheWindow( gWidgetData[nScreen].gTreeView, nScreen );
}
}
+
+static void NWEnsureGTKSlider( int nScreen )
+{
+ if( !gWidgetData[nScreen].gHScale )
+ {
+ gWidgetData[nScreen].gHScale = gtk_hscale_new_with_range(0, 10, 1);
+ NWAddWidgetToCacheWindow( gWidgetData[nScreen].gHScale, nScreen );
+ }
+ if( !gWidgetData[nScreen].gVScale )
+ {
+ gWidgetData[nScreen].gVScale = gtk_vscale_new_with_range(0, 10, 1);
+ NWAddWidgetToCacheWindow( gWidgetData[nScreen].gVScale, nScreen );
+ }
+}
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index ba42cfc5ae82..ef356eb57aa9 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -806,8 +806,15 @@ void GtkSalFrame::Init( SalFrame* pParent, ULONG nStyle )
/* #i100116# metacity has a peculiar behavior regarding WM_HINT accept focus and _NET_WM_USER_TIME
at some point that may be fixed in metacity and we will have to revisit this
*/
- bool bMetaCityToolWindowHack = getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("Metacity") &&
- (nStyle & SAL_FRAME_STYLE_TOOLWINDOW );
+
+ // MT/PL 2010/02: #i102694# and #i102803# have been introduced by this hack
+ // Nowadays the original issue referenced above doesn't seem to exist anymore, tested different szenarious described in the issues
+ // If some older versions of MetaCity are still in use somewhere, they need to be updated, instead of using strange hacks in OOo.
+ // As a work around for such old systems, people might consider to not use the GTK plugin.
+
+ bool bMetaCityToolWindowHack = false;
+ // bMetaCityToolWindowHack = getDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("Metacity") && (nStyle & SAL_FRAME_STYLE_TOOLWINDOW );
+
if( bDecoHandling )
{
bool bNoDecor = ! (nStyle & (SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE ) );
@@ -2081,7 +2088,14 @@ void GtkSalFrame::ToTop( USHORT nFlags )
* is set to false.
*/
if( (m_nStyle & (SAL_FRAME_STYLE_OWNERDRAWDECORATION|SAL_FRAME_STYLE_FLOAT_FOCUSABLE)) )
+ {
+ // sad but true: this can cause an XError, we need to catch that
+ // to do this we need to synchronize with the XServer
+ getDisplay()->GetXLib()->PushXErrorLevel( true );
XSetInputFocus( getDisplay()->GetDisplay(), GDK_WINDOW_XWINDOW( m_pWindow->window ), RevertToParent, CurrentTime );
+ XSync( getDisplay()->GetDisplay(), False );
+ getDisplay()->GetXLib()->PopXErrorLevel();
+ }
}
else
{
diff --git a/vcl/unx/headless/svpframe.cxx b/vcl/unx/headless/svpframe.cxx
index 37c5eeb846a4..1adf9a51cce4 100644
--- a/vcl/unx/headless/svpframe.cxx
+++ b/vcl/unx/headless/svpframe.cxx
@@ -82,6 +82,33 @@ SvpSalFrame::~SvpSalFrame()
(*it)->SetParent( m_pParent );
if( m_pParent )
m_pParent->m_aChildren.remove( this );
+
+ if( s_pFocusFrame == this )
+ {
+ s_pFocusFrame = NULL;
+ // call directly here, else an event for a destroyed frame would be dispatched
+ CallCallback( SALEVENT_LOSEFOCUS, NULL );
+ // if the handler has not set a new focus frame
+ // pass focus to another frame, preferably a document style window
+ if( s_pFocusFrame == NULL )
+ {
+ const std::list< SalFrame* >& rFrames( m_pInstance->getFrames() );
+ for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it )
+ {
+ SvpSalFrame* pFrame = const_cast<SvpSalFrame*>(static_cast<const SvpSalFrame*>(*it));
+ if( pFrame->m_bVisible &&
+ pFrame->m_pParent == NULL &&
+ (pFrame->m_nStyle & (SAL_FRAME_STYLE_MOVEABLE |
+ SAL_FRAME_STYLE_SIZEABLE |
+ SAL_FRAME_STYLE_CLOSEABLE) ) != 0
+ )
+ {
+ pFrame->GetFocus();
+ break;
+ }
+ }
+ }
+ }
}
void SvpSalFrame::GetFocus()
diff --git a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
index 9db81aa30a4d..ed3f782c8576 100644
--- a/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
+++ b/vcl/unx/inc/plugins/gtk/gtkgdi.hxx
@@ -168,6 +168,11 @@ protected:
const clipList& rClipList,
ControlState nState, const ImplControlValue& aValue,
SalControlHandle& rControlHandle, const OUString& rCaption );
+ BOOL NWPaintGTKSlider( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
+ const Rectangle& rControlRectangle,
+ const clipList& rClipList,
+ ControlState nState, const ImplControlValue& aValue,
+ SalControlHandle& rControlHandle, const OUString& rCaption );
BOOL NWPaintGTKListNode( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart,
const Rectangle& rControlRectangle,
const clipList& rClipList,
diff --git a/vcl/unx/inc/saldisp.hxx b/vcl/unx/inc/saldisp.hxx
index 368e554794ad..e54d6e828911 100644
--- a/vcl/unx/inc/saldisp.hxx
+++ b/vcl/unx/inc/saldisp.hxx
@@ -404,6 +404,7 @@ protected:
int processRandREvent( XEvent* );
void doDestruct();
+ void addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight );
public:
static SalDisplay *GetSalDisplay( Display* display );
static BOOL BestVisual( Display *pDisp,
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 79de48302649..25dd50ce3958 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -88,8 +88,18 @@ QRect region2QRect( const Region& rControlRegion )
{
Rectangle aRect = rControlRegion.GetBoundRect();
- return QRect( QPoint( aRect.Left(), aRect.Top() ),
- QPoint( aRect.Right(), aRect.Bottom() ) );
+ return QRect(aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight());
+}
+
+KDESalGraphics::KDESalGraphics() :
+ m_image(0)
+{
+}
+
+KDESalGraphics::~KDESalGraphics()
+{
+ if (m_image)
+ delete m_image;
}
BOOL KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart part )
@@ -133,6 +143,9 @@ BOOL KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart par
if (type == CTRL_RADIOBUTTON) return true;
+ if (type == CTRL_SLIDER && (part == PART_TRACK_HORZ_AREA || part == PART_TRACK_VERT_AREA) )
+ return true;
+
return false;
if ( (type == CTRL_TAB_ITEM) && (part == PART_ENTIRE_CONTROL) ) return true;
@@ -143,7 +156,6 @@ BOOL KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart par
return false;
}
-
BOOL KDESalGraphics::hitTestNativeControl( ControlType, ControlPart,
const Region&, const Point&,
SalControlHandle&, BOOL& )
@@ -151,28 +163,59 @@ BOOL KDESalGraphics::hitTestNativeControl( ControlType, ControlPart,
return FALSE;
}
-void lcl_drawFrame( QRect& i_rRect, QPainter& i_rPainter, QStyle::PrimitiveElement i_nElement,
- ControlState i_nState, const ImplControlValue& i_rValue )
+/// helper drawing methods
+namespace
{
+ void draw( QStyle::ControlElement element, QStyleOption* option, QImage* image, QStyle::State state )
+ {
+ option->state |= state;
+ option->rect = image->rect();
+
+ QPainter painter(image);
+ kapp->style()->drawControl(element, option, &painter);
+ }
+
+ void draw( QStyle::PrimitiveElement element, QStyleOption* option, QImage* image, QStyle::State state, int nAdjust = 0 )
+ {
+ option->state |= state;
+ option->rect = image->rect();
+ if( nAdjust )
+ option->rect.adjust( nAdjust, nAdjust, -nAdjust, -nAdjust );
+
+ QPainter painter(image);
+ kapp->style()->drawPrimitive(element, option, &painter);
+ }
+
+ void draw( QStyle::ComplexControl element, QStyleOptionComplex* option, QImage* image, QStyle::State state )
+ {
+ option->state |= state;
+ option->rect = image->rect();
+
+ QPainter painter(image);
+ kapp->style()->drawComplexControl(element, option, &painter);
+ }
+
+ void lcl_drawFrame(QStyle::PrimitiveElement element, QImage* image, QStyle::State state)
+ {
#if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
- QStyleOptionFrameV3 styleOption;
- styleOption.frameShape = QFrame::StyledPanel;
+ QStyleOptionFrameV3 option;
+ option.frameShape = QFrame::StyledPanel;
+ option.state = QStyle::State_Sunken;
#else
- QStyleOptionFrame styleOption;
- QFrame aFrame( NULL );
- aFrame.setFrameRect( QRect(0, 0, i_rRect.width(), i_rRect.height()) );
- aFrame.setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
- aFrame.ensurePolished();
- styleOption.initFrom( &aFrame );
- styleOption.lineWidth = aFrame.lineWidth();
- styleOption.midLineWidth = aFrame.midLineWidth();
- #endif
- styleOption.rect = QRect(0, 0, i_rRect.width(), i_rRect.height());
- styleOption.state = vclStateValue2StateFlag( i_nState, i_rValue );
- #if ( QT_VERSION < QT_VERSION_CHECK( 4, 5, 0 ) )
- styleOption.state |= QStyle::State_Sunken;
+ QStyleOptionFrame option;
+
+ QFrame aFrame( NULL );
+ aFrame.setFrameRect( QRect(0, 0, image->width(), image->height()) );
+ aFrame.setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
+ aFrame.ensurePolished();
+
+ option.initFrom( &aFrame );
+ option.lineWidth = aFrame.lineWidth();
+ option.midLineWidth = aFrame.midLineWidth();
#endif
- kapp->style()->drawPrimitive(i_nElement, &styleOption, &i_rPainter);
+
+ draw(element, &option, image, state);
+ }
}
BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
@@ -188,10 +231,6 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
BOOL returnVal = true;
- Display* dpy = GetXDisplay();
- XLIB_Window drawable = GetDrawable();
- GC gc = SelectPen();
-
QRect widgetRect = region2QRect(rControlRegion);
if( type == CTRL_SPINBOX && part == PART_ALL_BUTTONS )
type = CTRL_SPINBUTTONS;
@@ -204,337 +243,287 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
aButtonRect.Right(), aButtonRect.Bottom() );
}
- //draw right onto the window
- QPixmap pixmap(widgetRect.width(), widgetRect.height());
-
- if (pixmap.isNull())
+ //if no image, or resized, make a new image
+ if (!m_image || m_image->size() != widgetRect.size())
{
- return false;
+ if (m_image)
+ delete m_image;
+
+ m_image = new QImage( widgetRect.width(),
+ widgetRect.height(),
+ QImage::Format_ARGB32 );
}
+ m_image->fill(KApplication::palette().color(QPalette::Window).rgb());
- QPainter painter(&pixmap);
- // painter.setBackgroundMode(Qt::OpaqueMode);
- //copy previous screen contents for proper blending
- #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
- QPixmap screen = QPixmap::fromX11Pixmap(drawable);
- painter.drawPixmap(0,0, screen, widgetRect.left(), widgetRect.top(), widgetRect.width(), widgetRect.height());
- #else
- const QX11Info& rX11Info( pixmap.x11Info() );
- X11SalGraphics::CopyScreenArea( dpy,
- drawable, GetScreenNumber(), GetBitCount(),
- pixmap.handle(), rX11Info.screen(), rX11Info.depth(),
- GetDisplay()->GetCopyGC( GetScreenNumber() ),
- widgetRect.left(), widgetRect.top(), widgetRect.width(), widgetRect.height(),
- 0, 0 );
- #endif
+ XLIB_Region pTempClipRegion = 0;
if (type == CTRL_PUSHBUTTON)
{
- QStyleOptionButton styleOption;
-
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state =vclStateValue2StateFlag( nControlState, value );
-
- kapp->style()->drawControl( QStyle::CE_PushButton, &styleOption, &painter);
+ QStyleOptionButton option;
+ draw( QStyle::CE_PushButton, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
else if ( (type == CTRL_MENUBAR))
{
if (part == PART_MENU_ITEM)
{
- QStyleOptionMenuItem styleOption;
-
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
-
- kapp->style()->drawControl( QStyle::CE_MenuBarItem, &styleOption, &painter);
+ QStyleOptionMenuItem option;
+ draw( QStyle::CE_MenuBarItem, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
+ }
+ else if (part == PART_ENTIRE_CONTROL)
+ {
}
else
{
- pixmap.fill(KApplication::palette().color(QPalette::Window));
+ returnVal = false;
}
}
else if (type == CTRL_MENU_POPUP)
{
if (part == PART_MENU_ITEM)
{
- QStyleOptionMenuItem styleOption;
-
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
-
- kapp->style()->drawControl( QStyle::CE_MenuItem, &styleOption, &painter);
+ QStyleOptionMenuItem option;
+ draw( QStyle::CE_MenuItem, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
- else if (part == PART_MENU_ITEM_CHECK_MARK)
+ else if (part == PART_MENU_ITEM_CHECK_MARK && (nControlState & CTRL_STATE_PRESSED) )
{
- QStyleOptionButton styleOption;
-
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
-
- if (nControlState & CTRL_STATE_PRESSED)
- {
- kapp->style()->drawPrimitive( QStyle::PE_IndicatorMenuCheckMark, &styleOption, &painter);
- }
+ QStyleOptionButton option;
+ draw( QStyle::PE_IndicatorMenuCheckMark, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
- else if (part == PART_MENU_ITEM_RADIO_MARK)
+ else if (part == PART_MENU_ITEM_RADIO_MARK && (nControlState & CTRL_STATE_PRESSED) )
{
- QStyleOptionButton styleOption;
-
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
-
- if (nControlState & CTRL_STATE_PRESSED)
- {
- kapp->style()->drawPrimitive( QStyle::PE_IndicatorRadioButton, &styleOption, &painter);
- }
+ QStyleOptionButton option;
+ draw( QStyle::PE_IndicatorRadioButton, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
else
{
- pixmap.fill(KApplication::palette().color(QPalette::Window));
-
#if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
- QStyleOptionFrameV3 styleOption;
+ QStyleOptionFrameV3 option;
+ option.frameShape = QFrame::StyledPanel;
#else
- QStyleOptionFrameV2 styleOption;
- #endif
-
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
- #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
- styleOption.frameShape = QFrame::StyledPanel;
+ QStyleOptionFrameV2 option;
#endif
-
- kapp->style()->drawPrimitive( QStyle::PE_FrameMenu, &styleOption, &painter);
+ draw( QStyle::PE_FrameMenu, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
}
else if ( (type == CTRL_TOOLBAR) && (part == PART_BUTTON) )
{
- QStyleOptionToolButton styleOption;
+ QStyleOptionToolButton option;
- styleOption.arrowType = Qt::NoArrow;
- styleOption.subControls = QStyle::SC_ToolButton;
+ option.arrowType = Qt::NoArrow;
+ option.subControls = QStyle::SC_ToolButton;
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
- styleOption.state |= QStyle::State_Raised | QStyle::State_Enabled | QStyle::State_AutoRaise;
+ option.state = vclStateValue2StateFlag( nControlState, value );
+ option.state |= QStyle::State_Raised | QStyle::State_Enabled | QStyle::State_AutoRaise;
- kapp->style()->drawComplexControl( QStyle::CC_ToolButton, &styleOption, &painter);
+ draw( QStyle::CC_ToolButton, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
else if ( (type == CTRL_TOOLBAR) && (part == PART_ENTIRE_CONTROL) )
{
- QStyleOptionToolBar styleOption;
+ QStyleOptionToolBar option;
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
+ option.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
+ option.state = vclStateValue2StateFlag( nControlState, value );
- kapp->style()->drawControl( QStyle::CE_ToolBar, &styleOption, &painter);
+ draw( QStyle::CE_ToolBar, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
else if ( (type == CTRL_TOOLBAR) && (part == PART_THUMB_VERT) )
{
- QStyleOption styleOption;
+ const int tw = widgetRect.width();
+ widgetRect.setWidth(kapp->style()->pixelMetric(QStyle::PM_ToolBarHandleExtent));
- int width = kapp->style()->pixelMetric(QStyle::PM_ToolBarHandleExtent);
+ QStyleOption option;
+ option.state = QStyle::State_Horizontal;
- styleOption.rect = QRect(0, 0, width, widgetRect.height());
- styleOption.state = QStyle::State_Horizontal;
+ draw( QStyle::PE_IndicatorToolBarHandle, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
- kapp->style()->drawPrimitive( QStyle::PE_IndicatorToolBarHandle, &styleOption, &painter);
+ widgetRect.setWidth(tw);
}
else if (type == CTRL_EDITBOX)
{
- pixmap.fill(KApplication::palette().color(QPalette::Window));
-
- //TODO hover?? OO does not seem to do this for line edits
+ QStyleOptionFrameV2 option;
+ draw( QStyle::PE_PanelLineEdit, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value), 2 );
- #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) )
- QStyleOptionFrameV3 styleOption;
- #else
- QStyleOptionFrameV2 styleOption;
- #endif
-
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
-
- //TODO...how does the line edit draw itself internally??
- styleOption.rect = QRect(2, 2, widgetRect.width()-4, widgetRect.height()-4);
- kapp->style()->drawPrimitive( QStyle::PE_PanelLineEdit, &styleOption, &painter);
-
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- kapp->style()->drawPrimitive( QStyle::PE_FrameLineEdit, &styleOption, &painter);
+ draw( QStyle::PE_FrameLineEdit, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value), 0 );
}
else if (type == CTRL_COMBOBOX)
{
- pixmap.fill(KApplication::palette().color(QPalette::Window));
-
- QStyleOptionComboBox styleOption;
+ QStyleOptionComboBox option;
+ option.editable = true;
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
-
- styleOption.editable = true;
-
- kapp->style()->drawComplexControl(QStyle::CC_ComboBox, &styleOption, &painter);
+ draw( QStyle::CC_ComboBox, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_LISTBOX)
{
if( part == PART_WINDOW )
{
- lcl_drawFrame( widgetRect, painter, QStyle::PE_Frame, nControlState, value );
+ lcl_drawFrame( QStyle::PE_Frame, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
else
{
- QStyleOptionComboBox styleOption;
-
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
-
+ QStyleOptionComboBox option;
if (part == PART_SUB_EDIT)
{
- kapp->style()->drawControl(QStyle::CE_ComboBoxLabel, &styleOption, &painter);
+ draw( QStyle::CE_ComboBoxLabel, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
else
{
- kapp->style()->drawComplexControl(QStyle::CC_ComboBox, &styleOption, &painter);
+ draw( QStyle::CC_ComboBox, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
}
}
else if (type == CTRL_LISTNODE)
{
- QStyleOption styleOption;
-
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
-
- styleOption.state |= QStyle::State_Item;
- styleOption.state |= QStyle::State_Children;
+ QStyleOption option;
+ option.state = QStyle::State_Item | QStyle::State_Children;
if (nControlState & CTRL_STATE_PRESSED)
- {
- styleOption.state |= QStyle::State_Open;
- }
+ option.state |= QStyle::State_Open;
- kapp->style()->drawPrimitive(QStyle::PE_IndicatorBranch, &styleOption, &painter);
+ draw( QStyle::PE_IndicatorBranch, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_CHECKBOX)
{
- QStyleOptionButton styleOption;
-
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
-
- kapp->style()->drawControl(QStyle::CE_CheckBox, &styleOption, &painter);
+ QStyleOptionButton option;
+ draw( QStyle::CE_CheckBox, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_SCROLLBAR)
{
- pixmap.fill(KApplication::palette().color(QPalette::Window));
-
if ((part == PART_DRAW_BACKGROUND_VERT) || (part == PART_DRAW_BACKGROUND_HORZ))
{
+ QStyleOptionSlider option;
ScrollbarValue* sbVal = static_cast<ScrollbarValue *> ( value.getOptionalVal() );
- QStyleOptionSlider styleOption;
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
-
//if the scroll bar is active (aka not degenrate...allow for hover events
if (sbVal->mnVisibleSize < sbVal->mnMax)
- {
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
- styleOption.state |= QStyle::State_MouseOver;
- }
+ option.state = QStyle::State_MouseOver;
//horizontal or vertical
if (part == PART_DRAW_BACKGROUND_VERT)
- {
- styleOption.orientation = Qt::Vertical;
- }
+ option.orientation = Qt::Vertical;
else
- {
- styleOption.state |= QStyle::State_Horizontal;
- }
+ option.state |= QStyle::State_Horizontal;
//setup parameters from the OO values
- styleOption.minimum = sbVal->mnMin;
- styleOption.maximum = sbVal->mnMax - sbVal->mnVisibleSize;
- styleOption.sliderValue = sbVal->mnCur;
- styleOption.sliderPosition = sbVal->mnCur;
- styleOption.pageStep = sbVal->mnVisibleSize;
+ option.minimum = sbVal->mnMin;
+ option.maximum = sbVal->mnMax - sbVal->mnVisibleSize;
+ option.sliderValue = sbVal->mnCur;
+ option.sliderPosition = sbVal->mnCur;
+ option.pageStep = sbVal->mnVisibleSize;
//setup the active control...always the slider
if (sbVal->mnThumbState & CTRL_STATE_ROLLOVER)
- {
- styleOption.activeSubControls = QStyle::SC_ScrollBarSlider;
- }
+ option.activeSubControls = QStyle::SC_ScrollBarSlider;
- kapp->style()->drawComplexControl(QStyle::CC_ScrollBar, &styleOption, &painter);
+ draw( QStyle::CC_ScrollBar, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
+ }
+ else
+ {
+ returnVal = false;
}
}
else if (type == CTRL_SPINBOX)
{
- pixmap.fill(KApplication::palette().color(QPalette::Window));
+ QStyleOptionSpinBox option;
- QStyleOptionSpinBox styleOption;
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
// determine active control
SpinbuttonValue* pSpinVal = (SpinbuttonValue *)(value.getOptionalVal());
if( pSpinVal )
{
if( (pSpinVal->mnUpperState & CTRL_STATE_PRESSED) )
- styleOption.activeSubControls |= QStyle::SC_SpinBoxUp;
+ option.activeSubControls |= QStyle::SC_SpinBoxUp;
if( (pSpinVal->mnLowerState & CTRL_STATE_PRESSED) )
- styleOption.activeSubControls |= QStyle::SC_SpinBoxDown;
+ option.activeSubControls |= QStyle::SC_SpinBoxDown;
}
- kapp->style()->drawComplexControl(QStyle::CC_SpinBox, &styleOption, &painter);
+ draw( QStyle::CC_SpinBox, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_GROUPBOX)
{
- QStyleOptionGroupBox styleOption;
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
-
- kapp->style()->drawComplexControl(QStyle::CC_GroupBox, &styleOption, &painter);
+ QStyleOptionGroupBox option;
+ draw( QStyle::CC_GroupBox, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_RADIOBUTTON)
{
- QStyleOptionButton styleOption;
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
-
- kapp->style()->drawControl(QStyle::CE_RadioButton, &styleOption, &painter);
+ QStyleOptionButton option;
+ draw( QStyle::CE_RadioButton, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_TOOLTIP)
{
- QStyleOption styleOption;
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
-
- kapp->style()->drawPrimitive(QStyle::PE_PanelTipLabel, &styleOption, &painter);
+ QStyleOption option;
+ draw( QStyle::PE_PanelTipLabel, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_FRAME)
{
- pixmap.fill(KApplication::palette().color(QPalette::Window));
- lcl_drawFrame( widgetRect, painter, QStyle::PE_Frame, nControlState, value );
+ lcl_drawFrame( QStyle::PE_Frame, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
+
+ int size = kapp->style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
+ pTempClipRegion = XCreateRegion();
+ XRectangle xRect = { widgetRect.left(), widgetRect.top(), widgetRect.width(), widgetRect.height() };
+ XUnionRectWithRegion( &xRect, pTempClipRegion, pTempClipRegion );
+ XLIB_Region pSubtract = XCreateRegion();
+ xRect.x += size;
+ xRect.y += size;
+ xRect.width -= 2* size;
+ xRect.height -= 2*size;
+ XUnionRectWithRegion( &xRect, pSubtract, pSubtract );
+ XSubtractRegion( pTempClipRegion, pSubtract, pTempClipRegion );
+ XDestroyRegion( pSubtract );
}
else if (type == CTRL_FIXEDBORDER)
{
- pixmap.fill(KApplication::palette().color(QPalette::Window));
- lcl_drawFrame( widgetRect, painter, QStyle::PE_FrameWindow, nControlState, value );
+ lcl_drawFrame( QStyle::PE_FrameWindow, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
}
else if (type == CTRL_WINDOW_BACKGROUND)
{
- pixmap.fill(KApplication::palette().color(QPalette::Window));
+ m_image->fill(KApplication::palette().color(QPalette::Window).rgb());
}
else if (type == CTRL_FIXEDLINE)
{
- QStyleOptionMenuItem styleOption;
+ QStyleOptionMenuItem option;
+ option.menuItemType = QStyleOptionMenuItem::Separator;
+ option.state |= QStyle::State_Item;
- styleOption.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
- styleOption.state = vclStateValue2StateFlag( nControlState, value );
- styleOption.menuItemType = QStyleOptionMenuItem::Separator;
- styleOption.state |= QStyle::State_Item;
+ draw( QStyle::CE_MenuItem, &option, m_image,
+ vclStateValue2StateFlag(nControlState, value) );
+ }
+ else if (type == CTRL_SLIDER && (part == PART_TRACK_HORZ_AREA || part == PART_TRACK_VERT_AREA))
+ {
+ SliderValue* slVal = static_cast<SliderValue *> ( value.getOptionalVal() );
+ QStyleOptionSlider option;
- kapp->style()->drawControl( QStyle::CE_MenuItem, &styleOption, &painter);
+ option.rect = QRect(0, 0, widgetRect.width(), widgetRect.height());
+ option.state = vclStateValue2StateFlag( nControlState, value );
+ option.maximum = slVal->mnMax;
+ option.minimum = slVal->mnMin;
+ option.sliderPosition = option.sliderValue = slVal->mnCur;
+ option.orientation = (part == PART_TRACK_HORZ_AREA) ? Qt::Horizontal : Qt::Vertical;
+
+ draw( QStyle::CC_Slider, &option, m_image, vclStateValue2StateFlag(nControlState, value) );
}
else
{
@@ -543,11 +532,35 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
if (returnVal)
{
- X11SalGraphics::CopyScreenArea( dpy,
- pixmap.handle(), pixmap.x11Info().screen(), pixmap.x11Info().depth(),
- drawable, GetScreenNumber(), GetVisual().GetDepth(), gc,
- 0, 0, widgetRect.width(), widgetRect.height(), widgetRect.left(), widgetRect.top() );
+ GC gc = SelectFont();
+
+ if( gc )
+ {
+ if( pTempClipRegion )
+ {
+ if( pClipRegion_ )
+ XIntersectRegion( pTempClipRegion, pClipRegion_, pTempClipRegion );
+ XSetRegion( GetXDisplay(), gc, pTempClipRegion );
+ }
+ QPixmap pixmap = QPixmap::fromImage(*m_image, Qt::ColorOnly | Qt::OrderedDither | Qt::OrderedAlphaDither);
+ X11SalGraphics::CopyScreenArea( GetXDisplay(),
+ pixmap.handle(), pixmap.x11Info().screen(), pixmap.x11Info().depth(),
+ GetDrawable(), GetScreenNumber(), GetVisual().GetDepth(),
+ gc, 0, 0, widgetRect.width(), widgetRect.height(), widgetRect.left(), widgetRect.top());
+
+ if( pTempClipRegion )
+ {
+ if( pClipRegion_ )
+ XSetRegion( GetXDisplay(), gc, pClipRegion_ );
+ else
+ XSetClipMask( GetXDisplay(), gc, None );
+ }
+ }
+ else
+ returnVal = false;
}
+ if( pTempClipRegion )
+ XDestroyRegion( pTempClipRegion );
return returnVal;
}
@@ -759,6 +772,24 @@ BOOL KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part,
boundingRect = contentRect;
retVal = true;
+ break;
+ }
+ case CTRL_SLIDER:
+ {
+ const int w = kapp->style()->pixelMetric(QStyle::PM_SliderLength);
+ if( part == PART_THUMB_HORZ )
+ {
+ contentRect = QRect(boundingRect.left(), boundingRect.top(), w, boundingRect.height());
+ boundingRect = contentRect;
+ retVal = true;
+ }
+ else if( part == PART_THUMB_VERT )
+ {
+ contentRect = QRect(boundingRect.left(), boundingRect.top(), boundingRect.width(), w);
+ boundingRect = contentRect;
+ retVal = true;
+ }
+ break;
}
default:
break;
diff --git a/vcl/unx/kde4/KDESalGraphics.hxx b/vcl/unx/kde4/KDESalGraphics.hxx
index 3e9ac44e4981..b5328f462a16 100644
--- a/vcl/unx/kde4/KDESalGraphics.hxx
+++ b/vcl/unx/kde4/KDESalGraphics.hxx
@@ -31,12 +31,18 @@
#include <saldisp.hxx>
#include <salgdi.h>
+#define Region QtXRegion
+#include <QImage>
+#undef Region
+
/** handles graphics drawings requests and performs the needed drawing operations */
class KDESalGraphics : public X11SalGraphics
{
+ QImage* m_image;
+
public:
- KDESalGraphics() {}
- virtual ~KDESalGraphics() {}
+ KDESalGraphics();
+ virtual ~KDESalGraphics();
/**
What widgets can be drawn the native way.
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index 97116626894e..2ed699ad0eb5 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -2594,6 +2594,28 @@ void SalDisplay::PrintInfo() const
sal::static_int_cast< unsigned int >(GetVisual(m_nDefaultScreen).GetVisualId()) );
}
+void SalDisplay::addXineramaScreenUnique( long i_nX, long i_nY, long i_nWidth, long i_nHeight )
+{
+ // see if any frame buffers are at the same coordinates
+ // this can happen with weird configuration e.g. on
+ // XFree86 and Clone displays
+ const size_t nScreens = m_aXineramaScreens.size();
+ for( size_t n = 0; n < nScreens; n++ )
+ {
+ if( m_aXineramaScreens[n].Left() == i_nX &&
+ m_aXineramaScreens[n].Top() == i_nY )
+ {
+ if( m_aXineramaScreens[n].GetWidth() < i_nWidth ||
+ m_aXineramaScreens[n].GetHeight() < i_nHeight )
+ {
+ m_aXineramaScreens[n].SetSize( Size( i_nWidth, i_nHeight ) );
+ }
+ return;
+ }
+ }
+ m_aXineramaScreens.push_back( Rectangle( Point( i_nX, i_nY ), Size( i_nWidth, i_nHeight ) ) );
+}
+
void SalDisplay::InitXinerama()
{
if( m_aScreens.size() > 1 )
@@ -2618,10 +2640,10 @@ void SalDisplay::InitXinerama()
m_bXinerama = true;
m_aXineramaScreens = std::vector<Rectangle>( nFramebuffers );
for( int i = 0; i < nFramebuffers; i++ )
- m_aXineramaScreens[i] = Rectangle( Point( pFramebuffers[i].x,
- pFramebuffers[i].y ),
- Size( pFramebuffers[i].width,
- pFramebuffers[i].height ) );
+ addXineramaScreenUnique( pFramebuffers[i].x,
+ pFramebuffers[i].y,
+ pFramebuffers[i].width,
+ pFramebuffers[i].height );
}
}
#elif defined(USE_XINERAMA_XORG)
@@ -2637,30 +2659,10 @@ if( XineramaIsActive( pDisp_ ) )
m_aXineramaScreens = std::vector<Rectangle>();
for( int i = 0; i < nFramebuffers; i++ )
{
- // see if any frame buffers are at the same coordinates
- // this can happen with weird configuration e.g. on
- // XFree86 and Clone displays
- bool bDuplicate = false;
- for( int n = 0; n < i; n++ )
- {
- if( m_aXineramaScreens[n].Left() == pScreens[i].x_org &&
- m_aXineramaScreens[n].Top() == pScreens[i].y_org )
- {
- bDuplicate = true;
- if( m_aXineramaScreens[n].GetWidth() < pScreens[i].width ||
- m_aXineramaScreens[n].GetHeight() < pScreens[i].height )
- {
- m_aXineramaScreens[n].SetSize( Size( pScreens[i].width,
- pScreens[i].height ) );
- }
- break;
- }
- }
- if( ! bDuplicate )
- m_aXineramaScreens.push_back( Rectangle( Point( pScreens[i].x_org,
- pScreens[i].y_org ),
- Size( pScreens[i].width,
- pScreens[i].height ) ) );
+ addXineramaScreenUnique( pScreens[i].x_org,
+ pScreens[i].y_org,
+ pScreens[i].width,
+ pScreens[i].height );
}
m_bXinerama = m_aXineramaScreens.size() > 1;
}
diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx
index 18d8a8d85a43..bc6de4fbc94a 100644
--- a/vcl/unx/source/fontmanager/fontconfig.cxx
+++ b/vcl/unx/source/fontmanager/fontconfig.cxx
@@ -643,7 +643,7 @@ namespace
}
}
-int PrintFontManager::countFontconfigFonts()
+int PrintFontManager::countFontconfigFonts( std::hash_map<rtl::OString, int, rtl::OStringHash>& o_rVisitedPaths )
{
int nFonts = 0;
@@ -704,6 +704,9 @@ int PrintFontManager::countFontconfigFonts()
std::list< PrintFont* > aFonts;
OString aDir, aBase, aOrgPath( (sal_Char*)file );
splitPath( aOrgPath, aDir, aBase );
+
+ o_rVisitedPaths[aDir] = 1;
+
int nDirID = getDirectoryAtom( aDir, true );
if( ! m_pFontCache->getFontCacheFile( nDirID, aBase, aFonts ) )
{
@@ -1183,7 +1186,7 @@ bool PrintFontManager::initFontconfig()
return false;
}
-int PrintFontManager::countFontconfigFonts()
+int PrintFontManager::countFontconfigFonts( std::hash_map<rtl::OString, int, rtl::OStringHash>& )
{
return 0;
}
diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx
index 7d5224707f72..93e3eef53ab3 100644
--- a/vcl/unx/source/fontmanager/fontmanager.cxx
+++ b/vcl/unx/source/fontmanager/fontmanager.cxx
@@ -2149,10 +2149,14 @@ void PrintFontManager::initialize()
} while( nIndex >= 0 );
}
+ // protect against duplicate paths
+ std::hash_map< OString, int, OStringHash > visited_dirs;
+
// now that all global and local font dirs are known to fontconfig
// check that there are fonts actually managed by fontconfig
+ // also don't search directories that fontconfig already did
if( m_bFontconfigSuccess )
- m_bFontconfigSuccess = (countFontconfigFonts() > 0);
+ m_bFontconfigSuccess = (countFontconfigFonts( visited_dirs ) > 0);
// don't search through many directories fontconfig already told us about
if( ! m_bFontconfigSuccess )
@@ -2163,8 +2167,6 @@ void PrintFontManager::initialize()
// search for font files in each path
std::list< OString >::iterator dir_it;
- // protect against duplicate paths
- std::hash_map< OString, int, OStringHash > visited_dirs;
for( dir_it = m_aFontDirectories.begin(); dir_it != m_aFontDirectories.end(); ++dir_it )
{
OString aPath( *dir_it );
diff --git a/vcl/unx/source/fontmanager/parseAFM.cxx b/vcl/unx/source/fontmanager/parseAFM.cxx
index fd131121cbb5..e1a33b4d1b5d 100644
--- a/vcl/unx/source/fontmanager/parseAFM.cxx
+++ b/vcl/unx/source/fontmanager/parseAFM.cxx
@@ -403,89 +403,91 @@ static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
switch(recognize(keyword, tokenlen))
{
case STARTFONTMETRICS:
- keyword = token(fp,tokenlen);
- gfi->afmVersion = strdup( keyword );
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->afmVersion = strdup( keyword );
break;
case COMMENT:
keyword = linetoken(fp);
break;
case FONTNAME:
- keyword = token(fp, tokenlen);
- gfi->fontName = strdup( keyword );
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->fontName = strdup( keyword );
break;
case ENCODINGSCHEME:
- keyword = token(fp, tokenlen);
- gfi->encodingScheme = strdup( keyword );
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->encodingScheme = strdup( keyword );
break;
case FULLNAME:
- keyword = linetoken(fp);
- gfi->fullName = strdup( keyword );
+ if ((keyword = linetoken(fp)) != NULL)
+ gfi->fullName = strdup( keyword );
break;
case FAMILYNAME:
- keyword = linetoken(fp);
- gfi->familyName = strdup( keyword );
+ if ((keyword = linetoken(fp)) != NULL)
+ gfi->familyName = strdup( keyword );
break;
case WEIGHT:
- keyword = token(fp, tokenlen);
- gfi->weight = strdup( keyword );
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->weight = strdup( keyword );
break;
case ITALICANGLE:
- keyword = token(fp,tokenlen);
- gfi->italicAngle = StringToDouble( keyword );
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->italicAngle = StringToDouble( keyword );
break;
case ISFIXEDPITCH:
- keyword = token(fp,tokenlen);
- if (MATCH(keyword, False))
- gfi->isFixedPitch = 0;
- else
- gfi->isFixedPitch = 1;
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ {
+ if (MATCH(keyword, False))
+ gfi->isFixedPitch = 0;
+ else
+ gfi->isFixedPitch = 1;
+ }
break;
case UNDERLINEPOSITION:
- keyword = token(fp,tokenlen);
- gfi->underlinePosition = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->underlinePosition = atoi(keyword);
break;
case UNDERLINETHICKNESS:
- keyword = token(fp,tokenlen);
- gfi->underlineThickness = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->underlineThickness = atoi(keyword);
break;
case VERSION:
- keyword = token(fp,tokenlen);
- gfi->version = strdup( keyword );
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->version = strdup( keyword );
break;
case NOTICE:
- keyword = linetoken(fp);
- gfi->notice = strdup( keyword );
+ if ((keyword = linetoken(fp)) != NULL)
+ gfi->notice = strdup( keyword );
break;
case FONTBBOX:
- keyword = token(fp,tokenlen);
- gfi->fontBBox.llx = atoi(keyword);
- keyword = token(fp,tokenlen);
- gfi->fontBBox.lly = atoi(keyword);
- keyword = token(fp,tokenlen);
- gfi->fontBBox.urx = atoi(keyword);
- keyword = token(fp,tokenlen);
- gfi->fontBBox.ury = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->fontBBox.llx = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->fontBBox.lly = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->fontBBox.urx = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->fontBBox.ury = atoi(keyword);
break;
case CAPHEIGHT:
- keyword = token(fp,tokenlen);
- gfi->capHeight = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->capHeight = atoi(keyword);
break;
case XHEIGHT:
- keyword = token(fp,tokenlen);
- gfi->xHeight = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->xHeight = atoi(keyword);
break;
case DESCENT:
- keyword = token(fp,tokenlen);
- gfi->descender = -atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->descender = -atoi(keyword);
break;
case DESCENDER:
- keyword = token(fp,tokenlen);
- gfi->descender = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->descender = atoi(keyword);
break;
case ASCENT:
case ASCENDER:
- keyword = token(fp,tokenlen);
- gfi->ascender = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ gfi->ascender = atoi(keyword);
break;
case STARTCHARMETRICS:
cont = false;
@@ -499,8 +501,8 @@ static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
keyword = token(fp,tokenlen);
break;
case STARTDIRECTION:
- keyword = token(fp,tokenlen);
- direction = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ direction = atoi(keyword);
break; /* ignore this for now */
case ENDDIRECTION:
break; /* ignore this for now */
@@ -523,9 +525,11 @@ static int parseGlobals( FileInputStream* fp, register GlobalFontInfo* gfi )
keyword=token(fp,tokenlen); //ignore
break;
case CHARWIDTH:
- keyword = token(fp,tokenlen);
- if (direction == 0)
- gfi->charwidth = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ {
+ if (direction == 0)
+ gfi->charwidth = atoi(keyword);
+ }
keyword = token(fp,tokenlen);
/* ignore y-width for now */
break;
@@ -584,24 +588,27 @@ static int initializeArray( FileInputStream* fp, register int* cwi)
keyword = linetoken(fp);
break;
case CODE:
- code = atoi(token(fp,tokenlen));
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ code = atoi(keyword);
break;
case CODEHEX:
- sscanf(token(fp,tokenlen),"<%x>", &code);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ sscanf(keyword,"<%x>", &code);
break;
case XWIDTH:
- width = atoi(token(fp,tokenlen));
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ width = atoi(keyword);
break;
case X0WIDTH:
(void) token(fp,tokenlen);
break;
case CHARNAME:
- keyword = token(fp,tokenlen);
- if (MATCH(keyword, Space))
- {
- cont = false;
- found = true;
- }
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ if (MATCH(keyword, Space))
+ {
+ cont = false;
+ found = true;
+ }
break;
case ENDCHARMETRICS:
cont = false;
@@ -690,8 +697,8 @@ static int parseCharWidths( FileInputStream* fp, register int* cwi)
keyword = linetoken(fp);
break;
case CODE:
- keyword = token(fp,tokenlen);
- pos = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ pos = atoi(keyword);
break;
case XYWIDTH:
/* PROBLEM: Should be no Y-WIDTH when doing "quick & dirty" */
@@ -699,16 +706,16 @@ static int parseCharWidths( FileInputStream* fp, register int* cwi)
error = parseError;
break;
case CODEHEX:
- keyword = token(fp,tokenlen);
- sscanf(keyword, "<%x>", &pos);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ sscanf(keyword, "<%x>", &pos);
break;
case X0WIDTH:
(void) token(fp,tokenlen);
break;
case XWIDTH:
- keyword = token(fp,tokenlen);
- if (pos >= 0) /* ignore unmapped chars */
- cwi[pos] = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ if (pos >= 0) /* ignore unmapped chars */
+ cwi[pos] = atoi(keyword);
break;
case ENDCHARMETRICS:
cont = false;
@@ -835,7 +842,8 @@ static int parseCharMetrics( FileInputStream* fp, register FontInfo* fi)
{
if (firstTime) firstTime = false;
else temp++;
- temp->code = atoi(token(fp,tokenlen));
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ temp->code = atoi(keyword);
if (fi->gfi && fi->gfi->charwidth)
temp->wx = fi->gfi->charwidth;
count++;
@@ -859,7 +867,8 @@ static int parseCharMetrics( FileInputStream* fp, register FontInfo* fi)
firstTime = false;
else
temp++;
- sscanf(token(fp,tokenlen),"<%x>", &temp->code);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ sscanf(keyword,"<%x>", &temp->code);
if (fi->gfi && fi->gfi->charwidth)
temp->wx = fi->gfi->charwidth;
count++;
@@ -870,24 +879,32 @@ static int parseCharMetrics( FileInputStream* fp, register FontInfo* fi)
}
break;
case XYWIDTH:
- temp->wx = atoi(token(fp,tokenlen));
- temp->wy = atoi(token(fp,tokenlen));
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ temp->wx = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ temp->wy = atoi(keyword);
break;
case X0WIDTH:
- temp->wx = atoi(token(fp,tokenlen));
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ temp->wx = atoi(keyword);
break;
case XWIDTH:
- temp->wx = atoi(token(fp,tokenlen));
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ temp->wx = atoi(keyword);
break;
case CHARNAME:
- keyword = token(fp,tokenlen);
- temp->name = (char *)strdup(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ temp->name = (char *)strdup(keyword);
break;
case CHARBBOX:
- temp->charBBox.llx = atoi(token(fp,tokenlen));
- temp->charBBox.lly = atoi(token(fp,tokenlen));
- temp->charBBox.urx = atoi(token(fp,tokenlen));
- temp->charBBox.ury = atoi(token(fp,tokenlen));
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ temp->charBBox.llx = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ temp->charBBox.lly = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ temp->charBBox.urx = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ temp->charBBox.ury = atoi(keyword);
break;
case LIGATURE: {
Ligature **tail = &(temp->ligs);
@@ -901,10 +918,10 @@ static int parseCharMetrics( FileInputStream* fp, register FontInfo* fi)
}
*tail = (Ligature *) calloc(1, sizeof(Ligature));
- keyword = token(fp,tokenlen);
- (*tail)->succ = (char *)strdup(keyword);
- keyword = token(fp,tokenlen);
- (*tail)->lig = (char *)strdup(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ (*tail)->succ = (char *)strdup(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ (*tail)->lig = (char *)strdup(keyword);
break; }
case ENDCHARMETRICS:
cont = false;;
@@ -1000,16 +1017,16 @@ static int parseTrackKernData( FileInputStream* fp, register FontInfo* fi)
if (tcount < fi->numOfTracks)
{
- keyword = token(fp,tokenlen);
- fi->tkd[pos].degree = atoi(keyword);
- keyword = token(fp,tokenlen);
- fi->tkd[pos].minPtSize = StringToDouble(keyword);
- keyword = token(fp,tokenlen);
- fi->tkd[pos].minKernAmt = StringToDouble(keyword);
- keyword = token(fp,tokenlen);
- fi->tkd[pos].maxPtSize = StringToDouble(keyword);
- keyword = token(fp,tokenlen);
- fi->tkd[pos++].maxKernAmt = StringToDouble(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->tkd[pos].degree = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->tkd[pos].minPtSize = StringToDouble(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->tkd[pos].minKernAmt = StringToDouble(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->tkd[pos].maxPtSize = StringToDouble(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->tkd[pos++].maxKernAmt = StringToDouble(keyword);
tcount++;
}
else
@@ -1107,14 +1124,14 @@ static int parsePairKernData( FileInputStream* fp, register FontInfo* fi)
}
if (pcount < fi->numOfPairs)
{
- keyword = token(fp,tokenlen);
- fi->pkd[pos].name1 = strdup( keyword );
- keyword = token(fp,tokenlen);
- fi->pkd[pos].name2 = strdup( keyword );
- keyword = token(fp,tokenlen);
- fi->pkd[pos].xamt = atoi(keyword);
- keyword = token(fp,tokenlen);
- fi->pkd[pos++].yamt = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->pkd[pos].name1 = strdup( keyword );
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->pkd[pos].name2 = strdup( keyword );
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->pkd[pos].xamt = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->pkd[pos++].yamt = atoi(keyword);
pcount++;
}
else
@@ -1131,12 +1148,12 @@ static int parsePairKernData( FileInputStream* fp, register FontInfo* fi)
}
if (pcount < fi->numOfPairs)
{
- keyword = token(fp,tokenlen);
- fi->pkd[pos].name1 = strdup( keyword );
- keyword = token(fp,tokenlen);
- fi->pkd[pos].name2 = strdup( keyword );
- keyword = token(fp,tokenlen);
- fi->pkd[pos++].xamt = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->pkd[pos].name1 = strdup( keyword );
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->pkd[pos].name2 = strdup( keyword );
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->pkd[pos++].xamt = atoi(keyword);
pcount++;
}
else
@@ -1258,8 +1275,8 @@ static int parseCompCharData( FileInputStream* fp, register FontInfo* fi)
if (firstTime) firstTime = false;
else pos++;
fi->ccd[pos].ccName = strdup( keyword );
- keyword = token(fp,tokenlen);
- fi->ccd[pos].numOfPieces = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->ccd[pos].numOfPieces = atoi(keyword);
fi->ccd[pos].pieces = (Pcc *)
calloc(fi->ccd[pos].numOfPieces, sizeof(Pcc));
j = 0;
@@ -1274,12 +1291,12 @@ static int parseCompCharData( FileInputStream* fp, register FontInfo* fi)
case COMPCHARPIECE:
if (pcount < fi->ccd[pos].numOfPieces)
{
- keyword = token(fp,tokenlen);
- fi->ccd[pos].pieces[j].pccName = strdup( keyword );
- keyword = token(fp,tokenlen);
- fi->ccd[pos].pieces[j].deltax = atoi(keyword);
- keyword = token(fp,tokenlen);
- fi->ccd[pos].pieces[j++].deltay = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->ccd[pos].pieces[j].pccName = strdup( keyword );
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->ccd[pos].pieces[j].deltax = atoi(keyword);
+ if ((keyword = token(fp,tokenlen)) != NULL)
+ fi->ccd[pos].pieces[j++].deltay = atoi(keyword);
pcount++;
}
else
@@ -1373,7 +1390,8 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
if ((code != normalEOF) && (code != earlyEOF))
{
- (*fi)->numOfChars = atoi(token(&aFile,tokenlen));
+ if ((keyword = token(&aFile,tokenlen)) != NULL)
+ (*fi)->numOfChars = atoi(keyword);
if (flags & (P_M ^ P_W))
{
(*fi)->cmi = (CharMetricInfo *)
@@ -1423,7 +1441,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
break;
case STARTTRACKKERN:
keyword = token(&aFile,tokenlen);
- if (flags & P_T)
+ if ((flags & P_T) && keyword)
{
(*fi)->numOfTracks = atoi(keyword);
(*fi)->tkd = (TrackKernData *)
@@ -1438,7 +1456,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
break;
case STARTKERNPAIRS:
keyword = token(&aFile,tokenlen);
- if (flags & P_P)
+ if ((flags & P_P) && keyword)
{
(*fi)->numOfPairs = atoi(keyword);
(*fi)->pkd = (PairKernData *)
@@ -1453,7 +1471,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
break;
case STARTCOMPOSITES:
keyword = token(&aFile,tokenlen);
- if (flags & P_C)
+ if ((flags & P_C) && keyword)
{
(*fi)->numOfComps = atoi(keyword);
(*fi)->ccd = (CompCharData *)
diff --git a/vcl/unx/source/gdi/gcach_xpeer.cxx b/vcl/unx/source/gdi/gcach_xpeer.cxx
index 634f79d3e002..a69a2426b519 100644
--- a/vcl/unx/source/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/source/gdi/gcach_xpeer.cxx
@@ -119,7 +119,7 @@ void X11GlyphPeer::InitAntialiasing()
// enable XRENDER accelerated aliasing on screens that support it
// unless it explicitly disabled by an environment variable
if( (nEnvAntiAlias & 2) == 0 )
- mnUsingXRender = XRenderPeer::GetInstance().InitRenderText( mnMaxScreens );
+ mnUsingXRender = XRenderPeer::GetInstance().InitRenderText();
// else enable client side antialiasing for these screens
// unless it is explicitly disabled by an environment variable
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
index 0c1fcd7c77bd..7cf2009a3e07 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -1088,7 +1088,7 @@ void X11SalGraphics::DrawServerAAFontString( const ServerFontLayout& rLayout )
}
// set font foreground color and opacity
- XRenderColor aRenderColor = GetXRenderColor( nTextPixel_ );
+ XRenderColor aRenderColor = GetXRenderColor( nTextColor_ );
rRenderPeer.FillRectangle( PictOpSrc, rEntry.m_aPicture, &aRenderColor, 0, 0, 1, 1 );
// set clipping
diff --git a/vcl/unx/source/gdi/xrender_peer.cxx b/vcl/unx/source/gdi/xrender_peer.cxx
index c5d84cffab58..8d24e4098df4 100644
--- a/vcl/unx/source/gdi/xrender_peer.cxx
+++ b/vcl/unx/source/gdi/xrender_peer.cxx
@@ -25,6 +25,9 @@
*
************************************************************************/
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_vcl.hxx"
+
#include <stdio.h>
#include <rtl/ustring.hxx>
#include <osl/module.h>
@@ -172,7 +175,7 @@ void XRenderPeer::InitRenderLib()
#if 0 // not having trapezoid support is supported
if( !pFunc ) return;
#endif
- mpXRenderAddTraps = (void(*)(Display*,Picture,int,int,const XTrap*,int))pFunc;
+ mpXRenderAddTraps = (void(*)(Display*,Picture,int,int,const _XTrap*,int))pFunc;
#endif // XRENDER_LINK
@@ -190,12 +193,16 @@ void XRenderPeer::InitRenderLib()
(*mpXRenderQueryVersion)( mpDisplay, &nMajor, &nMinor );
#endif
mnRenderVersion = 16*nMajor + nMinor;
+
+ // the 8bit alpha mask format must be there
+ XRenderPictFormat aPictFormat={0,0,8,{0,0,0,0,0,0,0,0xFF},0};
+ mpStandardFormatA8 = FindPictureFormat( PictFormatAlphaMask|PictFormatDepth, aPictFormat );
}
// ---------------------------------------------------------------------------
// return mask of screens capable of XRENDER text
-sal_uInt32 XRenderPeer::InitRenderText( int nMaxDepth )
+sal_uInt32 XRenderPeer::InitRenderText()
{
if( mnRenderVersion < 0x01 )
return 0;
@@ -206,9 +213,6 @@ sal_uInt32 XRenderPeer::InitRenderText( int nMaxDepth )
if( mnRenderVersion < 0x02 )
return 0;
- // the 8bit alpha mask format must be there
- XRenderPictFormat aPictFormat={0,0,8,{0,0,0,0,0,0,0,0xFF},0};
- mpStandardFormatA8 = FindPictureFormat( PictFormatAlphaMask|PictFormatDepth, aPictFormat );
if( !mpStandardFormatA8 )
return 0;
@@ -217,18 +221,24 @@ sal_uInt32 XRenderPeer::InitRenderText( int nMaxDepth )
SalDisplay* pSalDisp = GetX11SalData()->GetDisplay();
const int nScreenCount = pSalDisp->GetScreenCount();
XRenderPictFormat* pVisualFormat = NULL;
+ int nMaxDepth = 0;
for( int nScreen = 0; nScreen < nScreenCount; ++nScreen )
{
Visual* pXVisual = pSalDisp->GetVisual( nScreen ).GetVisual();
pVisualFormat = FindVisualFormat( pXVisual );
if( pVisualFormat != NULL )
+ {
+ int nVDepth = pSalDisp->GetVisual( nScreen ).GetDepth();
+ if( nVDepth > nMaxDepth )
+ nMaxDepth = nVDepth;
nRetMask |= 1U << nScreen;
+ }
}
// #97763# disable XRENDER on <15bit displays for XFree<=4.2.0
if( mnRenderVersion <= 0x02 )
if( nMaxDepth < 15 )
- return 0;
+ nRetMask = 0;
return nRetMask;
}
diff --git a/vcl/unx/source/gdi/xrender_peer.hxx b/vcl/unx/source/gdi/xrender_peer.hxx
index 6d40015ee94d..89dccfcef40b 100644
--- a/vcl/unx/source/gdi/xrender_peer.hxx
+++ b/vcl/unx/source/gdi/xrender_peer.hxx
@@ -29,6 +29,7 @@
#define _SV_XRENDER_PEER_HXX
#include <tools/prex.h>
+struct _XTrap; // on some older systems this is not declared within Xrender.h
#include <X11/extensions/Xrender.h>
#include <tools/postx.h>
@@ -41,7 +42,7 @@ public:
static XRenderPeer& GetInstance();
int GetVersion() const;
- sal_uInt32 InitRenderText( int nMaxDepth );
+ sal_uInt32 InitRenderText();
protected:
XRenderPeer();
@@ -84,7 +85,7 @@ public:
const XRenderPictFormat*, int nXSrc, int nYSrc,
const XTrapezoid*, int nCount ) const;
bool AddTraps( Picture aDst, int nXOfs, int nYOfs,
- const XTrap*, int nCount ) const;
+ const _XTrap*, int nCount ) const;
bool AreTrapezoidsSupported() const
#ifdef XRENDER_LINK
@@ -120,7 +121,7 @@ private:
const XRenderColor*,int,int,unsigned int,unsigned int);
void (*mpXRenderCompositeTrapezoids)(Display*,int,Picture,Picture,
const XRenderPictFormat*,int,int,const XTrapezoid*,int);
- void (*mpXRenderAddTraps)(Display*,Picture,int,int,const XTrap*,int);
+ void (*mpXRenderAddTraps)(Display*,Picture,int,int,const _XTrap*,int);
#endif // XRENDER_LINK
};
@@ -326,7 +327,7 @@ inline void XRenderPeer::CompositeTrapezoids( int nOp,
}
inline bool XRenderPeer::AddTraps( Picture aDst, int nXOfs, int nYOfs,
- const XTrap* pTraps, int nCount ) const
+ const _XTrap* pTraps, int nCount ) const
{
#ifdef XRENDER_LINK
XRenderAddTraps( mpDisplay, aDst, nXOfs, nYOfs, pTraps, nCount );
diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx
index f95f42d6bf4d..1b7ed7dcfccb 100644
--- a/vcl/win/source/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx
@@ -291,6 +291,10 @@ BOOL WinSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP
if( nPart == PART_ENTIRE_CONTROL )
hTheme = getThemeHandle( mhWnd, L"Progress");
break;
+ case CTRL_SLIDER:
+ if( nPart == PART_TRACK_HORZ_AREA || nPart == PART_TRACK_VERT_AREA )
+ hTheme = getThemeHandle( mhWnd, L"Trackbar" );
+ break;
default:
hTheme = NULL;
break;
@@ -890,6 +894,38 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc,
return ImplDrawTheme( hTheme, hDC, PP_CHUNK, iState, aProgressRect, aCaption );
}
+ if( nType == CTRL_SLIDER )
+ {
+ iPart = (nPart == PART_TRACK_HORZ_AREA) ? TKP_TRACK : TKP_TRACKVERT;
+ iState = (nPart == PART_TRACK_HORZ_AREA) ? TRS_NORMAL : TRVS_NORMAL;
+
+ Rectangle aTrackRect = ImplGetThemeRect( hTheme, hDC, iPart, iState, Rectangle() );
+ RECT aTRect = rc;
+ if( nPart == PART_TRACK_HORZ_AREA )
+ {
+ long nH = aTrackRect.GetHeight();
+ aTRect.top += (rc.bottom - rc.top - nH)/2;
+ aTRect.bottom = aTRect.top + nH;
+ }
+ else
+ {
+ long nW = aTrackRect.GetWidth();
+ aTRect.left += (rc.right - rc.left - nW)/2;
+ aTRect.right = aTRect.left + nW;
+ }
+ ImplDrawTheme( hTheme, hDC, iPart, iState, aTRect, aCaption );
+
+ RECT aThumbRect;
+ SliderValue* pVal = (SliderValue*)aValue.getOptionalVal();
+ aThumbRect.left = pVal->maThumbRect.Left();
+ aThumbRect.top = pVal->maThumbRect.Top();
+ aThumbRect.right = pVal->maThumbRect.Right();
+ aThumbRect.bottom = pVal->maThumbRect.Bottom();
+ iPart = (nPart == PART_TRACK_HORZ_AREA) ? TKP_THUMB : TKP_THUMBVERT;
+ iState = (nState & CTRL_STATE_ENABLED) ? TUS_NORMAL : TUS_DISABLED;
+ return ImplDrawTheme( hTheme, hDC, iPart, iState, aThumbRect, aCaption );
+ }
+
return false;
}
@@ -970,6 +1006,10 @@ BOOL WinSalGraphics::drawNativeControl( ControlType nType,
if( nPart == PART_ENTIRE_CONTROL )
hTheme = getThemeHandle( mhWnd, L"Progress");
break;
+ case CTRL_SLIDER:
+ if( nPart == PART_TRACK_HORZ_AREA || nPart == PART_TRACK_VERT_AREA )
+ hTheme = getThemeHandle( mhWnd, L"Trackbar" );
+ break;
default:
hTheme = NULL;
break;
@@ -1106,7 +1146,6 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
bRet = TRUE;
}
}
-
if( (nType == CTRL_LISTBOX || nType == CTRL_COMBOBOX ) && nPart == PART_ENTIRE_CONTROL )
{
HTHEME hTheme = getThemeHandle( mhWnd, L"Combobox");
@@ -1162,6 +1201,33 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType,
}
}
}
+ if( nType == CTRL_SLIDER && ( (nPart == PART_THUMB_HORZ) || (nPart == PART_THUMB_VERT) ) )
+ {
+ HTHEME hTheme = getThemeHandle( mhWnd, L"Trackbar");
+ if( hTheme )
+ {
+ int iPart = (nPart == PART_THUMB_HORZ) ? TKP_THUMB : TKP_THUMBVERT;
+ int iState = (nPart == PART_THUMB_HORZ) ? TUS_NORMAL : TUVS_NORMAL;
+ Rectangle aThumbRect = ImplGetThemeRect( hTheme, hDC, iPart, iState, Rectangle() );
+ if( nPart == PART_THUMB_HORZ )
+ {
+ long nW = aThumbRect.GetWidth();
+ Rectangle aRect( rControlRegion.GetBoundRect() );
+ aRect.Right() = aRect.Left() + nW - 1;
+ rNativeContentRegion = aRect;
+ rNativeBoundingRegion = rNativeContentRegion;
+ }
+ else
+ {
+ long nH = aThumbRect.GetHeight();
+ Rectangle aRect( rControlRegion.GetBoundRect() );
+ aRect.Bottom() = aRect.Top() + nH - 1;
+ rNativeContentRegion = aRect;
+ rNativeBoundingRegion = rNativeContentRegion;
+ }
+ bRet = TRUE;
+ }
+ }
ReleaseDC( mhWnd, hDC );
return( bRet );
diff --git a/vcl/win/source/window/MAKEFILE.MK b/vcl/win/source/window/MAKEFILE.MK
index e83f04cfdfb0..cecfbcf5b2e5 100644
--- a/vcl/win/source/window/MAKEFILE.MK
+++ b/vcl/win/source/window/MAKEFILE.MK
@@ -38,12 +38,7 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : $(PRJ)$/util$/makefile2.pmk
# --- #105371#
-.IF "$(COM)"=="GCC"
-CFLAGS += -D_WIN32_WINNT=0x0501
-.ELSE
-CFLAGS += -DWINVER=0x0400 -D_WIN32_WINNT=0x0501
-
-.ENDIF
+CDEFS +=-U_WIN32_WINNT -D_WIN32_WINNT=0x0501
# --- Files --------------------------------------------------------