[Libreoffice-commits] core.git: Branch 'private/kohei/new-chart-type-skeleton' - 136 commits - bin/distro-install-desktop-integration bin/distro-install-file-lists canvas/source chart2/Library_chartcontroller.mk chart2/Library_chartcore.mk chart2/source cui/source cui/uiconfig extras/Module_extras.mk extras/Package_cfgsrvbitmapunx.mk extras/unx filter/source framework/inc framework/source helpcontent2 i18npool/source icon-themes/galaxy include/svx include/tools include/ucbhelper include/vcl ios/experimental l10ntools/source linguistic/source offapi/com officecfg/registry oox/source package/source padmin/AllLangResTarget_spa.mk padmin/Executable_spadmin.bin.mk padmin/Library_spa.mk padmin/Makefile padmin/Module_padmin.mk padmin/Package_padmin.mk padmin/README padmin/source padmin/uiconfig padmin/UIConfig_spa.mk psprint_config/configuration psprint_config/Makefile psprint_config/Module_psprint_config.mk psprint_config/Package_fontunxppds.mk psprint_config/Package_fontunxpsprint.mk psprint_config/RE ADME Repository.mk RepositoryModule_host.mk scp2/source sc/source sc/uiconfig sd/source sd/uiconfig sfx2/source solenv/gbuild starmath/source svl/source svtools/source svtools/uiconfig svx/inc svx/Library_svxcore.mk svx/source svx/uiconfig svx/UIConfig_svx.mk sw/qa sw/source sw/uiconfig sysui/CustomTarget_share.mk sysui/desktop test/Package_unittest.mk tools/source ucbhelper/source ucb/source unusedcode.easy vcl/generic vcl/headless vcl/inc vcl/Library_vcl.mk vcl/Library_vclopengl.mk vcl/Library_vclplug_gen.mk vcl/Module_vcl.mk vcl/null vcl/osx vcl/Package_fontunxppds.mk vcl/Package_fontunxpsprint.mk vcl/quartz vcl/source vcl/uiconfig vcl/UIConfig_vcl.mk vcl/unx vcl/win wizards/com writerfilter/inc writerfilter/source xmlhelp/source xmloff/source xmlscript/source xmlsecurity/source
Kohei Yoshida
kohei.yoshida at collabora.com
Fri Mar 21 14:58:25 PDT 2014
Rebased ref, commits from common ancestor:
commit a25dc8198eb485e1ef450fce6ac3a1c25d6a086a
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Mar 21 16:21:58 2014 -0400
List child type for GL3D bar chart type.
For now there is only one child type.
Change-Id: If39a3e75fdae62f0b20769c21e6a4e235ede941e
diff --git a/chart2/source/controller/dialogs/Bitmaps.hrc b/chart2/source/controller/dialogs/Bitmaps.hrc
index b5fc1e7..643ed3d 100644
--- a/chart2/source/controller/dialogs/Bitmaps.hrc
+++ b/chart2/source/controller/dialogs/Bitmaps.hrc
@@ -199,6 +199,8 @@
// Bubble Chart Subtypes
#define BMP_BUBBLE_1 (RID_APP_START + 88)
+// GL3D Bar Chart subtypes.
+#define BMP_GL3D_BAR_ROUNDRECT (RID_APP_START + 106)
//further Images:
diff --git a/chart2/source/controller/dialogs/Bitmaps.src b/chart2/source/controller/dialogs/Bitmaps.src
index c088844..49bd2f8 100644
--- a/chart2/source/controller/dialogs/Bitmaps.src
+++ b/chart2/source/controller/dialogs/Bitmaps.src
@@ -97,6 +97,12 @@ Bitmap BMP_BUBBLE_1
{
File = "bubble_52x60.png" ;
};
+
+Bitmap BMP_GL3D_BAR_ROUNDRECT
+{
+ File = "gl3dbar_roundrect.png";
+};
+
Bitmap BMP_AREAS_2D
{
File = "areas_52x60.png" ;
diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx
index 907c8f4..053cbe7 100644
--- a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx
+++ b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx
@@ -12,6 +12,8 @@
#include <Bitmaps.hrc>
#include <ResId.hxx>
+#include <svtools/valueset.hxx>
+
namespace chart {
GL3DBarChartDialogController::GL3DBarChartDialogController() {}
@@ -36,6 +38,15 @@ GL3DBarChartDialogController::getTemplateMap() const
return aMap;
}
+void GL3DBarChartDialogController::fillSubTypeList(
+ ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ )
+{
+ rSubTypeList.Clear();
+ rSubTypeList.InsertItem(1, Image(Bitmap(SchResId(BMP_GL3D_BAR_ROUNDRECT))));
+
+ rSubTypeList.SetItemText(1, SchResId(STR_GL3D_BAR).toString());
+}
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx
index 72aac01..e2f31e2 100644
--- a/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx
+++ b/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx
@@ -23,6 +23,8 @@ public:
virtual OUString getName();
virtual Image getImage();
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const;
+
+ virtual void fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter );
};
}
diff --git a/chart2/source/controller/dialogs/Strings_ChartTypes.src b/chart2/source/controller/dialogs/Strings_ChartTypes.src
index 3ece3a3..8871780 100644
--- a/chart2/source/controller/dialogs/Strings_ChartTypes.src
+++ b/chart2/source/controller/dialogs/Strings_ChartTypes.src
@@ -144,7 +144,12 @@ String STR_BUBBLE_1
String STR_TYPE_GL3D_BAR
{
- Text [ en-US ] = "GL 3D Bar";
+ Text [ en-US ] = "GL3D Bar";
+};
+
+String STR_GL3D_BAR
+{
+ Text [ en-US ] = "GL3D Bar Chart";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/inc/Strings.hrc b/chart2/source/inc/Strings.hrc
index f102f40..59de25d 100644
--- a/chart2/source/inc/Strings.hrc
+++ b/chart2/source/inc/Strings.hrc
@@ -65,6 +65,7 @@
#define STR_BUBBLE_1 (RID_APP_START + 283)
#define STR_TYPE_GL3D_BAR (RID_APP_START + 127)
+#define STR_GL3D_BAR (RID_APP_START + 128)
//additional strings
#define STR_TEXT_SEPARATOR (RID_APP_START + 20)
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index 748d40d..6cc13bc 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -179,7 +179,6 @@ uno::Reference< XDiagram > SAL_CALL ChartTypeTemplate::createDiagramByDataSource
}
sal_Bool SAL_CALL ChartTypeTemplate::supportsCategories()
- throw (uno::RuntimeException, std::exception)
{
return sal_True;
}
diff --git a/chart2/source/model/template/ChartTypeTemplate.hxx b/chart2/source/model/template/ChartTypeTemplate.hxx
index 19278a2..5f551b0 100644
--- a/chart2/source/model/template/ChartTypeTemplate.hxx
+++ b/chart2/source/model/template/ChartTypeTemplate.hxx
@@ -92,8 +92,8 @@ protected:
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArguments )
throw (::com::sun::star::uno::RuntimeException, std::exception);
/// denotes if the chart needs categories at the first scale
- virtual sal_Bool SAL_CALL supportsCategories()
- throw (::com::sun::star::uno::RuntimeException, std::exception);
+ virtual sal_Bool SAL_CALL supportsCategories();
+
virtual void SAL_CALL changeDiagram(
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram )
throw (::com::sun::star::uno::RuntimeException, std::exception);
diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
index 306481e..262828c 100644
--- a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
+++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
@@ -8,6 +8,8 @@
*/
#include "GL3DBarChartTypeTemplate.hxx"
+#include <servicenames_charttypes.hxx>
+#include <macros.hxx>
using namespace com::sun::star;
@@ -21,14 +23,49 @@ GL3DBarChartTypeTemplate::~GL3DBarChartTypeTemplate() {}
uno::Reference<chart2::XChartType> GL3DBarChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
{
- return uno::Reference<chart2::XChartType>();
+ uno::Reference<chart2::XChartType> xResult;
+
+ try
+ {
+ uno::Reference<lang::XMultiServiceFactory> xFact(
+ GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW);
+
+ xResult.set(xFact->createInstance(CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR), uno::UNO_QUERY_THROW);
+ }
+ catch (const uno::Exception & ex)
+ {
+ ASSERT_EXCEPTION( ex );
+ }
+
+ return xResult;
}
uno::Reference<chart2::XChartType>
GL3DBarChartTypeTemplate::getChartTypeForNewSeries(
- const uno::Sequence<uno::Reference<chart2::XChartType> >& /*xOldChartTypes*/ )
+ const uno::Sequence<uno::Reference<chart2::XChartType> >& xOldChartTypes )
+{
+ uno::Reference<chart2::XChartType> xResult;
+
+ try
+ {
+ uno::Reference<lang::XMultiServiceFactory> xFact(
+ GetComponentContext()->getServiceManager(), uno::UNO_QUERY_THROW);
+
+ xResult.set(xFact->createInstance(CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR), uno::UNO_QUERY_THROW);
+
+ ChartTypeTemplate::copyPropertiesFromOldToNewCoordianteSystem(xOldChartTypes, xResult);
+ }
+ catch (const uno::Exception & ex)
+ {
+ ASSERT_EXCEPTION( ex );
+ }
+
+ return xResult;
+}
+
+sal_Bool GL3DBarChartTypeTemplate::supportsCategories()
{
- return uno::Reference<chart2::XChartType>();
+ return false;
}
}
diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
index 2574329..47a7b06 100644
--- a/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
+++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
@@ -34,6 +34,8 @@ public:
virtual css::uno::Reference<css::chart2::XChartType> SAL_CALL
getChartTypeForNewSeries(
const css::uno::Sequence<css::uno::Reference<css::chart2::XChartType> >& xOldChartTypes );
+
+ virtual sal_Bool SAL_CALL supportsCategories();
};
}
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 944b31a..5202cc1 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2416,6 +2416,9 @@ VSeriesPlotter* VSeriesPlotter::createSeriesPlotter(
, sal_Int32 nDimensionCount
, bool bExcludingPositioning )
{
+ if (!xChartTypeModel.is())
+ return NULL;
+
OUString aChartType = xChartTypeModel->getChartType();
VSeriesPlotter* pRet=NULL;
diff --git a/icon-themes/galaxy/chart2/res/gl3dbar_roundrect.png b/icon-themes/galaxy/chart2/res/gl3dbar_roundrect.png
new file mode 100644
index 0000000..729bd3e
Binary files /dev/null and b/icon-themes/galaxy/chart2/res/gl3dbar_roundrect.png differ
commit 03931bd72ff880aa5aa7a0e7ddbaa3667e2e7af6
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Mar 21 10:55:06 2014 -0400
Skeleton template class for GL3D bar chart type.
Still very much empty. It needs to be filled with sub-categories.
Change-Id: Iad7ad34efb264025541b585a92ee2ea7b8fff56f
diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk
index 2e09fe3..63171f4 100644
--- a/chart2/Library_chartcore.mk
+++ b/chart2/Library_chartcore.mk
@@ -154,6 +154,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
chart2/source/model/template/DataInterpreter \
chart2/source/model/template/FilledNetChartType \
chart2/source/model/template/GL3DBarChartType \
+ chart2/source/model/template/GL3DBarChartTypeTemplate \
chart2/source/model/template/LineChartType \
chart2/source/model/template/LineChartTypeTemplate \
chart2/source/model/template/NetChartType \
diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx
index e68744c..49775f9 100644
--- a/chart2/source/model/template/ChartTypeManager.cxx
+++ b/chart2/source/model/template/ChartTypeManager.cxx
@@ -33,6 +33,7 @@
#include "StockChartTypeTemplate.hxx"
#include "NetChartTypeTemplate.hxx"
#include "BubbleChartTypeTemplate.hxx"
+#include "GL3DBarChartTypeTemplate.hxx"
#include <cppuhelper/component_context.hxx>
#include <comphelper/InlineContainer.hxx>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
@@ -121,6 +122,7 @@ enum TemplateId
TEMPLATE_STOCKVOLUMELOWHIGHCLOSE,
TEMPLATE_STOCKVOLUMEOPENLOWHIGHCLOSE,
TEMPLATE_BUBBLE,
+ TEMPLATE_GL3DBAR_ROUNDED_RECTANGLE,
// TEMPLATE_SURFACE,
// TEMPLATE_ADDIN,
TEMPLATE_NOT_FOUND = 0xffff
@@ -196,6 +198,7 @@ const tTemplateMapType & lcl_DefaultChartTypeMap()
( "com.sun.star.chart2.template.StockVolumeLowHighClose", TEMPLATE_STOCKVOLUMELOWHIGHCLOSE )
( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose", TEMPLATE_STOCKVOLUMEOPENLOWHIGHCLOSE )
( "com.sun.star.chart2.template.Bubble", TEMPLATE_BUBBLE )
+ ( "com.sun.star.chart2.template.GL3DBarRoundedRectangle", TEMPLATE_GL3DBAR_ROUNDED_RECTANGLE )
// ( "com.sun.star.chart2.template.Surface", TEMPLATE_SURFACE )
// ( "com.sun.star.chart2.template.Addin", TEMPLATE_ADDIN )
);
@@ -529,6 +532,10 @@ uno::Reference< uno::XInterface > SAL_CALL ChartTypeManager::createInstance(
xTemplate.set( new BubbleChartTypeTemplate( m_xContext, aServiceSpecifier ));
break;
+ case TEMPLATE_GL3DBAR_ROUNDED_RECTANGLE:
+ xTemplate.set(new GL3DBarChartTypeTemplate(m_xContext, aServiceSpecifier));
+ break;
+
// case TEMPLATE_SURFACE:
// case TEMPLATE_ADDIN:
// break;
diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
new file mode 100644
index 0000000..306481e
--- /dev/null
+++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.cxx
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "GL3DBarChartTypeTemplate.hxx"
+
+using namespace com::sun::star;
+
+namespace chart {
+
+GL3DBarChartTypeTemplate::GL3DBarChartTypeTemplate(
+ const uno::Reference<uno::XComponentContext>& xContext, const OUString& rServiceName ) :
+ ChartTypeTemplate(xContext, rServiceName) {}
+
+GL3DBarChartTypeTemplate::~GL3DBarChartTypeTemplate() {}
+
+uno::Reference<chart2::XChartType> GL3DBarChartTypeTemplate::getChartTypeForIndex( sal_Int32 /*nChartTypeIndex*/ )
+{
+ return uno::Reference<chart2::XChartType>();
+}
+
+uno::Reference<chart2::XChartType>
+GL3DBarChartTypeTemplate::getChartTypeForNewSeries(
+ const uno::Sequence<uno::Reference<chart2::XChartType> >& /*xOldChartTypes*/ )
+{
+ return uno::Reference<chart2::XChartType>();
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
new file mode 100644
index 0000000..2574329
--- /dev/null
+++ b/chart2/source/model/template/GL3DBarChartTypeTemplate.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef CHART2_GL3DBARCHARTTYPETEMPLATE_HXX
+#define CHART2_GL3DBARCHARTTYPETEMPLATE_HXX
+
+#include <MutexContainer.hxx>
+#include <ChartTypeTemplate.hxx>
+#include <OPropertySet.hxx>
+#include <ServiceMacros.hxx>
+
+namespace chart {
+
+class GL3DBarChartTypeTemplate : public ChartTypeTemplate
+{
+public:
+ GL3DBarChartTypeTemplate(
+ const css::uno::Reference<
+ css::uno::XComponentContext>& xContext,
+ const OUString& rServiceName );
+
+ virtual ~GL3DBarChartTypeTemplate();
+
+ virtual css::uno::Reference<css::chart2::XChartType> getChartTypeForIndex( sal_Int32 nChartTypeIndex );
+
+ // XChartTypeTemplate
+
+ virtual css::uno::Reference<css::chart2::XChartType> SAL_CALL
+ getChartTypeForNewSeries(
+ const css::uno::Sequence<css::uno::Reference<css::chart2::XChartType> >& xOldChartTypes );
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index a683903..d21b6df 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -112,7 +112,7 @@ DiagramHelper::tTemplateWithServiceName
Reference< XChartTypeTemplate > xTempl(
xChartTypeManager->createInstance( aServiceNames[ i ] ), uno::UNO_QUERY_THROW );
- if( xTempl->matchesTemplate( xDiagram, sal_True ))
+ if (xTempl.is() && xTempl->matchesTemplate(xDiagram, true))
{
aResult.first = xTempl;
aResult.second = aServiceNames[ i ];
commit 3357ff4c993b5e2c9322c673b223b4aebbabc63f
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Mar 21 10:27:46 2014 -0400
Let's be more defensive here by checking for null return objects.
Change-Id: I5164e7d82f882ea9fe296a5a2df616d396d6726f
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index 83e747e..748d40d 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -337,7 +337,11 @@ sal_Bool SAL_CALL ChartTypeTemplate::matchesTemplate(
if( bResult )
{
Sequence< Reference< XChartType > > aFormerlyUsedChartTypes;
- const OUString aChartTypeToMatch( getChartTypeForNewSeries(aFormerlyUsedChartTypes)->getChartType());
+ Reference<XChartType> xOldCT = getChartTypeForNewSeries(aFormerlyUsedChartTypes);
+ if (!xOldCT.is())
+ return false;
+
+ const OUString aChartTypeToMatch = xOldCT->getChartType();
const sal_Int32 nDimensionToMatch = getDimension();
for( sal_Int32 nCooSysIdx=0; bResult && (nCooSysIdx < aCooSysSeq.getLength()); ++nCooSysIdx )
{
@@ -348,6 +352,9 @@ sal_Bool SAL_CALL ChartTypeTemplate::matchesTemplate(
Sequence< Reference< XChartType > > aChartTypeSeq( xCTCnt->getChartTypes());
for( sal_Int32 nCTIdx=0; bResult && (nCTIdx < aChartTypeSeq.getLength()); ++nCTIdx )
{
+ if (!aChartTypeSeq[nCTIdx].is())
+ return false;
+
// match chart type
bResult = bResult && aChartTypeSeq[nCTIdx]->getChartType().equals( aChartTypeToMatch );
bool bFound=false;
commit 5438e50cec4ee1b3a943eb6a35ea92ddde5d6398
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Thu Mar 20 20:53:42 2014 -0400
Image for the new chart type.
Change-Id: Idba626c947cc7875bdcdf13677f2161c4d5b68c5
diff --git a/icon-themes/galaxy/chart2/res/typegl3dbar_16.png b/icon-themes/galaxy/chart2/res/typegl3dbar_16.png
new file mode 100644
index 0000000..ada848c
Binary files /dev/null and b/icon-themes/galaxy/chart2/res/typegl3dbar_16.png differ
commit 500599c58e0f66799eacd24c14422a0fcfc8995e
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Thu Mar 20 20:52:11 2014 -0400
Add a new chart type "GL 3D Bar" (working name).
Change-Id: I0b0a65bf4f9365a8d522e3c439afe19797b2fdd5
diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk
index 6a4907f..86c2a04 100644
--- a/chart2/Library_chartcontroller.mk
+++ b/chart2/Library_chartcontroller.mk
@@ -87,6 +87,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty \
chart2/source/controller/dialogs/ChangingResource \
chart2/source/controller/dialogs/ChartTypeDialogController \
+ chart2/source/controller/dialogs/GL3DBarChartDialogController \
chart2/source/controller/dialogs/DataBrowser \
chart2/source/controller/dialogs/DataBrowserModel \
chart2/source/controller/dialogs/DialogModel \
diff --git a/chart2/source/controller/dialogs/Bitmaps.hrc b/chart2/source/controller/dialogs/Bitmaps.hrc
index 6f99eff..b5fc1e7 100644
--- a/chart2/source/controller/dialogs/Bitmaps.hrc
+++ b/chart2/source/controller/dialogs/Bitmaps.hrc
@@ -39,10 +39,11 @@
#define IMG_TYPE_NET (RID_APP_START + 8)
#define IMG_TYPE_STOCK (RID_APP_START + 9)
#define IMG_TYPE_COLUMN_LINE (RID_APP_START + 10)
-#define IMG_STEP_START (RID_APP_START + 11)
-#define IMG_STEP_END (RID_APP_START + 12)
-#define IMG_STEP_CENTER_X (RID_APP_START + 13)
-#define IMG_STEP_CENTER_Y (RID_APP_START + 14)
+#define IMG_TYPE_GL3D_BAR (RID_APP_START + 11)
+#define IMG_STEP_START (RID_APP_START + 12)
+#define IMG_STEP_END (RID_APP_START + 13)
+#define IMG_STEP_CENTER_X (RID_APP_START + 14)
+#define IMG_STEP_CENTER_Y (RID_APP_START + 15)
//Chart Subtypes
diff --git a/chart2/source/controller/dialogs/Bitmaps.src b/chart2/source/controller/dialogs/Bitmaps.src
index 802de33..c088844 100644
--- a/chart2/source/controller/dialogs/Bitmaps.src
+++ b/chart2/source/controller/dialogs/Bitmaps.src
@@ -68,6 +68,11 @@ Image IMG_TYPE_BUBBLE
ImageBitmap = Bitmap { File = "typebubble_16.png" ; };
MaskColor = STD_MASKCOLOR;
};
+Image IMG_TYPE_GL3D_BAR
+{
+ ImageBitmap = Bitmap { File = "typegl3dbar_16.png" ; };
+ MaskColor = STD_MASKCOLOR;
+};
Image IMG_STEP_START
{
ImageBitmap = Bitmap { File = "step_start_30.png" ; };
diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx
new file mode 100644
index 0000000..907c8f4
--- /dev/null
+++ b/chart2/source/controller/dialogs/GL3DBarChartDialogController.cxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "GL3DBarChartDialogController.hxx"
+#include <Strings.hrc>
+#include <Bitmaps.hrc>
+#include <ResId.hxx>
+
+namespace chart {
+
+GL3DBarChartDialogController::GL3DBarChartDialogController() {}
+
+GL3DBarChartDialogController::~GL3DBarChartDialogController() {}
+
+OUString GL3DBarChartDialogController::getName()
+{
+ return SchResId(STR_TYPE_GL3D_BAR).toString();
+}
+
+Image GL3DBarChartDialogController::getImage()
+{
+ return Image(SchResId(IMG_TYPE_GL3D_BAR));
+}
+
+const tTemplateServiceChartTypeParameterMap&
+GL3DBarChartDialogController::getTemplateMap() const
+{
+ static tTemplateServiceChartTypeParameterMap aMap(
+ "com.sun.star.chart2.template.GL3DBarRoundedRectangle", ChartTypeParameter(1));
+ return aMap;
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx b/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx
new file mode 100644
index 0000000..72aac01
--- /dev/null
+++ b/chart2/source/controller/dialogs/GL3DBarChartDialogController.hxx
@@ -0,0 +1,32 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_CHART2_GL3DBARCHARTDIALOGCONTROLLER_HXX
+#define INCLUDED_CHART2_GL3DBARCHARTDIALOGCONTROLLER_HXX
+
+#include "ChartTypeDialogController.hxx"
+
+namespace chart {
+
+class GL3DBarChartDialogController : public ChartTypeDialogController
+{
+public:
+ GL3DBarChartDialogController();
+ virtual ~GL3DBarChartDialogController();
+
+ virtual OUString getName();
+ virtual Image getImage();
+ virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/Strings_ChartTypes.src b/chart2/source/controller/dialogs/Strings_ChartTypes.src
index 86ed516..3ece3a3 100644
--- a/chart2/source/controller/dialogs/Strings_ChartTypes.src
+++ b/chart2/source/controller/dialogs/Strings_ChartTypes.src
@@ -142,6 +142,9 @@ String STR_BUBBLE_1
Text [ en-US ] = "Bubble Chart" ;
};
-
+String STR_TYPE_GL3D_BAR
+{
+ Text [ en-US ] = "GL 3D Bar";
+};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 0c78e59..987f934 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -25,6 +25,7 @@
#include "res_BarGeometry.hxx"
#include "ControllerLockGuard.hxx"
#include "macros.hxx"
+#include "GL3DBarChartDialogController.hxx"
#include <svtools/controldims.hrc>
@@ -726,6 +727,7 @@ ChartTypeTabPage::ChartTypeTabPage(Window* pParent
m_aChartTypeDialogControllerList.push_back(new StockChartDialogController() );
}
m_aChartTypeDialogControllerList.push_back(new CombiColumnLineChartDialogController() );
+ m_aChartTypeDialogControllerList.push_back(new GL3DBarChartDialogController());
::std::vector< ChartTypeDialogController* >::const_iterator aIter = m_aChartTypeDialogControllerList.begin();
const ::std::vector< ChartTypeDialogController* >::const_iterator aEnd = m_aChartTypeDialogControllerList.end();
diff --git a/chart2/source/inc/Strings.hrc b/chart2/source/inc/Strings.hrc
index 15c1ca8..f102f40 100644
--- a/chart2/source/inc/Strings.hrc
+++ b/chart2/source/inc/Strings.hrc
@@ -64,8 +64,10 @@
#define STR_TYPE_BUBBLE (RID_APP_START + 282)
#define STR_BUBBLE_1 (RID_APP_START + 283)
+#define STR_TYPE_GL3D_BAR (RID_APP_START + 127)
+
//additional strings
-#define STR_TEXT_SEPARATOR (RID_APP_START + 20)
+#define STR_TEXT_SEPARATOR (RID_APP_START + 20)
//SchStatisticTabPage and SchDataStatisticsDlg
//see Strings_Statistic.src
@@ -94,7 +96,7 @@
#define STR_INVALID_TIME_UNIT (RID_APP_START + 292)
-//for range didalog
+//for range dialog
#define STR_DATA_ROLE_LABEL (RID_APP_START + 241)
#define STR_DATA_ROLE_X (RID_APP_START + 242)
#define STR_DATA_ROLE_Y (RID_APP_START + 243)
@@ -272,7 +274,6 @@
#define STR_BUTTON_UP (RID_APP_START + 500)
#define STR_BUTTON_DOWN (RID_APP_START + 501)
-
// ids must not exceed RID_APP_START + 499
// ids >= RID_APP_START + 500 are defined in glob.hrc
commit 25f78c6467cc088d36eb1a69bf650df200044b27
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Thu Mar 20 17:41:16 2014 -0400
Better to associate true for "enable" and false for "disable".
The code reads better this way, and certainly is easier on human brain
to process their logic.
Change-Id: I3150fca3385931b9fe01ad13cb11fab410331349
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index b6242a4..dea17aa 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -149,8 +149,8 @@ enum
PROP_DOCUMENT_ADDITIONAL_SHAPES,
PROP_DOCUMENT_UPDATE_ADDIN,
PROP_DOCUMENT_NULL_DATE,
- PROP_DOCUMENT_DISABLE_COMPLEX_CHARTTYPES,
- PROP_DOCUMENT_DISABLE_DATATABLE_DIALOG
+ PROP_DOCUMENT_ENABLE_COMPLEX_CHARTTYPES,
+ PROP_DOCUMENT_ENABLE_DATATABLE_DIALOG
};
void lcl_AddPropertiesToVector(
@@ -224,14 +224,14 @@ void lcl_AddPropertiesToVector(
beans::PropertyAttribute::MAYBEVOID ));
rOutProperties.push_back(
- Property( "DisableComplexChartTypes",
- PROP_DOCUMENT_DISABLE_COMPLEX_CHARTTYPES,
+ Property( "EnableComplexChartTypes",
+ PROP_DOCUMENT_ENABLE_COMPLEX_CHARTTYPES,
::getBooleanCppuType(),
//#i112666# no PropertyChangeEvent is fired on change so far
beans::PropertyAttribute::MAYBEDEFAULT ) );
rOutProperties.push_back(
- Property( "DisableDataTableDialog",
- PROP_DOCUMENT_DISABLE_DATATABLE_DIALOG,
+ Property( "EnableDataTableDialog",
+ PROP_DOCUMENT_ENABLE_DATATABLE_DIALOG,
::getBooleanCppuType(),
//#i112666# no PropertyChangeEvent is fired on change so far
beans::PropertyAttribute::MAYBEDEFAULT ) );
@@ -1531,8 +1531,8 @@ const std::vector< WrappedProperty* > ChartDocumentWrapper::createWrappedPropert
aWrappedProperties.push_back( new WrappedAdditionalShapesProperty( *this ) );
aWrappedProperties.push_back( new WrappedRefreshAddInAllowedProperty( *this ) );
aWrappedProperties.push_back( new WrappedIgnoreProperty("NullDate",Any() ) ); // i99104
- aWrappedProperties.push_back( new WrappedIgnoreProperty("DisableComplexChartTypes", uno::makeAny( sal_False ) ) );
- aWrappedProperties.push_back( new WrappedIgnoreProperty("DisableDataTableDialog", uno::makeAny( sal_False ) ) );
+ aWrappedProperties.push_back( new WrappedIgnoreProperty("EnableComplexChartTypes", uno::makeAny(sal_True) ) );
+ aWrappedProperties.push_back( new WrappedIgnoreProperty("EnableDataTableDialog", uno::makeAny(sal_True) ) );
return aWrappedProperties;
}
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index 7c25681..2803f37 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -97,7 +97,7 @@ ErrorBarResources::ErrorBarResources( VclBuilderContainer* pParent, Dialog * pPa
m_pParentDialog( pParentDialog ),
m_pCurrentRangeChoosingField( 0 ),
m_bHasInternalDataProvider( true ),
- m_bDisableDataTableDialog( false )
+ m_bEnableDataTableDialog( true )
{
pParent->get(m_pRbNone,"RB_NONE");
pParent->get(m_pRbConst, "RB_CONST");
@@ -181,7 +181,7 @@ void ErrorBarResources::SetChartDocumentForRangeChoosing(
{
try
{
- xProps->getPropertyValue( "DisableDataTableDialog" ) >>= m_bDisableDataTableDialog;
+ xProps->getPropertyValue("EnableDataTableDialog") >>= m_bEnableDataTableDialog;
}
catch( const uno::Exception& e )
{
@@ -231,7 +231,7 @@ void ErrorBarResources::UpdateControlStates()
m_pLbFunction->Enable( bIsFunction );
// range buttons
- m_pRbRange->Enable( !m_bHasInternalDataProvider || !m_bDisableDataTableDialog );
+ m_pRbRange->Enable( !m_bHasInternalDataProvider || m_bEnableDataTableDialog );
bool bShowRange = ( m_pRbRange->IsChecked());
bool bCanChooseRange =
( bShowRange &&
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 63df637..0c78e59 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -696,13 +696,13 @@ ChartTypeTabPage::ChartTypeTabPage(Window* pParent
m_pSubTypeList->SetColCount(4);
m_pSubTypeList->SetLineCount(1);
- bool bDisableComplexChartTypes = false;
+ bool bEnableComplexChartTypes = true;
uno::Reference< beans::XPropertySet > xProps( m_xChartModel, uno::UNO_QUERY );
if ( xProps.is() )
{
try
{
- xProps->getPropertyValue( "DisableComplexChartTypes" ) >>= bDisableComplexChartTypes;
+ xProps->getPropertyValue("EnableComplexChartTypes") >>= bEnableComplexChartTypes;
}
catch( const uno::Exception& e )
{
@@ -715,13 +715,13 @@ ChartTypeTabPage::ChartTypeTabPage(Window* pParent
m_aChartTypeDialogControllerList.push_back(new PieChartDialogController() );
m_aChartTypeDialogControllerList.push_back(new AreaChartDialogController() );
m_aChartTypeDialogControllerList.push_back(new LineChartDialogController() );
- if ( !bDisableComplexChartTypes )
+ if (bEnableComplexChartTypes)
{
m_aChartTypeDialogControllerList.push_back(new XYChartDialogController() );
m_aChartTypeDialogControllerList.push_back(new BubbleChartDialogController() );
}
m_aChartTypeDialogControllerList.push_back(new NetChartDialogController() );
- if ( !bDisableComplexChartTypes )
+ if (bEnableComplexChartTypes)
{
m_aChartTypeDialogControllerList.push_back(new StockChartDialogController() );
}
diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx
index 83cc4d1..de97253 100644
--- a/chart2/source/controller/inc/res_ErrorBar.hxx
+++ b/chart2/source/controller/inc/res_ErrorBar.hxx
@@ -119,7 +119,7 @@ private:
boost::scoped_ptr< RangeSelectionHelper > m_apRangeSelectionHelper;
Edit * m_pCurrentRangeChoosingField;
bool m_bHasInternalDataProvider;
- bool m_bDisableDataTableDialog;
+ bool m_bEnableDataTableDialog;
DECL_LINK( CategoryChosen, void * );
DECL_LINK( SynchronizePosAndNeg, void * );
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 07fdf49..f7e6e5e 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -538,7 +538,7 @@ void ControllerCommandDispatch::updateCommandAvailability()
{
try
{
- xProps->getPropertyValue( "DisableDataTableDialog" ) >>= bDisableDataTableDialog;
+ xProps->getPropertyValue( "EnableDataTableDialog" ) >>= bDisableDataTableDialog;
}
catch( const uno::Exception& e )
{
commit bae749c8f2554917355daa08c30093cd3adc38fb
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Thu Mar 20 16:30:25 2014 -0400
Initial skeleton class for the new chart type. Still very much empty.
Change-Id: I5e9eaeb9337d51f59f800f8e676b8bc83b80df70
diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk
index de4c888..2e09fe3 100644
--- a/chart2/Library_chartcore.mk
+++ b/chart2/Library_chartcore.mk
@@ -153,6 +153,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
chart2/source/model/template/ColumnLineDataInterpreter \
chart2/source/model/template/DataInterpreter \
chart2/source/model/template/FilledNetChartType \
+ chart2/source/model/template/GL3DBarChartType \
chart2/source/model/template/LineChartType \
chart2/source/model/template/LineChartTypeTemplate \
chart2/source/model/template/NetChartType \
diff --git a/chart2/source/inc/servicenames_charttypes.hxx b/chart2/source/inc/servicenames_charttypes.hxx
index 321ba73..20f078c 100644
--- a/chart2/source/inc/servicenames_charttypes.hxx
+++ b/chart2/source/inc/servicenames_charttypes.hxx
@@ -19,8 +19,7 @@
#ifndef INCLUDED_CHART2_SOURCE_INC_SERVICENAMES_CHARTTYPES_HXX
#define INCLUDED_CHART2_SOURCE_INC_SERVICENAMES_CHARTTYPES_HXX
-namespace chart
-{
+namespace chart {
#define CHART2_SERVICE_NAME_CHARTTYPE_AREA OUString( "com.sun.star.chart2.AreaChartType" )
#define CHART2_SERVICE_NAME_CHARTTYPE_BAR OUString( "com.sun.star.chart2.BarChartType" )
@@ -32,8 +31,10 @@ namespace chart
#define CHART2_SERVICE_NAME_CHARTTYPE_FILLED_NET OUString( "com.sun.star.chart2.FilledNetChartType" )
#define CHART2_SERVICE_NAME_CHARTTYPE_CANDLESTICK OUString( "com.sun.star.chart2.CandleStickChartType" )
#define CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE OUString( "com.sun.star.chart2.BubbleChartType" )
+#define CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR OUString( "com.sun.star.chart2.GL3DBarChartType" )
} //namespace chart
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/template/GL3DBarChartType.cxx b/chart2/source/model/template/GL3DBarChartType.cxx
new file mode 100644
index 0000000..1dd889d
--- /dev/null
+++ b/chart2/source/model/template/GL3DBarChartType.cxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "GL3DBarChartType.hxx"
+#include <servicenames_charttypes.hxx>
+
+using namespace com::sun::star;
+
+namespace chart {
+
+GL3DBarChartType::GL3DBarChartType( const uno::Reference<uno::XComponentContext>& xContext ) :
+ ChartType(xContext) {}
+
+GL3DBarChartType::~GL3DBarChartType() {}
+
+APPHELPER_XSERVICEINFO_IMPL(
+ GL3DBarChartType, OUString("com.sun.star.comp.chart.GL3DBarChartType") );
+
+uno::Sequence<OUString> GL3DBarChartType::getSupportedServiceNames_Static()
+{
+ uno::Sequence<OUString> aServices(2);
+ aServices[0] = CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR;
+ aServices[1] = "com.sun.star.chart2.ChartType";
+ return aServices;
+}
+
+GL3DBarChartType::GL3DBarChartType( const GL3DBarChartType& rOther ) :
+ ChartType(rOther) {}
+
+OUString SAL_CALL GL3DBarChartType::getChartType()
+ throw (::com::sun::star::uno::RuntimeException, std::exception)
+{
+ return CHART2_SERVICE_NAME_CHARTTYPE_GL3DBAR;
+}
+
+com::sun::star::uno::Reference<com::sun::star::util::XCloneable>
+GL3DBarChartType::createClone()
+ throw (com::sun::star::uno::RuntimeException, std::exception)
+{
+ return uno::Reference<util::XCloneable>(new GL3DBarChartType(*this));
+}
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/model/template/GL3DBarChartType.hxx b/chart2/source/model/template/GL3DBarChartType.hxx
new file mode 100644
index 0000000..4951050
--- /dev/null
+++ b/chart2/source/model/template/GL3DBarChartType.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_CHART2_GL3DBARCHARTTYPE_HXX
+#define INCLUDED_CHART2_GL3DBARCHARTTYPE_HXX
+
+#include "ChartType.hxx"
+#include "ServiceMacros.hxx"
+
+namespace chart {
+
+/**
+ * Chart type that represents 3 dimensional data content in 3D space using
+ * OpenGL.
+ */
+class GL3DBarChartType : public ChartType
+{
+public:
+ GL3DBarChartType( const com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext );
+ virtual ~GL3DBarChartType();
+
+ APPHELPER_XSERVICEINFO_DECL()
+
+ APPHELPER_SERVICE_FACTORY_HELPER( GL3DBarChartType )
+
+protected:
+ GL3DBarChartType( const GL3DBarChartType& rOther );
+
+ virtual OUString SAL_CALL getChartType()
+ throw (com::sun::star::uno::RuntimeException, std::exception);
+
+ virtual com::sun::star::uno::Reference<com::sun::star::util::XCloneable>
+ SAL_CALL createClone()
+ throw (com::sun::star::uno::RuntimeException, std::exception);
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 9dc4377c91b00585519abfd4fc1528393fe84e4a
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Mar 21 15:06:47 2014 -0400
Revert "fdo#74064 The filename gets properly highlighted in the Save As dialog."
This reverts commit 55eb86699d7d4b2151530e9a0b3ca2e99033595b, which caused a
regression fdo#76466.
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 6e524b9..2365565 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -1345,13 +1345,9 @@ void SAL_CALL SalGtkFilePicker::setValue( sal_Int16 nControlId, sal_Int16 nContr
OSL_TRACE("enable unknown control %d", nControlId);
else if( tType == GTK_TYPE_TOGGLE_BUTTON )
{
- // fdo#74064, not activating the auto_extension checkbox so that proper filename is highlighted.
- if(nControlId != ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION)
- {
- bool bChecked = false;
- rValue >>= bChecked;
- gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( pWidget ), bChecked );
- }
+ bool bChecked = false;
+ rValue >>= bChecked;
+ gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( pWidget ), bChecked );
}
else if( tType == GTK_TYPE_COMBO_BOX )
HandleSetListValue(GTK_COMBO_BOX(pWidget), nControlAction, rValue);
commit 80652a80da6f86974a2ce0b0367d27a5e797b85d
Author: Eike Rathke <erack at redhat.com>
Date: Fri Mar 21 18:57:24 2014 +0100
always resize vector, reserve is just that
Change-Id: I6e6c54e5e6ee87039b8337258bb78da2f0201d06
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index 2a52df8..75bc1bb 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -377,8 +377,7 @@ void ImportExcel8::Feat( void )
// TODO: could here be some sanity check applied to not allocate 4GB?
aProt.maSecurityDescriptor.reserve( nCbSD);
sal_Size nRead = aIn.Read( &aProt.maSecurityDescriptor.front(), nCbSD);
- if (nRead != nCbSD)
- aProt.maSecurityDescriptor.resize( nRead);
+ aProt.maSecurityDescriptor.resize( nRead);
}
GetSheetProtectBuffer().AppendEnhancedProtection( aProt, GetCurrScTab() );
commit 0f2414d82c0a4b4aca9ef040d617dcc7554a8fc5
Author: Eike Rathke <erack at redhat.com>
Date: Fri Mar 21 18:46:37 2014 +0100
refactored to use XclRangeList and XclImpAddressConverter
Change-Id: If0455f0243aace784c704e234469709e6da4542f
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index 4ffc326..2a52df8 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -354,12 +354,16 @@ void ImportExcel8::Feat( void )
aIn.Ignore(4); // size if EXC_ISFFEC2, else 0 and to be ignored
aIn.Ignore(2); // reserved3 (2 bytes)
- XclEnhancedProtection aProt;
- aProt.maRefs.reserve( nCref);
- XclRef8U aRef;
- for (sal_uInt16 i=0; i < nCref && aIn.IsValid(); ++i)
+ ScEnhancedProtection aProt;
+ if (nCref)
{
- aProt.maRefs.push_back( aRef.read( aIn));
+ XclRangeList aRefs;
+ aRefs.Read( aIn, true, nCref);
+ if (!aRefs.empty())
+ {
+ aProt.maRangeList = new ScRangeList;
+ GetAddressConverter().ConvertRangeList( *aProt.maRangeList, aRefs, GetCurrScTab(), false);
+ }
}
// FeatProtection structure follows in record.
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index bc27a29..bb5ec44 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -65,39 +65,6 @@ using ::com::sun::star::uno::Sequence;
using ::std::auto_ptr;
-const XclRef8U & XclRef8U::read( XclImpStream & rStrm )
-{
- mnRow1 = rStrm.ReaduInt16();
- mnRow2 = rStrm.ReaduInt16();
- mnCol1 = rStrm.ReaduInt16();
- mnCol2 = rStrm.ReaduInt16();
- return *this;
-}
-
-ScRange XclRef8U::convertToScRange( SCTAB nTab ) const
-{
- return ScRange( mnCol1, mnRow1, nTab, mnCol2, mnRow2, nTab);
-}
-
-ScEnhancedProtection XclEnhancedProtection::convertToScEnhancedProtection( SCTAB nTab ) const
-{
- ScEnhancedProtection aProt;
- if (!maRefs.empty())
- {
- aProt.maRangeList = new ScRangeList;
- for (::std::vector<XclRef8U>::const_iterator it(maRefs.begin()), itEnd(maRefs.end()); it != itEnd; ++it)
- {
- aProt.maRangeList->Append( it->convertToScRange( nTab));
- }
- }
- aProt.mnAreserved = mnAreserved;
- aProt.mnPasswordVerifier = mnPasswordVerifier;
- aProt.maTitle = maTitle;
- aProt.maSecurityDescriptor = maSecurityDescriptor;
- return aProt;
-}
-
-
// Shared string table ========================================================
XclImpSst::XclImpSst( const XclImpRoot& rRoot ) :
@@ -1280,7 +1247,7 @@ void XclImpSheetProtectBuffer::ReadOptions( XclImpStream& rStrm, SCTAB nTab )
pSheet->mnOptions = nOptions;
}
-void XclImpSheetProtectBuffer::AppendEnhancedProtection( const XclEnhancedProtection & rProt, SCTAB nTab )
+void XclImpSheetProtectBuffer::AppendEnhancedProtection( const ScEnhancedProtection & rProt, SCTAB nTab )
{
Sheet* pSheet = GetSheetItem(nTab);
if (pSheet)
@@ -1338,23 +1305,11 @@ void XclImpSheetProtectBuffer::Apply() const
pProtect->setOption( ScTableProtection::PIVOT_TABLES, (nOptions & 0x2000) );
pProtect->setOption( ScTableProtection::SELECT_UNLOCKED_CELLS, (nOptions & 0x4000) );
- SCTAB nTab = itr->first;
-
// Enhanced protection containing editable ranges and permissions.
- if (!itr->second.maEnhancedProtections.empty())
- {
- ::std::vector<ScEnhancedProtection> aProtections;
- for (::std::vector<XclEnhancedProtection>::const_iterator
- it(itr->second.maEnhancedProtections.begin()), itEnd(itr->second.maEnhancedProtections.end());
- it != itEnd; ++it)
- {
- aProtections.push_back( it->convertToScEnhancedProtection( nTab));
- }
- pProtect->setEnhancedProtection( aProtections);
- }
+ pProtect->setEnhancedProtection( itr->second.maEnhancedProtections);
// all done. now commit.
- GetDoc().SetTabProtection(nTab, pProtect.get());
+ GetDoc().SetTabProtection(itr->first, pProtect.get());
}
}
diff --git a/sc/source/filter/excel/xladdress.cxx b/sc/source/filter/excel/xladdress.cxx
index 694e1e0..237d0f7 100644
--- a/sc/source/filter/excel/xladdress.cxx
+++ b/sc/source/filter/excel/xladdress.cxx
@@ -93,10 +93,13 @@ XclRange XclRangeList::GetEnclosingRange() const
return aXclRange;
}
-void XclRangeList::Read( XclImpStream& rStrm, bool bCol16Bit )
+void XclRangeList::Read( XclImpStream& rStrm, bool bCol16Bit, sal_uInt16 nRefs )
{
sal_uInt16 nCount;
- rStrm >> nCount;
+ if (nRefs)
+ nCount = nRefs;
+ else
+ rStrm >> nCount;
size_t nOldSize = size();
resize( nOldSize + nCount );
for( iterator aIt = begin() + nOldSize; rStrm.IsValid() && (nCount > 0); --nCount, ++aIt )
diff --git a/sc/source/filter/inc/xicontent.hxx b/sc/source/filter/inc/xicontent.hxx
index 3d4f5fc..d3668d4 100644
--- a/sc/source/filter/inc/xicontent.hxx
+++ b/sc/source/filter/inc/xicontent.hxx
@@ -26,13 +26,12 @@
#include "xistring.hxx"
#include "xiroot.hxx"
#include "validat.hxx"
+#include "tabprotection.hxx"
#include <map>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/noncopyable.hpp>
-struct ScEnhancedProtection;
-
/* ============================================================================
Classes to import the big Excel document contents (related to several cells or
globals for the document).
@@ -46,29 +45,6 @@ globals for the document).
- Stream decryption
============================================================================ */
-struct XclRef8U
-{
- sal_uInt16 mnRow1;
- sal_uInt16 mnRow2;
- sal_uInt16 mnCol1;
- sal_uInt16 mnCol2;
-
- const XclRef8U & read( XclImpStream & rStrm );
- ScRange convertToScRange( SCTAB nTab ) const;
-};
-
-/** Feat ISFPROTECTION refs plus FeatProtection */
-struct XclEnhancedProtection
-{
- ::std::vector< XclRef8U > maRefs;
- sal_uInt32 mnAreserved;
- sal_uInt32 mnPasswordVerifier;
- OUString maTitle;
- ::std::vector< sal_uInt8 > maSecurityDescriptor; // raw data
-
- ScEnhancedProtection convertToScEnhancedProtection( SCTAB nTab ) const;
-};
-
// Shared string table ========================================================
/** The SST (shared string table) contains all strings used in a BIFF8 file.
@@ -330,7 +306,7 @@ public:
void ReadOptions( XclImpStream& rStrm, SCTAB nTab );
- void AppendEnhancedProtection( const XclEnhancedProtection & rProt, SCTAB nTab );
+ void AppendEnhancedProtection( const ScEnhancedProtection & rProt, SCTAB nTab );
void ReadPasswordHash( XclImpStream& rStrm, SCTAB nTab );
@@ -342,7 +318,7 @@ private:
bool mbProtected;
sal_uInt16 mnPasswordHash;
sal_uInt16 mnOptions;
- ::std::vector< XclEnhancedProtection > maEnhancedProtections;
+ ::std::vector< ScEnhancedProtection > maEnhancedProtections;
Sheet();
Sheet(const Sheet& r);
diff --git a/sc/source/filter/inc/xladdress.hxx b/sc/source/filter/inc/xladdress.hxx
index fb2a366..9748885 100644
--- a/sc/source/filter/inc/xladdress.hxx
+++ b/sc/source/filter/inc/xladdress.hxx
@@ -126,7 +126,7 @@ public:
XclRange GetEnclosingRange() const;
- void Read( XclImpStream& rStrm, bool bCol16Bit = true );
+ void Read( XclImpStream& rStrm, bool bCol16Bit = true, sal_uInt16 nRefs = 0 );
void Write( XclExpStream& rStrm, bool bCol16Bit = true ) const;
void WriteSubList( XclExpStream& rStrm,
size_t nBegin, size_t nCount, bool bCol16Bit = true ) const;
commit 5ff0e274bb146bbaede31e9e349cba301137d4f2
Author: Rajashri <rajashri.udhoji at synerzip.com>
Date: Thu Mar 20 13:27:17 2014 +0530
fdo#76361 : LO crash: LO crashes while saving the document to docx
The document contains an empty table with borders.
LO was treating this table as a nested table, which lead to
a TC tag mismatch.
In docxattributeoutput.cxx, inside 'switchHeaderFooter'
added a check against 'm_oldTableReference->m_pOldTablepInner'
For some documents, even if the above value was null, still
it was getting assigned to 'm_tableReference' . Thus in such situations
it leads to a crash.
Change-Id: I883267585cb804f961989797de57c4b843b96821
Reviewed-on: https://gerrit.libreoffice.org/8677
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sw/qa/extras/ooxmlexport/data/TCTagMisMatch.docx b/sw/qa/extras/ooxmlexport/data/TCTagMisMatch.docx
new file mode 100644
index 0000000..6d890ac
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/TCTagMisMatch.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index a1542d9..966e52c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2887,6 +2887,18 @@ DECLARE_OOXMLEXPORT_TEST(test76108, "test76108.docx")
assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/w:fldChar[1]", "fldCharType", "begin");
}
+DECLARE_OOXMLEXPORT_TEST(testTCTagMisMatch, "TCTagMisMatch.docx")
+{
+ // TCTagMisMatch.docx : This document contains a empty table with borders.
+ // there was a TC tag mismatch which resulted into a crash.
+
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if(!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc,"/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tbl[1]/w:tr[1]/w:tc[1]",0);
+ assertXPath(pXmlDoc,"/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]", 1);
+}
+
DECLARE_OOXMLEXPORT_TEST(testHyperLinkTagEnded, "fdo76316.docx")
{
/* XML tag <w:hyperlink> was not getting closed when its inside another
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index a088367..e287f71 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2489,10 +2489,15 @@ void DocxAttributeOutput::switchHeaderFooter(bool isHeaderFooter, sal_Int32 inde
}
else if( index == -1)
{
- *m_tableReference = *m_oldTableReference;
- //Reset the oldReference, after copying it back to the original.
- m_oldTableReference->m_bTableCellOpen = false ;
- m_oldTableReference->m_nTableDepth = 0;
+ if (m_oldTableReference->m_pOldTablepInner)
+ {
+ *m_tableReference = *m_oldTableReference;
+
+ //Reset the oldReference, after copying it back to the original.
+ m_oldTableReference->m_bTableCellOpen = false ;
+ m_oldTableReference->m_nTableDepth = 0;
+ }
+
}
else
{
commit 9ae556c626da301f3798c33dc7632c7c891f2a04
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 17:14:44 2014 +0000
Related: fdo#76457 set the edit fields to expand
the buttons remain too narrow, but that seems to be the case for all
the formula buttons
Change-Id: Ib7ecc6dffeed23459eddb1fc98140faf1a26296d
diff --git a/sc/uiconfig/scalc/ui/printareasdialog.ui b/sc/uiconfig/scalc/ui/printareasdialog.ui
index d52ef6d..e0b1f50 100644
--- a/sc/uiconfig/scalc/ui/printareasdialog.ui
+++ b/sc/uiconfig/scalc/ui/printareasdialog.ui
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkDialog" id="PrintAreasDialog">
<property name="can_focus">False</property>
@@ -72,24 +73,28 @@
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkFrame" id="printframe">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
@@ -112,6 +117,7 @@
<object class="foruilo-RefEdit" id="edprintarea">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="invisible_char">â</property>
<property name="width_chars">50</property>
</object>
@@ -126,8 +132,6 @@
<object class="GtkComboBoxText" id="lbprintarea">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
<items>
<item translatable="yes">- none -</item>
<item translatable="yes">- entire sheet -</item>
@@ -167,24 +171,28 @@
<object class="GtkFrame" id="rowframe">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="foruilo-RefEdit" id="edrepeatrow">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="invisible_char">â</property>
<property name="width_chars">50</property>
</object>
@@ -215,8 +223,6 @@
<object class="GtkComboBoxText" id="lbrepeatrow">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
<items>
<item translatable="yes">- none -</item>
<item translatable="yes">- user defined -</item>
@@ -254,24 +260,28 @@
<object class="GtkFrame" id="colframe">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="foruilo-RefEdit" id="edrepeatcol">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="invisible_char">â</property>
<property name="width_chars">50</property>
</object>
@@ -302,8 +312,6 @@
<object class="GtkComboBoxText" id="lbrepeatcol">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
<items>
<item translatable="yes">- none -</item>
<item translatable="yes">- user defined -</item>
commit e3d9b3406a2013cd4f9d4baf3a7800d1d95c2d90
Author: Khaled Hosny <khaledhosny at eglug.org>
Date: Fri Mar 21 15:27:33 2014 +0200
Fold psprint_config into vcl
The files are only used by the psprint stuff in vcl, so move them closer
to it. We should kill all of this anyway, but that is for another day.
Change-Id: Ie3b893c92d556333c9d8b041859d5e97604ace10
Reviewed-on: https://gerrit.libreoffice.org/8694
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 88119fc..6e3b90b 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -83,7 +83,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
oox \
package \
postprocess \
- psprint_config \
$(call gb_Helper_optional,PYUNO,pyuno) \
$(call gb_Helper_optional,QADEVOOO,qadevOOo) \
readlicense_oo \
diff --git a/psprint_config/Makefile b/psprint_config/Makefile
deleted file mode 100644
index ccb1c85..0000000
--- a/psprint_config/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-
-module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
-
-include $(module_directory)/../solenv/gbuild/partial_build.mk
-
-# vim: set noet sw=4 ts=4:
diff --git a/psprint_config/Module_psprint_config.mk b/psprint_config/Module_psprint_config.mk
deleted file mode 100644
index 041d7d1..0000000
--- a/psprint_config/Module_psprint_config.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This file incorporates work covered by the following license notice:
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed
-# with this work for additional information regarding copyright
-# ownership. The ASF licenses this file to you under the Apache
-# License, Version 2.0 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.apache.org/licenses/LICENSE-2.0 .
-#
-
-$(eval $(call gb_Module_Module,psprint_config))
-
-$(eval $(call gb_Module_add_targets,psprint_config,\
- Package_fontunxppds \
- Package_fontunxpsprint \
-))
-
-# vim: set noet sw=4:
diff --git a/scp2/source/ooo/file_extra_ooo.scp b/scp2/source/ooo/file_extra_ooo.scp
index ced1389..69eed78 100644
--- a/scp2/source/ooo/file_extra_ooo.scp
+++ b/scp2/source/ooo/file_extra_ooo.scp
@@ -81,19 +81,15 @@ File gid_File_Extra_Fontunxppds
Dir = FILELIST_DIR;
TXT_FILE_BODY;
Styles = (FILELIST);
- Name = "psprint_config_fontunxppds.filelist";
+ Name = "vcl_fontunxppds.filelist";
End
#endif
-#endif
-
-#ifdef UNX
-
File gid_File_Extra_Fontunxpsprint
Dir = FILELIST_DIR;
TXT_FILE_BODY;
Styles = (FILELIST, CONFIGFILE);
- Name = "psprint_config_fontunxpsprint.filelist";
+ Name = "vcl_fontunxpsprint.filelist";
End
#endif
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index bb2ad3b..fb5d04b 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -41,6 +41,8 @@ $(eval $(call gb_Module_add_targets,vcl,\
Library_vclplug_gen \
Library_desktop_detector \
StaticLibrary_headless \
+ Package_fontunxppds \
+ Package_fontunxpsprint \
))
ifneq ($(ENABLE_GTK),)
diff --git a/psprint_config/Package_fontunxppds.mk b/vcl/Package_fontunxppds.mk
similarity index 80%
rename from psprint_config/Package_fontunxppds.mk
rename to vcl/Package_fontunxppds.mk
index 781286f..2d9ea46 100644
--- a/psprint_config/Package_fontunxppds.mk
+++ b/vcl/Package_fontunxppds.mk
@@ -16,9 +16,9 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-$(eval $(call gb_Package_Package,psprint_config_fontunxppds,$(SRCDIR)/psprint_config/configuration/ppds))
+$(eval $(call gb_Package_Package,vcl_fontunxppds,$(SRCDIR)/vcl/unx/generic/printer/configuration/ppds))
-$(eval $(call gb_Package_add_files,psprint_config_fontunxppds,$(LIBO_SHARE_FOLDER)/psprint/driver,\
+$(eval $(call gb_Package_add_files,vcl_fontunxppds,$(LIBO_SHARE_FOLDER)/psprint/driver,\
SGENPRT.PS \
SGENT42.PS \
))
diff --git a/psprint_config/Package_fontunxpsprint.mk b/vcl/Package_fontunxpsprint.mk
similarity index 80%
rename from psprint_config/Package_fontunxpsprint.mk
rename to vcl/Package_fontunxpsprint.mk
index ab0aaf7..1ab2a56 100644
--- a/psprint_config/Package_fontunxpsprint.mk
+++ b/vcl/Package_fontunxpsprint.mk
@@ -16,9 +16,9 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-$(eval $(call gb_Package_Package,psprint_config_fontunxpsprint,$(SRCDIR)/psprint_config/configuration))
+$(eval $(call gb_Package_Package,vcl_fontunxpsprint,$(SRCDIR)/vcl/unx/generic/printer/configuration))
-$(eval $(call gb_Package_add_files,psprint_config_fontunxpsprint,$(LIBO_SHARE_FOLDER)/psprint,\
+$(eval $(call gb_Package_add_files,vcl_fontunxpsprint,$(LIBO_SHARE_FOLDER)/psprint,\
psprint.conf \
))
diff --git a/psprint_config/README b/vcl/unx/generic/printer/configuration/README
similarity index 100%
rename from psprint_config/README
rename to vcl/unx/generic/printer/configuration/README
diff --git a/psprint_config/configuration/ppds/SGENPRT.PS b/vcl/unx/generic/printer/configuration/ppds/SGENPRT.PS
similarity index 100%
rename from psprint_config/configuration/ppds/SGENPRT.PS
rename to vcl/unx/generic/printer/configuration/ppds/SGENPRT.PS
diff --git a/psprint_config/configuration/ppds/SGENT42.PS b/vcl/unx/generic/printer/configuration/ppds/SGENT42.PS
similarity index 100%
rename from psprint_config/configuration/ppds/SGENT42.PS
rename to vcl/unx/generic/printer/configuration/ppds/SGENT42.PS
diff --git a/psprint_config/configuration/psprint.conf b/vcl/unx/generic/printer/configuration/psprint.conf
similarity index 100%
rename from psprint_config/configuration/psprint.conf
rename to vcl/unx/generic/printer/configuration/psprint.conf
commit 3b1cca8c547ce53b2af29b3edecc22c7694a0621
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 16:57:27 2014 +0000
Related: fdo#74468 drop hard-coded 'sec' and use FUNIT_SECONDS
Change-Id: I11e2aa39d77c01446387b13ba4bc9f40b61a958a
diff --git a/sd/uiconfig/simpress/ui/slidetransitionspanel.ui b/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
index 2d7bde2..52836f3 100644
--- a/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
+++ b/sd/uiconfig/simpress/ui/slidetransitionspanel.ui
@@ -255,7 +255,6 @@
<property name="can_focus">True</property>
<property name="invisible_char">â</property>
<property name="invisible_char_set">True</property>
- <property name="format">sec</property>
<property name="digits">2</property>
<property name="spin_size">25</property>
</object>
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index ad67f9f..bd60588 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1592,12 +1592,7 @@ Size MetricField::CalcMinimumSize() const
bool MetricField::set_property(const OString &rKey, const OString &rValue)
{
- if (rKey == "format")
- {
- maCustomUnitText = OStringToOUString(rValue, RTL_TEXTENCODING_UTF8);
- meUnit = FUNIT_CUSTOM;
- }
- else if (rKey == "digits")
+ if (rKey == "digits")
SetDecimalDigits(rValue.toInt32());
else if (rKey == "spin-size")
SetSpinSize(rValue.toInt32());
commit 973ff09ee7e7a1926326db6accf9e3e40e901874
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 16:25:18 2014 +0000
coverity#982461 Unchecked dynamic_cast
Change-Id: I3933b2cd03b8e1dff7bcb106d841a429e4d0ba53
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 041cea7..014c3ec 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -1021,7 +1021,7 @@ void LngSvcMgr::GetGrammarCheckerDsp_Impl( sal_Bool bSetSvcList )
pGrammarDsp = dynamic_cast< GrammarCheckingIterator * >(xGCI.get());
xGrammarDsp = xGCI;
SAL_WARN_IF( pGrammarDsp == NULL, "linguistic", "failed to get implementation" );
- if (bSetSvcList)
+ if (bSetSvcList && pGrammarDsp)
SetCfgServiceLists( *pGrammarDsp );
}
}
commit 10be411f33c69db83cc5de410eaddf2d297608ae
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date: Fri Mar 21 17:34:19 2014 +0100
Remove opengl usage from svx until we can't solve building problems
Change-Id: I45b2e0f772f7bcc47bc2e0ce2c7639ef775b379b
diff --git a/include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx b/include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx
index 00e1dff..8781aa4 100644
--- a/include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx
+++ b/include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx
@@ -11,7 +11,6 @@
#define INCLUDED_SVX_SDR_CONTACT_VIEWOBJECTCONTACTOFOPENGL_HXX
#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
-#include <vcl/OpenGLContext.hxx>
class Window;
@@ -26,9 +25,6 @@ public:
protected:
Window* getWindow() const;
-
-private:
- OpenGLContext m_aOpenGLContext;
};
} // namespace sdr
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index b3c3521..f26479c 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -75,7 +75,6 @@ $(eval $(call gb_Library_use_libraries,svxcore,\
utl \
vcl \
xo \
- $(if $(filter FREEBSD LINUX MACOSX WNT,$(OS)),vclopengl) \
$(gb_UWINAPI) \
))
@@ -83,8 +82,6 @@ $(eval $(call gb_Library_use_externals,svxcore,\
boost_headers \
icuuc \
icu_headers \
- mesa_headers \
- glew \
))
$(eval $(call gb_Library_add_exception_objects,svxcore,\
diff --git a/svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx b/svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx
index 1689468..2cf0086 100644
--- a/svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx
@@ -18,9 +18,6 @@ ViewObjectContactOfOpenGLObj::ViewObjectContactOfOpenGLObj(
ObjectContact& rObjectContact, ViewContact& rViewContact )
: ViewObjectContactOfSdrObj( rObjectContact, rViewContact )
{
- m_aOpenGLContext.init(getWindow());
- // Set a dummy size to make the window visible
- m_aOpenGLContext.setWinSize(Size(200,200));
}
ViewObjectContactOfOpenGLObj::~ViewObjectContactOfOpenGLObj()
commit 40c8121fbeb89403418a90c77b88d13ad268d347
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Fri Mar 21 12:32:09 2014 +0000
Resolves: #i124474# on change of User Field via UNO-API...
trigger update to get dependent Input Fields updated.
(cherry picked from commit fc0c91c2d00157cb02cbe7b1d09cb950762e8145)
Conflicts:
sw/source/core/unocore/unofield.cxx
Change-Id: I0ead765729c93992103baca53924b7a127936b38
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 044dcb1..a416963 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -577,18 +577,29 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
}
}
}
- if( bSetValue )
+ if ( bSetValue )
{
// nothing special to be done here for the properties
// UNO_NAME_DATA_BASE_NAME and UNO_NAME_DATA_BASE_URL.
// We just call PutValue (empty string is allowed).
// Thus the last property set will be used as Data Source.
- sal_uInt16 nMId = GetFieldTypeMId( rPropertyName, *pType );
- if( USHRT_MAX != nMId )
- pType->PutValue( rValue, nMId );
+ const sal_uInt16 nMemberValueId = GetFieldTypeMId( rPropertyName, *pType );
+ if ( USHRT_MAX != nMemberValueId )
+ {
+ pType->PutValue( rValue, nMemberValueId );
+ if ( pType->Which() == RES_USERFLD )
+ {
+ // trigger update of User field in order to get depending Input Fields updated.
+ pType->UpdateFlds();
+ }
+ }
else
- throw beans::UnknownPropertyException(OUString( "Unknown property: " ) + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
+ {
+ throw beans::UnknownPropertyException(
+ OUString( "Unknown property: " ) + rPropertyName,
+ static_cast< cppu::OWeakObject * >( this ) );
+ }
}
}
else if (!pType && m_pImpl->m_pDoc && rPropertyName == UNO_NAME_NAME)
commit cbce7443b2fa0c1304ff94a54eb48da0c4518146
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 16:20:27 2014 +0000
missing another libspa
Change-Id: I1e9a9e97ea2f6bdd43e6143830a3ab45177f9b05
diff --git a/Repository.mk b/Repository.mk
index 4e1e379..9fd036e 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -323,9 +323,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
simplecanvas \
slideshow \
sot \
- $(if $(and $(filter unx,$(GUIBASE)),$(filter-out MACOSX,$(OS))), \
- $(if $(ENABLE_HEADLESS),,spa) \
- ) \
spell \
$(if $(ENABLE_HEADLESS),,spl) \
$(if $(DISABLE_SCRIPTING),,stringresource) \
commit 9cb77ae1d0ef6c820800adaa234a0fbb50465db6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 16:09:38 2014 +0000
coverity#982649 Missing break in switch
Change-Id: I25ffff8576aca6891060283c55eff7125a9d4681
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index c248b54..9209ea3 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3011,6 +3011,7 @@ SvxFrameDirection MakeDirection(sal_uInt16 nCode, bool bIsBiDi)
{
default:
OSL_ENSURE(eDir == 4, "unknown direction code, maybe it's a bitfield");
+ //fall-through
case 3:
eDir = bIsBiDi ? FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP; // #i38158# - Consider RTL tables
break;
commit 0c5d6e657244d54a1eb15d06159cd217516d666c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 16:01:51 2014 +0000
coverity#705313 Missing break in switch
Change-Id: I71c7c1af3f4ec804b1722003099869994199939d
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index ced4c19..826c1f6 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1494,6 +1494,7 @@ SvXMLImportContext *SwXMLTableContext::CreateChildContext( sal_uInt16 nPrefix,
break;
case XML_TOK_TABLE_HEADER_ROWS:
bHeader = sal_True;
+ //fall-through
case XML_TOK_TABLE_ROWS:
pContext = new SwXMLTableRowsContext_Impl( GetSwImport(), nPrefix,
rLocalName, xAttrList,
commit db4dc451efe6afe7a20a000b9ef4bbb2e94ac724
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:58:47 2014 +0000
coverity#705310 Missing break in switch
Change-Id: Ibadcc7c4da119989b57fcf96c5a2413f1346fca5
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index ea38549..cbf59bf 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -1125,6 +1125,7 @@ void W1_CHP::Out(Ww1Shell& rOut, Ww1Manager& rMan)
if (fsIcoGet())
switch(icoGet()) {
default: OSL_ENSURE(false, "Chpx");
+ //fall-through
case 0: { rOut.EndItem(RES_CHRATR_COLOR); } break;
case 1: { rOut << SvxColorItem(Color(COL_BLACK), RES_CHRATR_COLOR); } break;
case 2: { rOut << SvxColorItem(Color(COL_LIGHTBLUE), RES_CHRATR_COLOR); } break;
commit 37148c375504066839417eb4e6d0bd1dc161ed97
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:58:02 2014 +0000
coverity#705309 Missing break in switch
Change-Id: Ia1522c645793af8bc316885def415beb2a5d50d5
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index 3659f88..ea38549 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -1907,6 +1907,7 @@ void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/)
ReadDIB(aBmp, aOut, true);
pGraphic = new Graphic(aBmp);
}
+ //fall-through
default:
OSL_ENSURE(pPic->mfp.mmGet() == 97, "Ww1Picture");
}
commit d27b20b9c392ecbdf57c65d12c9cca85e4e05d57
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 16:15:19 2014 +0000
another hidden libspa usage
Change-Id: I523a9813c2b121342fc1bc31328ff8ce48f68c4d
diff --git a/solenv/gbuild/extensions/pre_MergedLibsList.mk b/solenv/gbuild/extensions/pre_MergedLibsList.mk
index 9cc2079..0388d96 100644
--- a/solenv/gbuild/extensions/pre_MergedLibsList.mk
+++ b/solenv/gbuild/extensions/pre_MergedLibsList.mk
@@ -82,7 +82,6 @@ gb_EXTRAMERGEDLIBS := \
$(if $(filter-out ANDROID IOS,$(OS)),scn) \
sd \
$(call gb_Helper_optional,DBCONNECTIVITY,sdbc2) \
- $(if $(filter unx,$(GUIBASE)),spa) \
spell \
svgfilter \
swd \
commit 172156ec8d2bfbfd4697d9e1676fe766b3c93069
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:55:56 2014 +0000
WaE: -Werror=unused-variable
Change-Id: I857fcd923788f086294f8f3e3105b44949d80e56
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 5e8ae2a..c2de240 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -160,7 +160,6 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
SfxViewFrame* pThisFrame = GetViewFrame();
bool bOle = GetViewFrame()->GetFrame().IsInPlace();
- SCTAB nTabCount = pDoc->GetTableCount();
SCTAB nTabSelCount = rMark.GetSelectCount();
SfxWhichIter aIter(rSet);
commit 87d1e5c27d33f79f45fff3a1c9d05f0d3662cfaa
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:48:11 2014 +0000
coverity#705459 Dereference null return value
Change-Id: Ib49e23529e34dfc4afda45f26eec15af67e9da68
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 057f014..1a23f7d 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -877,6 +877,9 @@ void OfaTreeOptionsDialog::ActivateLastSelection()
pEntry = aTreeLB.Next(pEntry);
}
+ if ( !pEntry )
+ return;
+
SvTreeListEntry* pParent = aTreeLB.GetParent(pEntry);
aTreeLB.Expand(pParent);
aTreeLB.MakeVisible(pParent);
commit 292ba61eae3318edd86ec0af4d8726189bc2affd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:46:37 2014 +0000
coverity#1000766 Dereference before null check
Change-Id: I539cb91511fe95d004044a98736b4a6b99f24a5b
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 7de3d81..093da2f 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -4212,9 +4212,8 @@ SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr,
// do glyph fallback if needed
// #105768# avoid fallback for very small font sizes
- if( aLayoutArgs.NeedFallback() )
- if( mpFontEntry && (mpFontEntry->maFontSelData.mnHeight >= 3) )
- pSalLayout = ImplGlyphFallbackLayout( pSalLayout, aLayoutArgs );
+ if (aLayoutArgs.NeedFallback() && mpFontEntry->maFontSelData.mnHeight >= 3)
+ pSalLayout = ImplGlyphFallbackLayout(pSalLayout, aLayoutArgs);
// position, justify, etc. the layout
pSalLayout->AdjustLayout( aLayoutArgs );
commit 85771a44ccc6404bbafbd5f70eff3c39ae85e507
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:41:49 2014 +0000
coverity#705975 Dereference before null check
Change-Id: I5499cba6f72c9bcf4b47363da7003fa9bc94dfa6
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 4615286..14e0c3c 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -2232,12 +2232,9 @@ OOXMLFastContextHandlerWrapper::OOXMLFastContextHandlerWrapper
uno::Reference<XFastContextHandler> xContext)
: OOXMLFastContextHandler(pParent), mxContext(xContext)
{
- if (pParent != NULL)
- {
- setId(pParent->getId());
- setToken(pParent->getToken());
- setPropertySet(pParent->getPropertySet());
- }
+ setId(pParent->getId());
+ setToken(pParent->getToken());
+ setPropertySet(pParent->getPropertySet());
}
OOXMLFastContextHandlerWrapper::~OOXMLFastContextHandlerWrapper()
commit ba811903a6eb12ec599ca8e84c97d2e6cfc48cb4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:40:42 2014 +0000
coverity#705974 Dereference before null check
Change-Id: I6286888f85214a82ad232dd26b7b23e175de39d4
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 667646b..4615286 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -147,8 +147,8 @@ OOXMLFastContextHandler::OOXMLFastContextHandler
mId(0),
mnDefine(0),
mnToken(OOXML_FAST_TOKENS_END),
- mpStream(NULL),
- mnTableDepth(0),
+ mpStream(pContext->mpStream),
+ mnTableDepth(pContext->mnTableDepth),
mnInstanceNumber(mnInstanceCount),
mnRefCount(0),
inPositionV(pContext->inPositionV),
@@ -157,13 +157,7 @@ OOXMLFastContextHandler::OOXMLFastContextHandler
m_bTookChoice(pContext->m_bTookChoice),
m_aSavedAlternateStates(pContext->m_aSavedAlternateStates)
{
- if (pContext != NULL)
- {
- mpStream = pContext->mpStream;
- mpParserState = pContext->mpParserState;
- mnTableDepth = pContext->mnTableDepth;
- m_xContext = pContext->m_xContext;
- }
+ mpParserState = pContext->mpParserState;
if (mpParserState.get() == NULL)
mpParserState.reset(new OOXMLParserState());
commit 94319e31f08310266280307be08f78311385ca6d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:38:08 2014 +0000
coverity#705953 Dereference before null check
Change-Id: Ia9d6af4d601b76dfb9e950fdb4bdaf283f3e985c
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 54437b4..dcb8bc6 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -3201,14 +3201,11 @@ void SwTokenWindow::AdjustScrolling()
}
else
{
- if(pFirstCtrl)
- {
- //if the control fits into the space then the first control must be at postion 0
- long nFirstPos = pFirstCtrl->GetPosPixel().X();
+ //if the control fits into the space then the first control must be at postion 0
+ long nFirstPos = pFirstCtrl->GetPosPixel().X();
- if(nFirstPos != 0)
- MoveControls(-nFirstPos);
- }
+ if(nFirstPos != 0)
+ MoveControls(-nFirstPos);
m_pRightScrollWin->Enable(false);
m_pLeftScrollWin->Enable(false);
commit 899da0c87348cc298fe8ab43c905eaaab977f781
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:36:42 2014 +0000
coverity#705956 Dereference before null check
Change-Id: I2058c5ab31763b0df483737e79ead6c980b966c7
diff --git a/sw/source/core/uibase/shells/annotsh.cxx b/sw/source/core/uibase/shells/annotsh.cxx
index f2602b7..beddafa 100644
--- a/sw/source/core/uibase/shells/annotsh.cxx
+++ b/sw/source/core/uibase/shells/annotsh.cxx
@@ -665,20 +665,15 @@ void SwAnnotationShell::GetState(SfxItemSet& rSet)
case SID_ATTR_CHAR_WEIGHT:
case SID_ATTR_CHAR_POSTURE:
{
- if ( pOLV )
- {
- sal_uInt16 nScriptType = pOLV->GetSelectedScriptType();
- SfxItemPool* pSecondPool = aEditAttr.GetPool()->GetSecondaryPool();
- if( !pSecondPool )
- pSecondPool = aEditAttr.GetPool();
- SvxScriptSetItem aSetItem( nSlotId, *pSecondPool );
- aSetItem.GetItemSet().Put( aEditAttr, false );
- const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
- if( pI )
- rSet.Put( *pI, nWhich );
- else
- rSet.InvalidateItem( nWhich );
- }
+ sal_uInt16 nScriptType = pOLV->GetSelectedScriptType();
+ SfxItemPool* pSecondPool = aEditAttr.GetPool()->GetSecondaryPool();
+ if( !pSecondPool )
+ pSecondPool = aEditAttr.GetPool();
+ SvxScriptSetItem aSetItem( nSlotId, *pSecondPool );
+ aSetItem.GetItemSet().Put( aEditAttr, false );
+ const SfxPoolItem* pI = aSetItem.GetItemOfScript( nScriptType );
+ if( pI )
+ rSet.Put( *pI, nWhich );
else
rSet.InvalidateItem( nWhich );
}
commit 511d8bbbec6bc95d92a3ac6bbac4c68622738706
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:33:53 2014 +0000
coverity#705966 Dereference before null check
Change-Id: I74507ce67f928bdeb626d4070dbd2a45cc126521
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index b439477..d957159 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -2332,7 +2332,7 @@ bool GetSfntTable( TrueTypeFont* ttf, int nSubtableIndex,
return false;
*pRawLength = ttf->tlens[ nSubtableIndex ];
*ppRawBytes = ttf->tables[ nSubtableIndex ];
- bool bOk = (*pRawLength > 0) && (ppRawBytes != NULL);
+ bool bOk = (*pRawLength > 0) && (*ppRawBytes != NULL);
return bOk;
}
commit d34bcb1053540a858958db8551bb2b4797caaf09
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:32:04 2014 +0000
coverity#705961 Dereference before null check
Change-Id: I0737bbc738779a4ef282c7eea1406a796e0d663d
diff --git a/sw/source/core/uibase/uno/SwXDocumentSettings.cxx b/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
index c8f6849..0f4a840 100644
--- a/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
@@ -293,9 +293,11 @@ void SwXDocumentSettings::_preSetValues ()
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
{
mpDocSh = mpModel->GetDocShell();
- mpDoc = mpDocSh->GetDoc();
+ if (NULL == mpDocSh)
+ throw UnknownPropertyException();
- if( NULL == mpDoc || NULL == mpDocSh )
+ mpDoc = mpDocSh->GetDoc();
+ if (NULL == mpDoc)
throw UnknownPropertyException();
}
commit 813a1ea12da7f588c22cf40bd1d6b227bf01a539
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:22:26 2014 +0000
coverity#705960 Dereference before null check
Change-Id: I39253ca1e50c57564b594401f69cef4b661dbd2a
diff --git a/sw/source/core/uibase/uno/SwXDocumentSettings.cxx b/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
index 877e805..c8f6849 100644
--- a/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
@@ -822,8 +822,10 @@ void SwXDocumentSettings::_preGetValues ()
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
{
mpDocSh = mpModel->GetDocShell();
+ if (NULL == mpDocSh)
+ throw UnknownPropertyException();
mpDoc = mpDocSh->GetDoc();
- if( NULL == mpDoc || NULL == mpDocSh )
+ if (NULL == mpDoc)
throw UnknownPropertyException();
}
commit e19de1925d41fb4af490df1c5b64ce737f5f9cf9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:50:58 2014 +0000
Updated core
Project: help b0fd711c33b96466e3be944fdc497f9c248e8b38
diff --git a/helpcontent2 b/helpcontent2
index 6a97b77..b0fd711 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 6a97b776ce1d7a6fc454203ece60ab506228d4e1
+Subproject commit b0fd711c33b96466e3be944fdc497f9c248e8b38
commit f2d009a675755136e2e06b2866bc055b06cea6c8
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Mar 21 11:28:59 2014 -0400
Make it harder to accidentally set print range to '- none -'.
And make the current print range behavior a bit more intuitive. People
often "remove" ranges to quickly clear any custom ranges if set. They
wouldn't expect this to actually set the print range to "none".
Also, change the wording of the menu item from "Remove" to "Clear", to
refect this behavior change.
Change-Id: I0369020fedf1c7463d718809875022adef697bf4
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index cdfd826..249b0ba 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -550,10 +550,10 @@
</node>
<node oor:name=".uno:DeletePrintArea" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
- <value xml:lang="en-US">~Remove Print Area</value>
+ <value xml:lang="en-US">~Clear Print Area</value>
</prop>
<prop oor:name="ContextLabel" oor:type="xs:string">
- <value xml:lang="en-US">~Remove</value>
+ <value xml:lang="en-US">~Clear</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index c74de5a..d8d4827 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -190,8 +190,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_DELETE_PRINTAREA:
{
+ // Clear currently defined print range if any, and reset it to
+ // print entire sheet which is the default.
OUString aEmpty;
- SetPrintRanges( false, &aEmpty, NULL, NULL, false ); // Druckbereich loeschen
+ SetPrintRanges(true, &aEmpty, NULL, NULL, false);
rReq.Done();
}
break;
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index af5cd66..5e8ae2a 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -191,21 +191,12 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
break;
case SID_DELETE_PRINTAREA:
- if ( nTabSelCount > 1 )
- {
- // #i22589# also take "Print Entire Sheet" into account here
- bool bHas = false;
- for (SCTAB i=0; !bHas && i<nTabCount; i++)
- bHas = rMark.GetTableSelect(i) && (pDoc->GetPrintRangeCount(i) || pDoc->IsPrintEntireSheet(i));
- if (!bHas)
- rSet.DisableItem( nWhich );
- }
- else if ( !pDoc->GetPrintRangeCount( nTab ) && !pDoc->IsPrintEntireSheet( nTab ) )
- rSet.DisableItem( nWhich );
if ( pDocShell && pDocShell->IsDocShared() )
{
rSet.DisableItem( nWhich );
}
+ else if (pDoc->IsPrintEntireSheet(nTab))
+ rSet.DisableItem(nWhich);
break;
case SID_STATUS_PAGESTYLE:
commit f5179bcbac9a0b33546e442a9e176b1791dff170
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:13:42 2014 +0000
just give the enclosing frame the required helpid
Change-Id: Ifb0209eaea4f738ac5b5826f924552465cccc272
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index ae09869..ce6fcc0 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -587,7 +587,6 @@ void AssignmentPersistentData::Commit()
m_pImpl->pFields[row * 2 + column] = get<ListBox>(OString("box") + OString::number(row * 2 + column));
m_pImpl->pFields[row * 2 + column]->SetSelectHdl(LINK(this, AddressBookSourceDialog, OnFieldSelect));
- m_pImpl->pFields[row * 2 + column]->SetHelpId("svt/ui/addresstemplatedialog/assign");
}
}
diff --git a/svtools/uiconfig/ui/addresstemplatedialog.ui b/svtools/uiconfig/ui/addresstemplatedialog.ui
index 01b4e76..65e708c 100644
--- a/svtools/uiconfig/ui/addresstemplatedialog.ui
+++ b/svtools/uiconfig/ui/addresstemplatedialog.ui
@@ -210,7 +210,7 @@
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame2">
+ <object class="GtkFrame" id="assign">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
commit 76ff20b5766758c4f4343064d744b2b330ab3885
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 15:11:56 2014 +0000
Updated core
Project: help 6a97b776ce1d7a6fc454203ece60ab506228d4e1
diff --git a/helpcontent2 b/helpcontent2
index f8aa950..6a97b77 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit f8aa9509d36c652b00e4c7c827dcdab62a218c56
+Subproject commit 6a97b776ce1d7a6fc454203ece60ab506228d4e1
commit 8b7adff61fb54aa383cec93f94debbfb77b52327
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 21 14:59:14 2014 +0000
Updated core
Project: help f8aa9509d36c652b00e4c7c827dcdab62a218c56
diff --git a/helpcontent2 b/helpcontent2
index 7182afe..f8aa950 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 7182afe0322254178ed9b6096a62c9cc8c6f3b62
+Subproject commit f8aa9509d36c652b00e4c7c827dcdab62a218c56
commit 09e064adc51bf4a26a4f316d42945be9cfbd2c95
Author: Jan Holesovsky <kendy at collabora.com>
Date: Fri Mar 21 14:24:36 2014 +0100
First check if this is the one we search for, then extract.
Change-Id: Ie98dc14b743983e68f126ed4b7a7f00b637957d3
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 5fc7c87..9c7ee32 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -666,13 +666,12 @@ writeAppProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xProp
uno::Sequence<beans::NamedValue> aStats = xProperties->getDocumentStatistics();
for (sal_Int32 i = 0; i < aStats.getLength(); ++i)
{
- sal_Int32 nValue = 0;
- if (aStats[i].Value >>= nValue)
+ if (aStats[i].Name == "ParagraphCount")
{
- OUString aValue = OUString::number(nValue);
- if (aStats[i].Name == "ParagraphCount")
+ sal_Int32 nValue = 0;
+ if (aStats[i].Value >>= nValue)
{
- writeElement(pAppProps, XML_Paragraphs, aValue);
+ writeElement(pAppProps, XML_Paragraphs, OUString::number(nValue));
break;
}
}
commit fdacaab2485fa42648ae96348b9ad6a9e1f49424
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Mar 21 15:31:21 2014 +0100
DOCX import: implement progressbar
The design follows what we do in case of ODT import already: read the
number of paragraphs from the document statistics metadata, and then
estimate progress based on the number of already imported paragraphs.
Change-Id: I042cc6014c05ca7456fdf1c8d7247b615ba3a244
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index 4bbc31b..7f104ab 100644
--- a/writerfilter/inc/ooxml/OOXMLDocument.hxx
+++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx
@@ -24,6 +24,7 @@
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <resourcemodel/WW8ResourceModel.hxx>
+#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/xml/sax/XParser.hpp>
#include <com/sun/star/xml/sax/XFastParser.hpp>
#include <com/sun/star/xml/sax/XFastTokenHandler.hpp>
@@ -269,7 +270,7 @@ public:
createStream(OOXMLStream::Pointer_t pStream, const OUString & rId);
static OOXMLDocument *
- createDocument(OOXMLStream::Pointer_t pStream);
+ createDocument(OOXMLStream::Pointer_t pStream, const uno::Reference<task::XStatusIndicator>& xStatusIndicator);
};
diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx
index b6615a9..d75e56b 100644
--- a/writerfilter/source/filter/ImportFilter.cxx
+++ b/writerfilter/source/filter/ImportFilter.cxx
@@ -105,7 +105,8 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes
if( eType == writerfilter::dmapper::DOCUMENT_OOXML )
{
writerfilter::ooxml::OOXMLStream::Pointer_t pDocStream = writerfilter::ooxml::OOXMLDocumentFactory::createStream(m_xContext, xInputStream, bRepairStorage);
- writerfilter::ooxml::OOXMLDocument::Pointer_t pDocument(writerfilter::ooxml::OOXMLDocumentFactory::createDocument(pDocStream));
+ uno::Reference<task::XStatusIndicator> xStatusIndicator = aMediaDesc.getUnpackedValueOrDefault(MediaDescriptor::PROP_STATUSINDICATOR(), uno::Reference<task::XStatusIndicator>());
+ writerfilter::ooxml::OOXMLDocument::Pointer_t pDocument(writerfilter::ooxml::OOXMLDocumentFactory::createDocument(pDocStream, xStatusIndicator));
uno::Reference<frame::XModel> xModel(m_xDstDoc, uno::UNO_QUERY_THROW);
pDocument->setModel(xModel);
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 60ac009..83cdb58 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -17,8 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <comphelper/sequenceashashmap.hxx>
+
#include <com/sun/star/xml/sax/XParser.hpp>
+#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/xml/sax/SAXException.hpp>
#include <com/sun/star/xml/dom/DocumentBuilder.hpp>
#include <com/sun/star/embed/XHierarchicalStorageAccess.hpp>
@@ -30,6 +33,11 @@
#include "OOXMLPropertySetImpl.hxx"
#include "ooxmlLoggers.hxx"
+#include <tools/resmgr.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/settings.hxx>
+#include <svx/dialogs.hrc>
+
#include <iostream>
// this extern variable is declared in OOXMLStreamImpl.hxx
@@ -46,12 +54,17 @@ TagLogger::Pointer_t debug_logger(TagLogger::getInstance("DEBUG"));
using namespace ::std;
-OOXMLDocumentImpl::OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream)
+OOXMLDocumentImpl::OOXMLDocumentImpl(OOXMLStream::Pointer_t pStream, const uno::Reference<task::XStatusIndicator>& xStatusIndicator)
: mpStream(pStream)
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list