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
ee2fcbab
Kaydet (Commit)
ee2fcbab
authored
Şub 05, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
C2872: ´Window´ : ambiguous symbol
Change-Id: Id5a342b9fdc5240b70b0985f4c6de9493162f10c
üst
e401b9c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
33 deletions
+33
-33
builder.hxx
include/vcl/builder.hxx
+33
-33
No files found.
include/vcl/builder.hxx
Dosyayı görüntüle @
ee2fcbab
...
@@ -42,7 +42,7 @@ class VCL_DLLPUBLIC VclBuilder: private boost::noncopyable
...
@@ -42,7 +42,7 @@ class VCL_DLLPUBLIC VclBuilder: private boost::noncopyable
{
{
public
:
public
:
typedef
std
::
map
<
OString
,
OString
>
stringmap
;
typedef
std
::
map
<
OString
,
OString
>
stringmap
;
typedef
Window
*
(
*
customMakeWidget
)(
Window
*
pParent
,
stringmap
&
rVec
);
typedef
::
Window
*
(
*
customMakeWidget
)(
::
Window
*
pParent
,
stringmap
&
rVec
);
private
:
private
:
typedef
boost
::
ptr_map
<
OUString
,
osl
::
Module
>
ModuleMap
;
typedef
boost
::
ptr_map
<
OUString
,
osl
::
Module
>
ModuleMap
;
//We store these until the builder is deleted, that way we can use the
//We store these until the builder is deleted, that way we can use the
...
@@ -71,10 +71,10 @@ private:
...
@@ -71,10 +71,10 @@ private:
struct
WinAndId
struct
WinAndId
{
{
OString
m_sID
;
OString
m_sID
;
Window
*
m_pWindow
;
::
Window
*
m_pWindow
;
short
m_nResponseId
;
short
m_nResponseId
;
PackingData
m_aPackingData
;
PackingData
m_aPackingData
;
WinAndId
(
const
OString
&
rId
,
Window
*
pWindow
,
bool
bVertical
)
WinAndId
(
const
OString
&
rId
,
::
Window
*
pWindow
,
bool
bVertical
)
:
m_sID
(
rId
)
:
m_sID
(
rId
)
,
m_pWindow
(
pWindow
)
,
m_pWindow
(
pWindow
)
,
m_nResponseId
(
RET_CANCEL
)
,
m_nResponseId
(
RET_CANCEL
)
...
@@ -182,7 +182,7 @@ private:
...
@@ -182,7 +182,7 @@ private:
}
}
};
};
typedef
std
::
map
<
Window
*
,
stringmap
>
AtkMap
;
typedef
std
::
map
<
::
Window
*
,
stringmap
>
AtkMap
;
struct
ParserState
struct
ParserState
{
{
...
@@ -207,7 +207,7 @@ private:
...
@@ -207,7 +207,7 @@ private:
Translations
m_aTranslations
;
Translations
m_aTranslations
;
std
::
map
<
Window
*
,
Window
*>
m_aRedundantParentWidgets
;
std
::
map
<
::
Window
*
,
::
Window
*>
m_aRedundantParentWidgets
;
std
::
vector
<
SizeGroup
>
m_aSizeGroups
;
std
::
vector
<
SizeGroup
>
m_aSizeGroups
;
...
@@ -224,17 +224,17 @@ private:
...
@@ -224,17 +224,17 @@ private:
OString
m_sID
;
OString
m_sID
;
OString
m_sHelpRoot
;
OString
m_sHelpRoot
;
ResHookProc
m_pStringReplace
;
ResHookProc
m_pStringReplace
;
Window
*
m_pParent
;
::
Window
*
m_pParent
;
bool
m_bToplevelHasDeferredInit
;
bool
m_bToplevelHasDeferredInit
;
bool
m_bToplevelHasDeferredProperties
;
bool
m_bToplevelHasDeferredProperties
;
bool
m_bToplevelParentFound
;
bool
m_bToplevelParentFound
;
ParserState
*
m_pParserState
;
ParserState
*
m_pParserState
;
Window
*
get_by_name
(
OString
sID
);
::
Window
*
get_by_name
(
OString
sID
);
void
delete_by_name
(
OString
sID
);
void
delete_by_name
(
OString
sID
);
class
sortIntoBestTabTraversalOrder
class
sortIntoBestTabTraversalOrder
:
public
std
::
binary_function
<
const
Window
*
,
const
Window
*
,
bool
>
:
public
std
::
binary_function
<
const
::
Window
*
,
const
::
Window
*
,
bool
>
{
{
VclBuilder
*
m_pBuilder
;
VclBuilder
*
m_pBuilder
;
public
:
public
:
...
@@ -242,22 +242,22 @@ private:
...
@@ -242,22 +242,22 @@ private:
:
m_pBuilder
(
pBuilder
)
:
m_pBuilder
(
pBuilder
)
{
{
}
}
bool
operator
()(
const
Window
*
pA
,
const
Window
*
pB
)
const
;
bool
operator
()(
const
::
Window
*
pA
,
const
::
Window
*
pB
)
const
;
};
};
/// XFrame to be able to extract labels and other properties of the UNO commands (like of .uno:Bold).
/// XFrame to be able to extract labels and other properties of the UNO commands (like of .uno:Bold).
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>
m_xFrame
;
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>
m_xFrame
;
public
:
public
:
VclBuilder
(
Window
*
pParent
,
OUString
sUIRootDir
,
OUString
sUIFile
,
VclBuilder
(
::
Window
*
pParent
,
OUString
sUIRootDir
,
OUString
sUIFile
,
OString
sID
=
OString
(),
OString
sID
=
OString
(),
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
frame
::
XFrame
>
&
rFrame
=
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
frame
::
XFrame
>
());
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
frame
::
XFrame
>
&
rFrame
=
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
frame
::
XFrame
>
());
~
VclBuilder
();
~
VclBuilder
();
Window
*
get_widget_root
();
::
Window
*
get_widget_root
();
//sID must exist and be of type T
//sID must exist and be of type T
template
<
typename
T
>
T
*
get
(
T
*&
ret
,
OString
sID
)
template
<
typename
T
>
T
*
get
(
T
*&
ret
,
OString
sID
)
{
{
Window
*
w
=
get_by_name
(
sID
);
::
Window
*
w
=
get_by_name
(
sID
);
SAL_WARN_IF
(
!
w
,
"vcl.layout"
,
"widget
\"
"
<<
sID
.
getStr
()
<<
"
\"
not found in .ui"
);
SAL_WARN_IF
(
!
w
,
"vcl.layout"
,
"widget
\"
"
<<
sID
.
getStr
()
<<
"
\"
not found in .ui"
);
SAL_WARN_IF
(
!
dynamic_cast
<
T
*>
(
w
),
SAL_WARN_IF
(
!
dynamic_cast
<
T
*>
(
w
),
"vcl.layout"
,
".ui widget
\"
"
<<
sID
.
getStr
()
<<
"
\"
needs to correspond to vcl type "
<<
typeid
(
T
).
name
());
"vcl.layout"
,
".ui widget
\"
"
<<
sID
.
getStr
()
<<
"
\"
needs to correspond to vcl type "
<<
typeid
(
T
).
name
());
...
@@ -273,9 +273,9 @@ public:
...
@@ -273,9 +273,9 @@ public:
return
ret
;
return
ret
;
}
}
//sID may not exist, but must be of type T if it does
//sID may not exist, but must be of type T if it does
template
<
typename
T
/*= Window if we had c++11*/
>
T
*
get
(
OString
sID
)
template
<
typename
T
/*=
::
Window if we had c++11*/
>
T
*
get
(
OString
sID
)
{
{
Window
*
w
=
get_by_name
(
sID
);
::
Window
*
w
=
get_by_name
(
sID
);
SAL_WARN_IF
(
w
&&
!
dynamic_cast
<
T
*>
(
w
),
SAL_WARN_IF
(
w
&&
!
dynamic_cast
<
T
*>
(
w
),
"vcl.layout"
,
".ui widget
\"
"
<<
sID
.
getStr
()
<<
"
\"
needs to correspond to vcl type "
<<
typeid
(
T
).
name
());
"vcl.layout"
,
".ui widget
\"
"
<<
sID
.
getStr
()
<<
"
\"
needs to correspond to vcl type "
<<
typeid
(
T
).
name
());
assert
(
!
w
||
dynamic_cast
<
T
*>
(
w
));
assert
(
!
w
||
dynamic_cast
<
T
*>
(
w
));
...
@@ -285,13 +285,13 @@ public:
...
@@ -285,13 +285,13 @@ public:
PopupMenu
*
get_menu
(
OString
sID
);
PopupMenu
*
get_menu
(
OString
sID
);
//given an sID return the response value for that widget
//given an sID return the response value for that widget
short
get_response
(
const
Window
*
pWindow
)
const
;
short
get_response
(
const
::
Window
*
pWindow
)
const
;
OString
get_by_window
(
const
Window
*
pWindow
)
const
;
OString
get_by_window
(
const
::
Window
*
pWindow
)
const
;
void
delete_by_window
(
const
Window
*
pWindow
);
void
delete_by_window
(
const
::
Window
*
pWindow
);
//apply the properties of rProps to pWindow
//apply the properties of rProps to pWindow
static
void
set_properties
(
Window
*
pWindow
,
const
stringmap
&
rProps
);
static
void
set_properties
(
::
Window
*
pWindow
,
const
stringmap
&
rProps
);
//Convert _ gtk markup to ~ vcl markup
//Convert _ gtk markup to ~ vcl markup
static
OString
convertMnemonicMarkup
(
const
OString
&
rIn
);
static
OString
convertMnemonicMarkup
(
const
OString
&
rIn
);
...
@@ -310,17 +310,17 @@ public:
...
@@ -310,17 +310,17 @@ public:
void
setDeferredProperties
();
void
setDeferredProperties
();
//Helpers to retrofit all the existing code to the builder
//Helpers to retrofit all the existing code to the builder
static
void
reorderWithinParent
(
std
::
vector
<
Window
*>&
rChilds
,
bool
bIsButtonBox
);
static
void
reorderWithinParent
(
std
::
vector
<
::
Window
*>&
rChilds
,
bool
bIsButtonBox
);
static
void
reorderWithinParent
(
Window
&
rWindow
,
sal_uInt16
nNewPosition
);
static
void
reorderWithinParent
(
::
Window
&
rWindow
,
sal_uInt16
nNewPosition
);
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>
getFrame
()
{
return
m_xFrame
;
}
css
::
uno
::
Reference
<
css
::
frame
::
XFrame
>
getFrame
()
{
return
m_xFrame
;
}
private
:
private
:
Window
*
insertObject
(
Window
*
pParent
,
::
Window
*
insertObject
(
::
Window
*
pParent
,
const
OString
&
rClass
,
const
OString
&
rID
,
const
OString
&
rClass
,
const
OString
&
rID
,
stringmap
&
rProps
,
stringmap
&
rPangoAttributes
,
stringmap
&
rProps
,
stringmap
&
rPangoAttributes
,
stringmap
&
rAtkProps
,
std
::
vector
<
OString
>
&
rItems
);
stringmap
&
rAtkProps
,
std
::
vector
<
OString
>
&
rItems
);
Window
*
makeObject
(
Window
*
pParent
,
::
Window
*
makeObject
(
::
Window
*
pParent
,
const
OString
&
rClass
,
const
OString
&
rID
,
const
OString
&
rClass
,
const
OString
&
rID
,
stringmap
&
rVec
,
const
std
::
vector
<
OString
>
&
rItems
);
stringmap
&
rVec
,
const
std
::
vector
<
OString
>
&
rItems
);
...
@@ -338,10 +338,10 @@ private:
...
@@ -338,10 +338,10 @@ private:
void
handleTranslations
(
xmlreader
::
XmlReader
&
reader
);
void
handleTranslations
(
xmlreader
::
XmlReader
&
reader
);
void
handleChild
(
Window
*
pParent
,
xmlreader
::
XmlReader
&
reader
);
void
handleChild
(
::
Window
*
pParent
,
xmlreader
::
XmlReader
&
reader
);
Window
*
handleObject
(
Window
*
pParent
,
xmlreader
::
XmlReader
&
reader
);
::
Window
*
handleObject
(
::
Window
*
pParent
,
xmlreader
::
XmlReader
&
reader
);
void
handlePacking
(
Window
*
pCurrent
,
xmlreader
::
XmlReader
&
reader
);
void
handlePacking
(
::
Window
*
pCurrent
,
xmlreader
::
XmlReader
&
reader
);
void
applyPackingProperty
(
Window
*
pCurrent
,
xmlreader
::
XmlReader
&
reader
);
void
applyPackingProperty
(
::
Window
*
pCurrent
,
xmlreader
::
XmlReader
&
reader
);
void
collectProperty
(
xmlreader
::
XmlReader
&
reader
,
const
OString
&
rID
,
stringmap
&
rVec
);
void
collectProperty
(
xmlreader
::
XmlReader
&
reader
,
const
OString
&
rID
,
stringmap
&
rVec
);
void
collectPangoAttribute
(
xmlreader
::
XmlReader
&
reader
,
stringmap
&
rMap
);
void
collectPangoAttribute
(
xmlreader
::
XmlReader
&
reader
,
stringmap
&
rMap
);
void
collectAtkAttribute
(
xmlreader
::
XmlReader
&
reader
,
stringmap
&
rMap
);
void
collectAtkAttribute
(
xmlreader
::
XmlReader
&
reader
,
stringmap
&
rMap
);
...
@@ -356,21 +356,21 @@ private:
...
@@ -356,21 +356,21 @@ private:
void
handleRow
(
xmlreader
::
XmlReader
&
reader
,
const
OString
&
rID
,
sal_Int32
nRowIndex
);
void
handleRow
(
xmlreader
::
XmlReader
&
reader
,
const
OString
&
rID
,
sal_Int32
nRowIndex
);
void
handleAdjustment
(
const
OString
&
rID
,
stringmap
&
rProperties
);
void
handleAdjustment
(
const
OString
&
rID
,
stringmap
&
rProperties
);
void
handleTextBuffer
(
const
OString
&
rID
,
stringmap
&
rProperties
);
void
handleTextBuffer
(
const
OString
&
rID
,
stringmap
&
rProperties
);
void
handleTabChild
(
Window
*
pParent
,
xmlreader
::
XmlReader
&
reader
);
void
handleTabChild
(
::
Window
*
pParent
,
xmlreader
::
XmlReader
&
reader
);
void
handleMenu
(
xmlreader
::
XmlReader
&
reader
,
const
OString
&
rID
);
void
handleMenu
(
xmlreader
::
XmlReader
&
reader
,
const
OString
&
rID
);
std
::
vector
<
OString
>
handleItems
(
xmlreader
::
XmlReader
&
reader
,
const
OString
&
rID
);
std
::
vector
<
OString
>
handleItems
(
xmlreader
::
XmlReader
&
reader
,
const
OString
&
rID
);
void
handleSizeGroup
(
xmlreader
::
XmlReader
&
reader
,
const
OString
&
rID
);
void
handleSizeGroup
(
xmlreader
::
XmlReader
&
reader
,
const
OString
&
rID
);
void
handleAtkObject
(
xmlreader
::
XmlReader
&
reader
,
const
OString
&
rID
,
Window
*
pWindow
);
void
handleAtkObject
(
xmlreader
::
XmlReader
&
reader
,
const
OString
&
rID
,
::
Window
*
pWindow
);
void
handleActionWidget
(
xmlreader
::
XmlReader
&
reader
);
void
handleActionWidget
(
xmlreader
::
XmlReader
&
reader
);
PackingData
get_window_packing_data
(
const
Window
*
pWindow
)
const
;
PackingData
get_window_packing_data
(
const
::
Window
*
pWindow
)
const
;
void
set_window_packing_position
(
const
Window
*
pWindow
,
sal_Int32
nPosition
);
void
set_window_packing_position
(
const
::
Window
*
pWindow
,
sal_Int32
nPosition
);
Window
*
prepareWidgetOwnScrolling
(
Window
*
pParent
,
WinBits
&
rWinStyle
);
::
Window
*
prepareWidgetOwnScrolling
(
::
Window
*
pParent
,
WinBits
&
rWinStyle
);
void
cleanupWidgetOwnScrolling
(
Window
*
pScrollParent
,
Window
*
pWindow
,
stringmap
&
rMap
);
void
cleanupWidgetOwnScrolling
(
::
Window
*
pScrollParent
,
::
Window
*
pWindow
,
stringmap
&
rMap
);
void
set_response
(
OString
sID
,
short
nResponse
);
void
set_response
(
OString
sID
,
short
nResponse
);
};
};
...
@@ -401,7 +401,7 @@ public:
...
@@ -401,7 +401,7 @@ public:
{
{
return
m_pUIBuilder
->
get
<
T
>
(
ret
,
sID
);
return
m_pUIBuilder
->
get
<
T
>
(
ret
,
sID
);
}
}
template
<
typename
T
/*= Window if we had c++11*/
>
T
*
get
(
OString
sID
)
template
<
typename
T
/*=
::
Window if we had c++11*/
>
T
*
get
(
OString
sID
)
{
{
return
m_pUIBuilder
->
get
<
T
>
(
sID
);
return
m_pUIBuilder
->
get
<
T
>
(
sID
);
}
}
...
...
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