[Libreoffice-commits] core.git: include/vbahelper oovbaapi/ooo sc/source sw/source vbahelper/source

2023-03-13 Thread Baole Fang (via logerrit)
 include/vbahelper/vbaapplicationbase.hxx  |1 -
 oovbaapi/ooo/vba/XApplicationBase.idl |1 -
 oovbaapi/ooo/vba/excel/XApplication.idl   |1 +
 sc/source/ui/vba/vbaapplication.cxx   |6 ++
 sc/source/ui/vba/vbaapplication.hxx   |1 +
 sw/source/ui/vba/vbaapplication.cxx   |2 +-
 vbahelper/source/vbahelper/vbaapplicationbase.cxx |5 -
 7 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit a6edfaaeb02169d90d8b414c480257b1ec0bcaad
Author: Baole Fang 
AuthorDate: Sun Mar 12 22:14:31 2023 -0400
Commit: Mike Kaganski 
CommitDate: Mon Mar 13 15:16:24 2023 +

tdf#150281: Fix CentimetersToPoints in Calc

Originally, CentimetersToPoints was implemented as a base method for
Writer and Calc. They are both using the same implementation,
which is correct for Writer, but wrong for Calc.
Since their behavior should be different,
I remove the base method and implement a correct one for Calc.

Change-Id: If957accdd9be86a96ca6fb711502e49a79bf3223
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148745
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/include/vbahelper/vbaapplicationbase.hxx 
b/include/vbahelper/vbaapplicationbase.hxx
index 24bac8204d7e..6c8f4460fa00 100644
--- a/include/vbahelper/vbaapplicationbase.hxx
+++ b/include/vbahelper/vbaapplicationbase.hxx
@@ -73,7 +73,6 @@ public:
 
 virtual css::uno::Any SAL_CALL Run( const OUString& MacroName, const 
css::uno::Any& varg1, const css::uno::Any& varg2, const css::uno::Any& varg3, 
const css::uno::Any& varg4, const css::uno::Any& varg5, const css::uno::Any& 
varg6, const css::uno::Any& varg7, const css::uno::Any& varg8, const 
css::uno::Any& varg9, const css::uno::Any& varg10, const css::uno::Any& varg11, 
const css::uno::Any& varg12, const css::uno::Any& varg13, const css::uno::Any& 
varg14, const css::uno::Any& varg15, const css::uno::Any& varg16, const 
css::uno::Any& varg17, const css::uno::Any& varg18, const css::uno::Any& 
varg19, const css::uno::Any& varg20, const css::uno::Any& varg21, const 
css::uno::Any& varg22, const css::uno::Any& varg23, const css::uno::Any& 
varg24, const css::uno::Any& varg25, const css::uno::Any& varg26, const 
css::uno::Any& varg27, const css::uno::Any& varg28, const css::uno::Any& 
varg29, const css::uno::Any& varg30 ) override;
 virtual void SAL_CALL OnTime( const css::uno::Any& aEarliestTime, const 
OUString& aFunction, const css::uno::Any& aLatestTime, const css::uno::Any& 
aSchedule ) override;
-virtual float SAL_CALL CentimetersToPoints( float Centimeters ) override;
 virtual void SAL_CALL Undo() override;
 virtual void SAL_CALL Quit() override;
 
diff --git a/oovbaapi/ooo/vba/XApplicationBase.idl 
b/oovbaapi/ooo/vba/XApplicationBase.idl
index c4e968872546..3a8612516366 100644
--- a/oovbaapi/ooo/vba/XApplicationBase.idl
+++ b/oovbaapi/ooo/vba/XApplicationBase.idl
@@ -37,7 +37,6 @@ interface XApplicationBase
 any CommandBars( [in] any Index );
 any Run([in] string MacroName, [in] /*Optional*/ any varg1, [in] 
/*Optional*/ any varg2, [in] /*Optional*/ any varg3, [in] /*Optional*/ any 
varg4, [in] /*Optional*/ any varg5, [in] /*Optional*/ any varg6, [in] 
/*Optional*/ any varg7, [in] /*Optional*/ any varg8, [in] /*Optional*/ any 
varg9, [in] /*Optional*/ any varg10, [in] /*Optional*/ any varg11, [in] 
/*Optional*/ any varg12, [in] /*Optional*/ any varg13, [in] /*Optional*/ any 
varg14, [in] /*Optional*/ any varg15, [in] /*Optional*/ any varg16, [in] 
/*Optional*/ any varg17, [in] /*Optional*/ any varg18, [in] /*Optional*/ any 
varg19, [in] /*Optional*/ any varg20, [in] /*Optional*/ any varg21, [in] 
/*Optional*/ any varg22, [in] /*Optional*/ any varg23, [in] /*Optional*/ any 
varg24, [in] /*Optional*/ any varg25, [in] /*Optional*/ any varg26, [in] 
/*Optional*/ any varg27, [in] /*Optional*/ any varg28, [in] /*Optional*/ any 
varg29, [in] /*Optional*/ any varg30);
 void OnTime( [in] any EarliestTime, [in] string Procedure, [in] any 
LatestTime, [in] any Schedule );
-float CentimetersToPoints([in] float Centimeters );
 void Undo();
 };
 
diff --git a/oovbaapi/ooo/vba/excel/XApplication.idl 
b/oovbaapi/ooo/vba/excel/XApplication.idl
index c51640abe7e4..bcdc11672c15 100644
--- a/oovbaapi/ooo/vba/excel/XApplication.idl
+++ b/oovbaapi/ooo/vba/excel/XApplication.idl
@@ -89,6 +89,7 @@ interface XApplication
 raises(com::sun::star::script::BasicErrorException);
 XRange Union([in] XRange Arg1, [in] XRange Arg2, [in] /*Optional*/ any 
Arg3, [in] /*Optional*/ any Arg4, [in] /*Optional*/ any Arg5, [in] /*Optional*/ 
any Arg6, [in] /*Optional*/ any Arg7, [in] /*Optional*/ any Arg8, [in] 
/*Optional*/ any Arg9, [in] /*Optional*/ any Arg10, [in] /*Optional*/ any 
Arg11, [in] /*Optional*/ any Arg12, [in] /*Optional*/ any Arg13, [in] 
/*Optional*/ any Arg14, [in] /*Optional*/ any Arg15, [in] /*Optional*/ any 
Arg16

[Libreoffice-commits] core.git: include/vbahelper sc/qa sc/source sw/source vbahelper/source

2023-02-20 Thread Hannah Meeks (via logerrit)
 include/vbahelper/vbafontbase.hxx  |8 ++-
 sc/qa/extras/testdocuments/BGR-RGBTest.xls |binary
 sc/qa/extras/vba-macro-test.cxx|2 +
 sc/source/ui/vba/vbafont.cxx   |2 -
 sw/source/ui/vba/vbafont.cxx   |   11 +-
 sw/source/ui/vba/vbafont.hxx   |1 
 vbahelper/source/vbahelper/vbafontbase.cxx |   30 ++---
 7 files changed, 35 insertions(+), 19 deletions(-)

New commits:
commit 0548269ca03f093c41f6292e783cc6c77328808e
Author: Hannah Meeks 
AuthorDate: Fri Dec 23 21:54:01 2022 +
Commit: Mike Kaganski 
CommitDate: Mon Feb 20 16:55:31 2023 +

VBA: Remove conversions in writer from OORGBTOXLRGB (XLRGB is actually BGR!)

Enum to store if document is Writer or Calc because font colors are treated
differently depending on this:

In writer the colors come in as RGB but in calc they are in BGR and both 
palettes
are in RBG so we only need this conversion for calc.

Includes testdoc for calc - to show this still works

Change-Id: I79d9d585dbfc527c0781543ce1f1095c4db190b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144788
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/include/vbahelper/vbafontbase.hxx 
b/include/vbahelper/vbafontbase.hxx
index 732a67bc1d1e..d388715c93ba 100644
--- a/include/vbahelper/vbafontbase.hxx
+++ b/include/vbahelper/vbafontbase.hxx
@@ -44,9 +44,13 @@ typedef  InheritedHelperInterfaceWeakImpl< ov::XFontBase > 
VbaFontBase_BASE;
 
 class VBAHELPER_DLLPUBLIC VbaFontBase : public VbaFontBase_BASE
 {
+public:
+enum Component { WORD, EXCEL };
+
 protected:
 css::uno::Reference< css::beans::XPropertySet > mxFont;
 css::uno::Reference< css::container::XIndexAccess > mxPalette;
+Component meWhich;
 bool mbFormControl;
 
 public:
@@ -79,7 +83,9 @@ public:
 const css::uno::Reference< css::uno::XComponentContext >& xContext,
 const css::uno::Reference< css::container::XIndexAccess >& xPalette,
 const css::uno::Reference< css::beans::XPropertySet >& xPropertySet,
-bool bFormControl = false );
+Component eWhich,
+bool bFormControl = false);
+
 virtual ~VbaFontBase() override;// {}
 
 // Attributes
diff --git a/sc/qa/extras/testdocuments/BGR-RGBTest.xls 
b/sc/qa/extras/testdocuments/BGR-RGBTest.xls
new file mode 100755
index ..e2bf43fb0e92
Binary files /dev/null and b/sc/qa/extras/testdocuments/BGR-RGBTest.xls differ
diff --git a/sc/qa/extras/vba-macro-test.cxx b/sc/qa/extras/vba-macro-test.cxx
index 04e4efece2cf..2464996d2812 100644
--- a/sc/qa/extras/vba-macro-test.cxx
+++ b/sc/qa/extras/vba-macro-test.cxx
@@ -466,6 +466,8 @@ void VBAMacroTest::testVba()
 { OUString("vba_findFunction."),
   OUString(
   
"vnd.sun.Star.script:VBAProject.testMacros.test?language=Basic&location=document")
 },
+{ OUString("BGR-RGBTest."),
+  
OUString("vnd.sun.Star.script:VBAProject.Module1.test?language=Basic&location=document")
 }
 };
 OUString sTempDir;
 OUString sTempDirURL;
diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx
index 99afd919bea7..db49f013499c 100644
--- a/sc/source/ui/vba/vbafont.cxx
+++ b/sc/source/ui/vba/vbafont.cxx
@@ -37,7 +37,7 @@ ScVbaFont::ScVbaFont(
 const ScVbaPalette& dPalette,
 const uno::Reference< beans::XPropertySet >& xPropertySet,
 ScCellRangeObj* pRangeObj, bool bFormControl ) :
-ScVbaFont_BASE( xParent, xContext, dPalette.getPalette(), xPropertySet, 
bFormControl ),
+ScVbaFont_BASE( xParent, xContext, dPalette.getPalette(), xPropertySet, 
Component::EXCEL, bFormControl ),
 mpRangeObj( pRangeObj )
 {
 }
diff --git a/sw/source/ui/vba/vbafont.cxx b/sw/source/ui/vba/vbafont.cxx
index de37a6c74e18..91a31ec66470 100644
--- a/sw/source/ui/vba/vbafont.cxx
+++ b/sw/source/ui/vba/vbafont.cxx
@@ -111,7 +111,8 @@ public:
 
 }
 
-SwVbaFont::SwVbaFont( const uno::Reference< XHelperInterface >& xParent, const 
uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< 
container::XIndexAccess >& xPalette, uno::Reference< css::beans::XPropertySet > 
const & xPropertySet ) : SwVbaFont_BASE( xParent, xContext, xPalette, 
xPropertySet )
+SwVbaFont::SwVbaFont( const uno::Reference< XHelperInterface >& xParent, const 
uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< 
container::XIndexAccess >& xPalette, uno::Reference< css::beans::XPropertySet > 
const & xPropertySet )
+: SwVbaFont_BASE( xParent, xContext, xPalette, xPropertySet, 
Component::WORD )
 {
 }
 
@@ -141,14 +142,6 @@ SwVbaFont::getServiceImplName()
 return "SwVbaFont";
 }
 
-void SAL_CALL
-SwVbaFont::setColorIndex( const uno::Any& _colorindex )
-{
-sal_Int32 nIndex = 0;
-_colorindex >>= nIndex;
-return setColor( mxPalette->getByIndex( nIndex ) );
-}
-
 uno::Any SAL_CALL
 SwVbaFont::getCo

[Libreoffice-commits] core.git: include/vbahelper sw/qa sw/source

2022-12-02 Thread Justin Luth (via logerrit)
 include/vbahelper/vbacollectionimpl.hxx |   17 +
 sw/qa/core/data/docm/testModernVBA.docm |binary
 sw/source/ui/vba/vbacontentcontrol.cxx  |6 +++---
 sw/source/ui/vba/vbacontentcontrols.cxx |   15 ---
 4 files changed, 24 insertions(+), 14 deletions(-)

New commits:
commit 567c9066933b4c02377368e17a3b32f7ab7c5451
Author: Justin Luth 
AuthorDate: Wed Nov 23 20:45:09 2022 -0500
Commit: Justin Luth 
CommitDate: Sat Dec 3 00:45:41 2022 +

tdf#151548 ContentControls vba: allow search by name/float

This so-called modern content control is rather terrible for
VBA programmers. It has no modifiable ID!
Instead, there is a random _signed-integer_ as a unique id.
How descriptive...

Since it is an integer, it can't be passed to Item(),
because then it would be an index lookup.
Instead, you can pass it as a float (indicated by a #)
or as a _unsigned-integer_ string.

Recently the ID was preserved for content control import/export,
so we can now round out our VBA to find content controls by name.

make CppunitTest_sw_macros_test CPPUNIT_TEST_NAME=testVba

Change-Id: I387a287505e17d3768bad5ed954136e532ca70e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143196
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/include/vbahelper/vbacollectionimpl.hxx 
b/include/vbahelper/vbacollectionimpl.hxx
index 90bfb51d59a5..2e5184721a83 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -294,19 +294,28 @@ public:
 
 virtual css::uno::Any SAL_CALL Item(const css::uno::Any& Index1, const 
css::uno::Any& /*not processed in this base class*/) override
 {
-if ( Index1.getValueTypeClass() != css::uno::TypeClass_STRING )
+OUString aStringSheet;
+if (Index1.getValueTypeClass() == css::uno::TypeClass_DOUBLE)
+{
+// This is needed for ContentControls, where the unique integer ID
+// can be passed as float to simulate a "by name" lookup.
+double fIndex = 0;
+Index1 >>= fIndex;
+aStringSheet = OUString::number(fIndex);
+}
+else if (Index1.getValueTypeClass() != css::uno::TypeClass_STRING)
 {
 sal_Int32 nIndex = 0;
-
 if ( !( Index1 >>= nIndex ) )
 {
 throw  css::lang::IndexOutOfBoundsException( "Couldn't convert 
index to Int32" );
 }
+
 return  getItemByIntIndex( nIndex );
 }
-OUString aStringSheet;
+else
+Index1 >>= aStringSheet;
 
-Index1 >>= aStringSheet;
 return getItemByStringIndex( aStringSheet );
 }
 
diff --git a/sw/qa/core/data/docm/testModernVBA.docm 
b/sw/qa/core/data/docm/testModernVBA.docm
index be7d99a24b84..49e53b615622 100644
Binary files a/sw/qa/core/data/docm/testModernVBA.docm and 
b/sw/qa/core/data/docm/testModernVBA.docm differ
diff --git a/sw/source/ui/vba/vbacontentcontrol.cxx 
b/sw/source/ui/vba/vbacontentcontrol.cxx
index da3f3ec6f4ee..0a156e35c96b 100644
--- a/sw/source/ui/vba/vbacontentcontrol.cxx
+++ b/sw/source/ui/vba/vbacontentcontrol.cxx
@@ -473,9 +473,9 @@ uno::Any SwVbaContentControl::getDropdownListEntries()
 
 OUString SwVbaContentControl::getID()
 {
-//const std::shared_ptr& pCC = 
m_rCC.GetContentControl().GetContentControl();
-//return OUString::number(static_cast(pCC->GetId()));
-return OUString();
+const std::shared_ptr& pCC = 
m_rCC.GetContentControl().GetContentControl();
+// This signed integer is treated in VBA as if it was an unsigned int.
+return OUString::number(static_cast(pCC->GetId()));
 }
 
 sal_Int32 SwVbaContentControl::getLevel()
diff --git a/sw/source/ui/vba/vbacontentcontrols.cxx 
b/sw/source/ui/vba/vbacontentcontrols.cxx
index 4ef73f5d196e..e39094df357a 100644
--- a/sw/source/ui/vba/vbacontentcontrols.cxx
+++ b/sw/source/ui/vba/vbacontentcontrols.cxx
@@ -65,15 +65,16 @@ lcl_getContentControl(std::u16string_view sName, 
std::u16string_view sTag,
 && sTitle != 
pControl->GetContentControl().GetContentControl()->GetAlias())
 continue;
 
-//OUString sID = OUString::number(static_cast(
-//pControl->GetContentControl().GetContentControl()->GetId()));
-//if (!sName.empty() && sName != sID)
-//continue;
+// When treated as a name, consider the integer ID to be unsigned
+const OUString sID = OUString::number(static_cast(
+pControl->GetContentControl().GetContentControl()->GetId()));
+if (!sName.empty() && sName != sID)
+continue;
 
-//if (pElementNames)
-//vElementNames.push_back(sID);
+if (pElementNames)
+vElementNames.push_back(sID);
 
-if (rIndex == nCounter /*|| !sName.empty()*/)
+if (rIndex ==

[Libreoffice-commits] core.git: include/vbahelper oovbaapi/ooo sw/qa sw/source vbahelper/source

2022-10-17 Thread Justin Luth (via logerrit)
 include/vbahelper/vbahelper.hxx  |4 
 oovbaapi/ooo/vba/word/XWordBasic.idl |1 +
 sw/qa/core/data/docm/testVBA.docm|binary
 sw/source/ui/vba/vbawordbasic.cxx|   13 +
 sw/source/ui/vba/vbawordbasic.hxx|1 +
 vbahelper/source/vbahelper/vbahelper.cxx |   21 +
 6 files changed, 40 insertions(+)

New commits:
commit 55628d6b258f77eac8a34a1a8f6bbcbf09fd97cc
Author: Justin Luth 
AuthorDate: Thu Oct 13 17:22:52 2022 -0400
Commit: Miklos Vajna 
CommitDate: Mon Oct 17 14:14:53 2022 +0200

sw vba: add WordBasic.MsgBox

The unit test just consists of adding a
"WordBasic.MsgBox()" to the vba code in testVBA.docm.

make CppunitTest_sw_macros_test

or just open the file manually for an easy-to-run experience.

Change-Id: I38edfee42649fcc85f0f535a2c9861c45038fa0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141347
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index 533d5e3698b6..9be2b900a019 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -131,6 +132,9 @@ namespace ooo::vba
 VBAHELPER_DLLPUBLIC bool setPropertyValue( css::uno::Sequence< 
css::beans::PropertyValue >& aProp, const OUString& aName, const css::uno::Any& 
aValue );
 VBAHELPER_DLLPUBLIC void setOrAppendPropertyValue( css::uno::Sequence< 
css::beans::PropertyValue >& aProp, const OUString& aName, const css::uno::Any& 
aValue );
 
+VBAHELPER_DLLPUBLIC bool executeRunTimeLibrary(const 
std::u16string_view& rSbRtl_command,
+   SbxArray* pParameters);
+
 class VBAHELPER_DLLPUBLIC Millimeter
 {
 //Factor to translate between points and hundredths of millimeters:
diff --git a/oovbaapi/ooo/vba/word/XWordBasic.idl 
b/oovbaapi/ooo/vba/word/XWordBasic.idl
index 66c867f09364..7cc1efe8bd56 100644
--- a/oovbaapi/ooo/vba/word/XWordBasic.idl
+++ b/oovbaapi/ooo/vba/word/XWordBasic.idl
@@ -42,6 +42,7 @@ interface XWordBasic
 any DocMaximize( [in] any State );
 void AppShow( [in] any WindowName );
 any AppCount();
+void MsgBox( [in] string Prompt );
 void ScreenUpdating( [in] /*optional*/ any On );
 };
 
diff --git a/sw/qa/core/data/docm/testVBA.docm 
b/sw/qa/core/data/docm/testVBA.docm
index c02e353c3c3e..a2609feb6cd0 100644
Binary files a/sw/qa/core/data/docm/testVBA.docm and 
b/sw/qa/core/data/docm/testVBA.docm differ
diff --git a/sw/source/ui/vba/vbawordbasic.cxx 
b/sw/source/ui/vba/vbawordbasic.cxx
index ae59cf245f55..f08ed4e0daa8 100644
--- a/sw/source/ui/vba/vbawordbasic.cxx
+++ b/sw/source/ui/vba/vbawordbasic.cxx
@@ -22,6 +22,8 @@
 #include "vbamailmerge.hxx"
 #include "vbawordbasic.hxx"
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -242,6 +244,17 @@ css::uno::Any SAL_CALL SwWordBasic::AppCount()
 return css::uno::Any(sal_Int32(2));
 }
 
+void SAL_CALL SwWordBasic::MsgBox(const OUString& sPrompt)
+{
+SbxArrayRef pArgs = new SbxArray;
+SbxVariable* pVar = new SbxVariable();
+pVar->PutString(sPrompt);
+pArgs->Put(pVar, 1);
+
+if (!executeRunTimeLibrary(u"MsgBox", pArgs.get()))
+SAL_WARN("sw.vba", "failed to execute runtime library function MsgBox 
(" << sPrompt << ")");
+}
+
 void SAL_CALL SwWordBasic::ScreenUpdating(const uno::Any& On)
 {
 sal_Int32 nOn;
diff --git a/sw/source/ui/vba/vbawordbasic.hxx 
b/sw/source/ui/vba/vbawordbasic.hxx
index 75f8a05a3210..05589f0c58c5 100644
--- a/sw/source/ui/vba/vbawordbasic.hxx
+++ b/sw/source/ui/vba/vbawordbasic.hxx
@@ -86,6 +86,7 @@ public:
 virtual css::uno::Any SAL_CALL DocMaximize(const css::uno::Any& State) 
override;
 virtual void SAL_CALL AppShow(const css::uno::Any& WindowName) override;
 virtual css::uno::Any SAL_CALL AppCount() override;
+virtual void SAL_CALL MsgBox(const OUString& sPrompt) override;
 virtual void SAL_CALL ScreenUpdating(const css::uno::Any& On) override;
 };
 
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx 
b/vbahelper/source/vbahelper/vbahelper.cxx
index 4e71cb582565..2722f627e9ba 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -746,6 +746,27 @@ void setOrAppendPropertyValue( uno::Sequence< 
beans::PropertyValue >& aProp, con
 pProp[ nLength ].Value = aValue;
 }
 
+bool executeRunTimeLibrary(const std::u16string_view& rSbRtl_command, 
SbxArray* pParameters)
+{
+StarBASIC* pBasic = dynamic_cast< StarBASIC* 
>(StarBASIC::GetActiveModule()->GetParent());
+if (!pBasic)
+return false;
+
+SbxObject* pRunTimeLibrary = pBasic->GetRtl();
+if (!pRunTimeLibrary)
+return false;
+
+SbxVariable* pFound = pRunTimeLibrary->Find(OUString(rSbRtl_command), 
SbxClassType::Me

[Libreoffice-commits] core.git: include/vbahelper sc/source vbahelper/source

2022-10-07 Thread Justin Luth (via logerrit)
 include/vbahelper/vbaeventshelperbase.hxx  |2 ++
 sc/source/ui/vba/vbaeventshelper.cxx   |5 +++--
 vbahelper/source/vbahelper/vbaeventshelperbase.cxx |   17 +
 3 files changed, 22 insertions(+), 2 deletions(-)

New commits:
commit 6834fda784f3066a89838cd6cda4fe945f4c7904
Author: Justin Luth 
AuthorDate: Thu Oct 6 20:00:07 2022 -0400
Commit: Justin Luth 
CommitDate: Fri Oct 7 23:48:36 2022 +0200

related tdf#148806 xls/x vba: no auto_open if Auto_Open module

The presence of an Auto_Close module prevents any
auto_close subroutines from running.

Interestingly, Word is different. It doesn't care at all
if such a module is present. (In fact, it uses that
module's main() as an AutoClose if there is no
Sub AutoClose.)

Change-Id: I83a80b7f016dcf2ad3b7fd931acacb6f788241a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141036
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/include/vbahelper/vbaeventshelperbase.hxx 
b/include/vbahelper/vbaeventshelperbase.hxx
index 0126db442ee8..e7038da7ab75 100644
--- a/include/vbahelper/vbaeventshelperbase.hxx
+++ b/include/vbahelper/vbaeventshelperbase.hxx
@@ -78,6 +78,8 @@ public:
 
 // little helpers -
 
+bool hasModule(const OUString& rModuleName);
+
 /** Helper to execute event handlers without throwing any exceptions. */
 void processVbaEventNoThrow( sal_Int32 nEventId, const css::uno::Sequence< 
css::uno::Any >& rArgs );
 
diff --git a/sc/source/ui/vba/vbaeventshelper.cxx 
b/sc/source/ui/vba/vbaeventshelper.cxx
index bd00fdcac3bd..d412af36b466 100644
--- a/sc/source/ui/vba/vbaeventshelper.cxx
+++ b/sc/source/ui/vba/vbaeventshelper.cxx
@@ -659,7 +659,8 @@ bool ScVbaEventsHelper::implPrepareEvent( EventQueue& 
rEventQueue,
 rEventQueue.emplace_back(WORKBOOK_ACTIVATE );
 uno::Sequence< uno::Any > aArgs{ 
uno::Any(mxModel->getCurrentController()) };
 rEventQueue.emplace_back( WORKBOOK_WINDOWACTIVATE, aArgs );
-rEventQueue.emplace_back(AUTO_OPEN );
+if (!hasModule("Auto_Open"))
+rEventQueue.emplace_back(AUTO_OPEN );
 // remember initial selection
 maOldSelection <<= mxModel->getCurrentSelection();
 }
@@ -779,7 +780,7 @@ void ScVbaEventsHelper::implPostProcessEvent( EventQueue& 
rEventQueue,
 case WORKBOOK_BEFORECLOSE:
 /*  Execute Auto_Close only if not cancelled by event handler, but
 before UI asks user whether to cancel closing the document. */
-if( !bCancel )
+if (!bCancel && !hasModule("Auto_Close"))
 rEventQueue.emplace_back(AUTO_CLOSE );
 break;
 }
diff --git a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx 
b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx
index 1f92e449a156..dbd345c9bac7 100644
--- a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx
+++ b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx
@@ -320,6 +320,23 @@ void VbaEventsHelperBase::ensureVBALibrary()
 }
 }
 
+bool VbaEventsHelperBase::hasModule(const OUString& rModuleName)
+{
+if (rModuleName.isEmpty())
+return false;
+
+bool bRet = false;
+try
+{
+ensureVBALibrary();
+bRet = mxModuleInfos->hasModuleInfo(rModuleName);
+}
+catch (uno::Exception&)
+{}
+
+return bRet;
+}
+
 sal_Int32 VbaEventsHelperBase::getModuleType( const OUString& rModuleName )
 {
 // make sure the VBA library exists


[Libreoffice-commits] core.git: include/vbahelper sc/source vbahelper/source

2022-08-06 Thread Mike Kaganski (via logerrit)
 include/vbahelper/vbahelper.hxx  |3 ---
 sc/source/ui/vba/vbasheetobject.cxx  |   10 ++
 sc/source/ui/vba/vbasheetobjects.cxx |   10 ++
 vbahelper/source/vbahelper/vbahelper.cxx |   26 +++---
 4 files changed, 23 insertions(+), 26 deletions(-)

New commits:
commit ed4ffba1c180c74e3b9c3aadc279ff92bda8ab5a
Author: Mike Kaganski 
AuthorDate: Sat Aug 6 09:28:57 2022 +0300
Commit: Mike Kaganski 
CommitDate: Sat Aug 6 12:10:19 2022 +0200

Drop some conversion from vbahelper; use usual functions where needed

Change-Id: I71bea54f095072a0e403bfc7aa48a0f0f9a0ebaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137891
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index 07c5fce6ec6b..01366d9ad771 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -121,11 +121,8 @@ namespace ooo::vba
 /// @throws css::uno::RuntimeException
 VBAHELPER_DLLPUBLIC OUString getAnyAsString( const css::uno::Any& 
pvargItem );
 VBAHELPER_DLLPUBLIC OUString VBAToRegexp(const OUString &rIn); // 
needs to be in a uno service ( already this code is duplicated in basic )
-VBAHELPER_DLLPUBLIC double getPixelTo100thMillimeterConversionFactor( 
const css::uno::Reference< css::awt::XDevice >& xDevice, bool bVertical);
 VBAHELPER_DLLPUBLIC double PointsToPixels( const css::uno::Reference< 
css::awt::XDevice >& xDevice, double fPoints, bool bVertical);
 VBAHELPER_DLLPUBLIC double PixelsToPoints( const css::uno::Reference< 
css::awt::XDevice >& xDevice, double fPixels, bool bVertical);
-VBAHELPER_DLLPUBLIC sal_Int32 PointsToHmm( double fPoints );
-VBAHELPER_DLLPUBLIC double HmmToPoints( sal_Int32 nHmm );
 VBAHELPER_DLLPUBLIC PointerStyle getPointerStyle( const 
css::uno::Reference< css::frame::XModel >& );
 VBAHELPER_DLLPUBLIC void setCursorHelper( const css::uno::Reference< 
css::frame::XModel >& xModel, PointerStyle nPointer, bool bOverWrite );
 /// @throws css::uno::RuntimeException
diff --git a/sc/source/ui/vba/vbasheetobject.cxx 
b/sc/source/ui/vba/vbasheetobject.cxx
index 52513095fac4..ff37ab8addfb 100644
--- a/sc/source/ui/vba/vbasheetobject.cxx
+++ b/sc/source/ui/vba/vbasheetobject.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -39,6 +40,15 @@ using namespace ::ooo::vba;
 constexpr OUStringLiteral gaListenerType = u"XActionListener";
 constexpr OUStringLiteral gaEventMethod = u"actionPerformed";
 
+static double HmmToPoints(double nHmm)
+{
+return o3tl::convert(nHmm, o3tl::Length::mm100, o3tl::Length::pt);
+}
+
+static sal_Int32 PointsToHmm(double fPoints)
+{
+return std::round(o3tl::convert(fPoints, o3tl::Length::pt, 
o3tl::Length::mm100));
+}
 
 ScVbaButtonCharacters::ScVbaButtonCharacters(
 const uno::Reference< XHelperInterface >& rxParent,
diff --git a/sc/source/ui/vba/vbasheetobjects.cxx 
b/sc/source/ui/vba/vbasheetobjects.cxx
index 32e025a3ca7e..a6a9a1233b8e 100644
--- a/sc/source/ui/vba/vbasheetobjects.cxx
+++ b/sc/source/ui/vba/vbasheetobjects.cxx
@@ -19,6 +19,7 @@
 
 #include "vbasheetobjects.hxx"
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -58,9 +59,10 @@ bool lclGetProperty( Type& orValue, const uno::Reference< 
beans::XPropertySet >&
 
 @throws uno::RuntimeException
 */
-double lclPointsToHmm( const uno::Any& rPoints )
+sal_Int32 lclPointsToHmm( const uno::Any& rPoints )
 {
-return PointsToHmm( ::rtl::math::approxFloor( rPoints.get< double >() / 
0.75 ) * 0.75 );
+return 
std::round(o3tl::convert(::rtl::math::approxFloor(rPoints.get() / 0.75) 
* 0.75,
+o3tl::Length::pt, o3tl::Length::mm100));
 }
 
 } // namespace
@@ -349,8 +351,8 @@ uno::Any SAL_CALL ScVbaGraphicObjectsBase::Add( const 
uno::Any& rLeft, const uno
 /*  Extract double values from passed Anys (the lclPointsToHmm() helper
 function will throw a RuntimeException on any error), and convert from
 points to 1/100 mm. */
-awt::Point aPos( static_cast(lclPointsToHmm( rLeft )),  
static_cast(lclPointsToHmm( rTop )) );
-awt::Size aSize( static_cast(lclPointsToHmm( rWidth )), 
static_cast(lclPointsToHmm( rHeight )) );
+awt::Point aPos( lclPointsToHmm( rLeft ),  lclPointsToHmm( rTop ) );
+awt::Size aSize( lclPointsToHmm( rWidth ), lclPointsToHmm( rHeight ) );
 // TODO: translate coordinates for RTL sheets
 if( (aPos.X < 0) || (aPos.Y < 0) || (aSize.Width <= 0) || (aSize.Height <= 
0) )
 throw uno::RuntimeException();
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx 
b/vbahelper/source/vbahelper/vbahelper.cxx
index a6e7ac1da2aa..be4098ce6ae9 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -62,6 +62,7 @@
 #include 
 #include 
 #include 
+#include 
 

[Libreoffice-commits] core.git: include/vbahelper vbahelper/source

2022-05-03 Thread Stephan Bergmann (via logerrit)
 include/vbahelper/vbacollectionimpl.hxx  |6 +-
 vbahelper/source/msforms/vbabutton.cxx   |2 
 vbahelper/source/msforms/vbacheckbox.cxx |6 +-
 vbahelper/source/msforms/vbacombobox.cxx |8 +-
 vbahelper/source/msforms/vbacontrol.cxx  |   14 ++--
 vbahelper/source/msforms/vbacontrols.cxx |6 +-
 vbahelper/source/msforms/vbaframe.cxx|2 
 vbahelper/source/msforms/vbalabel.cxx|4 -
 vbahelper/source/msforms/vbalistbox.cxx  |   16 ++---
 vbahelper/source/msforms/vbalistcontrolhelper.cxx|8 +-
 vbahelper/source/msforms/vbamultipage.cxx|6 +-
 vbahelper/source/msforms/vbaradiobutton.cxx  |6 +-
 vbahelper/source/msforms/vbascrollbar.cxx|8 +-
 vbahelper/source/msforms/vbaspinbutton.cxx   |4 -
 vbahelper/source/msforms/vbatextbox.cxx  |4 -
 vbahelper/source/msforms/vbatogglebutton.cxx |8 +-
 vbahelper/source/msforms/vbauserform.cxx |4 -
 vbahelper/source/vbahelper/vbaapplicationbase.cxx|4 -
 vbahelper/source/vbahelper/vbacolorformat.cxx|4 -
 vbahelper/source/vbahelper/vbacommandbar.cxx |6 +-
 vbahelper/source/vbahelper/vbacommandbarcontrol.cxx  |   12 ++--
 vbahelper/source/vbahelper/vbacommandbarcontrols.cxx |8 +-
 vbahelper/source/vbahelper/vbacommandbars.cxx|2 
 vbahelper/source/vbahelper/vbadocumentsbase.cxx  |   10 +--
 vbahelper/source/vbahelper/vbafillformat.cxx |   10 +--
 vbahelper/source/vbahelper/vbafontbase.cxx   |   10 +--
 vbahelper/source/vbahelper/vbaglobalbase.cxx |4 -
 vbahelper/source/vbahelper/vbahelper.cxx |6 +-
 vbahelper/source/vbahelper/vbalineformat.cxx |   14 ++--
 vbahelper/source/vbahelper/vbapictureformat.cxx  |4 -
 vbahelper/source/vbahelper/vbashape.cxx  |   28 -
 vbahelper/source/vbahelper/vbashaperange.cxx |   56 +--
 vbahelper/source/vbahelper/vbashapes.cxx |   40 ++---
 vbahelper/source/vbahelper/vbatextframe.cxx  |8 +-
 34 files changed, 169 insertions(+), 169 deletions(-)

New commits:
commit 46972be699730f4dc381a19b5d50a02eae407a71
Author: Stephan Bergmann 
AuthorDate: Mon May 2 22:24:37 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Tue May 3 13:35:43 2022 +0200

Just use Any ctor instead of makeAny in vbahelper

Change-Id: Ie985584ad55f69817294e45b11b7c832d39c9bf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133737
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/vbahelper/vbacollectionimpl.hxx 
b/include/vbahelper/vbacollectionimpl.hxx
index c6a0b85aee75..7b3af3e55511 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -167,7 +167,7 @@ private:
 virtual css::uno::Any SAL_CALL nextElement(  ) override
 {
 if ( hasMoreElements() )
-return css::uno::makeAny( *mIt++ );
+return css::uno::Any( *mIt++ );
 throw css::container::NoSuchElementException();
 }
 };
@@ -184,7 +184,7 @@ public:
 {
 if ( !hasByName(aName) )
 throw css::container::NoSuchElementException();
-return css::uno::makeAny( *cachePos );
+return css::uno::Any( *cachePos );
 }
 virtual css::uno::Sequence< OUString > SAL_CALL getElementNames(  ) 
override
 {
@@ -220,7 +220,7 @@ public:
 if ( Index < 0 || Index >= getCount() )
 throw css::lang::IndexOutOfBoundsException();
 
-return css::uno::makeAny( mXNamedVec[ Index ] );
+return css::uno::Any( mXNamedVec[ Index ] );
 
 }
 // XEnumerationAccess
diff --git a/vbahelper/source/msforms/vbabutton.cxx 
b/vbahelper/source/msforms/vbabutton.cxx
index b1d07ba9911c..38d5c94028be 100644
--- a/vbahelper/source/msforms/vbabutton.cxx
+++ b/vbahelper/source/msforms/vbabutton.cxx
@@ -40,7 +40,7 @@ VbaButton::getCaption()
 void SAL_CALL
 VbaButton::setCaption( const OUString& _caption )
 {
-m_xProps->setPropertyValue( "Label", uno::makeAny( _caption ) );
+m_xProps->setPropertyValue( "Label", uno::Any( _caption ) );
 }
 
 sal_Bool SAL_CALL VbaButton::getAutoSize()
diff --git a/vbahelper/source/msforms/vbacheckbox.cxx 
b/vbahelper/source/msforms/vbacheckbox.cxx
index 61e2216c2f44..13922a6de7a4 100644
--- a/vbahelper/source/msforms/vbacheckbox.cxx
+++ b/vbahelper/source/msforms/vbacheckbox.cxx
@@ -40,7 +40,7 @@ ScVbaCheckbox::getCaption()
 void SAL_CALL
 ScVbaCheckbox::setCaption( const OUString& _caption )
 {
-m_xProps->setPropertyValue( "Label", uno::makeAny( _caption ) );
+m_xProps->setPropertyValue( "Label", uno::Any( _caption ) );
 }
 
 uno::Any SAL_CALL
@@ -53,7 +53,7 @@ ScVbaCheckbox::getValue()
 //return uno::makeAny( 

[Libreoffice-commits] core.git: include/vbahelper vcl/inc

2020-06-17 Thread Stephan Bergmann (via logerrit)
 include/vbahelper/vbahelperinterface.hxx |2 +-
 vcl/inc/vclstatuslistener.hxx|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1dbb338842a9725cfbad73007f69244a13a0bea7
Author: Stephan Bergmann 
AuthorDate: Wed Jun 17 17:29:09 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 17 19:51:04 2020 +0200

Adapt to C++20 CWG2237

... "Can 
a
template-id name a constructor?", as implemented by GCC 11 trunk since
 "c++: C++20 DR 2237, disallow
simple-template-id in cdtor."

Change-Id: I2113a3968549103e1b35fb17d7f12770ba0086d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96547
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/vbahelper/vbahelperinterface.hxx 
b/include/vbahelper/vbahelperinterface.hxx
index 5feb4ab83eba..0bbf18992ec3 100644
--- a/include/vbahelper/vbahelperinterface.hxx
+++ b/include/vbahelper/vbahelperinterface.hxx
@@ -108,7 +108,7 @@ class SAL_DLLPUBLIC_TEMPLATE 
InheritedHelperInterfaceWeakImpl : public Inherited
 {
 typedef InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper< Ifc... > > 
Base;
 public:
-InheritedHelperInterfaceWeakImpl< Ifc... >( const css::uno::Reference< 
ov::XHelperInterface >& xParent, const css::uno::Reference< 
css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}
+InheritedHelperInterfaceWeakImpl( const css::uno::Reference< 
ov::XHelperInterface >& xParent, const css::uno::Reference< 
css::uno::XComponentContext >& xContext ) : Base( xParent, xContext ) {}
 };
 
 
diff --git a/vcl/inc/vclstatuslistener.hxx b/vcl/inc/vclstatuslistener.hxx
index 2652befcd4cc..fb6d876ef6a2 100644
--- a/vcl/inc/vclstatuslistener.hxx
+++ b/vcl/inc/vclstatuslistener.hxx
@@ -24,7 +24,7 @@
 template  class VclStatusListener final : public cppu::WeakImplHelper 
< css::frame::XStatusListener>
 {
 public:
-VclStatusListener(T* widget, const OUString& aCommand);
+VclStatusListener(T* widget, const OUString& aCommand);
 
 private:
 VclPtr mWidget; /** The widget on which actions are performed */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vbahelper vbahelper/source

2020-03-16 Thread Noel Grandin (via logerrit)
 include/vbahelper/vbacollectionimpl.hxx  |2 +-
 include/vbahelper/vbadialogbase.hxx  |2 +-
 include/vbahelper/vbadocumentsbase.hxx   |2 +-
 include/vbahelper/vbaeventshelperbase.hxx|4 ++--
 include/vbahelper/vbafontbase.hxx|2 +-
 include/vbahelper/vbahelper.hxx  |6 +++---
 include/vbahelper/vbashape.hxx   |2 +-
 vbahelper/source/msforms/vbacontrol.cxx  |4 ++--
 vbahelper/source/msforms/vbacontrols.cxx |4 ++--
 vbahelper/source/msforms/vbacontrols.hxx |4 ++--
 vbahelper/source/msforms/vbalistcontrolhelper.cxx|4 ++--
 vbahelper/source/msforms/vbamultipage.cxx|2 +-
 vbahelper/source/msforms/vbatextbox.hxx  |2 +-
 vbahelper/source/vbahelper/vbacolorformat.hxx|2 +-
 vbahelper/source/vbahelper/vbacommandbar.hxx |4 ++--
 vbahelper/source/vbahelper/vbacommandbarcontrol.hxx  |2 +-
 vbahelper/source/vbahelper/vbacommandbarcontrols.hxx |2 +-
 17 files changed, 25 insertions(+), 25 deletions(-)

New commits:
commit 1133c399ff7a5d33c5351f776cc24d3b48592eba
Author: Noel Grandin 
AuthorDate: Sun Mar 15 18:32:13 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Mar 16 08:17:02 2020 +0100

Revert "loplugin:constfields in vbahelper"

This reverts commit cc34b5a4c2d231de3882508654f15765d29f44c9.

Change-Id: I891826d88dd4e8bc8e6896889f4c1880c798080f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90543
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/vbahelper/vbacollectionimpl.hxx 
b/include/vbahelper/vbacollectionimpl.hxx
index 05c9e37bf638..73058d0f4b7c 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -238,7 +238,7 @@ typedef InheritedHelperInterfaceImpl< Ifc... > BaseColBase;
 protected:
 css::uno::Reference< css::container::XIndexAccess > m_xIndexAccess;
 css::uno::Reference< css::container::XNameAccess > m_xNameAccess;
-bool const mbIgnoreCase;
+bool mbIgnoreCase;
 
 /// @throws css::uno::RuntimeException
 virtual css::uno::Any getItemByStringIndex( const OUString& sIndex )
diff --git a/include/vbahelper/vbadialogbase.hxx 
b/include/vbahelper/vbadialogbase.hxx
index c5578f10d009..4c7a2636917a 100644
--- a/include/vbahelper/vbadialogbase.hxx
+++ b/include/vbahelper/vbadialogbase.hxx
@@ -45,7 +45,7 @@ typedef InheritedHelperInterfaceWeakImpl< ov::XDialogBase > 
VbaDialogBase_BASE;
 class VBAHELPER_DLLPUBLIC VbaDialogBase : public VbaDialogBase_BASE
 {
 protected:
-sal_Int32 const mnIndex;
+sal_Int32 mnIndex;
 css::uno::Reference< css::frame::XModel > m_xModel;
 public:
 VbaDialogBase( const css::uno::Reference< ov::XHelperInterface >& xParent, 
const css::uno::Reference< css::uno::XComponentContext >& xContext, const 
css::uno::Reference< css::frame::XModel >& xModel, sal_Int32 nIndex 
):VbaDialogBase_BASE( xParent, xContext ), mnIndex( nIndex ), m_xModel( xModel 
) {}
diff --git a/include/vbahelper/vbadocumentsbase.hxx 
b/include/vbahelper/vbadocumentsbase.hxx
index 6530d734a0c9..ac6d316a0256 100644
--- a/include/vbahelper/vbadocumentsbase.hxx
+++ b/include/vbahelper/vbadocumentsbase.hxx
@@ -56,7 +56,7 @@ public:
 };
 
 private:
-DOCUMENT_TYPE const meDocType;
+DOCUMENT_TYPE meDocType;
 
 public:
 /// @throws css::uno::RuntimeException
diff --git a/include/vbahelper/vbaeventshelperbase.hxx 
b/include/vbahelper/vbaeventshelperbase.hxx
index f1bf3a805da9..91c8bf72c7c5 100644
--- a/include/vbahelper/vbaeventshelperbase.hxx
+++ b/include/vbahelper/vbaeventshelperbase.hxx
@@ -119,8 +119,8 @@ protected:
 
 struct EventQueueEntry
 {
-sal_Int32 const mnEventId;
-css::uno::Sequence< css::uno::Any > const maArgs;
+sal_Int32 mnEventId;
+css::uno::Sequence< css::uno::Any > maArgs;
 /*implicit*/ EventQueueEntry( sal_Int32 nEventId ) : mnEventId( 
nEventId ) {}
 EventQueueEntry( sal_Int32 nEventId, const css::uno::Sequence< 
css::uno::Any >& rArgs ) : mnEventId( nEventId ), maArgs( rArgs ) {}
 };
diff --git a/include/vbahelper/vbafontbase.hxx 
b/include/vbahelper/vbafontbase.hxx
index d12e13ddfbf1..32c8270e1783 100644
--- a/include/vbahelper/vbafontbase.hxx
+++ b/include/vbahelper/vbafontbase.hxx
@@ -47,7 +47,7 @@ class VBAHELPER_DLLPUBLIC VbaFontBase : public 
VbaFontBase_BASE
 protected:
 css::uno::Reference< css::beans::XPropertySet > mxFont;
 css::uno::Reference< css::container::XIndexAccess > mxPalette;
-bool const mbFormControl;
+bool mbFormControl;
 
 public:
 // use local constants there is no need to expose these constants
diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index d130c4e6ea1c..f56b34730c08 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -

[Libreoffice-commits] core.git: include/vbahelper include/vcl uui/source vbahelper/source vcl/inc vcl/ios vcl/osx vcl/qa vcl/qt5 vcl/source vcl/unx vcl/win

2019-12-24 Thread Noel Grandin (via logerrit)
 include/vbahelper/vbaaccesshelper.hxx  |2 
 include/vbahelper/vbaeventshelperbase.hxx  |2 
 include/vcl/dockwin.hxx|4 
 include/vcl/idle.hxx   |6 -
 include/vcl/strhelper.hxx  |2 
 include/vcl/syswin.hxx |4 
 include/vcl/task.hxx   |6 -
 include/vcl/timer.hxx  |6 -
 include/vcl/transfer.hxx   |2 
 uui/source/services.cxx|2 
 vbahelper/source/msforms/service.cxx   |2 
 vbahelper/source/vbahelper/vbaeventshelperbase.cxx |2 
 vcl/inc/unx/printergfx.hxx |2 
 vcl/inc/win/saldata.hxx|2 
 vcl/ios/DataFlavorMapping.cxx  |4 
 vcl/ios/HtmlFmtFlt.cxx |   12 +-
 vcl/osx/DataFlavorMapping.cxx  |2 
 vcl/osx/HtmlFmtFlt.cxx |   12 +-
 vcl/qa/cppunit/timer.cxx   |4 
 vcl/qt5/Qt5Transferable.cxx|4 
 vcl/source/app/idle.cxx|6 -
 vcl/source/app/scheduler.cxx   |6 -
 vcl/source/app/svdata.cxx  |2 
 vcl/source/app/timer.cxx   |6 -
 vcl/source/components/factory.cxx  |2 
 vcl/source/control/field2.cxx  |   10 -
 vcl/source/control/throbber.cxx|2 
 vcl/source/filter/ixbm/xbmread.cxx |4 
 vcl/source/filter/ixpm/xpmread.cxx |4 
 vcl/source/filter/wmf/wmfwr.cxx|4 
 vcl/source/font/Feature.cxx|   10 -
 vcl/source/font/OpenTypeFeatureDefinitonList.cxx   |   12 +-
 vcl/source/font/fontcharmap.cxx|6 -
 vcl/source/fontsubset/xlat.cxx |2 
 vcl/source/gdi/WidgetDefinitionReader.cxx  |4 
 vcl/source/gdi/pdfwriter_impl.cxx  |  114 ++---
 vcl/source/gdi/pdfwriter_impl.hxx  |6 -
 vcl/source/opengl/OpenGLContext.cxx|2 
 vcl/source/outdev/text.cxx |4 
 vcl/source/treelist/inetimg.cxx|4 
 vcl/source/treelist/transfer.cxx   |8 -
 vcl/source/treelist/transfer2.cxx  |2 
 vcl/source/window/builder.cxx  |2 
 vcl/unx/generic/app/i18n_cb.cxx|4 
 vcl/unx/generic/dtrans/X11_selection.cxx   |2 
 vcl/unx/generic/fontmanager/fontmanager.cxx|2 
 vcl/unx/generic/print/common_gfx.cxx   |   12 +-
 vcl/unx/generic/print/printerjob.cxx   |2 
 vcl/unx/generic/print/psputil.cxx  |   10 -
 vcl/unx/generic/print/psputil.hxx  |6 -
 vcl/unx/generic/printer/ppdparser.cxx  |   10 -
 vcl/unx/gtk3/a11y/gtk3atkaction.cxx|4 
 vcl/win/app/saldata.cxx|2 
 vcl/win/window/salframe.cxx|   12 +-
 54 files changed, 185 insertions(+), 185 deletions(-)

New commits:
commit a2f1be46f29dad0923bee8a93ab1aecdbccb332b
Author: Noel Grandin 
AuthorDate: Tue Dec 24 10:47:38 2019 +0200
Commit: Noel Grandin 
CommitDate: Tue Dec 24 11:03:58 2019 +0100

sal_Char->char in vcl

Change-Id: I4359b7042f98586e2c9f5529d83d769cdf3d033c
Reviewed-on: https://gerrit.libreoffice.org/85775
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/vbahelper/vbaaccesshelper.hxx 
b/include/vbahelper/vbaaccesshelper.hxx
index 3dd3be21f6fa..ce55e01e22ff 100644
--- a/include/vbahelper/vbaaccesshelper.hxx
+++ b/include/vbahelper/vbaaccesshelper.hxx
@@ -51,7 +51,7 @@ namespace ooo
 }
 
 /// @throws css::uno::Exception
-inline css::uno::Reference< css::uno::XInterface > 
createVBAUnoAPIServiceWithArgs( SfxObjectShell const * pShell,  const sal_Char* 
_pAsciiName, const css::uno::Sequence< css::uno::Any >& aArgs )
+inline css::uno::Reference< css::uno::XInterface > 
createVBAUnoAPIServiceWithArgs( SfxObjectShell const * pShell,  const char* 
_pAsciiName, const css::uno::Sequence< css::uno::Any >& aArgs )
 {
 OSL_PRECOND( pShell, "createVBAUnoAPIService: no shell!" );
 OUString sVarName( OUString::createFromAscii( _pAsciiName ) );
diff --git a/include/vbahelper/vbaeventshelperbase.hxx 
b/include/vbahelper/vbaeventshelperbase.hxx
index 0b4c9ba681df..f1bf3a805da9 100644
--- a/include/vbahelper/vbaeventshelperbase.hxx
+++ b/include/vbahelper/vbaeventshelperbase.hxx
@@ -112,7 +112,7 @@ protected:
 void registerEventHandler(
 sal_Int32 nEventId,
 sal_Int32 nModuleType,
-const 

[Libreoffice-commits] core.git: include/vbahelper

2019-10-31 Thread Noel Grandin (via logerrit)
 include/vbahelper/vbacollectionimpl.hxx |4 ++--
 include/vbahelper/vbahelper.hxx |5 +++--
 include/vbahelper/vbapropvalue.hxx  |2 +-
 include/vbahelper/vbareturntypes.hxx|2 +-
 include/vbahelper/vbashaperange.hxx |2 +-
 include/vbahelper/vbashapes.hxx |2 +-
 6 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 32c53b465bc2052c2756f12294699fabae754756
Author: Noel Grandin 
AuthorDate: Thu Oct 31 08:12:55 2019 +0200
Commit: Noel Grandin 
CommitDate: Thu Oct 31 12:40:10 2019 +0100

loplugin:finalclasses in vbahelper

Change-Id: I4f940ef52a17a315b74cea0f0218e9a9a610e78b
Reviewed-on: https://gerrit.libreoffice.org/81826
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/vbahelper/vbacollectionimpl.hxx 
b/include/vbahelper/vbacollectionimpl.hxx
index 26853ad9077c..f545bb5c48c8 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -66,7 +66,7 @@ typedef ::cppu::WeakImplHelper< css::container::XEnumeration 
> EnumerationHelper
 used to provide an enumeration from an index container with other objects
 (e.g. UNO objects) where construction of the VBA objects is needed first.
  */
-class VBAHELPER_DLLPUBLIC SimpleIndexAccessToEnumeration : public 
EnumerationHelper_BASE
+class VBAHELPER_DLLPUBLIC SimpleIndexAccessToEnumeration final : public 
EnumerationHelper_BASE
 {
 public:
 /// @throws css::uno::RuntimeException
@@ -144,7 +144,7 @@ public:
 
 
 template< typename OneIfc >
-class XNamedObjectCollectionHelper : public ::cppu::WeakImplHelper< 
css::container::XNameAccess,
+class XNamedObjectCollectionHelper final : public ::cppu::WeakImplHelper< 
css::container::XNameAccess,
 
css::container::XIndexAccess,
 
css::container::XEnumerationAccess >
 {
diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index f32498ff0451..d130c4e6ea1c 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -191,7 +191,7 @@ public:
 void setTop(double _fTop);
 };
 
-class VBAHELPER_DLLPUBLIC ConcreteXShapeGeometryAttributes : public 
AbstractGeometryAttributes
+class VBAHELPER_DLLPUBLIC ConcreteXShapeGeometryAttributes final : public 
AbstractGeometryAttributes
 {
 std::unique_ptr< ShapeHelper > m_pShapeHelper;
 public:
@@ -209,7 +209,8 @@ public:
 
 #define VBA_LEFT "PositionX"
 #define VBA_TOP "PositionY"
-class VBAHELPER_DLLPUBLIC UserFormGeometryHelper : public 
AbstractGeometryAttributes
+
+class VBAHELPER_DLLPUBLIC UserFormGeometryHelper final : public 
AbstractGeometryAttributes
 {
 public:
 UserFormGeometryHelper(
diff --git a/include/vbahelper/vbapropvalue.hxx 
b/include/vbahelper/vbapropvalue.hxx
index 7c9e4bdda8ab..ee6443f08a34 100644
--- a/include/vbahelper/vbapropvalue.hxx
+++ b/include/vbahelper/vbapropvalue.hxx
@@ -41,7 +41,7 @@ protected:
 };
 
 
-class VBAHELPER_DLLPUBLIC ScVbaPropValue : public ::cppu::WeakImplHelper< 
ov::XPropValue >
+class VBAHELPER_DLLPUBLIC ScVbaPropValue final : public 
::cppu::WeakImplHelper< ov::XPropValue >
 {
 PropListener* m_pListener;
 public:
diff --git a/include/vbahelper/vbareturntypes.hxx 
b/include/vbahelper/vbareturntypes.hxx
index 746107358214..7893a72cdbd8 100644
--- a/include/vbahelper/vbareturntypes.hxx
+++ b/include/vbahelper/vbareturntypes.hxx
@@ -43,7 +43,7 @@ namespace ooo
 };
 
 typedef DefaultReturnHelper< sal_Int32, ov::msforms::XReturnInteger > 
ReturnInteger_BASE;
-class ReturnInteger : public ReturnInteger_BASE
+class ReturnInteger final : public ReturnInteger_BASE
 {
 public:
 ReturnInteger( sal_Int32 nValue ) : ReturnInteger_BASE( nValue ){}
diff --git a/include/vbahelper/vbashaperange.hxx 
b/include/vbahelper/vbashaperange.hxx
index 4b8261ffa6cc..2560dbe99f5f 100644
--- a/include/vbahelper/vbashaperange.hxx
+++ b/include/vbahelper/vbashaperange.hxx
@@ -51,7 +51,7 @@ namespace ooo { namespace vba {
 
 typedef CollTestImplHelper< ov::msforms::XShapeRange > ScVbaShapeRange_BASE;
 
-class VBAHELPER_DLLPUBLIC ScVbaShapeRange : public ScVbaShapeRange_BASE
+class VBAHELPER_DLLPUBLIC ScVbaShapeRange final : public ScVbaShapeRange_BASE
 {
 private:
 css::uno::Reference< css::drawing::XDrawPage > m_xDrawPage;
diff --git a/include/vbahelper/vbashapes.hxx b/include/vbahelper/vbashapes.hxx
index 4a23b13d10c0..ad4dc93fbf20 100644
--- a/include/vbahelper/vbashapes.hxx
+++ b/include/vbahelper/vbashapes.hxx
@@ -51,7 +51,7 @@ namespace ooo { namespace vba {
 
 typedef CollTestImplHelper< ov::msforms::XShapes > ScVbaShapes_BASE;
 
-class VBAHELPER_DLLPUBLIC ScVbaShapes : public ScVbaShapes_BASE
+class VBAHELPER_DLLPUBLIC ScVbaShapes final : public ScVbaShapes_BASE
 {
 private:
 css::uno::Reference< css::drawing::XShapes > m_xShapes;
__

[Libreoffice-commits] core.git: include/vbahelper vbahelper/source

2019-09-26 Thread Noel Grandin (via logerrit)
 include/vbahelper/vbadocumentbase.hxx  |2 +-
 include/vbahelper/vbahelper.hxx|2 +-
 include/vbahelper/vbawindowbase.hxx|6 +++---
 vbahelper/source/msforms/vbacontrol.cxx|2 +-
 vbahelper/source/msforms/vbacontrol.hxx|2 +-
 vbahelper/source/vbahelper/vbacommandbarhelper.cxx |2 +-
 vbahelper/source/vbahelper/vbacommandbarhelper.hxx |2 +-
 vbahelper/source/vbahelper/vbahelper.cxx   |2 +-
 vbahelper/source/vbahelper/vbawindowbase.cxx   |6 +++---
 9 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit f04bd7975292d297b72e8bb23aa74a2a5198aa23
Author: Noel Grandin 
AuthorDate: Thu Sep 26 03:32:12 2019 +0200
Commit: Noel Grandin 
CommitDate: Thu Sep 26 09:05:31 2019 +0200

loplugin:constmethod in vbahelper

Change-Id: I40a59224286cb1eaece58f5f52b26f9191171be8
Reviewed-on: https://gerrit.libreoffice.org/79581
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/vbahelper/vbadocumentbase.hxx 
b/include/vbahelper/vbadocumentbase.hxx
index d868dae2c96f..7ea44b5e0814 100644
--- a/include/vbahelper/vbadocumentbase.hxx
+++ b/include/vbahelper/vbadocumentbase.hxx
@@ -51,7 +51,7 @@ protected:
 css::uno::Reference< css::frame::XModel > mxModel;
 css::uno::Reference< css::uno::XInterface > mxVBProject;
 protected:
-const css::uno::Reference< css::frame::XModel >& getModel() { return 
mxModel; }
+const css::uno::Reference< css::frame::XModel >& getModel() const { return 
mxModel; }
 public:
 VbaDocumentBase(const css::uno::Reference< ov::XHelperInterface >& 
xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
 css::uno::Reference< css::frame::XModel > const & xModel );
diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index 379e0f61dc93..f32498ff0451 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -147,7 +147,7 @@ public:
 Millimeter(double mm);
 
 void setInPoints(double points) ;
-double getInHundredthsOfOneMillimeter();
+double getInHundredthsOfOneMillimeter() const;
 static sal_Int32 getInHundredthsOfOneMillimeter(double points);
 static double getInPoints(int _hmm);
 };
diff --git a/include/vbahelper/vbawindowbase.hxx 
b/include/vbahelper/vbawindowbase.hxx
index 64f70b0edf35..9b0c31e65e21 100644
--- a/include/vbahelper/vbawindowbase.hxx
+++ b/include/vbahelper/vbawindowbase.hxx
@@ -80,11 +80,11 @@ public:
 
 protected:
 /// @throws css::uno::RuntimeException
-css::uno::Reference< css::frame::XController > getController();
+css::uno::Reference< css::frame::XController > getController() const;
 /// @throws css::uno::RuntimeException
-css::uno::Reference< css::awt::XWindow > getWindow();
+css::uno::Reference< css::awt::XWindow > getWindow() const;
 /// @throws css::uno::RuntimeException
-css::uno::Reference< css::awt::XWindow2 > getWindow2();
+css::uno::Reference< css::awt::XWindow2 > getWindow2() const;
 
 css::uno::Reference< css::frame::XModel > m_xModel;
 
diff --git a/vbahelper/source/msforms/vbacontrol.cxx 
b/vbahelper/source/msforms/vbacontrol.cxx
index ba0a6f994035..aa386fdae3e7 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -728,7 +728,7 @@ void ScVbaControl::setBackColor( sal_Int32 nBackColor )
 m_xProps->setPropertyValue( "BackgroundColor" , uno::makeAny( 
XLRGBToOORGB( nBackColor ) ) );
 }
 
-bool ScVbaControl::getAutoSize()
+bool ScVbaControl::getAutoSize() const
 {
 bool bIsResizeEnabled = false;
 uno::Reference< uno::XInterface > xIf( m_xControl, uno::UNO_SET_THROW );
diff --git a/vbahelper/source/msforms/vbacontrol.hxx 
b/vbahelper/source/msforms/vbacontrol.hxx
index 675bb0874e03..2e7c408d5cf2 100644
--- a/vbahelper/source/msforms/vbacontrol.hxx
+++ b/vbahelper/source/msforms/vbacontrol.hxx
@@ -111,7 +111,7 @@ public:
 /// @throws css::uno::RuntimeException
 void setBackColor( sal_Int32 nBackColor );
 /// @throws css::uno::RuntimeException
-bool getAutoSize();
+bool getAutoSize() const;
 /// @throws css::uno::RuntimeException
 void setAutoSize( bool bAutoSize );
 /// @throws css::uno::RuntimeException
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx 
b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
index 31dcb7d5667c..014e04035be9 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
@@ -156,7 +156,7 @@ void VbaCommandBarHelper::ApplyTempChange( const OUString& 
sResourceUrl, const c
 }
 }
 
-uno::Reference< frame::XLayoutManager > VbaCommandBarHelper::getLayoutManager()
+uno::Reference< frame::XLayoutManager > 
VbaCommandBarHelper::getLayoutManager() const
 {
 uno::Reference< frame::XFrame > xFrame( 
getModel()->getCurrentController()->getFrame(), u

[Libreoffice-commits] core.git: include/vbahelper sc/source vbahelper/source

2019-07-22 Thread Gabor Kelemen (via logerrit)
 include/vbahelper/vbaaccesshelper.hxx  |2 --
 include/vbahelper/vbaeventshelperbase.hxx  |3 ---
 include/vbahelper/vbahelper.hxx|2 --
 sc/source/ui/vba/vbaapplication.cxx|1 +
 sc/source/ui/vba/vbaaxes.cxx   |1 +
 sc/source/ui/vba/vbachartobjects.cxx   |1 +
 sc/source/ui/vba/vbatitle.hxx  |1 +
 vbahelper/source/vbahelper/vbaeventshelperbase.cxx |1 +
 vbahelper/source/vbahelper/vbahelper.cxx   |1 +
 vbahelper/source/vbahelper/vbashapes.cxx   |1 +
 10 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit e86690fe3a2f83e7be18a5703baf02fefea9aeec
Author: Gabor Kelemen 
AuthorDate: Sun Jul 7 19:43:21 2019 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jul 22 10:24:33 2019 +0200

tdf#42949 Fix IWYU warnings in include/vbahelper

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: I31ca76998b4fab5fe383993c89319b3a08d30401
Reviewed-on: https://gerrit.libreoffice.org/75181
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/include/vbahelper/vbaaccesshelper.hxx 
b/include/vbahelper/vbaaccesshelper.hxx
index 78728f5c07a3..3dd3be21f6fa 100644
--- a/include/vbahelper/vbaaccesshelper.hxx
+++ b/include/vbahelper/vbaaccesshelper.hxx
@@ -25,13 +25,11 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
 //#define VBAHELPER_DLLIMPLEMENTATION
-#include 
 #include 
 #include 
 #include 
diff --git a/include/vbahelper/vbaeventshelperbase.hxx 
b/include/vbahelper/vbaeventshelperbase.hxx
index 777815ce20a1..0b4c9ba681df 100644
--- a/include/vbahelper/vbaeventshelperbase.hxx
+++ b/include/vbahelper/vbaeventshelperbase.hxx
@@ -21,7 +21,6 @@
 #define INCLUDED_VBAHELPER_VBAEVENTSHELPERBASE_HXX
 
 #include 
-#include 
 #include 
 #include 
 
@@ -32,9 +31,7 @@
 #include 
 #include 
 #include 
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index 83d627b54351..379e0f61dc93 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -22,10 +22,8 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sc/source/ui/vba/vbaapplication.cxx 
b/sc/source/ui/vba/vbaapplication.cxx
index c7a46c3c74c2..f9ee9813d2e6 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -19,6 +19,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx
index 754aca9a027f..9cf88bf0eb83 100644
--- a/sc/source/ui/vba/vbaaxes.cxx
+++ b/sc/source/ui/vba/vbaaxes.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/sc/source/ui/vba/vbachartobjects.cxx 
b/sc/source/ui/vba/vbachartobjects.cxx
index bca84c28300a..c8a752021a3c 100644
--- a/sc/source/ui/vba/vbachartobjects.cxx
+++ b/sc/source/ui/vba/vbachartobjects.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
diff --git a/sc/source/ui/vba/vbatitle.hxx b/sc/source/ui/vba/vbatitle.hxx
index e66c84d7..c4ce1f360f89 100644
--- a/sc/source/ui/vba/vbatitle.hxx
+++ b/sc/source/ui/vba/vbatitle.hxx
@@ -24,6 +24,7 @@
 #include "vbafont.hxx"
 #include "vbapalette.hxx"
 #include 
+#include 
 #include 
 #include 
 
diff --git a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx 
b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx
index 14c650f60de8..454568b40b95 100644
--- a/vbahelper/source/vbahelper/vbaeventshelperbase.cxx
+++ b/vbahelper/source/vbahelper/vbaeventshelperbase.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx 
b/vbahelper/source/vbahelper/vbahelper.cxx
index b55ad65c4fae..459761c632df 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/vbahelper/source/vbahelper/vbashapes.cxx 
b/vbahelper/source/vbahelper/vbashapes.cxx
index 6d6bd434b35e..52b5f4e5ec5b 100644
--- a/vbahelper/source/vbahelper/vbashapes.cxx
+++ b/vbahelper/source/vbahelper/vbashapes.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/vbahelper vbahelper/source

2019-02-22 Thread Libreoffice Gerrit user
 include/vbahelper/vbashape.hxx   |2 --
 include/vbahelper/vbashapes.hxx  |4 ++--
 vbahelper/source/vbahelper/vbashapes.cxx |   11 ---
 3 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit f7acbfe2322477b25e5a21b414fd5f5e129eafb1
Author: Noel Grandin 
AuthorDate: Fri Feb 22 10:00:32 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 22 11:05:58 2019 +0100

loplugin:unusedfields in vbahelper

Change-Id: I5b5820f236fa81a08faa8bd4d928ace2cc49cf25
Reviewed-on: https://gerrit.libreoffice.org/68157
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/vbahelper/vbashape.hxx b/include/vbahelper/vbashape.hxx
index 3cdf74abe312..59581dfe81ee 100644
--- a/include/vbahelper/vbashape.hxx
+++ b/include/vbahelper/vbashape.hxx
@@ -66,7 +66,6 @@ protected:
 css::uno::Reference< css::beans::XPropertySet > m_xPropertySet;
 sal_Int32 const m_nType;
 css::uno::Reference< css::frame::XModel > m_xModel;
-css::uno::Any m_aRange;
 void addListeners();
 /// @throws css::uno::RuntimeException
 void removeShapeListener();
@@ -79,7 +78,6 @@ public:
 /// @throws css::uno::RuntimeException
 ScVbaShape( const css::uno::Reference< ov::XHelperInterface >& xParent, 
const css::uno::Reference< css::uno::XComponentContext >& xContext, const 
css::uno::Reference< css::drawing::XShape >& xShape, const css::uno::Reference< 
css::drawing::XShapes >& xShapes, const css::uno::Reference< css::frame::XModel 
>& xModel, sal_Int32 nType );
 virtual ~ScVbaShape() override;
-void setRange( css::uno::Any aRange ) { m_aRange = aRange; };
 
 /// @throws css::uno::RuntimeException
 static sal_Int32 getType( const css::uno::Reference< css::drawing::XShape 
>& rShape );
diff --git a/include/vbahelper/vbashapes.hxx b/include/vbahelper/vbashapes.hxx
index 3c956c10eb37..4a23b13d10c0 100644
--- a/include/vbahelper/vbashapes.hxx
+++ b/include/vbahelper/vbashapes.hxx
@@ -66,9 +66,9 @@ private:
 /// @throws css::uno::RuntimeException
 css::uno::Reference< css::drawing::XShape > createShape( const OUString& 
service );
 /// @throws css::uno::RuntimeException
-css::uno::Any AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 
nLineWidth, sal_Int32 nLineHeight, const css::uno::Any& rRange );
+css::uno::Any AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 
nLineWidth, sal_Int32 nLineHeight );
 /// @throws css::uno::RuntimeException
-css::uno::Any AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 
nLineWidth, sal_Int32 nLineHeight, const css::uno::Any& rRange );
+css::uno::Any AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 
nLineWidth, sal_Int32 nLineHeight );
 /// @throws css::uno::RuntimeException
 css::uno::Any AddTextboxInWriter( sal_Int32 _nLeft, sal_Int32 _nTop, 
sal_Int32 _nWidth, sal_Int32 _nHeight );
 OUString createName( const OUString& sName );
diff --git a/vbahelper/source/vbahelper/vbashapes.cxx 
b/vbahelper/source/vbahelper/vbashapes.cxx
index 5c3bcbf304fe..74fb90504bcf 100644
--- a/vbahelper/source/vbahelper/vbashapes.cxx
+++ b/vbahelper/source/vbahelper/vbashapes.cxx
@@ -215,7 +215,7 @@ ScVbaShapes::createShape( const OUString& service )
 }
 
 uno::Any
-ScVbaShapes::AddRectangle(sal_Int32 startX, sal_Int32 startY, sal_Int32 
nLineWidth, sal_Int32 nLineHeight, const uno::Any& rRange)
+ScVbaShapes::AddRectangle(sal_Int32 startX, sal_Int32 startY, sal_Int32 
nLineWidth, sal_Int32 nLineHeight)
 {
 sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( startX );
 sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( startY );
@@ -241,12 +241,11 @@ ScVbaShapes::AddRectangle(sal_Int32 startX, sal_Int32 
startY, sal_Int32 nLineWid
 xShape->setSize( size );
 
 ScVbaShape *pScVbaShape = new ScVbaShape( getParent(), mxContext, xShape, 
m_xShapes, m_xModel, ScVbaShape::getType( xShape ) );
-pScVbaShape->setRange(rRange);
 return uno::makeAny( uno::Reference< msforms::XShape > ( pScVbaShape ) );
 }
 
 uno::Any
-ScVbaShapes::AddEllipse(sal_Int32 startX, sal_Int32 startY, sal_Int32 
nLineWidth, sal_Int32 nLineHeight, const uno::Any& rRange)
+ScVbaShapes::AddEllipse(sal_Int32 startX, sal_Int32 startY, sal_Int32 
nLineWidth, sal_Int32 nLineHeight)
 {
 sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( startX );
 sal_Int32 nYPos = Millimeter::getInHundredthsOfOneMillimeter( startY );
@@ -284,7 +283,6 @@ ScVbaShapes::AddEllipse(sal_Int32 startX, sal_Int32 startY, 
sal_Int32 nLineWidth
 xShape->setSize(size);
 
 ScVbaShape *pScVbaShape = new ScVbaShape( getParent(), mxContext, xShape, 
m_xShapes, m_xModel, ScVbaShape::getType( xShape ) );
-pScVbaShape->setRange(rRange);
 return uno::makeAny( uno::Reference< msforms::XShape > ( pScVbaShape ) );
 }
 
@@ -326,14 +324,13 @@ ScVbaShapes::AddLine( sal_Int32 StartX, sal_Int32 StartY, 
sal_Int32 endX, sal_In
 uno::Any SAL_CALL
 ScVb

[Libreoffice-commits] core.git: include/vbahelper vbahelper/source

2018-09-17 Thread Libreoffice Gerrit user
 include/vbahelper/vbacollectionimpl.hxx  |2 +-
 include/vbahelper/vbadialogbase.hxx  |2 +-
 include/vbahelper/vbadocumentsbase.hxx   |2 +-
 include/vbahelper/vbaeventshelperbase.hxx|4 ++--
 include/vbahelper/vbafontbase.hxx|2 +-
 include/vbahelper/vbahelper.hxx  |6 +++---
 include/vbahelper/vbashape.hxx   |2 +-
 vbahelper/source/msforms/vbacontrol.cxx  |4 ++--
 vbahelper/source/msforms/vbacontrols.cxx |4 ++--
 vbahelper/source/msforms/vbacontrols.hxx |4 ++--
 vbahelper/source/msforms/vbalistcontrolhelper.cxx|4 ++--
 vbahelper/source/msforms/vbamultipage.cxx|2 +-
 vbahelper/source/msforms/vbatextbox.hxx  |2 +-
 vbahelper/source/vbahelper/vbacolorformat.hxx|2 +-
 vbahelper/source/vbahelper/vbacommandbar.hxx |4 ++--
 vbahelper/source/vbahelper/vbacommandbarcontrol.hxx  |2 +-
 vbahelper/source/vbahelper/vbacommandbarcontrols.hxx |2 +-
 17 files changed, 25 insertions(+), 25 deletions(-)

New commits:
commit cc34b5a4c2d231de3882508654f15765d29f44c9
Author: Noel Grandin 
AuthorDate: Mon Sep 17 11:21:25 2018 +0200
Commit: Noel Grandin 
CommitDate: Tue Sep 18 08:56:48 2018 +0200

loplugin:constfields in vbahelper

Change-Id: I6121e2b41a5e6116be8027fe5197ce53d8f6797f
Reviewed-on: https://gerrit.libreoffice.org/60562
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/vbahelper/vbacollectionimpl.hxx 
b/include/vbahelper/vbacollectionimpl.hxx
index 790e68f86907..f2adf5b302e8 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -238,7 +238,7 @@ typedef InheritedHelperInterfaceImpl< Ifc... > BaseColBase;
 protected:
 css::uno::Reference< css::container::XIndexAccess > m_xIndexAccess;
 css::uno::Reference< css::container::XNameAccess > m_xNameAccess;
-bool mbIgnoreCase;
+bool const mbIgnoreCase;
 
 /// @throws css::uno::RuntimeException
 virtual css::uno::Any getItemByStringIndex( const OUString& sIndex )
diff --git a/include/vbahelper/vbadialogbase.hxx 
b/include/vbahelper/vbadialogbase.hxx
index 4c7a2636917a..c5578f10d009 100644
--- a/include/vbahelper/vbadialogbase.hxx
+++ b/include/vbahelper/vbadialogbase.hxx
@@ -45,7 +45,7 @@ typedef InheritedHelperInterfaceWeakImpl< ov::XDialogBase > 
VbaDialogBase_BASE;
 class VBAHELPER_DLLPUBLIC VbaDialogBase : public VbaDialogBase_BASE
 {
 protected:
-sal_Int32 mnIndex;
+sal_Int32 const mnIndex;
 css::uno::Reference< css::frame::XModel > m_xModel;
 public:
 VbaDialogBase( const css::uno::Reference< ov::XHelperInterface >& xParent, 
const css::uno::Reference< css::uno::XComponentContext >& xContext, const 
css::uno::Reference< css::frame::XModel >& xModel, sal_Int32 nIndex 
):VbaDialogBase_BASE( xParent, xContext ), mnIndex( nIndex ), m_xModel( xModel 
) {}
diff --git a/include/vbahelper/vbadocumentsbase.hxx 
b/include/vbahelper/vbadocumentsbase.hxx
index ac6d316a0256..6530d734a0c9 100644
--- a/include/vbahelper/vbadocumentsbase.hxx
+++ b/include/vbahelper/vbadocumentsbase.hxx
@@ -56,7 +56,7 @@ public:
 };
 
 private:
-DOCUMENT_TYPE meDocType;
+DOCUMENT_TYPE const meDocType;
 
 public:
 /// @throws css::uno::RuntimeException
diff --git a/include/vbahelper/vbaeventshelperbase.hxx 
b/include/vbahelper/vbaeventshelperbase.hxx
index 042ad7439b8f..777815ce20a1 100644
--- a/include/vbahelper/vbaeventshelperbase.hxx
+++ b/include/vbahelper/vbaeventshelperbase.hxx
@@ -122,8 +122,8 @@ protected:
 
 struct EventQueueEntry
 {
-sal_Int32 mnEventId;
-css::uno::Sequence< css::uno::Any > maArgs;
+sal_Int32 const mnEventId;
+css::uno::Sequence< css::uno::Any > const maArgs;
 /*implicit*/ EventQueueEntry( sal_Int32 nEventId ) : mnEventId( 
nEventId ) {}
 EventQueueEntry( sal_Int32 nEventId, const css::uno::Sequence< 
css::uno::Any >& rArgs ) : mnEventId( nEventId ), maArgs( rArgs ) {}
 };
diff --git a/include/vbahelper/vbafontbase.hxx 
b/include/vbahelper/vbafontbase.hxx
index 32c8270e1783..d12e13ddfbf1 100644
--- a/include/vbahelper/vbafontbase.hxx
+++ b/include/vbahelper/vbafontbase.hxx
@@ -47,7 +47,7 @@ class VBAHELPER_DLLPUBLIC VbaFontBase : public 
VbaFontBase_BASE
 protected:
 css::uno::Reference< css::beans::XPropertySet > mxFont;
 css::uno::Reference< css::container::XIndexAccess > mxPalette;
-bool mbFormControl;
+bool const mbFormControl;
 
 public:
 // use local constants there is no need to expose these constants
diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index ff9eca3f232f..e070a29d59ca 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -243,9 +243,9 @@ private:
 css::uno::Reference< css::awt::XWindow > mxWindow;
 css

[Libreoffice-commits] core.git: include/vbahelper oovbaapi/ooo vbahelper/source

2018-05-30 Thread Tor Lillqvist
 include/vbahelper/vbaapplicationbase.hxx  |2 +
 oovbaapi/ooo/vba/XApplicationBase.idl |1 
 vbahelper/source/vbahelper/vbaapplicationbase.cxx |   34 ++
 3 files changed, 37 insertions(+)

New commits:
commit 857a33404626f8df04882478d026969691624cbb
Author: Tor Lillqvist 
Date:   Wed Mar 7 13:12:01 2018 +0200

Add Caption property to ooo::vba::XApplicationBase

Implementation is just a dummy, though. At first I thought that it
would work to get the XModel of the "current" document (as returned by
getCurrentDocument()), and then get the XFrame of that, and then use
the XFrame's getName() and setName(). But, it seems that
getCurrentDocument() and what it calls is tightly coupled to
StarBasic, and it doesn't do anything sane in the case of Automation
clients.

Change-Id: I74ded5114ecce06e72862f69d0c06d963e55fd75
Reviewed-on: https://gerrit.libreoffice.org/55064
Tested-by: Jenkins 
Reviewed-by: Tor Lillqvist 

diff --git a/include/vbahelper/vbaapplicationbase.hxx 
b/include/vbahelper/vbaapplicationbase.hxx
index 4f392a5d332c..be2f6765e951 100644
--- a/include/vbahelper/vbaapplicationbase.hxx
+++ b/include/vbahelper/vbaapplicationbase.hxx
@@ -64,6 +64,8 @@ public:
 virtual void SAL_CALL setInteractive( sal_Bool bInteractive ) override;
 virtual sal_Bool SAL_CALL getVisible() override;
 virtual void SAL_CALL setVisible( sal_Bool bVisible ) override;
+virtual OUString SAL_CALL getCaption() override;
+virtual void SAL_CALL setCaption( const OUString& sCaption ) override;
 virtual void SAL_CALL OnKey( const OUString& Key, const css::uno::Any& 
Procedure ) override;
 virtual css::uno::Any SAL_CALL CommandBars( const css::uno::Any& aIndex ) 
override;
 virtual OUString SAL_CALL getVersion() override;
diff --git a/oovbaapi/ooo/vba/XApplicationBase.idl 
b/oovbaapi/ooo/vba/XApplicationBase.idl
index 90ba919407d4..4df45daad53e 100644
--- a/oovbaapi/ooo/vba/XApplicationBase.idl
+++ b/oovbaapi/ooo/vba/XApplicationBase.idl
@@ -32,6 +32,7 @@ interface XApplicationBase
 [attribute] boolean DisplayStatusBar;
 [attribute] boolean Interactive;
 [attribute] boolean Visible;
+[attribute] string Caption;
 
 [attribute, readonly] string Version;
 [attribute, readonly] any VBE;
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx 
b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index a0268237efe6..d550731cc89f 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -151,6 +151,7 @@ struct VbaApplicationBase_Impl final
 {
 VbaTimerHashMap m_aTimerHash;
 bool mbVisible;
+OUString msCaption;
 
 VbaApplicationBase_Impl() : mbVisible( true ) {}
 
@@ -262,6 +263,39 @@ void SAL_CALL VbaApplicationBase::setVisible( sal_Bool 
bVisible )
 m_pImpl->mbVisible = bVisible;  // dummy implementation
 }
 
+OUString SAL_CALL VbaApplicationBase::getCaption()
+{
+SbMethod* pMeth = StarBASIC::GetActiveMethod();
+if (!pMeth)
+{
+// When called from Automation clients, we don't even try, as there 
doesn't seem to be any
+// good way to get at the actual "caption" (title) of the 
application's window (any of them,
+// if there are several). We just keep a copy of a fake caption in the 
VbaApplicationBase_Impl.
+return m_pImpl->msCaption;
+}
+
+// No idea if this code, which uses APIs that apparently are related to 
StarBasic (check
+// getCurrentDoc() in vbahelper.cxx), actually works any better.
+uno::Reference< frame::XModel > xModel( getCurrentDocument(), 
uno::UNO_QUERY_THROW );
+uno::Reference< frame::XFrame > xFrame( 
xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
+return xFrame->getName();
+}
+
+void SAL_CALL VbaApplicationBase::setCaption( const OUString& sCaption )
+{
+// See comments in getCaption().
+
+SbMethod* pMeth = StarBASIC::GetActiveMethod();
+if (!pMeth)
+{
+m_pImpl->msCaption = sCaption;
+return;
+}
+
+uno::Reference< frame::XModel > xModel( getCurrentDocument(), 
uno::UNO_QUERY_THROW );
+uno::Reference< frame::XFrame > xFrame( 
xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
+xFrame->setName( sCaption );
+}
 
 void SAL_CALL
 VbaApplicationBase::OnKey( const OUString& Key, const uno::Any& Procedure )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vbahelper

2018-05-30 Thread Tor Lillqvist
 include/vbahelper/vbaapplicationbase.hxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit 64980d88fb75b8a34b1fce4ed1d0d64d0f2d5e09
Author: Tor Lillqvist 
Date:   Wed Mar 7 13:23:40 2018 +0200

Remove two unnecessary forward declarations

Change-Id: I5bf56b6216835870b4beefd588f070a127835514
Reviewed-on: https://gerrit.libreoffice.org/55068
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/include/vbahelper/vbaapplicationbase.hxx 
b/include/vbahelper/vbaapplicationbase.hxx
index 55ea2a32781c..4f392a5d332c 100644
--- a/include/vbahelper/vbaapplicationbase.hxx
+++ b/include/vbahelper/vbaapplicationbase.hxx
@@ -38,11 +38,6 @@ namespace com { namespace sun { namespace star {
 namespace uno { class XComponentContext; }
 } } }
 
-namespace ooo { namespace vba {
-class XApplicationBase;
-class XHelperInterface;
-} }
-
 typedef InheritedHelperInterfaceWeakImpl< ov::XApplicationBase > 
ApplicationBase_BASE;
 
 struct VbaApplicationBase_Impl;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vbahelper

2018-03-09 Thread Tor Lillqvist
 include/vbahelper/vbaaccesshelper.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit cf42f0916d1f30d8939de15bff626cabb6836d35
Author: Tor Lillqvist 
Date:   Fri Mar 9 16:30:05 2018 +0200

Bin incorrect comments, this is not "org::openoffice" but "ooo::vba"

Change-Id: I044bb3afa1e134dd851dd30f639b475400f4ceea
Reviewed-on: https://gerrit.libreoffice.org/51006
Tested-by: Jenkins 
Reviewed-by: Tor Lillqvist 

diff --git a/include/vbahelper/vbaaccesshelper.hxx 
b/include/vbahelper/vbaaccesshelper.hxx
index 04460b165fb3..78728f5c07a3 100644
--- a/include/vbahelper/vbaaccesshelper.hxx
+++ b/include/vbahelper/vbaaccesshelper.hxx
@@ -76,8 +76,8 @@ namespace ooo
 // word seems to return an erroneous mime type :-/ 
"application/msword"  not consistent with the excel one
 inline bool isAlienWordDoc( SfxObjectShell const & rDocShell ) { 
return isAlienDoc( rDocShell, "application/msword" ); }
 
-} // openoffice
-} // org
+}
+}
 
 #endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vbahelper sc/source

2018-03-01 Thread Noel Grandin
 include/vbahelper/vbahelper.hxx  |2 ++
 sc/source/ui/vba/vbainterior.cxx |3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 82d42fa2c05e8d53ec2c21733a2a9f53412dd2d1
Author: Noel Grandin 
Date:   Thu Mar 1 16:49:55 2018 +0200

add Color method version of OORGBToXLRGB

Change-Id: I769ff8aed3caa74679e1b4d03e8fbc3cd5d22b1a
Reviewed-on: https://gerrit.libreoffice.org/50587
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index 3643874ef5d5..ff9eca3f232f 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -97,6 +98,7 @@ namespace ooo
 VBAHELPER_DLLPUBLIC void dispatchRequests (const css::uno::Reference< 
css::frame::XModel>& xModel, const OUString & aUrl, const css::uno::Sequence< 
css::beans::PropertyValue >& sProps );
 VBAHELPER_DLLPUBLIC void dispatchExecute(SfxViewShell const * pView, 
sal_uInt16 nSlot );
 VBAHELPER_DLLPUBLIC sal_Int32 OORGBToXLRGB( sal_Int32 );
+inline sal_Int32 OORGBToXLRGB( ::Color n ) { return 
OORGBToXLRGB(sal_Int32(n)); }
 VBAHELPER_DLLPUBLIC sal_Int32 XLRGBToOORGB( sal_Int32 );
 VBAHELPER_DLLPUBLIC css::uno::Any OORGBToXLRGB( const css::uno::Any& );
 VBAHELPER_DLLPUBLIC css::uno::Any XLRGBToOORGB( const css::uno::Any& );
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index b413b385a801..c40224a04f04 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -91,8 +91,7 @@ ScVbaInterior::ScVbaInterior( const uno::Reference< 
XHelperInterface >& xParent,
 uno::Any
 ScVbaInterior::getColor()
 {
-Color aBackColor( GetBackColor() );
-return uno::makeAny( OORGBToXLRGB( aBackColor.GetColor() ) );
+return uno::makeAny( OORGBToXLRGB( GetBackColor() ) );
 }
 
 void
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vbahelper

2018-02-02 Thread Tor Lillqvist
 include/vbahelper/vbaglobalbase.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 7eb24dc16b68fa1bf89a903e431ba15646fbbfdf
Author: Tor Lillqvist 
Date:   Fri Feb 2 13:39:22 2018 +0200

These fields can be const

Change-Id: I7012e0d7b65fbb3317719f24572f77fb9aafd910
Reviewed-on: https://gerrit.libreoffice.org/49143
Tested-by: Jenkins 
Reviewed-by: Tor Lillqvist 

diff --git a/include/vbahelper/vbaglobalbase.hxx 
b/include/vbahelper/vbaglobalbase.hxx
index 9390f42d040a..fe338acd7f21 100644
--- a/include/vbahelper/vbaglobalbase.hxx
+++ b/include/vbahelper/vbaglobalbase.hxx
@@ -47,8 +47,8 @@ typedef InheritedHelperInterfaceWeakImpl< ov::XGlobalsBase > 
Globals_BASE;
 class VBAHELPER_DLLPUBLIC VbaGlobalsBase : public Globals_BASE
 {
 protected:
-OUString msDocCtxName;
-OUString msApplication;
+const OUString msDocCtxName;
+const OUString msApplication;
 
 bool hasServiceName( const OUString& serviceName );
 void init(  const css::uno::Sequence< css::beans::PropertyValue >& 
aInitArgs );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vbahelper sc/source xmlsecurity/source

2017-06-28 Thread Andrea Gelmini
 include/vbahelper/vbafontbase.hxx  |2 +-
 sc/source/core/data/table1.cxx |2 +-
 xmlsecurity/source/dialogs/digitalsignaturesdialog.src |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 8a6ed98b00cb91dbe5b807051715858a2dc90883
Author: Andrea Gelmini 
Date:   Wed Jun 28 13:38:34 2017 +0200

Fix typos

Change-Id: I59777c29fe20f112327ce28a1c0b9cdd2f60857c
Reviewed-on: https://gerrit.libreoffice.org/39354
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/include/vbahelper/vbafontbase.hxx 
b/include/vbahelper/vbafontbase.hxx
index 8ea5195f55c7..b1cb05c4c9e7 100644
--- a/include/vbahelper/vbafontbase.hxx
+++ b/include/vbahelper/vbafontbase.hxx
@@ -53,7 +53,7 @@ public:
 // use local constants there is no need to expose these constants
 // externally. Looking at the Format->Character dialog it seem that
 // these may in fact even be calculated. Leave hardcoded for now
-// #FIXEME #TBD investigate the code for dialog mentioned above
+// #FIXME #TBD investigate the code for dialog mentioned above
 
 // The font baseline is not specified.
 static const short NORMAL = 0;
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 0611f1b7369a..1e9a50e05ac4 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1166,7 +1166,7 @@ SCCOL ScTable::FindNextVisibleColWithContent( SCCOL nCol, 
bool bRight, SCROW nRo
 const SCCOL nLastCol = aCol.size() - 1;
 if(bRight)
 {
-// If nCol is the last allocated column index, there wont be any 
content to its right.
+// If nCol is the last allocated column index, there won't be any 
content to its right.
 // To maintain the original return behaviour, return MAXCOL.
 if(nCol >= nLastCol)
 return MAXCOL;
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.src 
b/xmlsecurity/source/dialogs/digitalsignaturesdialog.src
index 9bf58db172f4..2d4b4e0fb38e 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.src
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.src
@@ -43,7 +43,7 @@ String STR_XMLSECDLG_QUERY_REALLYREMOVE
 
 String STR_XMLSECDLG_SIGNING_FAILED
 {
-Text [ en-US ] = "An error occured while adding the signature.";
+Text [ en-US ] = "An error occurred while adding the signature.";
 };
 
 String STR_XMLSECDLG_NO_CERT_MANAGER
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vbahelper include/vcl vbahelper/source vcl/headless vcl/inc vcl/source vcl/unx

2017-01-26 Thread Noel Grandin
 include/vbahelper/vbadialogbase.hxx  |1 -
 include/vbahelper/vbadialogsbase.hxx |1 -
 include/vbahelper/vbadocumentbase.hxx|1 -
 include/vbahelper/vbadocumentsbase.hxx   |1 -
 include/vbahelper/vbapagesetupbase.hxx   |1 -
 include/vbahelper/vbatextframe.hxx   |1 -
 include/vcl/lazydelete.hxx   |2 --
 include/vcl/print.hxx|1 -
 include/vcl/salctype.hxx |1 -
 vbahelper/source/msforms/vbapages.hxx|1 -
 vcl/headless/svpglyphcache.cxx   |3 ---
 vcl/inc/BitmapScaleConvolution.hxx   |3 ---
 vcl/inc/controldata.hxx  |4 
 vcl/inc/svmconverter.hxx |1 -
 vcl/inc/unx/gendata.hxx  |1 -
 vcl/inc/unx/i18n_xkb.hxx |6 --
 vcl/source/app/svapp.cxx |2 --
 vcl/source/control/button.cxx|5 -
 vcl/source/control/edit.cxx  |5 -
 vcl/source/fontsubset/cff.cxx|6 --
 vcl/source/gdi/dibtools.cxx  |   12 
 vcl/source/gdi/impvect.cxx   |5 -
 vcl/source/gdi/pdffontcache.hxx  |1 -
 vcl/source/gdi/pdfwriter_impl.cxx|1 -
 vcl/source/gdi/pdfwriter_impl.hxx|3 ---
 vcl/source/window/dockingarea.cxx|5 -
 vcl/source/window/dockwin.cxx|5 -
 vcl/source/window/floatwin.cxx   |5 -
 vcl/source/window/menubarwindow.hxx  |1 -
 vcl/source/window/popupmenuwindow.cxx|5 -
 vcl/source/window/status.cxx |5 -
 vcl/source/window/syswin.cxx |5 -
 vcl/source/window/toolbox.cxx|5 -
 vcl/unx/generic/app/i18n_im.cxx  |5 -
 vcl/unx/generic/dtrans/X11_selection.hxx |1 -
 vcl/unx/generic/printer/ppdparser.cxx|1 -
 36 files changed, 112 deletions(-)

New commits:
commit 32a461bdd6ffda4b59ff262e1fcbcbe8bf2be7a0
Author: Noel Grandin 
Date:   Thu Jan 26 13:48:47 2017 +0200

loplugin: unnecessary destructor vbahelper..vcl

Change-Id: I6b7800d4a456391251168f7923a1ec7a5ca9efc9
Reviewed-on: https://gerrit.libreoffice.org/33577
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/include/vbahelper/vbadialogbase.hxx 
b/include/vbahelper/vbadialogbase.hxx
index c1f3682..4c7a263 100644
--- a/include/vbahelper/vbadialogbase.hxx
+++ b/include/vbahelper/vbadialogbase.hxx
@@ -49,7 +49,6 @@ protected:
 css::uno::Reference< css::frame::XModel > m_xModel;
 public:
 VbaDialogBase( const css::uno::Reference< ov::XHelperInterface >& xParent, 
const css::uno::Reference< css::uno::XComponentContext >& xContext, const 
css::uno::Reference< css::frame::XModel >& xModel, sal_Int32 nIndex 
):VbaDialogBase_BASE( xParent, xContext ), mnIndex( nIndex ), m_xModel( xModel 
) {}
-virtual ~VbaDialogBase() override {}
 
 // Methods
 virtual void SAL_CALL Show() override;
diff --git a/include/vbahelper/vbadialogsbase.hxx 
b/include/vbahelper/vbadialogsbase.hxx
index e5e13d1..6e69515 100644
--- a/include/vbahelper/vbadialogsbase.hxx
+++ b/include/vbahelper/vbadialogsbase.hxx
@@ -48,7 +48,6 @@ protected:
 css::uno::Reference< css::frame::XModel > m_xModel;
 public:
 VbaDialogsBase( const css::uno::Reference< ov::XHelperInterface >& 
xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, 
const css::uno::Reference< css::frame::XModel >& xModel ): VbaDialogsBase_BASE( 
xParent, xContext ), m_xModel( xModel ) {}
-virtual ~VbaDialogsBase() override {}
 
 // XCollection
 virtual ::sal_Int32 SAL_CALL getCount() override;
diff --git a/include/vbahelper/vbadocumentbase.hxx 
b/include/vbahelper/vbadocumentbase.hxx
index 7978ccc..d868dae 100644
--- a/include/vbahelper/vbadocumentbase.hxx
+++ b/include/vbahelper/vbadocumentbase.hxx
@@ -56,7 +56,6 @@ public:
 VbaDocumentBase(const css::uno::Reference< ov::XHelperInterface >& 
xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
 css::uno::Reference< css::frame::XModel > const & xModel );
 VbaDocumentBase(css::uno::Sequence< css::uno::Any > const& aArgs, 
css::uno::Reference< css::uno::XComponentContext >const& xContext );
-virtual ~VbaDocumentBase() override {}
 
 // Attributes
 virtual OUString SAL_CALL getName() override;
diff --git a/include/vbahelper/vbadocumentsbase.hxx 
b/include/vbahelper/vbadocumentsbase.hxx
index 5ca030b..ac6d316 100644
--- a/include/vbahelper/vbadocumentsbase.hxx
+++ b/include/vbahelper/vbadocumentsbase.hxx
@@ -61,7 +61,6 @@ private:
 public:
 /// @throws css::uno::RuntimeException
 VbaDocumentsBase( const css::uno::Reference< ov::XHelperInterface >& 
xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, 
DOCUMENT_TYPE eDocType );
-virtual ~VbaDocumentsBase() override {}
 
 // XEnumerationAccess
 virtual

[Libreoffice-commits] core.git: include/vbahelper sc/source sw/source vbahelper/source

2016-06-13 Thread Jorenz Paragas
 include/vbahelper/helperdecl.hxx |1 
 include/vbahelper/vbaaccesshelper.hxx|   18 +-
 include/vbahelper/vbaapplicationbase.hxx |   25 -
 include/vbahelper/vbacollectionimpl.hxx  |   32 ++-
 include/vbahelper/vbadialogbase.hxx  |   19 ++-
 include/vbahelper/vbadialogsbase.hxx |   20 ++-
 include/vbahelper/vbadocumentbase.hxx|   22 +++-
 include/vbahelper/vbadocumentsbase.hxx   |   24 
 include/vbahelper/vbaeventshelperbase.hxx|   18 ++
 include/vbahelper/vbafontbase.hxx|   19 ++-
 include/vbahelper/vbaglobalbase.hxx  |   23 
 include/vbahelper/vbahelper.hxx  |   51 +++
 include/vbahelper/vbahelperinterface.hxx |   14 -
 include/vbahelper/vbapagesetupbase.hxx   |   19 ++-
 include/vbahelper/vbapropvalue.hxx   |   11 +++-
 include/vbahelper/vbareturntypes.hxx |   10 +--
 include/vbahelper/vbashape.hxx   |   37 +++--
 include/vbahelper/vbashaperange.hxx  |   31 ++-
 include/vbahelper/vbashapes.hxx  |   32 ++-
 include/vbahelper/vbatextframe.hxx   |   23 +++-
 include/vbahelper/vbawindowbase.hxx  |   25 -
 sc/source/ui/vba/excelvbahelper.cxx  |1 
 sc/source/ui/vba/vbaapplication.cxx  |2 
 sc/source/ui/vba/vbaaxes.cxx |1 
 sc/source/ui/vba/vbacomment.cxx  |1 
 sc/source/ui/vba/vbacondition.cxx|1 
 sc/source/ui/vba/vbaeventshelper.cxx |1 
 sc/source/ui/vba/vbaformat.cxx   |1 
 sc/source/ui/vba/vbaformat.hxx   |1 
 sc/source/ui/vba/vbaformatcondition.cxx  |1 
 sc/source/ui/vba/vbaformatconditions.cxx |1 
 sc/source/ui/vba/vbapagebreak.cxx|1 
 sc/source/ui/vba/vbapagebreaks.cxx   |1 
 sc/source/ui/vba/vbapagesetup.cxx|1 
 sc/source/ui/vba/vbarange.cxx|2 
 sc/source/ui/vba/vbarange.hxx|2 
 sc/source/ui/vba/vbasheetobjects.cxx |2 
 sc/source/ui/vba/vbastyle.cxx|1 
 sc/source/ui/vba/vbastyles.cxx   |1 
 sc/source/ui/vba/vbastyles.hxx   |1 
 sc/source/ui/vba/vbatextframe.cxx|2 
 sc/source/ui/vba/vbawindow.cxx   |1 
 sc/source/ui/vba/vbaworksheet.cxx|1 
 sc/source/ui/vba/vbaworksheet.hxx|1 
 sc/source/ui/vba/vbaworksheets.cxx   |1 
 sw/source/ui/vba/vbaaddins.cxx   |1 
 sw/source/ui/vba/vbabookmarks.cxx|1 
 sw/source/ui/vba/vbadocument.cxx |1 
 sw/source/ui/vba/vbaeventshelper.cxx |1 
 sw/source/ui/vba/vbafield.cxx|2 
 sw/source/ui/vba/vbafield.hxx|1 
 sw/source/ui/vba/vbafind.cxx |1 
 sw/source/ui/vba/vbafont.cxx |2 
 sw/source/ui/vba/vbaglobals.cxx  |3 +
 sw/source/ui/vba/vbalisthelper.cxx   |2 
 sw/source/ui/vba/vbalisttemplate.cxx |1 
 sw/source/ui/vba/vbaoptions.cxx  |1 
 sw/source/ui/vba/vbapagesetup.cxx|1 
 sw/source/ui/vba/vbapalette.cxx  |1 
 sw/source/ui/vba/vbapalette.hxx  |1 
 sw/source/ui/vba/vbaparagraphformat.cxx  |1 
 sw/source/ui/vba/vbarange.cxx|2 
 sw/source/ui/vba/vbarevisions.cxx|1 
 sw/source/ui/vba/vbarow.cxx  |1 
 sw/source/ui/vba/vbarows.cxx |1 
 sw/source/ui/vba/vbaselection.cxx|1 
 sw/source/ui/vba/vbastyle.cxx|1 
 sw/source/ui/vba/vbastyles.cxx   |2 
 sw/source/ui/vba/vbastyles.hxx   |1 
 sw/source/ui/vba/vbatableofcontents.cxx  |1 
 sw/source/ui/vba/vbatables.cxx   |1 
 sw/source/ui/vba/vbatablesofcontents.cxx |1 
 sw/source/ui/vba/vbatabstops.cxx |2 
 sw/source/ui/vba/vbatemplate.cxx |1 
 sw/source/ui/vba/vbaview.cxx |1 
 sw/source/ui/vba/vbawindow.cxx   |1 
 sw/source/ui/vba/vbawrapformat.cxx   |2 
 vbahelper/source/msforms/vbacontrol.cxx  |  

[Libreoffice-commits] core.git: include/vbahelper vbahelper/source

2016-04-22 Thread Stephan Bergmann
 include/vbahelper/vbaapplicationbase.hxx  |2 +-
 vbahelper/source/vbahelper/vbaapplicationbase.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 9181f09e28afdee26ffd0ed5f6d0c5dea0669cd1
Author: Stephan Bergmann 
Date:   Sun Apr 17 12:28:04 2016 +0200

Avoid reserved identifier

Change-Id: Iefea30eb0db96462aee87349968baf4756e1b786

diff --git a/include/vbahelper/vbaapplicationbase.hxx 
b/include/vbahelper/vbaapplicationbase.hxx
index 5d809b8..52fe03d 100644
--- a/include/vbahelper/vbaapplicationbase.hxx
+++ b/include/vbahelper/vbaapplicationbase.hxx
@@ -57,7 +57,7 @@ public:
 
 virtual css::uno::Any SAL_CALL Run( const OUString& MacroName, const 
css::uno::Any& varg1, const css::uno::Any& varg2, const css::uno::Any& varg3, 
const css::uno::Any& varg4, const css::uno::Any& varg5, const css::uno::Any& 
varg6, const css::uno::Any& varg7, const css::uno::Any& varg8, const 
css::uno::Any& varg9, const css::uno::Any& varg10, const css::uno::Any& varg11, 
const css::uno::Any& varg12, const css::uno::Any& varg13, const css::uno::Any& 
varg14, const css::uno::Any& varg15, const css::uno::Any& varg16, const 
css::uno::Any& varg17, const css::uno::Any& varg18, const css::uno::Any& 
varg19, const css::uno::Any& varg20, const css::uno::Any& varg21, const 
css::uno::Any& varg22, const css::uno::Any& varg23, const css::uno::Any& 
varg24, const css::uno::Any& varg25, const css::uno::Any& varg26, const 
css::uno::Any& varg27, const css::uno::Any& varg28, const css::uno::Any& 
varg29, const css::uno::Any& varg30 ) throw (css::uno::RuntimeException, 
std::exception) override;
 virtual void SAL_CALL OnTime( const css::uno::Any& aEarliestTime, const 
OUString& aFunction, const css::uno::Any& aLatestTime, const css::uno::Any& 
aSchedule ) throw (css::uno::RuntimeException, std::exception) override;
-virtual float SAL_CALL CentimetersToPoints( float _Centimeters ) throw 
(css::uno::RuntimeException, std::exception) override;
+virtual float SAL_CALL CentimetersToPoints( float Centimeters ) throw 
(css::uno::RuntimeException, std::exception) override;
 virtual void SAL_CALL Undo() throw (css::uno::RuntimeException, 
std::exception) override;
 virtual void SAL_CALL Quit() throw (css::uno::RuntimeException, 
std::exception) override;
 
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx 
b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index 352caea..aa6af2f 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -385,11 +385,11 @@ void SAL_CALL VbaApplicationBase::OnTime( const uno::Any& 
aEarliestTime, const O
 }
 }
 
-float SAL_CALL VbaApplicationBase::CentimetersToPoints( float _Centimeters ) 
throw (uno::RuntimeException, std::exception)
+float SAL_CALL VbaApplicationBase::CentimetersToPoints( float Centimeters ) 
throw (uno::RuntimeException, std::exception)
 {
 // i cm = 28.35 points
 static const float rate = 28.35f;
-return ( _Centimeters * rate );
+return ( Centimeters * rate );
 }
 
 uno::Any SAL_CALL VbaApplicationBase::getVBE() throw (uno::RuntimeException, 
std::exception)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vbahelper vbahelper/source

2016-02-26 Thread Noel Grandin
 include/vbahelper/vbahelper.hxx  |6 +++---
 vbahelper/source/vbahelper/vbahelper.cxx |   11 +++
 2 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit 236f3089175c601e2be36d034b3214d06be89767
Author: Noel Grandin 
Date:   Fri Feb 26 11:11:18 2016 +0200

loplugin:unuseddefaultparam in include/vbahelper

Change-Id: Idac2134dce40a54cc04f595464357a0f9ca71be0

diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index d7eb4e6..c3ca394 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -71,8 +71,8 @@ namespace ooo
 VBAHELPER_DLLPUBLIC css::uno::Reference< css::script::XTypeConverter > 
getTypeConverter( const css::uno::Reference< css::uno::XComponentContext >& 
xContext ) throw (css::uno::RuntimeException);
 
 VBAHELPER_DLLPUBLIC void dispatchRequests( const css::uno::Reference< 
css::frame::XModel>& xModel, const OUString& aUrl );
- VBAHELPER_DLLPUBLIC void dispatchRequests (const css::uno::Reference< 
css::frame::XModel>& xModel, const OUString & aUrl, const css::uno::Sequence< 
css::beans::PropertyValue >& sProps );
-VBAHELPER_DLLPUBLIC void dispatchExecute(SfxViewShell* pView, 
sal_uInt16 nSlot, SfxCallMode nCall = SfxCallMode::SYNCHRON );
+VBAHELPER_DLLPUBLIC void dispatchRequests (const css::uno::Reference< 
css::frame::XModel>& xModel, const OUString & aUrl, const css::uno::Sequence< 
css::beans::PropertyValue >& sProps );
+VBAHELPER_DLLPUBLIC void dispatchExecute(SfxViewShell* pView, 
sal_uInt16 nSlot );
 VBAHELPER_DLLPUBLIC sal_Int32 OORGBToXLRGB( sal_Int32 );
 VBAHELPER_DLLPUBLIC sal_Int32 XLRGBToOORGB( sal_Int32 );
 VBAHELPER_DLLPUBLIC css::uno::Any OORGBToXLRGB( const css::uno::Any& );
@@ -97,7 +97,7 @@ namespace ooo
 VBAHELPER_DLLPUBLIC OUString extractStringFromAny( const 
css::uno::Any& rAny, const OUString& rDefault, bool bUppercaseBool = false ) 
throw (css::uno::RuntimeException);
 
 VBAHELPER_DLLPUBLIC OUString getAnyAsString( const css::uno::Any& 
pvargItem ) throw ( css::uno::RuntimeException );
-VBAHELPER_DLLPUBLIC OUString VBAToRegexp(const OUString &rIn, bool 
bForLike = false); // needs to be in an uno service ( already this code is 
duplicated in basic )
+VBAHELPER_DLLPUBLIC OUString VBAToRegexp(const OUString &rIn); // 
needs to be in an uno service ( already this code is duplicated in basic )
 VBAHELPER_DLLPUBLIC double getPixelTo100thMillimeterConversionFactor( 
const css::uno::Reference< css::awt::XDevice >& xDevice, bool bVertical);
 VBAHELPER_DLLPUBLIC double PointsToPixels( const css::uno::Reference< 
css::awt::XDevice >& xDevice, double fPoints, bool bVertical);
 VBAHELPER_DLLPUBLIC double PixelsToPoints( const css::uno::Reference< 
css::awt::XDevice >& xDevice, double fPixels, bool bVertical);
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx 
b/vbahelper/source/vbahelper/vbahelper.cxx
index 721c7f7..effbbf0 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -120,7 +120,7 @@ aNULL()
 return aNULLL;
 }
 
-void dispatchExecute(SfxViewShell* pViewShell, sal_uInt16 nSlot, SfxCallMode 
nCall)
+void dispatchExecute(SfxViewShell* pViewShell, sal_uInt16 nSlot)
 {
 SfxViewFrame* pViewFrame = nullptr;
 if ( pViewShell )
@@ -130,7 +130,7 @@ void dispatchExecute(SfxViewShell* pViewShell, sal_uInt16 
nSlot, SfxCallMode nCa
 SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
 if( pDispatcher )
 {
-pDispatcher->Execute( nSlot , nCall );
+pDispatcher->Execute( nSlot , SfxCallMode::SYNCHRON );
 }
 }
 }
@@ -554,15 +554,13 @@ bool NeedEsc(sal_Unicode cCode)
 return OUString(".^$+\\|{}()").indexOf(cCode) != -1;
 }
 
-OUString VBAToRegexp(const OUString &rIn, bool bForLike )
+OUString VBAToRegexp(const OUString &rIn)
 {
 OUStringBuffer sResult;
 const sal_Unicode *start = rIn.getStr();
 const sal_Unicode *end = start + rIn.getLength();
 
 int seenright = 0;
-if ( bForLike )
-sResult.append('^');
 
 while (start < end)
 {
@@ -626,9 +624,6 @@ OUString VBAToRegexp(const OUString &rIn, bool bForLike )
 }
 }
 
-if ( bForLike )
-sResult.append('$');
-
 return sResult.makeStringAndClear( );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vbahelper sc/source sw/source vbahelper/source

2015-10-06 Thread Douglas Mencken
 include/vbahelper/vbaapplicationbase.hxx|2 
 include/vbahelper/vbacollectionimpl.hxx |   36 ++---
 include/vbahelper/vbadialogbase.hxx |3 
 include/vbahelper/vbadialogsbase.hxx|3 
 include/vbahelper/vbadocumentbase.hxx   |2 
 include/vbahelper/vbafontbase.hxx   |4 
 include/vbahelper/vbaglobalbase.hxx |2 
 include/vbahelper/vbahelper.hxx |1 
 include/vbahelper/vbahelperinterface.hxx|   40 +-
 include/vbahelper/vbapagesetupbase.hxx  |3 
 include/vbahelper/vbapropvalue.hxx  |4 
 include/vbahelper/vbareturntypes.hxx|4 
 include/vbahelper/vbashape.hxx  |4 
 include/vbahelper/vbatextframe.hxx  |2 
 include/vbahelper/vbawindowbase.hxx |2 
 sc/source/ui/vba/vbaaxis.hxx|2 
 sc/source/ui/vba/vbaborders.cxx |2 
 sc/source/ui/vba/vbacharacters.hxx  |2 
 sc/source/ui/vba/vbachart.hxx   |2 
 sc/source/ui/vba/vbachartobject.hxx |2 
 sc/source/ui/vba/vbacomment.hxx |2 
 sc/source/ui/vba/vbacondition.cxx   |   28 ++--
 sc/source/ui/vba/vbacondition.hxx   |6 
 sc/source/ui/vba/vbaformat.cxx  |  124 ++--
 sc/source/ui/vba/vbaformat.hxx  |6 
 sc/source/ui/vba/vbahyperlink.hxx   |2 
 sc/source/ui/vba/vbainterior.hxx|2 
 sc/source/ui/vba/vbamenu.hxx|2 
 sc/source/ui/vba/vbamenubar.hxx |2 
 sc/source/ui/vba/vbamenuitem.hxx|2 
 sc/source/ui/vba/vbaname.hxx|2 
 sc/source/ui/vba/vbaoleobject.hxx   |2 
 sc/source/ui/vba/vbaoutline.hxx |2 
 sc/source/ui/vba/vbapagebreak.cxx   |   20 +--
 sc/source/ui/vba/vbapagebreak.hxx   |6 
 sc/source/ui/vba/vbapivotcache.hxx  |2 
 sc/source/ui/vba/vbapivottable.hxx  |2 
 sc/source/ui/vba/vbasheetobject.hxx |4 
 sc/source/ui/vba/vbatextframe.hxx   |2 
 sc/source/ui/vba/vbatitle.hxx   |6 
 sc/source/ui/vba/vbavalidation.hxx  |2 
 sc/source/ui/vba/vbaworksheet.hxx   |2 
 sc/source/ui/vba/vbawsfunction.hxx  |2 
 sw/source/ui/vba/vbaaddin.hxx   |3 
 sw/source/ui/vba/vbaapplication.hxx |2 
 sw/source/ui/vba/vbaautotextentry.hxx   |3 
 sw/source/ui/vba/vbabookmark.hxx|3 
 sw/source/ui/vba/vbaborders.cxx |2 
 sw/source/ui/vba/vbacell.hxx|3 
 sw/source/ui/vba/vbacheckbox.hxx|3 
 sw/source/ui/vba/vbacolumn.hxx  |3 
 sw/source/ui/vba/vbadocumentproperties.cxx  |2 
 sw/source/ui/vba/vbafield.hxx   |2 
 sw/source/ui/vba/vbafind.hxx|3 
 sw/source/ui/vba/vbaframe.hxx   |3 
 sw/source/ui/vba/vbaheaderfooter.hxx|3 
 sw/source/ui/vba/vbalistformat.hxx  |3 
 sw/source/ui/vba/vbalistgallery.hxx |3 
 sw/source/ui/vba/vbalistlevel.hxx   |3 
 sw/source/ui/vba/vbalisttemplate.hxx|3 
 sw/source/ui/vba/vbaoptions.hxx |3 
 sw/source/ui/vba/vbapane.hxx|3 
 sw/source/ui/vba/vbaparagraph.hxx   |3 
 sw/source/ui/vba/vbaparagraphformat.hxx |3 
 sw/source/ui/vba/vbarange.hxx   |3 
 sw/source/ui/vba/vbareplacement.hxx |3 
 sw/source/ui/vba/vbarevision.hxx|3 
 sw/source/ui/vba/vbarow.hxx |3 
 sw/source/ui/vba/vbasection.hxx |3 
 sw/source/ui/vba/vbaselection.hxx   |2 
 sw/source/ui/vba/vbastyle.hxx   |2 
 sw/source/ui/vba/vbasystem.hxx  |3 
 sw/source/ui/vba/vbatable.hxx   |2 
 sw/source/ui/vba/vbatableofcontents.hxx |3 
 sw/source/ui/vba/vbatabstop.hxx |3 
 sw/source/ui/vba/vbatemplate.hxx|2 
 sw/source/ui/vba/vbavariable.hxx|3 
 sw/source/ui/vba/vbaview.hxx|2 
 sw/source/ui/vba/vbawrapformat.hxx  |2 
 vbahelper/source/msforms/vbacontrol.hxx |2 
 vbahelper/source/msforms/vbauserform.hxx|2 
 vbahelper/source/vb

[Libreoffice-commits] core.git: include/vbahelper vbahelper/source

2015-07-20 Thread Noel Grandin
 include/vbahelper/vbadocumentsbase.hxx |1 -
 include/vbahelper/vbashape.hxx |1 -
 vbahelper/source/msforms/vbacontrol.cxx|4 
 vbahelper/source/msforms/vbacontrol.hxx|2 --
 vbahelper/source/msforms/vbamultipage.hxx  |2 --
 vbahelper/source/vbahelper/vbacommandbar.hxx   |2 --
 vbahelper/source/vbahelper/vbacommandbarhelper.hxx |8 
 7 files changed, 20 deletions(-)

New commits:
commit 564805d6f825a7889e039c3f95a638fa7c00b4f4
Author: Noel Grandin 
Date:   Mon Jul 20 13:58:12 2015 +0200

loplugin:unusedmethods vbahelper

Change-Id: Ia04e2682e3bd05591b67b9fe15557ce8c0e7939e
Reviewed-on: https://gerrit.libreoffice.org/17234
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/include/vbahelper/vbadocumentsbase.hxx 
b/include/vbahelper/vbadocumentsbase.hxx
index b87702f..a3b4d88 100644
--- a/include/vbahelper/vbadocumentsbase.hxx
+++ b/include/vbahelper/vbadocumentsbase.hxx
@@ -51,7 +51,6 @@ public:
 
 protected:
 css::uno::Any createDocument() throw (css::uno::RuntimeException, 
std::exception);
-void closeDocuments() throw (css::uno::RuntimeException);
 css::uno::Any openDocument( const OUString& Filename, const css::uno::Any& 
ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw 
(css::uno::RuntimeException);
 };
 
diff --git a/include/vbahelper/vbashape.hxx b/include/vbahelper/vbashape.hxx
index 897ff5b..5cedd99 100644
--- a/include/vbahelper/vbashape.hxx
+++ b/include/vbahelper/vbashape.hxx
@@ -53,7 +53,6 @@ public:
 ScVbaShape( const css::uno::Reference< ov::XHelperInterface >& xParent, 
const css::uno::Reference< css::uno::XComponentContext >& xContext, const 
css::uno::Reference< css::drawing::XShape >& xShape, const css::uno::Reference< 
css::drawing::XShapes >& xShapes, const css::uno::Reference< css::frame::XModel 
>& xModel, sal_Int32 nType )
 throw (css::lang::IllegalArgumentException, 
css::uno::RuntimeException);
 virtual ~ScVbaShape();
-css::uno::Any getRange() { return m_aRange; };
 void setRange( css::uno::Any aRange ) { m_aRange = aRange; };
 
 static sal_Int32 getType( const css::uno::Reference< css::drawing::XShape 
>& rShape ) throw (css::uno::RuntimeException);
diff --git a/vbahelper/source/msforms/vbacontrol.cxx 
b/vbahelper/source/msforms/vbacontrol.cxx
index cdfc8a7..017c594 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -435,10 +435,6 @@ void SAL_CALL ScVbaControl::setTag( const OUString& aTag )
 return OORGBToXLRGB( nForeColor );
 }
 
-void SAL_CALL ScVbaControl::setForeColor( ::sal_Int32 _forecolor ) throw 
(::com::sun::star::uno::RuntimeException)
-{
- m_xProps->setPropertyValue( "TextColor" , uno::makeAny( XLRGBToOORGB( 
_forecolor ) ) );
-}
 
 struct PointerStyles
 {
diff --git a/vbahelper/source/msforms/vbacontrol.hxx 
b/vbahelper/source/msforms/vbacontrol.hxx
index 71a7c33..4a3f4ef 100644
--- a/vbahelper/source/msforms/vbacontrol.hxx
+++ b/vbahelper/source/msforms/vbacontrol.hxx
@@ -66,7 +66,6 @@ public:
 void setGeometryHelper( ov::AbstractGeometryAttributes* pHelper );
 // sets the name of the associated library ( used for UserForm controls )
 void setLibraryAndCodeName( const OUString& sLibCodeName ) { 
m_sLibraryAndCodeName = sLibCodeName; }
-OUString getLibraryAndCodeName() const { return m_sLibraryAndCodeName; }
 
 // XControl
 virtual sal_Bool SAL_CALL getEnabled() throw (css::uno::RuntimeException, 
std::exception) SAL_OVERRIDE;
@@ -103,7 +102,6 @@ public:
 //remove resource because ooo.vba.excel.XControl is a wrapper of 
com.sun.star.drawing.XControlShape
 void removeResource() throw( css::uno::RuntimeException );
 virtual ::sal_Int32 SAL_CALL getForeColor() throw 
(::com::sun::star::uno::RuntimeException);
-virtual void SAL_CALL setForeColor( ::sal_Int32 _forecolor ) throw 
(::com::sun::star::uno::RuntimeException);
 //XHelperInterface
 virtual OUString getServiceImplName() SAL_OVERRIDE;
 virtual css::uno::Sequence getServiceNames() SAL_OVERRIDE;
diff --git a/vbahelper/source/msforms/vbamultipage.hxx 
b/vbahelper/source/msforms/vbamultipage.hxx
index b3f3233..a7a19fb 100644
--- a/vbahelper/source/msforms/vbamultipage.hxx
+++ b/vbahelper/source/msforms/vbamultipage.hxx
@@ -48,8 +48,6 @@ public:
 //XHelperInterface
 virtual OUString getServiceImplName() SAL_OVERRIDE;
 virtual css::uno::Sequence getServiceNames() SAL_OVERRIDE;
-// XDefaultProperty
-static OUString SAL_CALL getDefaultPropertyName(  ) throw 
(css::uno::RuntimeException) { return OUString("Value"); }
 };
 
 #endif // INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBAMULTIPAGE_HXX
diff --git a/vbahelper/source/vbahelper/vbacommandbar.hxx 
b/vbahelper/source/vbahelper/vbacommandbar.hxx
index 62c6c0d..8073db0 100644
--- a/vbahelper/source/vbahelper/vbacommandbar.hxx
+++ b/vbahelper/s

[Libreoffice-commits] core.git: include/vbahelper

2014-09-15 Thread Stephan Bergmann
 include/vbahelper/vbareturntypes.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 40036fc228af31d84bc1d3a64af84ce03117fb37
Author: Stephan Bergmann 
Date:   Mon Sep 15 15:41:18 2014 +0200

scripting: sal_Bool -> bool

Change-Id: I3b2d410dfdd9bc779e7f1f1674fb6fc8b74a42c2

diff --git a/include/vbahelper/vbareturntypes.hxx 
b/include/vbahelper/vbareturntypes.hxx
index 826909e..ac8508c 100644
--- a/include/vbahelper/vbareturntypes.hxx
+++ b/include/vbahelper/vbareturntypes.hxx
@@ -55,7 +55,7 @@ namespace ooo
 class ReturnBoolean : public ReturnBoolean_BASE
 {
 public:
-ReturnBoolean( sal_Bool nValue ) : ReturnBoolean_BASE( nValue ){}
+ReturnBoolean( bool nValue ) : ReturnBoolean_BASE( nValue ){}
 };
 typedef DefaultReturnHelper< float, ov::msforms::XReturnSingle > 
ReturnSingle_BASE;
 class ReturnSingle : public ReturnSingle_BASE
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vbahelper

2014-09-15 Thread Stephan Bergmann
 include/vbahelper/vbacollectionimpl.hxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 9deb4ff1248bef48100fe3ceacc25ffa3b61e4da
Author: Stephan Bergmann 
Date:   Mon Sep 15 13:55:49 2014 +0200

Mark template member fns that are supposed to override as SAL_OVERRIDE

Change-Id: I712f352635a2e258bfaf60dc30ed764666a51f15

diff --git a/include/vbahelper/vbacollectionimpl.hxx 
b/include/vbahelper/vbacollectionimpl.hxx
index a0b9041..2fbb617 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -281,13 +281,13 @@ public:
 ScVbaCollectionBase( const css::uno::Reference< ov::XHelperInterface >& 
xParent,   const css::uno::Reference< css::uno::XComponentContext >& xContext, 
const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, bool 
bIgnoreCase = false ) : BaseColBase( xParent, xContext ), m_xIndexAccess( 
xIndexAccess ), mbIgnoreCase( bIgnoreCase ) { m_xNameAccess.set(m_xIndexAccess, 
css::uno::UNO_QUERY); }
 
 //XCollection
-virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException)
+virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException) 
SAL_OVERRIDE
 {
 return m_xIndexAccess->getCount();
 }
 
 virtual css::uno::Any SAL_CALL Item(const css::uno::Any& Index1, const 
css::uno::Any& /*not processed in this base class*/)
- throw (css::lang::IndexOutOfBoundsException, 
css::script::BasicErrorException, css::uno::RuntimeException)
+ throw (css::lang::IndexOutOfBoundsException, 
css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE
 {
 if ( Index1.getValueTypeClass() != css::uno::TypeClass_STRING )
 {
@@ -306,17 +306,17 @@ public:
 }
 
 // XDefaultMethod
-OUString SAL_CALL getDefaultMethodName(  ) throw 
(css::uno::RuntimeException)
+OUString SAL_CALL getDefaultMethodName(  ) throw 
(css::uno::RuntimeException) SAL_OVERRIDE
 {
 return OUString("Item");
 }
 // XEnumerationAccess
-virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL 
createEnumeration() throw (css::uno::RuntimeException) = 0;
+virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL 
createEnumeration() throw (css::uno::RuntimeException) SAL_OVERRIDE = 0;
 
 // XElementAccess
-virtual css::uno::Type SAL_CALL getElementType() throw 
(css::uno::RuntimeException) = 0;
+virtual css::uno::Type SAL_CALL getElementType() throw 
(css::uno::RuntimeException) SAL_OVERRIDE = 0;
 // XElementAccess
-virtual sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException)
+virtual sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException) 
SAL_OVERRIDE
 {
 return ( m_xIndexAccess->getCount() > 0 );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vbahelper

2014-09-15 Thread Stephan Bergmann
 include/vbahelper/vbahelperinterface.hxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit a8c8f92d3de7eab7fc385ca4d630487e2d10ce0e
Author: Stephan Bergmann 
Date:   Mon Sep 15 12:13:36 2014 +0200

Mark template member fns that are supposed to override as SAL_OVERRIDE

Change-Id: Ifb5798a9f01961dd916857a0dca44a3fd8587ec4

diff --git a/include/vbahelper/vbahelperinterface.hxx 
b/include/vbahelper/vbahelperinterface.hxx
index 2650ca0..2c97100 100644
--- a/include/vbahelper/vbahelperinterface.hxx
+++ b/include/vbahelper/vbahelperinterface.hxx
@@ -67,13 +67,13 @@ public:
 virtual css::uno::Sequence getServiceNames() = 0;
 
 // XHelperInterface Methods
-virtual ::sal_Int32 SAL_CALL getCreator() throw 
(css::script::BasicErrorException, css::uno::RuntimeException)
+virtual ::sal_Int32 SAL_CALL getCreator() throw 
(css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE
 {
 return 0x53756E4F;
 }
-virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent(  ) 
throw (css::script::BasicErrorException, css::uno::RuntimeException) { return 
mxParent; }
+virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent(  ) 
throw (css::script::BasicErrorException, css::uno::RuntimeException) 
SAL_OVERRIDE { return mxParent; }
 
-virtual css::uno::Any SAL_CALL Application(  ) throw 
(css::script::BasicErrorException, css::uno::RuntimeException) {
+virtual css::uno::Any SAL_CALL Application(  ) throw 
(css::script::BasicErrorException, css::uno::RuntimeException) SAL_OVERRIDE {
 // The application could certainly be passed around in the context 
- seems
 // to make sense
 css::uno::Reference< css::container::XNameAccess > xNameAccess( 
mxContext, css::uno::UNO_QUERY_THROW );
@@ -81,8 +81,8 @@ public:
 }
 
 // XServiceInfo Methods
-virtual OUString SAL_CALL getImplementationName(  ) throw 
(css::uno::RuntimeException) { return getServiceImplName(); }
-virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) 
throw (css::uno::RuntimeException)
+virtual OUString SAL_CALL getImplementationName(  ) throw 
(css::uno::RuntimeException) SAL_OVERRIDE { return getServiceImplName(); }
+virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) 
throw (css::uno::RuntimeException) SAL_OVERRIDE
 {
 css::uno::Sequence< OUString > sServices = getSupportedServiceNames();
 const OUString* pStart = sServices.getConstArray();
@@ -92,7 +92,7 @@ public:
 return sal_True;
 return sal_False;
 }
-virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  
) throw (css::uno::RuntimeException)
+virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  
) throw (css::uno::RuntimeException) SAL_OVERRIDE
 {
 css::uno::Sequence< OUString > aNames = getServiceNames();
 return aNames;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vbahelper vbahelper/source

2014-04-24 Thread Caolán McNamara
 include/vbahelper/vbashape.hxx  |8 
 vbahelper/source/vbahelper/vbashape.cxx |8 
 2 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit d8fa21bd11c79bed3a2d03a31b30563879cc8c4b
Author: Caolán McNamara 
Date:   Thu Apr 24 13:26:32 2014 +0100

hmm, need a rethink on these exceptions

Change-Id: I0d91e142d719b946f65ed704b06371d00534ad78

diff --git a/include/vbahelper/vbashape.hxx b/include/vbahelper/vbashape.hxx
index 0750bbd..838ad43 100644
--- a/include/vbahelper/vbashape.hxx
+++ b/include/vbahelper/vbashape.hxx
@@ -67,10 +67,10 @@ public:
 virtual void SAL_CALL setAlternativeText( const OUString& _name ) throw 
(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 virtual double SAL_CALL getHeight() throw (css::uno::RuntimeException, 
std::exception) SAL_OVERRIDE;
 virtual void SAL_CALL setHeight(double _height)
-throw (css::script::BasicErrorException, css::uno::RuntimeException, 
std::exception) SAL_OVERRIDE;
+throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 virtual double SAL_CALL getWidth() throw (css::uno::RuntimeException, 
std::exception) SAL_OVERRIDE;
 virtual void SAL_CALL setWidth(double _width)
-throw (css::script::BasicErrorException, css::uno::RuntimeException, 
std::exception) SAL_OVERRIDE;
+throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 virtual double SAL_CALL getLeft() throw (css::uno::RuntimeException, 
std::exception) SAL_OVERRIDE;
 virtual void SAL_CALL setLeft( double _left ) throw 
(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 virtual double SAL_CALL getTop() throw (css::uno::RuntimeException, 
std::exception) SAL_OVERRIDE;
@@ -90,10 +90,10 @@ public:
 virtual void SAL_CALL setLockAnchor( sal_Bool _lockanchor ) throw 
(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 virtual ::sal_Int32 SAL_CALL getRelativeHorizontalPosition() throw 
(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 virtual void SAL_CALL setRelativeHorizontalPosition(::sal_Int32 
_relativehorizontalposition)
-throw (css::script::BasicErrorException, css::uno::RuntimeException, 
std::exception) SAL_OVERRIDE;
+throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 virtual ::sal_Int32 SAL_CALL getRelativeVerticalPosition() throw 
(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 virtual void SAL_CALL setRelativeVerticalPosition(::sal_Int32 
_relativeverticalposition)
-throw (css::script::BasicErrorException, css::uno::RuntimeException, 
std::exception) SAL_OVERRIDE;
+throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
 // Methods
 virtual css::uno::Any SAL_CALL SAL_CALL TextFrame(  ) throw 
(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/vbahelper/source/vbahelper/vbashape.cxx 
b/vbahelper/source/vbahelper/vbashape.cxx
index 38a6740..09e4ccc 100644
--- a/vbahelper/source/vbahelper/vbashape.cxx
+++ b/vbahelper/source/vbahelper/vbashape.cxx
@@ -193,7 +193,7 @@ ScVbaShape::getHeight() throw (uno::RuntimeException, 
std::exception)
 
 void SAL_CALL
 ScVbaShape::setHeight(double _height)
-throw (script::BasicErrorException, uno::RuntimeException, std::exception)
+throw (uno::RuntimeException, std::exception)
 {
 m_pShapeHelper->setHeight( _height );
 }
@@ -206,7 +206,7 @@ ScVbaShape::getWidth() throw (uno::RuntimeException, 
std::exception)
 
 void SAL_CALL
 ScVbaShape::setWidth(double _width)
-throw (css::script::BasicErrorException, uno::RuntimeException, 
std::exception)
+throw (uno::RuntimeException, std::exception)
 {
 m_pShapeHelper->setWidth( _width );
 }
@@ -577,7 +577,7 @@ ScVbaShape::getRelativeHorizontalPosition() throw 
(uno::RuntimeException, std::e
 
 void SAL_CALL
 ScVbaShape::setRelativeHorizontalPosition(::sal_Int32 
_relativehorizontalposition)
-throw (css::script::BasicErrorException, uno::RuntimeException, 
std::exception)
+throw (uno::RuntimeException, std::exception)
 {
 sal_Int16 nType = text::RelOrientation::PAGE_FRAME;
 switch( _relativehorizontalposition )
@@ -649,7 +649,7 @@ ScVbaShape::getRelativeVerticalPosition() throw 
(uno::RuntimeException, std::exc
 
 void SAL_CALL
 ScVbaShape::setRelativeVerticalPosition(::sal_Int32 _relativeverticalposition)
-throw (css::script::BasicErrorException, uno::RuntimeException, 
std::exception)
+throw (uno::RuntimeException, std::exception)
 {
 sal_Int16 nType = text::RelOrientation::PAGE_FRAME;
 switch( _relativeverticalposition )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vbahelper

2014-04-14 Thread Thomas Arnhold
 include/vbahelper/vbacollectionimpl.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2346c010eab052aae2485bae522d06766e192cf0
Author: Thomas Arnhold 
Date:   Mon Apr 14 12:45:51 2014 +0200

fix mac build

Change-Id: I3f29b389543d23bb230964d81ed9a6a946a4414d

diff --git a/include/vbahelper/vbacollectionimpl.hxx 
b/include/vbahelper/vbacollectionimpl.hxx
index 47e0891..4698023 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -309,7 +309,7 @@ public:
 // XDefaultMethod
 OUString SAL_CALL getDefaultMethodName(  ) throw 
(css::uno::RuntimeException)
 {
-return "Item";
+return OUString("Item");
 }
 // XEnumerationAccess
 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL 
createEnumeration() throw (css::uno::RuntimeException) = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vbahelper include/xmloff vbahelper/source xmloff/inc xmloff/source

2014-03-13 Thread Noel Grandin
 include/vbahelper/vbahelper.hxx |2 
 include/vbahelper/vbashapes.hxx |6 -
 include/vbahelper/vbatextframe.hxx  |4 -
 include/xmloff/SettingsExportHelper.hxx |6 -
 include/xmloff/attrlist.hxx |2 
 include/xmloff/txtimp.hxx   |4 -
 include/xmloff/xmlaustp.hxx |2 
 vbahelper/source/vbahelper/vbahelper.cxx|2 
 vbahelper/source/vbahelper/vbalineformat.cxx|2 
 vbahelper/source/vbahelper/vbalineformat.hxx|2 
 vbahelper/source/vbahelper/vbashapes.cxx|9 +-
 vbahelper/source/vbahelper/vbatextframe.cxx |4 -
 xmloff/inc/XMLFootnoteConfigurationImportContext.hxx|4 -
 xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx |4 -
 xmloff/inc/XMLLineNumberingImportContext.hxx|6 -
 xmloff/inc/forms/property_handler.hxx   |2 
 xmloff/inc/txtflde.hxx  |4 -
 xmloff/inc/txtfldi.hxx  |4 -
 xmloff/inc/txtlists.hxx |   36 
+-
 xmloff/source/chart/SchXMLAxisContext.cxx   |2 
 xmloff/source/chart/SchXMLAxisContext.hxx   |2 
 xmloff/source/chart/transporttypes.hxx  |4 -
 xmloff/source/core/DomBuilderContext.cxx|4 -
 xmloff/source/core/SettingsExportHelper.cxx |6 -
 xmloff/source/core/attrlist.cxx |2 
 xmloff/source/forms/handler/vcl_date_handler.cxx|2 
 xmloff/source/forms/handler/vcl_date_handler.hxx|2 
 xmloff/source/forms/handler/vcl_time_handler.cxx|2 
 xmloff/source/forms/handler/vcl_time_handler.hxx|2 
 xmloff/source/style/xmlaustp.cxx|2 
 xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx|4 -
 xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx |4 -
 xmloff/source/text/XMLLineNumberingImportContext.cxx|2 
 xmloff/source/text/txtflde.cxx  |4 -
 xmloff/source/text/txtfldi.cxx  |2 
 xmloff/source/text/txtimp.cxx   |6 -
 xmloff/source/text/txtlists.cxx |   36 
+-
 xmloff/source/text/txtparai.cxx |   28 +++
 xmloff/source/text/txtparaimphint.hxx   |2 
 39 files changed, 111 insertions(+), 112 deletions(-)

New commits:
commit fddde2b74a24b1e88e33940ee98f7fa2887dc58c
Author: Noel Grandin 
Date:   Thu Mar 13 15:04:48 2014 +0200

xmloff,vbahelper: prefer passing OUString and OString by reference

Change-Id: I8b7e4284c122549c03edaa7f3963cbfb2024b3fc

diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index 236beae..6b3c2c2 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -230,7 +230,7 @@ class VBAHELPER_DLLPUBLIC ContainerUtilities
 
 public:
 static OUString getUniqueName( const css::uno::Sequence< OUString >&  
_slist, const OUString& _sElementName, const OUString& _sSuffixSeparator);
-static OUString getUniqueName( const css::uno::Sequence< OUString >& 
_slist, const OUString _sElementName, const OUString& _sSuffixSeparator, 
sal_Int32 _nStartSuffix );
+static OUString getUniqueName( const css::uno::Sequence< OUString >& 
_slist, const OUString& _sElementName, const OUString& _sSuffixSeparator, 
sal_Int32 _nStartSuffix );
 
 static sal_Int32 FieldInList( const css::uno::Sequence< OUString >& 
SearchList, const OUString& SearchString );
 };
diff --git a/include/vbahelper/vbashapes.hxx b/include/vbahelper/vbashapes.hxx
index 65905dd..2e8e979d 100644
--- a/include/vbahelper/vbashapes.hxx
+++ b/include/vbahelper/vbashapes.hxx
@@ -42,18 +42,18 @@ protected:
 virtual OUString getServiceImplName();
 virtual css::uno::Sequence getServiceNames();
 virtual css::uno::Reference< css::container::XIndexAccess > 
getShapesByArrayIndices( const css::uno::Any& Index ) throw 
(css::uno::RuntimeException);
-css::uno::Reference< css::drawing::XShape > createShape( OUString service 
) throw (css::uno::RuntimeException);
+css::uno::Reference< css::drawing::XShape > createShape( const OUString& 
service ) throw (css::uno::RuntimeException);
 css::uno::Any AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 
nLineWidth, sal_Int32 nLineHeight, css::uno::Any aRange ) throw 
(css::uno::RuntimeException);
 css::uno::