1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: bibmod.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_extensions.hxx"
35 #include <tools/resmgr.hxx>
36 #include <tools/urlobj.hxx>
37 #include <svtools/urihelper.hxx>
38 #include <com/sun/star/container/XNameAccess.hpp>
39 #include <com/sun/star/util/XLocalizedAliases.hpp>
40 #include <com/sun/star/lang/XLocalizable.hpp>
41 #include <tools/debug.hxx>
44 #include "bibresid.hxx"
46 #include "bibconfig.hxx"
47 static PtrBibModul pBibModul
=NULL
;
48 static sal_uInt32 nBibModulCount
=0;
49 #include <ucbhelper/content.hxx>
51 using namespace ::rtl
;
52 using namespace ::com::sun::star
;
53 using namespace ::com::sun::star::uno
;
54 using namespace ::com::sun::star::util
;
55 using namespace ::com::sun::star::lang
;
56 using namespace ::com::sun::star::ucb
;
58 #define C2U(cChar) OUString::createFromAscii(cChar)
59 #define C2S(cChar) String::CreateFromAscii(cChar)
61 HdlBibModul
OpenBibModul()
65 pBibModul
=new BibModul();
71 void CloseBibModul(HdlBibModul ppBibModul
)
74 if(nBibModulCount
==0 && ppBibModul
!=NULL
)
81 BibResId::BibResId( sal_uInt16 nId
) :
82 ResId( nId
, *pBibModul
->GetResMgr() )
85 BibConfig
* BibModul::pBibConfig
= 0;
88 pResMgr
= ResMgr::CreateResMgr( "bib" );
98 BibDataManager
* BibModul::createDataManager()
100 return new BibDataManager();
102 //-----------------------------------------------------------------------------
103 BibConfig
* BibModul::GetConfig()
106 pBibConfig
= new BibConfig
;
112 #define STATIC_USTRING(a,b) rtl::OUString a(b)
113 STATIC_USTRING(FM_PROP_LABEL
,C2U("Label"));
114 STATIC_USTRING(FM_PROP_CONTROLSOURCE
,C2U("DataField"));
115 STATIC_USTRING(FM_PROP_NAME
,C2U("Name"));
116 STATIC_USTRING(FM_PROP_FORMATKEY
,C2U("FormatKey"));
119 STATIC_USTRING(FM_PROP_EDITMODE
,C2U("RecordMode"));
120 STATIC_USTRING(FM_PROP_CURSORSOURCETYPE
,C2U("DataSelectionType"));
121 STATIC_USTRING(FM_PROP_CURSORSOURCE
,C2U("DataSelection"));
122 STATIC_USTRING(FM_PROP_DATASOURCE
, C2U("DataSource"));
124 STATIC_USTRING(FM_PROP_VALUE
,C2U("Value"));
125 STATIC_USTRING(FM_PROP_TEXT
,C2U("Text"));