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
99ab7bf2
Kaydet (Commit)
99ab7bf2
authored
Ock 10, 2018
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
This is a hash: '#', this is a slash: '/'
Change-Id: I3a0bd41f021547678f7e423d10c8900723006bb6
üst
6cbea52d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
macroloader.cxx
sfx2/source/appl/macroloader.cxx
+6
-6
eventsupplier.cxx
sfx2/source/notify/eventsupplier.cxx
+4
-4
No files found.
sfx2/source/appl/macroloader.cxx
Dosyayı görüntüle @
99ab7bf2
...
...
@@ -210,18 +210,18 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, css::uno::Any& rRetval,
// 'macro://[docname|.]/lib.mod.proc(args)' => macro of current or qualified document
// 'macro://obj.method(args)' => direct API call, execute it via App-BASIC
const
OUString
&
aMacro
(
rURL
);
sal_Int32
n
H
ashPos
=
aMacro
.
indexOf
(
'/'
,
8
);
sal_Int32
n
ThirdSl
ashPos
=
aMacro
.
indexOf
(
'/'
,
8
);
sal_Int32
nArgsPos
=
aMacro
.
indexOf
(
'('
);
BasicManager
*
pAppMgr
=
SfxApplication
::
GetBasicManager
();
BasicManager
*
pBasMgr
=
nullptr
;
ErrCode
nErr
=
ERRCODE_NONE
;
// should a macro function be executed ( no direct API call)?
if
(
-
1
!=
n
HashPos
&&
(
-
1
==
nArgsPos
||
nH
ashPos
<
nArgsPos
)
)
if
(
-
1
!=
n
ThirdSlashPos
&&
(
-
1
==
nArgsPos
||
nThirdSl
ashPos
<
nArgsPos
)
)
{
// find BasicManager
SfxObjectShell
*
pDoc
=
nullptr
;
OUString
aBasMgrName
(
INetURLObject
::
decode
(
aMacro
.
copy
(
8
,
n
H
ashPos
-
8
),
INetURLObject
::
DecodeMechanism
::
WithCharset
)
);
OUString
aBasMgrName
(
INetURLObject
::
decode
(
aMacro
.
copy
(
8
,
n
ThirdSl
ashPos
-
8
),
INetURLObject
::
DecodeMechanism
::
WithCharset
)
);
if
(
aBasMgrName
.
isEmpty
()
)
pBasMgr
=
pAppMgr
;
else
if
(
aBasMgrName
==
"."
)
...
...
@@ -258,13 +258,13 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, css::uno::Any& rRetval,
}
// find BASIC method
OUString
aQualifiedMethod
(
INetURLObject
::
decode
(
aMacro
.
copy
(
n
H
ashPos
+
1
),
INetURLObject
::
DecodeMechanism
::
WithCharset
)
);
OUString
aQualifiedMethod
(
INetURLObject
::
decode
(
aMacro
.
copy
(
n
ThirdSl
ashPos
+
1
),
INetURLObject
::
DecodeMechanism
::
WithCharset
)
);
OUString
aArgs
;
if
(
-
1
!=
nArgsPos
)
{
// remove arguments from macro name
aArgs
=
aQualifiedMethod
.
copy
(
nArgsPos
-
n
H
ashPos
-
1
);
aQualifiedMethod
=
aQualifiedMethod
.
copy
(
0
,
nArgsPos
-
n
H
ashPos
-
1
);
aArgs
=
aQualifiedMethod
.
copy
(
nArgsPos
-
n
ThirdSl
ashPos
-
1
);
aQualifiedMethod
=
aQualifiedMethod
.
copy
(
0
,
nArgsPos
-
n
ThirdSl
ashPos
-
1
);
}
if
(
pBasMgr
->
HasMacro
(
aQualifiedMethod
)
)
...
...
sfx2/source/notify/eventsupplier.cxx
Dosyayı görüntüle @
99ab7bf2
...
...
@@ -429,18 +429,18 @@ void SfxEvents_Impl::NormalizeMacro( const ::comphelper::NamedValueCollection& i
{
if
(
aMacroName
.
isEmpty
()
||
aLibrary
.
isEmpty
()
)
{
sal_Int32
n
H
ashPos
=
aScript
.
indexOf
(
'/'
,
8
);
sal_Int32
n
ThirdSl
ashPos
=
aScript
.
indexOf
(
'/'
,
8
);
sal_Int32
nArgsPos
=
aScript
.
indexOf
(
'('
);
if
(
(
n
HashPos
!=
-
1
)
&&
(
nArgsPos
==
-
1
||
nH
ashPos
<
nArgsPos
)
)
if
(
(
n
ThirdSlashPos
!=
-
1
)
&&
(
nArgsPos
==
-
1
||
nThirdSl
ashPos
<
nArgsPos
)
)
{
OUString
aBasMgrName
(
INetURLObject
::
decode
(
aScript
.
copy
(
8
,
n
H
ashPos
-
8
),
INetURLObject
::
DecodeMechanism
::
WithCharset
)
);
OUString
aBasMgrName
(
INetURLObject
::
decode
(
aScript
.
copy
(
8
,
n
ThirdSl
ashPos
-
8
),
INetURLObject
::
DecodeMechanism
::
WithCharset
)
);
if
(
aBasMgrName
==
"."
)
aLibrary
=
pDoc
->
GetTitle
();
else
aLibrary
=
SfxGetpApp
()
->
GetName
();
// Get the macro name
aMacroName
=
aScript
.
copy
(
n
HashPos
+
1
,
nArgsPos
-
nH
ashPos
-
1
);
aMacroName
=
aScript
.
copy
(
n
ThirdSlashPos
+
1
,
nArgsPos
-
nThirdSl
ashPos
-
1
);
}
else
{
...
...
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