Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
7f585002
Kaydet (Commit)
7f585002
authored
Ock 28, 2012
tarafından
Olivier Hallot
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix for fdo43460 Part LVI getLength() to isEmpty()
Part LVI Modules vbahelper
üst
7c4807bf
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
30 additions
and
30 deletions
+30
-30
vbacombobox.cxx
vbahelper/source/msforms/vbacombobox.cxx
+2
-2
vbacontrols.cxx
vbahelper/source/msforms/vbacontrols.cxx
+6
-6
vbalistcontrolhelper.cxx
vbahelper/source/msforms/vbalistcontrolhelper.cxx
+1
-1
vbauserform.cxx
vbahelper/source/msforms/vbauserform.cxx
+1
-1
vbaapplicationbase.cxx
vbahelper/source/vbahelper/vbaapplicationbase.cxx
+2
-2
vbacommandbar.cxx
vbahelper/source/vbahelper/vbacommandbar.cxx
+1
-1
vbacommandbarhelper.cxx
vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+2
-2
vbacommandbars.cxx
vbahelper/source/vbahelper/vbacommandbars.cxx
+4
-4
vbadialogbase.cxx
vbahelper/source/vbahelper/vbadialogbase.cxx
+1
-1
vbadocumentbase.cxx
vbahelper/source/vbahelper/vbadocumentbase.cxx
+2
-2
vbaeventshelperbase.cxx
vbahelper/source/vbahelper/vbaeventshelperbase.cxx
+6
-6
vbahelper.cxx
vbahelper/source/vbahelper/vbahelper.cxx
+2
-2
No files found.
vbahelper/source/msforms/vbacombobox.cxx
Dosyayı görüntüle @
7f585002
...
...
@@ -62,7 +62,7 @@ ScVbaComboBox::ScVbaComboBox( const uno::Reference< XHelperInterface >& xParent,
catch
(
uno
::
Exception
&
)
{
}
if
(
sSourceName
.
getLength
()
==
0
)
if
(
sSourceName
.
isEmpty
()
)
sSourceName
=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Text"
)
);
}
...
...
@@ -110,7 +110,7 @@ ScVbaComboBox::getListIndex() throw (uno::RuntimeException)
{
rtl
::
OUString
sText
=
getText
();
sal_Int32
nLen
=
sItems
.
getLength
();
for
(
sal_Int32
index
=
0
;
sText
.
getLength
()
&&
index
<
nLen
;
++
index
)
for
(
sal_Int32
index
=
0
;
!
sText
.
isEmpty
()
&&
index
<
nLen
;
++
index
)
{
if
(
sItems
[
index
].
equals
(
sText
)
)
{
...
...
vbahelper/source/msforms/vbacontrols.cxx
Dosyayı görüntüle @
7f585002
...
...
@@ -288,10 +288,10 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St
// TODO: Support Before and After?
::
rtl
::
OUString
aNewName
;
StringKey
>>=
aNewName
;
if
(
!
aNewName
.
getLength
()
)
if
(
aNewName
.
isEmpty
()
)
{
aNewName
=
aComServiceName
;
if
(
!
aNewName
.
getLength
()
)
if
(
aNewName
.
isEmpty
()
)
aNewName
=
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Control"
)
);
sal_Int32
nInd
=
0
;
...
...
@@ -303,7 +303,7 @@ uno::Any SAL_CALL ScVbaControls::Add( const uno::Any& Object, const uno::Any& St
}
double
fDefWidth
=
72.0
,
fDefHeight
=
18.0
;
if
(
aComServiceName
.
getLength
()
)
if
(
!
aComServiceName
.
isEmpty
()
)
{
// create a UNO control model based on the passed control type
uno
::
Reference
<
awt
::
XControlModel
>
xNewModel
;
...
...
@@ -464,12 +464,12 @@ void SAL_CALL ScVbaControls::Remove( const uno::Any& StringKeyOrIndex )
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xModelFactory
(
mxDialog
->
getModel
(),
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
container
::
XNameContainer
>
xDialogContainer
(
xModelFactory
,
uno
::
UNO_QUERY_THROW
);
if
(
!
(
(
StringKeyOrIndex
>>=
aControlName
)
&&
aControlName
.
getLength
()
)
if
(
!
(
(
StringKeyOrIndex
>>=
aControlName
)
&&
!
aControlName
.
isEmpty
()
)
&&
!
(
(
StringKeyOrIndex
>>=
nIndex
)
&&
nIndex
>=
0
&&
nIndex
<
m_xIndexAccess
->
getCount
()
)
)
throw
uno
::
RuntimeException
();
uno
::
Reference
<
awt
::
XControl
>
xControl
;
if
(
aControlName
.
getLength
()
)
if
(
!
aControlName
.
isEmpty
()
)
{
uno
::
Reference
<
awt
::
XControlContainer
>
xControlContainer
(
mxDialog
,
uno
::
UNO_QUERY_THROW
);
xControl
=
xControlContainer
->
getControl
(
aControlName
);
...
...
@@ -482,7 +482,7 @@ void SAL_CALL ScVbaControls::Remove( const uno::Any& StringKeyOrIndex )
if
(
!
xControl
.
is
()
)
throw
uno
::
RuntimeException
();
if
(
!
aControlName
.
getLength
()
)
if
(
aControlName
.
isEmpty
()
)
aControlName
=
ControlArrayWrapper
::
getControlName
(
xControl
);
xDialogContainer
->
removeByName
(
aControlName
);
...
...
vbahelper/source/msforms/vbalistcontrolhelper.cxx
Dosyayı görüntüle @
7f585002
...
...
@@ -161,7 +161,7 @@ ListControlHelper::Clear( ) throw (uno::RuntimeException)
void
SAL_CALL
ListControlHelper
::
setRowSource
(
const
rtl
::
OUString
&
_rowsource
)
throw
(
uno
::
RuntimeException
)
{
if
(
_rowsource
.
getLength
()
==
0
)
if
(
_rowsource
.
isEmpty
()
)
Clear
();
}
...
...
vbahelper/source/msforms/vbauserform.cxx
Dosyayı görüntüle @
7f585002
...
...
@@ -273,7 +273,7 @@ ScVbaUserForm::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::Un
{
uno
::
Reference
<
msforms
::
XControl
>
xVBAControl
=
ScVbaControlFactory
::
createUserformControl
(
mxContext
,
xControl
,
xDialogControl
,
m_xModel
,
mpGeometryHelper
->
getOffsetX
(),
mpGeometryHelper
->
getOffsetY
()
);
ScVbaControl
*
pControl
=
dynamic_cast
<
ScVbaControl
*
>
(
xVBAControl
.
get
()
);
if
(
m_sLibName
.
getLength
()
)
if
(
!
m_sLibName
.
isEmpty
()
)
pControl
->
setLibraryAndCodeName
(
m_sLibName
.
concat
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"."
)
)
).
concat
(
getName
()
)
);
aResult
=
uno
::
makeAny
(
xVBAControl
);
}
...
...
vbahelper/source/vbahelper/vbaapplicationbase.cxx
Dosyayı görüntüle @
7f585002
...
...
@@ -109,7 +109,7 @@ public:
void
Start
(
const
::
rtl
::
Reference
<
VbaApplicationBase
>
xBase
,
const
::
rtl
::
OUString
&
aFunction
,
double
nFrom
,
double
nTo
)
{
if
(
!
xBase
.
is
()
||
!
aFunction
.
getLength
()
)
if
(
!
xBase
.
is
()
||
aFunction
.
isEmpty
()
)
throw
uno
::
RuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Unexpected arguments!"
)
),
uno
::
Reference
<
uno
::
XInterface
>
()
);
m_xBase
=
xBase
;
...
...
@@ -347,7 +347,7 @@ uno::Any SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, con
void
SAL_CALL
VbaApplicationBase
::
OnTime
(
const
uno
::
Any
&
aEarliestTime
,
const
::
rtl
::
OUString
&
aFunction
,
const
uno
::
Any
&
aLatestTime
,
const
uno
::
Any
&
aSchedule
)
throw
(
uno
::
RuntimeException
)
{
if
(
!
aFunction
.
getLength
()
)
if
(
aFunction
.
isEmpty
()
)
throw
uno
::
RuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Unexpected function name!"
)
),
uno
::
Reference
<
uno
::
XInterface
>
()
);
double
nEarliestTime
=
0
;
...
...
vbahelper/source/vbahelper/vbacommandbar.cxx
Dosyayı görüntüle @
7f585002
...
...
@@ -50,7 +50,7 @@ ScVbaCommandBar::getName() throw ( uno::RuntimeException )
uno
::
Any
aName
=
xPropertySet
->
getPropertyValue
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"UIName"
))
);
rtl
::
OUString
sName
;
aName
>>=
sName
;
if
(
sName
.
getLength
()
<
1
)
if
(
sName
.
isEmpty
()
)
{
if
(
m_bIsMenu
)
{
...
...
vbahelper/source/vbahelper/vbacommandbarhelper.cxx
Dosyayı görüntüle @
7f585002
...
...
@@ -114,7 +114,7 @@ void VbaCommandBarHelper::Init( ) throw (css::uno::RuntimeException)
maModuleId
=
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.text.TextDocument"
)
);
}
if
(
maModuleId
.
getLength
()
==
0
)
if
(
maModuleId
.
isEmpty
()
)
{
throw
uno
::
RuntimeException
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Not implemented"
)
),
uno
::
Reference
<
uno
::
XInterface
>
()
);
}
...
...
@@ -209,7 +209,7 @@ rtl::OUString VbaCommandBarHelper::findToolbarByName( const css::uno::Reference<
// check if it is an buildin toolbar
sResourceUrl
=
MSO2OOCommandbarHelper
::
getMSO2OOCommandbarHelper
()
->
findBuildinToolbar
(
sName
);
if
(
sResourceUrl
.
getLength
()
>
0
)
if
(
!
sResourceUrl
.
isEmpty
()
)
return
sResourceUrl
;
uno
::
Sequence
<
::
rtl
::
OUString
>
allNames
=
xNameAccess
->
getElementNames
();
...
...
vbahelper/source/vbahelper/vbacommandbars.cxx
Dosyayı görüntüle @
7f585002
...
...
@@ -143,14 +143,14 @@ ScVbaCommandBars::createCollectionObject( const uno::Any& aSource )
}
// nothing found - try to resolve from name
if
(
!
aRet
.
hasValue
()
&&
(
sResourceUrl
.
getLength
()
==
0
)
)
if
(
!
aRet
.
hasValue
()
&&
sResourceUrl
.
isEmpty
(
)
)
{
sResourceUrl
=
m_pCBarHelper
->
findToolbarByName
(
m_xNameAccess
,
sBarName
);
bMenu
=
sal_False
;
}
}
if
(
sResourceUrl
.
getLength
()
)
if
(
!
sResourceUrl
.
isEmpty
()
)
{
xBarSettings
=
m_pCBarHelper
->
getSettings
(
sResourceUrl
);
aRet
<<=
uno
::
Reference
<
XCommandBar
>
(
new
ScVbaCommandBar
(
this
,
mxContext
,
m_pCBarHelper
,
xBarSettings
,
sResourceUrl
,
bMenu
,
sal_False
)
);
...
...
@@ -174,10 +174,10 @@ ScVbaCommandBars::Add( const css::uno::Any& Name, const css::uno::Any& /*Positio
Name
>>=
sName
;
rtl
::
OUString
sResourceUrl
;
if
(
sName
.
getLength
()
)
if
(
!
sName
.
isEmpty
()
)
{
sResourceUrl
=
m_pCBarHelper
->
findToolbarByName
(
m_xNameAccess
,
sName
);
if
(
sResourceUrl
.
getLength
()
)
if
(
!
sResourceUrl
.
isEmpty
()
)
throw
uno
::
RuntimeException
(
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
"Toolbar exists"
)
),
uno
::
Reference
<
uno
::
XInterface
>
()
);
}
else
...
...
vbahelper/source/vbahelper/vbadialogbase.cxx
Dosyayı görüntüle @
7f585002
...
...
@@ -38,7 +38,7 @@ sal_Bool SAL_CALL VbaDialogBase::Show() throw ( uno::RuntimeException )
if
(
m_xModel
.
is
()
)
{
aURL
=
mapIndexToName
(
mnIndex
);
if
(
aURL
.
getLength
()
==
0
)
if
(
aURL
.
isEmpty
()
)
throw
uno
::
RuntimeException
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
" Unable to open the specified dialog "
)
),
uno
::
Reference
<
XInterface
>
()
);
...
...
vbahelper/source/vbahelper/vbadocumentbase.cxx
Dosyayı görüntüle @
7f585002
...
...
@@ -67,7 +67,7 @@ VbaDocumentBase::VbaDocumentBase( uno::Sequence< uno::Any> const & args,
VbaDocumentBase
::
getName
()
throw
(
uno
::
RuntimeException
)
{
rtl
::
OUString
sName
=
getModel
()
->
getURL
();
if
(
sName
.
getLength
()
)
if
(
!
sName
.
isEmpty
()
)
{
INetURLObject
aURL
(
getModel
()
->
getURL
()
);
...
...
@@ -87,7 +87,7 @@ VbaDocumentBase::getPath() throw (uno::RuntimeException)
INetURLObject
aURL
(
getModel
()
->
getURL
()
);
rtl
::
OUString
sURL
=
aURL
.
GetMainURL
(
INetURLObject
::
DECODE_TO_IURI
);
rtl
::
OUString
sPath
;
if
(
sURL
.
getLength
()
>
0
)
if
(
!
sURL
.
isEmpty
()
)
{
sURL
=
sURL
.
copy
(
0
,
sURL
.
getLength
()
-
aURL
.
GetLastName
().
getLength
()
-
1
);
::
osl
::
File
::
getSystemPathFromFileURL
(
sURL
,
sPath
);
...
...
vbahelper/source/vbahelper/vbaeventshelperbase.cxx
Dosyayı görüntüle @
7f585002
...
...
@@ -69,7 +69,7 @@ sal_Bool SAL_CALL VbaEventsHelperBase::hasVbaEventHandler( sal_Int32 nEventId, c
// getEventHandlerInfo() throws, if unknown event dentifier has been passed
const
EventHandlerInfo
&
rInfo
=
getEventHandlerInfo
(
nEventId
);
// getEventHandlerPath() searches for the macro in the document
return
getEventHandlerPath
(
rInfo
,
rArgs
).
getLength
()
>
0
;
return
!
getEventHandlerPath
(
rInfo
,
rArgs
).
isEmpty
()
;
}
sal_Bool
SAL_CALL
VbaEventsHelperBase
::
processVbaEvent
(
sal_Int32
nEventId
,
const
uno
::
Sequence
<
uno
::
Any
>&
rArgs
)
...
...
@@ -114,7 +114,7 @@ sal_Bool SAL_CALL VbaEventsHelperBase::processVbaEvent( sal_Int32 nEventId, cons
{
// search the event handler macro in the document
OUString
aMacroPath
=
getEventHandlerPath
(
rInfo
,
aEventArgs
);
if
(
aMacroPath
.
getLength
()
>
0
)
if
(
!
aMacroPath
.
isEmpty
()
)
{
// build the argument list
uno
::
Sequence
<
uno
::
Any
>
aVbaArgs
=
implBuildArgumentList
(
rInfo
,
aEventArgs
);
...
...
@@ -179,7 +179,7 @@ void SAL_CALL VbaEventsHelperBase::changesOccurred( const util::ChangesEvent& rE
{
const
util
::
ElementChange
&
rChange
=
rEvent
.
Changes
[
nIndex
];
OUString
aModuleName
;
if
(
(
rChange
.
Accessor
>>=
aModuleName
)
&&
(
aModuleName
.
getLength
()
>
0
)
)
try
if
(
(
rChange
.
Accessor
>>=
aModuleName
)
&&
!
aModuleName
.
isEmpty
(
)
)
try
{
// invalidate event handler path map depending on module type
if
(
getModuleType
(
aModuleName
)
==
script
::
ModuleType
::
NORMAL
)
...
...
@@ -275,7 +275,7 @@ OUString VbaEventsHelperBase::getEventHandlerPath( const EventHandlerInfo& rInfo
// document event: get name of the code module associated to the event sender
case
script
:
:
ModuleType
::
DOCUMENT
:
aModuleName
=
implGetDocumentModuleName
(
rInfo
,
rArgs
);
if
(
aModuleName
.
getLength
()
==
0
)
if
(
aModuleName
.
isEmpty
()
)
throw
lang
::
IllegalArgumentException
();
break
;
...
...
@@ -295,7 +295,7 @@ void VbaEventsHelperBase::ensureVBALibrary() throw (uno::RuntimeException)
if
(
!
mxModuleInfos
.
is
()
)
try
{
maLibraryName
=
getDefaultProjectName
(
mpShell
);
if
(
maLibraryName
.
getLength
()
==
0
)
if
(
maLibraryName
.
isEmpty
()
)
throw
uno
::
RuntimeException
();
uno
::
Reference
<
beans
::
XPropertySet
>
xModelProps
(
mxModel
,
uno
::
UNO_QUERY_THROW
);
uno
::
Reference
<
container
::
XNameAccess
>
xBasicLibs
(
xModelProps
->
getPropertyValue
(
...
...
@@ -319,7 +319,7 @@ sal_Int32 VbaEventsHelperBase::getModuleType( const OUString& rModuleName ) thro
ensureVBALibrary
();
// no module specified: global event handler in standard code modules
if
(
rModuleName
.
getLength
()
==
0
)
if
(
rModuleName
.
isEmpty
()
)
return
script
::
ModuleType
::
NORMAL
;
// get module type from module info
...
...
vbahelper/source/vbahelper/vbahelper.cxx
Dosyayı görüntüle @
7f585002
...
...
@@ -432,13 +432,13 @@ void PrintOutHelper( SfxViewShell* pViewShell, const uno::Any& From, const uno::
aArgs
.
Put
(
sfxCollate
,
sfxCollate
.
Which
()
);
SfxInt16Item
sfxCopies
(
SID_PRINT_COPIES
,
nCopies
);
aArgs
.
Put
(
sfxCopies
,
sfxCopies
.
Which
()
);
if
(
sFileName
.
getLength
()
)
if
(
!
sFileName
.
isEmpty
()
)
{
SfxStringItem
sfxFileName
(
SID_FILE_NAME
,
sFileName
);
aArgs
.
Put
(
sfxFileName
,
sfxFileName
.
Which
()
);
}
if
(
sRange
.
getLength
()
)
if
(
!
sRange
.
isEmpty
()
)
{
SfxStringItem
sfxRange
(
SID_PRINT_PAGES
,
sRange
);
aArgs
.
Put
(
sfxRange
,
sfxRange
.
Which
()
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment